The model as a stock-and-flow diagram: stocks are boxes, flows are valves on pipes, auxiliaries are circles, and clouds mark the model's boundary. The curved arrows are drawn from the equations themselves. Click any variable to see its equation, what it reads, what reads it, and its values in your plan's run.
All equations
How the model and the decomposition work
The model is a production and workforce chain in the style of Sterman, Business Dynamics, ch. 17–19. Orders build a backlog and are shipped from inventory. Production starts enter a supply line (a third-order delay of the production lead time) before they become inventory. Production follows the workforce, with ±20% flexible working time. New people come through vacancies (the hiring delay) and training (half as productive until trained).
Decision rules (anchor and adjust). Production starts = expected demand + inventory gap / TAI + wSL · supply-line gap / TASL. Hiring = attrition + workforce gap / TAW + wV · vacancy gap / TAV. The workforce target follows either the capacity the production plan needs or the inventory gap, which is blind to the work already in the pipeline.
The decomposition. Overshoot is the production above demand after the step (below it, for a step down), counted only where it happens: over a whole run, the net extra production always equals the refill, so a net measure would hide the oscillation. The necessary refill is (inventory coverage + lead time − delivery delay) × the change in demand: a bigger inventory and pipeline to fill, less of it waiting as backlog. Structure is what run (c) produces beyond that. Policy is (b) − (c), and forecast is (a) − (b). The four add up to your plan's overshoot exactly. A layer can be negative: a slow forecast sometimes damps an aggressive policy.
The model, the decomposition and their tests are in lag-lab/: an analytic check of the delay and smoothing, exact conservation of material and people, and the textbook results that ignoring the supply line oscillates and full accounting does not.