This repository contains the code developed for the assignment in 46755 Renewables in Electricity Markets, Spring 2026.
The project is structured by task, where each script can be run independently and each task has its own plotting script.
The repository is organized as follows:
These scripts contain the core implementation for each assignment step.
Each script is self-contained and can be executed on its own.
-
step1.py
Single-hour day-ahead market clearing without network constraints. -
step2.py
Multi-hour market clearing with storage. -
step3.py
Nodal and zonal market clearing with network constraints. -
step5.py
Balancing market analysis including outage and wind forecast errors. -
step6.py
Reserve market and day-ahead market clearing with reserve commitments.
Each task has its own dedicated plotting script.
These scripts contain the figure functions used by the corresponding task script.
plots_step1.pyplots_step2.pyplots_step3.pyplots_step5.pyplots_step6.py
helpers.py
Contains functions that are used repeatedly across tasks, such as:- loading and preparing data
- building generator and demand inputs
- loading wind availability
- solving Pyomo models
data/
Contains the input data used by the assignment, such as generator data, demand data, line data, and wind profiles.
plots/
Stores generated output files such as plots.
The scripts follow a common structure:
-
Input building
Data is loaded and prepared for the selected task. -
Model building
The optimization problem is formulated in Pyomo. -
Model solving
The model is solved with the selected solver. -
Result extraction
Dispatch, prices, welfare, profits, and other outputs are extracted. -
Plotting
Figures are created using the corresponding plot script.
Each task script is intended to be executable on its own.
There is therefore no single central main.py file for the whole repository.
The project dependencies are listed in:
requirements.txt
You can install them with:
pip install -r requirements.txt