Build a Work-in-Progress Conveyor Transfer and Reroute Dispatcher — implementation
Linked challenge: Build a Work-in-Progress Conveyor Transfer and Reroute Dispatcher
Prompt source
implementation109 lines11 sectionsNo variables1 code block
## Build
Track simulated conveyor queue jams and workstation cycle delays. Synthesize dynamic lot reroute proposals across parallel assembly lines to protect target throughput.
## User
Manufacturing Line Dispatch Supervisor
## Workflow
1. Ingest simulated open62541 OPC UA sensor signals indicating conveyor station occupancy.
2. Identify accumulation bottlenecks and downstream queue overflows across cells.
3. Calculate alternate routing paths based on station availability and remaining work duration.
4. Format structured lot transfer proposals for floor supervisor authorization.
## Interface
Interactive conveyor flow topology with congested line warnings and lot transfer approval cards.
## Data
Create synthetic JSON streams containing conveyor photoelectric sensor states and pallet RFID tags. Serve via local Python WebSocket.
Starter examples below are synthetic. They are not downloaded records.
## Source
[open62541 OPC UA](https://raw.githubusercontent.com/open62541/open62541/master/README.md)
OPC UA information model representing conveyor status, sensor variables, and sub-assembly line telemetry from open62541.
## Tools
ray-serve, pydantic, fastapi.
Ray Serve enables high-concurrency simulation of parallel assembly lines and queue state evaluation.
Low-latency LLM endpoint for real-time queue classification and dispatch formulation.
## 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 conveyor line congestion when pallet accumulation exceeds buffer limits.
- Proposes valid diversion routes matching part process constraints.
- Rejects diversion routes that would starve upstream critical path operations.
## Starter Examples
```json
[
{
"input": {
"conveyor_zones": [
{
"zone_id": "ZONE_C1",
"capacity": 10,
"current_occupancy": 10,
"status": "CONGESTED"
},
{
"zone_id": "ZONE_C2",
"capacity": 10,
"current_occupancy": 3,
"status": "NOMINAL"
}
],
"divert_points": [
{
"divert_id": "DIVERT_01",
"source_zone": "ZONE_C1",
"target_zone": "ZONE_C2",
"active": true
}
],
"queued_lot": {
"lot_id": "LOT_404",
"recipe_type": "TYPE_B",
"compatible_lines": [
"ZONE_C1",
"ZONE_C2"
]
}
},
"expected_output": {
"reroute_recommended": true,
"lot_id": "LOT_404",
"target_zone": "ZONE_C2",
"diversion_path": "DIVERT_01",
"rationale": "ZONE_C1 at capacity; diverting LOT_404 preserves line throughput."
}
},
{
"input": {
"conveyor_zones": [
{
"zone_id": "ZONE_C1",
"capacity": 10,
"current_occupancy": 5,
"status": "NOMINAL"
},
{
"zone_id": "ZONE_C2",
"capacity": 10,
"current_occupancy": 4,
"status": "NOMINAL"
}
],
"divert_points": [],
"queued_lot": {
"lot_id": "LOT_405",
"recipe_type": "TYPE_A",
"compatible_lines": [
"ZONE_C1"
]
}
},
"expected_output": {
"reroute_recommended": false,
"lot_id": "LOT_405",
"target_zone": "ZONE_C1",
"diversion_path": null,
"rationale": "Line loading balanced; no reroute required."
}
}
]
```
## Safety
Read-only simulation. Dispatch and diversion outputs are displayed as suggestions for human operator confirmation.
Use mock external writes. Require human review before any real deployment.