โ QueueSim home ยท All models
Simulates a TV production line quality control process with a feedback loop for rework.
TV sets arrive from a production line and first undergo inspection. The inspection station is staffed by two parallel inspectors. If a TV passes inspection, it leaves the system. If it fails (with a 15% probability), it must be sent to a single adjuster for repair. Once adjusted, the TV is routed back to the inspection station to be verified again. This creates a feedback loop where a single TV may visit the inspection station multiple times.
This is based on the "TV Inspection and Adjustment" problem from Schriber-1974 and reprinted in Schriber-GPSS/H.
The model utilizes a state-machine approach for the TV puck:
TV puck (lines 46-118): The puck transitions through several states: Arriving \(\rightarrow\) WaitingForInspection \(\rightarrow\) BeingInspected \(\rightarrow\) WaitingForAdjustment \(\rightarrow\) BeingAdjusted \(\rightarrow\) Done.sim.Storage (line 26): The inspection station is modeled as a multi-server resource, allowing up to two TVs to be inspected simultaneously.sim.Facility (line 27): The adjustment station is a single-server resource.BeingAdjusted triggers a call to try_enter_inspection (line 116), sending the puck back to the start of the inspection process.The use of sim.Storage for inspection is necessary to model the parallel nature of the two inspectors. The la-puck idiom for "rework" is implemented as a simple state transition. By returning the puck to the try_enter_inspection procedure, the model naturally handles the re-entry into the multi-server queue without needing complex routing logic.
The la-puck's state machine (lines 62-118) explicitly separates "Waiting" from "Being Processed" (e.g., WaitingForInspection vs BeingInspected). This allows the model to accurately track and report wait times separately from service times.
sim.Storage) and single-server resources (sim.Facility) in one workflow.odin run examples/tv_inspection
./tv_inspection [options]
Add --json to emit the uniform envelope (metadata, execution_stats,
metrics, details) instead of the default text output.
| Flag | Type | Default | Description |
|---|---|---|---|
--json |
bool | false |
Emit uniform JSON envelope instead of text. |
Example runs:
./tv_inspection # default text run
./tv_inspection --json # uniform envelope
docs/puck-modeling-patterns.md for feedback loop patterns.