Home▸Economics & Social Systems▸Supply Chain Port Shock (2D)

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.

Economics & Social Systems2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-supply-chain-port-shock ↗ Open standalone

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.

⚙ Under the hood

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.

supply chainqueueing theoryport logisticsbuffer stockinventory managementbullwhip effect

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

Why does the queue keep growing even without a port closure?

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.

What does the "buffer stock" slider actually control?

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.

What happens during a port closure?

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.

What did you find?

Add reproduction steps (optional)