Get the codeThe full repository on GitHub: model, data pipeline, notebooks and this site.Open GitHub →InstallOne reproducible uv environment; the default solver ships as a wheel.Show →Run the modelSeven commands from model structure to an HTML report.Show →Command line13 commands behind
uv run osecan.Show →Code mapWhat each module does and which layer it belongs to.Open in Model →Developer guidesNaming rules, adding a policy type, data staging and solver diagnostics.Show →Install
C2070 (package osecan) is a uv project. uv installs Python and the
pinned dependencies from pyproject.toml and uv.lock.
git clone https://github.com/eliasinul/CLEWsCAN2070.git
cd CLEWsCAN2070
uv sync # creates .venv from pyproject.toml + uv.lock
Run the model
uv run osecan build-sets # structure -> SETs/
uv run osecan build-params # placeholder parameters (+ WS3/FABLE seams)
uv run osecan retrieve # open datasets -> data/external (+ sha256)
uv run osecan clean-demand "Current Measures" # CER EF2026 -> SpecifiedAnnualDemand
uv run osecan harmonize # gate: parameters reference only built set codes
uv run osecan solve --run results/base # preprocess -> solve -> result CSVs
uv run osecan report # HTML dashboard (+ transmission map)
osecan solve uses GLPK through Python bindings and needs no system solver. osecan run is the
subprocess variant and needs glpsol on the PATH. Notebooks: uv run jupyter lab, then open
notebooks/build_osecan.ipynb.
Command line
| Command | Does |
|---|---|
osecan build-params | Generate placeholder parameters for the current model sets. |
osecan build-sets | Generate OSeMOSYS sets and activity-ratio CSV files. |
osecan clean-capacity | Convert observed CER capacity to residual capacity and annual bounds. |
osecan clean-demand | Convert CER end-use demand to SpecifiedAnnualDemand parameters. |
osecan harmonize | Check that parameter CSVs reference valid generated codes and years. |
osecan info | Print the model name, horizon, provinces, and land/water scope.""" |
osecan map | Generate a transmission map using capacity or solved flows. |
osecan profile | Print a dataset's schema and categorical values before cleaning. |
osecan report | Generate the interactive HTML report for model inputs and outputs. |
osecan retrieve | Download configured open datasets and record SHA-256 provenance. |
osecan run | Assemble inputs, solve the model, and extract results with diagnostics. |
osecan site | Generate the project website from the live codebase and documentation. |
osecan solve | Solve a prepared run with GLPK bindings and extract result CSVs. |
Developer guides
- Model description: design decisions, naming convention, set generation, and how to declare, add and test a User Defined Constraint.
- Data pipeline: retrieve, clean and map, harmonise, and source provenance.
- Solve and diagnostics: solver stages, the diagnostics bundle and debugging infeasibility.