Stock and flow

Every barrel is booked.

A ledger moves a stock along each relation, one day a step. A flow that leaves the model goes to a boundary account, so the total is conserved to round-off.

A geoeconomics simulation on a globe in the CommandAGI workbench: oil flows from the Persian Gulf to China, India, Japan, South Korea, Europe and the United States drawn as arcs, each country coloured by its oil inflow, while the globe turns slowly from the Gulf toward the Pacific.
Recorded in the workbench: the geo-hormuz world on its globe. Its numbers are illustrative, not data.

The ledger

dS/dt = inflow − outflow.

A ledger reads the relations of one kind. Each entity's restriction withholds that share of its outbound flow, and the stock is never clamped.

How the oil ledger moves a stockThe rest of the world is a boundary account. Production flows from it to Saudi Arabia, Iran and the UAE, which ship oil to China, India, Japan and the others. The strait's closure sets each exporter's restriction, which withholds that share of its outbound flow, and each importer's consumption flows back to the boundary. Stocks plus the boundary's account are conserved.productionmb/d, less what is withheldrestrictionconsumptionRest of the worlda boundary accountSaudi Arabia · Iran · UAErestriction = exposure ×closureStrait of Hormuzclosure, from the gameChina · India · Japan ·Korea · EUstrategic stocks, millionbarrelsHow the oil ledger moves a stockThe rest of the world is a boundary account. Production flows from it to Saudi Arabia, Iran and the UAE, which ship oil to China, India, Japan and the others. The strait's closure sets each exporter's restriction, which withholds that share of its outbound flow, and each importer's consumption flows back to the boundary. Stocks plus the boundary's account are conserved.productionmb/d, less what is withheldrestrictionconsumptionRest of the worlda boundary accountSaudi Arabia ·Iran · UAErestriction =exposure ×closureStrait ofHormuzclosure, from thegameChina · India · Japan · Korea · EUstrategic stocks, million barrels

120 days, read every 10.

scripts/sites/case-studies.mjs hormuz stepped the shipped world in the one engine (sim-engine.js) at its own parameters: escalation 1.8, Saudi exposure 0.6. The world says of itself: illustrative, not calibrated.

cloud://global/examples/template-library/worlds/geo-hormuz/world.tsxthe engine's numbers · simulation · 2026-11-04
day   0  closure  0.0%  price  $80.0  China 900.0  India 70.0  Japan 480.0  residual 0
day  20  closure 30.5%  price  $87.0  China 897.7  India 69.3  Japan 478.9  residual -4.5e-13
day  40  closure 43.7%  price $114.7  China 877.3  India 62.8  Japan 469.8  residual -2.3e-12
day  70  closure 44.2%  price $117.2  China 844.7  India 52.5  Japan 455.1  residual -2.7e-12
day  90  closure  0.0%  price  $91.5  China 833.4  India 49.0  Japan 450.1  residual -3.2e-12
day 120  closure  0.0%  price  $80.1  China 833.4  India 49.0  Japan 450.1  residual -3.2e-12

The drawdown

India loses 30% of its stock.

India's stock falls from 70.0 to 49.0 million barrels; China's from 900 to 833.4. After the strait opens, inflow and outflow balance again, so the stocks hold where they fell (case-studies/hormuz/stats.json).

Conserved, and checked. The run records oil.total and oil.residual each step. Here the residual never passed 5 × 10⁻¹² mb. Structural, not a forecast. A ledger is an accounting identity. Every surface that shows its numbers says so. One file. The entities, the relations and the three systems are one world.tsx. Change a rate and run it again.

million barrels in India's reserve
70.0 → 49.0
million barrels in China's
900 → 833.4
mb, the largest residual of the ledger
5 × 10⁻¹²

Simulated

Strategic oil stocks while the strait is closed
Los números
Strategic oil stocks while the strait is closed
DayChinaJapan
0900 mb480 mb
10900 mb480 mb
20898 mb479 mb
30888 mb475 mb
40877 mb470 mb
50866 mb465 mb
60856 mb460 mb
70845 mb455 mb
80836 mb451 mb
90833 mb450 mb
100833 mb450 mb
110833 mb450 mb
120833 mb450 mb
ProcedenciaArchivo cloud://global/examples/template-library/worlds/geo-hormuz/world.tsxResultado case-studies/hormuz/stats.jsonHerramienta scripts/sites/case-studies.mjs hormuz: sim-engine.jsSe ejecutó en This computer (dell-gb10-1)Cuándo

Close the strait yourself.

Open the world, change its escalation parameter and run it again.