Supply Chain Port Shock (2D)
Ships arrive at random for a limited number of port berths; a downstream buffer stock has to absorb the backlog whenever a simulated port closure halts new berth assignments.
This 2D companion turns "port shock" into an actual queueing model instead of a decorative scene: ships arrive at random intervals, wait in a queue when every berth is busy, occupy a berth for a handling time you control, and release cargo into a downstream warehouse that drains at a constant demand rate. Triggering a port closure freezes new berth assignments for 48 simulated hours, so you can watch the queue back up and the warehouse buffer — sized by the "buffer stock" slider — either absorb the disruption or run dry.
A multi-berth queueing simulation (Poisson ship arrivals, finite-capacity berths, FIFO queue) feeds a downstream inventory buffer that depletes at a constant demand rate and refills only when ships finish unloading, exposing how buffer-stock sizing trades off against port-closure risk.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
Whenever the ship arrival rate exceeds what the berths can process (arrivals × handling time > berths × available hours), the queue grows unboundedly — the same overload condition that drives real port congestion.
It sets how many days of downstream demand the warehouse can hold in reserve before a shipment arrives. A larger buffer absorbs a longer port closure without the warehouse running out.
No ship already in a queue can start unloading — berths finish whatever they were servicing but accept no new ships for 48 simulated hours, so the queue and backlog risk climb while inventory drains unreplenished.