Module summaries are read from each file's docstring, and the command list from the CLI
itself — so this page cannot drift from the code.
| Module | Layer | Role |
|---|
model_structure.py | structure | OSeCAN — CANadian OSeMOSYS Energy · model structure (v0.3 — multi-grid + UDC) |
sets_n_ratios.py | structure | OSeCAN set builder — v0.3 multi-grid (single REGION) + UDC. |
data/retrieve.py | data | Stage 0 — retrieve open datasets into data/external/ with provenance. |
data/profile.py | data | Stage-1 helper — profile a raw dataset before writing a cleaner. |
data/clean_demand.py | data | Stage 1->3 cleaner — CER end-use-demand-2026.csv -> SpecifiedAnnualDemand (v0.3 multi-grid). |
data/build_params.py | data | Build a COMPLETE placeholder parameter set for OSeCAN (v0.3 multi-grid + UDC). |
data/harmonize.py | data | Harmonization — check Stage-3 params against the built SETS. |
pipeline/assemble.py | pipeline | Assemble a complete otoole input directory from SETS + params. |
pipeline/solve.py | pipeline | Preprocess + solve (GLPK/swiglpk) + extract results — pure-Python, no glpsol binary. |
pipeline/runner.py | pipeline | OSeCAN runner — the full pipeline: assemble -> datafile -> LP -> solve -> results. |
pipeline/diagnostics.py | pipeline | Solver diagnostics — read solver output and debug feasibility (BCNexus-style). |
pipeline/review.py | pipeline | Auto-maintained modelling review log. |
vis/report.py | vis | OSeCAN report — template-driven dashboard plotting ALL inputs and outputs. |
vis/transmission_map.py | vis | Transmission map (static, light background, GADM boundaries) — v0.3. |
vis/site.py | vis | Automated project website — a small multi-page static site built from the LIVE codebase + docs. |
| Command | Does |
|---|
osecan build-params | Generate the full placeholder parameter set keyed to the SETS. |
osecan build-sets | Generate SETS + InputActivityRatio + OutputActivityRatio from model_structure.py. |
osecan clean-demand | CER end-use demand -> SpecifiedAnnualDemand (real data, overwrites placeholder). |
osecan harmonize | Check that params reference only codes/years present in the built SETS (Stage 3 gate). |
osecan info | Show model scope. |
osecan map | Transmission map (GADM boundaries). Width ∝ capacity, or ∝ net flow with --run. |
osecan profile | Print a dataset's schema + categorical values before writing a cleaner (Stage 1). |
osecan report | Template-driven HTML report: all inputs + outputs, each with an info button. |
osecan retrieve | Download open datasets into data/external/ with sha256 provenance (Stage 0). |
osecan run | Full pipeline: assemble → datafile → LP → solve → results (+ diagnostics). |
osecan site | Generate the project website from the live codebase + docs. |
osecan solve | Preprocess + GLPK solve + extract result CSVs (no glpsol binary needed). |