BAM Engine 0.6.0 consolidates two parallel market-matching implementations into a single vectorized path, delivering ~30% faster simulations.
Vectorized Market Matching#
Previous releases carried both a sequential Python loop path and a vectorized NumPy path for market matching. Version 0.6.0 drops the sequential implementation and keeps only the vectorized one, with a dedicated round function for each market:
- Labor market:
labor_market_roundreplacesWorkersSendOneRound+FirmsHireWorkers. Batch conflict resolution viaresolve_conflicts(). - Credit market:
credit_market_roundreplacesFirmsSendOneLoanApp+BanksProvideLoans. Firms sorted by projected fragility;grouped_cumsum()tracks per-bank supply exhaustion. - Goods market:
goods_market_roundreplacesConsumersShopSequential. Uses batch-sequential processing (~10 randomized consumer batches).
~30% Faster Simulations#
Vectorized batch matching yields ~30% faster full simulation runs across all economy sizes. See the ASV benchmarks.
Breaking Changes#
- 5 sequential event classes removed:
WorkersSendOneRound,FirmsHireWorkers,FirmsSendOneLoanApp,BanksProvideLoans,ConsumersShopSequential. <->interleave syntax removed from pipeline YAML. Onlyevent x Nrepetition remains.
Simulation Behavior Preserved#
All validation and calibration baselines continue to pass.
Upgrading#
pip install --upgrade bamengine