Configuration
This guide covers all configuration options for OSeMOSYS-RDM.
Main Configuration File
The primary configuration is managed through:
src/Interface_RDM.xlsx
This Excel workbook contains multiple sheets that control different aspects of the workflow.
Setup Sheet
The Setup sheet controls the main execution parameters:
Parameter |
Type |
Description |
Example |
|---|---|---|---|
|
String |
Optimization solver to use |
|
|
Yes/No |
Execute baseline scenario |
|
|
Yes/No |
Execute RDM uncertainty analysis |
|
|
String |
Model region identifier |
|
|
String |
Model formulation file |
|
|
Integer |
Number of time slices |
|
|
Integer |
Number of futures to generate |
|
|
Integer |
Batch size for parallel execution |
|
|
Integer |
Year uncertainties begin |
|
|
String |
Which scenarios to run |
|
|
String |
Identifier for this experiment |
|
|
String |
Semicolon-separated substrings for conventional EV technologies |
|
|
String |
Substring for electric technologies |
|
|
String |
Semicolon-separated EV penetration UDC names |
|
Note
The EV_Conventional_Patterns, EV_Electric_Pattern, and EV_UDCs fields configure the automatic
EV UDC sign correction. If any of these fields is empty, the correction is skipped.
See the RDM Pipeline for details.
Solver Selection
Choose a solver based on your needs:
Solver |
Speed |
Cost |
Notes |
|---|---|---|---|
GLPK |
Slowest |
Free |
Required for preprocessing |
CBC |
Fast |
Free |
Good for most applications |
CPLEX |
Fastest |
Commercial |
Best for large ensembles |
Gurobi |
Fastest |
Commercial |
Excellent performance |
Tip
For large RDM experiments (>50 futures), commercial solvers provide significant time savings.
To_Print Sheet
Controls which model outputs are exported:
Column |
Description |
|---|---|
|
Name of the OSeMOSYS output variable |
|
|
Common parameters to export:
ProductionByTechnologyTotalCapacityAnnualAnnualEmissionsTotalDiscountedCostNewCapacity
Uncertainty_Table Sheet
Defines the parameters for RDM uncertainty analysis.
Column Definitions
Column |
Description |
|---|---|
|
Unique identifier for this uncertainty |
|
Category grouping for the uncertainty |
|
Human-readable description |
|
Type of variation (see below) |
|
What aspect is being varied |
|
Minimum value or multiplier |
|
Maximum value or multiplier |
|
Which scenarios this applies to |
|
Technology/Fuel sets involved |
|
Secondary sets (if applicable) |
|
Tertiary sets (if applicable) |
|
OSeMOSYS parameter names |
|
Year uncertainty begins |
Mathematical Types
Type |
Description |
Use Case |
|---|---|---|
|
Non-linear interpolation to final value |
Cost projections |
|
Maintain constant trajectory from uncertainty year |
Fixed parameters |
|
Linear interpolation to final value |
Simple projections |
|
S-curve trajectory |
Technology adoption |
|
Switch between predefined demand curves |
Demand shapes |
Important
For Timeslices_Curve type:
Curves must be predefined in the file
shape_of_demand.xlsxThe parameter
Explored_Parameter_of_Xmust be set toChange_CurveThis type enables switching between different curve profiles during uncertainty exploration
Example Uncertainty Definition
X_Num: 1
X_Category: Fuel Costs
X_Plain_English_Description: Natural gas price uncertainty
X_Mathematical_Type: Time_Series
Explored_Parameter_of_X: Final_Value
Min_Value: 0.8
Max_Value: 1.2
Involved_Scenarios: Scenario1
Involved_First_Sets_in_Osemosys: NATGAS
Exact_Parameters_Involved_in_Osemosys: VariableCost
Initial_Year_of_Uncertainty: 2025
Params_Sets_Vari Sheet
Maps parameters to their associated sets for correct data manipulation.
Column |
Description |
|---|---|
|
OSeMOSYS parameter name |
|
Number of sets this parameter depends on |
|
The set names in order |
DVC Configuration
dvc.yaml
The DVC pipeline is defined in dvc.yaml:
stages:
base_future:
cmd: python scripts/run_base_future.py
deps:
- src/workflow/0_Scenarios/
- src/Interface_RDM.xlsx
outs:
- src/workflow/1_Experiment/Executables/
Warning
It is not recommended to modify the DVC configuration (dvc.yaml) unless you have a specific advanced use case and fully understand the pipeline structure.
PRIM Configuration
PRIM analysis is configured through files in src/workflow/4_PRIM/:
PRIM_t3f2.yaml
Main PRIM configuration:
# Base scenario name
BAU: 'Scenario1'
# Model names (must match Region from Interface_RDM.xlsx)
ose_inputs: 'OSeMOSYS-{Region} inputs'
ose_oupts: 'OSeMOSYS-{Region} outputs'
# Directory structure
dir_exps: '1_Experiment'
dir_sdisc: 't3b_sdiscovery'
# Parallel processing
max_per_batch: 10
prim_structure.xlsx
Defines the analysis structure (driver→outcome mapping):
Outcomes: Metrics to analyze (costs, emissions, etc.)
Drivers: Uncertain parameters that influence outcomes
prim_files_creator_cntrl.xlsx
Execution controls and analysis periods:
Sheet |
Purpose |
|---|---|
|
Link experiments to analyses |
|
Define temporal periods for analysis |
|
Data typing controls |
Environment Configuration
environment.yaml
The Conda environment specification:
name: AFR-RDM-env
channels:
- conda-forge
- defaults
dependencies:
- python=3.11
- pandas
- numpy
- scipy
- openpyxl
- xlsxwriter
- pyarrow
- pyyaml
- scikit-learn
- pip
- pip:
- dvc>=3.0.0
- pyDOE>=0.3.8
File Structure Configuration
The workflow expects this directory structure:
osemosys-rdm/
├── src/
│ ├── Interface_RDM.xlsx # Main configuration
│ ├── workflow/
│ │ ├── 0_Scenarios/ # Input scenario files
│ │ ├── 1_Experiment/ # Experiment workspace
│ │ ├── 2_Miscellaneous/ # Reference files
│ │ ├── 3_Postprocessing/ # Output processing
│ │ └── 4_PRIM/ # PRIM configuration
│ └── Results/ # Final outputs
├── model.v.5.3.txt # OSeMOSYS formulation (v5.3)
├── model.v.5.4.txt # OSeMOSYS formulation (v5.4)
└── run.py # Main runner script