Presets
Demand and target
Controller (PID)
Clock
Options
Model check
The science
A work queue is a leaky tank. Jobs arrive at rate lambda (jobs/min); each service pod clears mu = 2 jobs/min. The backlog B is the controlled variable and the number of running pods s is what the controller changes. Pods cannot appear instantly: the actuator is a first-order lag with time constant tau (shift, hiring or set-up time).
dB/dt = lambda - mu s, ds/dt = (u - s)/tau, u = Kp e + Ki Int(e) + Kd de/dt, e = B - B_set.
The 2D view: block diagram and pole map
With G(s) = mu / (s (tau s + 1)) and the PID controller C(s), the closed-loop poles are the roots of tau s^3 + (1 + mu Kd) s^2 + mu Kp s + mu Ki = 0. On the s-plane a pole in the left half is a decaying mode; a complex pair -sigma +- i omega means oscillation of period 2 pi / omega; a pole in the shaded right half means the loop diverges. The grey curve is the root locus: where the poles travel as Kp is swept with everything else fixed. Stable iff (1+mu Kd) mu Kp > tau mu Ki (Routh-Hurwitz).
With Ki = 0 the backlog settles at an offset e_ss = lambda/(mu Kp) above target; with Ki > 0 the integral removes it.
Checks
A separate RK4 integration of the linear loop is compared with the steady-state offset, the oscillation period from the roots, and the Routh-Hurwitz verdict. 2D-only: Vieta's relations for the three poles (sum = -(1+mu Kd)/tau, product = -mu Ki/tau) and the residual of the cubic at each root.
Honest simplifications
Arrivals are a smooth rate, not random: real queues add randomness and need queueing theory on top. This models a flow of jobs, not people, and says nothing about how individual employees should be assessed. With saturation (0 to 12 pods) and B >= 0 the loop is nonlinear, so the closed-form numbers apply only to the unsaturated regime. Parameter values are illustrative.