BAM Engine 0.7.0 replaces the batch-sequential goods market with a pure sequential implementation, eliminating inventory collisions and delivering 6.5% faster simulations.

Sequential Goods Market#

The v0.6.0 goods market processed consumers in ~10 randomized batches. Within each batch, consumers shopped simultaneously, which caused “phantom goods” overselling: multiple consumers could purchase from the same firm’s inventory slot before stock was updated.

Version 0.7.0 switches to a pure sequential loop: each consumer completes all shopping visits before the next consumer starts. This eliminates within-batch inventory collisions entirely.

Performance#

The sequential approach is 6.5% faster for full simulations, with goods_market_round itself dropping 35% in execution time. See the ASV benchmarks.

Validation Metric Update#

The price_ratio_floor metric (Growth+) now uses the 1st percentile instead of the global minimum, filtering transient demand surges at full employment while still catching genuine deflationary spirals. Its weight was also lowered from 3.0 to 2.0.

Seed-Stability Testing Overhaul#

  • Stability tests upgraded from 20 to 100 seeds per scenario with parallel execution.
  • New bench_seed_stability.py, a 1000-seed benchmark runner with JSON output, git-worktree support, and CLI for running across tags and commits.
  • New validation-status.yml CI workflow reads pre-computed benchmark JSON with zero simulation in CI. Results are available on the validation dashboard.

Upgrading#

pip install --upgrade bamengine