Skip to main content
Back to Prompt Library
implementation

Build the application

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build a WIP Line Balancing and Dynamic Workstation Dispatcher

Format
Code-aware
Lines
97
Sections
11
Linked challenge
Build a WIP Line Balancing and Dynamic Workstation Dispatcher

Prompt source

Original prompt text with formatting preserved for inspection.

97 lines
11 sections
No variables
1 code block
## Build
Correlate simulated open62541 station cycle times to identify starvation risks in multi-stage production lines. Propose prioritized buffer dispatch schedules to balance hourly takt time.

## User
Manufacturing Operations Supervisor

## Workflow
1. Extract station cycle times and buffer levels from simulated open62541 server records.
2. Compute actual takt time vs target takt time across sequential manufacturing stages.
3. Detect workstations experiencing starvation or impending buffer overflow.
4. Construct a revised WIP lot dispatch manifest to re-align line flow with target takt.

## Interface
Interactive takt-time balancing chart showing buffer deltas, stage starvation alerts, and lot routing dispatch options.

## Data
Synthetic station telemetry feeds containing cycle time history, buffer count changes, and parts rejected counts.
Starter examples below are synthetic. They are not downloaded records.

## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
Extracts station runtime telemetry and discrete production counters mapped to open62541 OPC UA information nodes.

## Tools
crewai, pandas, fastapi.
CrewAI facilitates multi-agent role division between line bottleneck analysis and dispatch schedule creation.
Local or hosted LLM with multi-step reasoning capabilities for dispatch logic.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Detects stations whose actual cycle time deviates more than 15% from line takt time.
- Prioritizes starved stations in dispatch schedule output.
- Ensures proposed lot moves do not breach downstream buffer limits.

## Starter Examples
```json
[
  {
    "input": {
      "target_takt_s": 45,
      "stations": [
        {
          "station_id": "STAGE-1",
          "avg_cycle_s": 44,
          "buffer_downstream": 8,
          "buffer_max": 10
        },
        {
          "station_id": "STAGE-2",
          "avg_cycle_s": 58,
          "buffer_downstream": 1,
          "buffer_max": 10
        },
        {
          "station_id": "STAGE-3",
          "avg_cycle_s": 42,
          "buffer_downstream": 5,
          "buffer_max": 10
        }
      ]
    },
    "expected_output": {
      "limiting_stage": "STAGE-2",
      "starvation_risk_stage": "STAGE-3",
      "dispatch_recommendation": "Throttle STAGE-1 feeding; route parallel bypass lots to STAGE-3 reserve queue.",
      "takt_variance_s": 13
    }
  },
  {
    "input": {
      "target_takt_s": 45,
      "stations": [
        {
          "station_id": "STAGE-1",
          "avg_cycle_s": 44.5,
          "buffer_downstream": 5,
          "buffer_max": 10
        },
        {
          "station_id": "STAGE-2",
          "avg_cycle_s": 45.1,
          "buffer_downstream": 5,
          "buffer_max": 10
        },
        {
          "station_id": "STAGE-3",
          "avg_cycle_s": 44.8,
          "buffer_downstream": 5,
          "buffer_max": 10
        }
      ]
    },
    "expected_output": {
      "limiting_stage": "NONE",
      "starvation_risk_stage": "NONE",
      "dispatch_recommendation": "Maintain standard dispatch sequencing.",
      "takt_variance_s": 0.5
    }
  }
]
```

## Safety
Simulated dispatch recommendations; all shop floor actions remain subject to operator execution.
Use mock external writes. Require human review before any real deployment.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Hold the task contract and output shape stable so generated implementations remain comparable.

Tune next

Update libraries, interfaces, and environment assumptions to match the stack you actually run.

Verify after

Test failure handling, edge cases, and any code paths that depend on hidden context or secrets.