Devlog  /  sim build 0.0.1

The Whipsaw

A stock-flow-consistent economy simulation, written in Rust. This is the build log: what broke, what the numbers actually said, and which of my own instruments turned out to be lying.

Rounding keeps one unit afloat forever

problem: input-output matrix did not converge in 200 iterations
data:    a→b cycle with coefficients 0.5 and 0.6, spectral radius 0.548

Spectral radius 0.548. The matrix is productive, obviously productive, and the Leontief check still sat through 200 iterations waiting for the powers to go to zero.

It isn’t the matrix. It’s the rounding. Half away from zero turns 1 × 0.5 straight back into 1, so a single unit at 1e-9 never decays. Just sits on the quantisation floor.

Which isn’t a bug. That’s what the arithmetic does. But it’s going to bite twice more: perishability per tick, and equipment retirement. Stock that should rot away parks itself at one milli-unit and stays in the model for good.

So either I zero anything under a threshold explicitly, or I come back and read this entry the day eternal dust turns up in the warehouses.