Running Model & Results

Project Structure

The AETOS GitHub repository is organised into two main components:

  • 📁 AETOS_Assumptions, which contains all input datasets, and

  • 📁 AETOS_Runner, the full model-runner environment.

Inside AETOS_Runner, you will find:

📂 CSVFiles → OSeMOSYS parameters in CSV format (generated by Otoole)
📂 input_data → User-edited input data in Excel format (multiple versions)
📂 model → OSeMOSYS model in TXT format (used for solver runs)
📂 output_data → Converted input (XLSX → TXT) for solver execution (via Otoole)
📂 results → Solver output in TXT format
📂 scripts → Python scripts for data processing and automation
📂 visualisation → Plots and reports (PDF/PNG)
📄 commands_AETOS.txt → Example command-line workflow (Miniconda + Otoole + solver)
📄 config_otoole_AETOS.yaml → Otoole configuration file (parameters + defaults)

Running the Model

This section walks you through the complete AETOS workflow — from preparing inputs to exporting results.

When running commands, replace <SCENARIO_NAME> with your chosen scenario tag (e.g. AETOS_BSNZ).

Step 1 – Prepare Input Data

Once you have edited your scenario Excel file (.xlsx), convert it into CSV and then into the OSeMOSYS datafile for solver execution:

otoole convert excel csv input_data/<SCENARIO_NAME>.xlsx CSVFiles config_otoole_v3_AETOS.yaml

otoole convert csv datafile CSVFiles output_data/<SCENARIO_NAME>.txt config_otoole_v3_AETOS.yaml

Step 2 – Generate LP File (GLPK)

Use GLPK to generate the LP problem file:

glpsol -m model/osemosys_fast_v8_AETOS.txt -d output_data/<SCENARIO_NAME>.txt --wlp results/results.lp --check

Step 3 – Solve the Model (e.g. CPLEX)

Run CPLEX to solve the optimization problem:

cplex
read results/results.lp
optimize
write results/results.sol
quit

Step 4 – Process and Sort Results

Transform and sort the solver output:

python scripts/transform_31072013.py results/results.sol results/trans_results.txt
sort results/trans_results.txt > results/trans_results_sorted.txt

Step 5 – Export Results to Excel

Finally, export the processed results into Excel format for analysis and visualisation. The generated files will be saved in the results/ folder, automatically named according to the current date and version tag.

python scripts/export_to_excel.py