Millwright: cause a fault, see the plan heal
8 machines, a plan for the next 120 minutes. When a machine stops, the scheduler moves its orders on its own.
- Type
- Our own project
- Who it is for
- Factories: planners and foremen
- Built
- 2026
- Similar project
- Application or system: from 15,000 PLN. Studio pricing and contact
At a glance
A machine stops, and the scheduler moves its order to a machine with a free slot on its own.
A shop floor with no shared picture of the situation
When a machine breaks down or a rush order lands, nobody sees where to move the work or what it will cost.

An algorithm that counts setup time too
Sequence
Critical orders first, then rush, then normal.
Machine choice
The machine with the lowest completion time wins, transport and setup included.
Taking over work
Idle machines take over orders. After a fault the plan is built again.
MCT-S is our own heuristic: it picks the machine with the lowest completion time.
Numbers from the simulation
- 200 ms
- simulation tick, not the time to assign an order
- 8
- machines of three types: CNC, assembly, test
- 25
- first orders of a session set the control chart limits
The shop floor and its breakdowns are simulated.
What an hour of standstill costs in the example
- Output value20,000 PLN/h
- Materials12,000 PLN/h
- Lost value added8,000 PLN/h
For engineers: the technology stack
| Layer | Choice | What it does |
|---|---|---|
| Frontend | Next.js | The screen changes with the state of the floor. |
| State | Zustand | Two views never show two truths. |
| Charts | Recharts | Floor load as a line over time. |
| Export | ExcelJS | The floor report as a sheet for Excel. |
MCT-S (Minimum Completion Time with Setup Awareness) picks the machine greedily. A gap under 0.5 min goes to the machine with no setup; longest order first (LPT) breaks ties.
Methods, assumptions and the full description
The problem on the floor
Orders and machine status live in spreadsheets, on whiteboards and in foremen's heads. When a machine breaks down or a rush order lands, nobody sees where to move the work or what it will cost. Millwright decides where each order goes before anyone can work it out by hand.
The MCT-S algorithm
Sequence: critical orders first, then rush, then normal. A rush order takes the queue position its priority earns, ahead of work already waiting. Machine choice: for each capable machine we compute the order's completion time. It adds the machine's remaining work, processing, transport (5 min) and setup (3 min, when the order type changes). The machine preferred for that order type gets 10% off. The lowest score wins. Taking over work: idle machines scan overloaded queues and take over compatible orders when it pays off. When a machine faults, its orders go back to the pool and get new places. The notice gives the time that took, measured in the browser with performance.now().
Numbers from the simulation
200 ms is the simulation tick: how often the state of the floor refreshes. It is not the time to assign an order. 8 machines of three types (CNC, assembly, test), to which one algorithm assigns the orders. 25 first completed orders of a session set the limits of the lead-time control chart.
OEE
The panel computes real OEE (availability × performance × quality) from each machine's actual downtime and run time, not a canned formula.
What is a fault worth: method
The box “What is a fault worth?” shows a figure in PLN for one fault and one for the whole session, and lets you change both numbers it comes from. The cost of a stopped hour defaults to 8,000 PLN. It is the lost value added in the worked example at utrzymanieruchu.pl (opens in a new tab) (20,000 PLN/h of output less 12,000 PLN/h of materials).
The 15-minute assumption
The second field, 15 minutes of standstill saved by moving the orders, is labelled on screen as an assumption, not a measurement. The session figure is the cost of one fault times the faults the running session has actually resolved, not an annual projection.
The screenshot
The Floor view mid-run: two machines are down for repair and have handed their orders to the others. The right column shows the guide, the hall's OEE and the number of faults recovered.
