CER–macroABM Quickstart¶
Draft pipeline for driving MacroABM with CER Energy Futures 2026 end-use demand (Powering Canada's Growth project).
Prerequisites¶
- Branch:
grid_unlocked_v2on M3-linkages;grid_unlocked_v2on macroabm-ca. - Environment:
m3linkages_envwithtoml,pandas, and MacroABM deps (viauvin macroabm-ca). - Raw data: Point
Models.MacroABM.raw_data_pathat a full macroABMraw_data/tree, or use the bundled test pickle for smoke runs (see smoke scenario configs).
cd dependencies/macroabm-ca
git checkout grid_unlocked_v2
cd ../..
git checkout grid_unlocked_v2
conda activate m3linkages_env
Run both headline scenarios¶
python linkage_cer_macroabm.py
Runs CER Current Measures then CER Net-zero. Outputs land under
scenarios/<scenario>/macroabm/.
Run a single scenario¶
python linkage_cer_macroabm.py -sc "CER Net-zero"
Smoke test (2030 horizon, test pickle)¶
python linkage_cer_macroabm.py -t
Unit tests (data processing only)¶
python scripts/test_cer_data_processor.py
Outputs¶
scenarios/CER Current Measures/macroabm/
├── cer_data/ # processed linkage matrices
├── gdp_growth.json
├── gdp_growth_by_period.json
├── simulation_shallow.h5
└── production_annual_01_CAN_*.csv
See the methodology for mapping and processing details.