C2070 Delta E+Delta E+ · SFU

Code map

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.

Modules

ModuleLayerRole
model_structure.pystructureOSeCAN — CANadian OSeMOSYS Energy · model structure (v0.3 — multi-grid + UDC)
sets_n_ratios.pystructureOSeCAN set builder — v0.3 multi-grid (single REGION) + UDC.
data/retrieve.pydataStage 0 — retrieve open datasets into data/external/ with provenance.
data/profile.pydataStage-1 helper — profile a raw dataset before writing a cleaner.
data/clean_demand.pydataStage 1->3 cleaner — CER end-use-demand-2026.csv -> SpecifiedAnnualDemand (v0.3 multi-grid).
data/build_params.pydataBuild a COMPLETE placeholder parameter set for OSeCAN (v0.3 multi-grid + UDC).
data/harmonize.pydataHarmonization — check Stage-3 params against the built SETS.
pipeline/assemble.pypipelineAssemble a complete otoole input directory from SETS + params.
pipeline/solve.pypipelinePreprocess + solve (GLPK/swiglpk) + extract results — pure-Python, no glpsol binary.
pipeline/runner.pypipelineOSeCAN runner — the full pipeline: assemble -> datafile -> LP -> solve -> results.
pipeline/diagnostics.pypipelineSolver diagnostics — read solver output and debug feasibility (BCNexus-style).
pipeline/review.pypipelineAuto-maintained modelling review log.
vis/report.pyvisOSeCAN report — template-driven dashboard plotting ALL inputs and outputs.
vis/transmission_map.pyvisTransmission map (static, light background, GADM boundaries) — v0.3.
vis/site.pyvisAutomated project website — a small multi-page static site built from the LIVE codebase + docs.

Commands

CommandDoes
osecan build-paramsGenerate the full placeholder parameter set keyed to the SETS.
osecan build-setsGenerate SETS + InputActivityRatio + OutputActivityRatio from model_structure.py.
osecan clean-demandCER end-use demand -> SpecifiedAnnualDemand (real data, overwrites placeholder).
osecan harmonizeCheck that params reference only codes/years present in the built SETS (Stage 3 gate).
osecan infoShow model scope.
osecan mapTransmission map (GADM boundaries). Width ∝ capacity, or ∝ net flow with --run.
osecan profilePrint a dataset's schema + categorical values before writing a cleaner (Stage 1).
osecan reportTemplate-driven HTML report: all inputs + outputs, each with an info button.
osecan retrieveDownload open datasets into data/external/ with sha256 provenance (Stage 0).
osecan runFull pipeline: assemble → datafile → LP → solve → results (+ diagnostics).
osecan siteGenerate the project website from the live codebase + docs.
osecan solvePreprocess + GLPK solve + extract result CSVs (no glpsol binary needed).