โ† QueueSim home  ยท  All models

TV Inspection โ€” README

TV Inspection and Adjustment

Simulates a TV production line quality control process with a feedback loop for rework.

Problem

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.

Model in this directory

The model utilizes a state-machine approach for the TV puck:

Why this shape

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.

Alternatives considered

What this example teaches

Running it

odin run examples/tv_inspection

CLI

./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

See also