This repository supplements the article "Storage Participation in Electricity Markets: Time Discretization through Robust Optimization" by Dirk Lauinger, Luc Coté, and Andy Sun.
The numerical experiments were implemented using:
- Julia 1.10.1
- JuMP 1.22.2
- Gurobi 11.0.2
A valid Gurobi license is required to run the optimization model. To install Julia dependencies, run this command in bash from the
codefolder
julia --project=.
followed by this command in Julia
]
instantiate
All numerical experiments were conducted on Intel Xeon Platinum 8260 CPUs with 24 cores, 48 threads, 192GB of RAM, and 2.4GHz base clock speed. On this hardware, running all nine experiments in Table A1 sequentially, without multi-threading, took 1520 hours. The runtime can be reduced by running experiments in parallel as well as running individual test days in parallel for experiments 1 and 2.
From within the code folder, run experiment x in {1,2} for test day YYYY-MM-DD as follows:
julia 1x.jl YYYY-MM-DD --project=.
From the same folder, run experiments x in {3,..,9} for the all test days in a text file TEST_FILE.txt, for example, 05_dates.txt as follows:
julia 1x.jl TEST_FILE.txt --project=.
The repository is organized as follows:
code/Data structure, optimization models, experiment scripts, and Julia toml files;data/Price data and regulation data via github release;data_processing/Source data for the backtest and code required to download, clean, and analyze that data;notebooks/For example 1 and analyzing input data.results/Results file underlaying Table A1.
The code folder contains general scripts (starting with 0) and experiment-specific scripts (starting with 1).
General scripts:
-
01_datastruct.jlis a structure for all the data needed to solve the exact bilinear market bidding problem (P), the mixed-integer linear restriction ($\overline{\text{P}}$ ), and relaxation ($\underline{\text{P}}$ ). -
02_model.jlcontains functions for solving the market bidding problems, which requires building the model (build_model), running the model with a specified solver (run_model), and auxiliary functions for loading data, deriving parameters from data, and computing the state-of-charge given fixed market decisions for result validation. -
03_backtest_save.jlcontains functions for the backtest described in Section 6 in the paper and saving results. -
04_parse_results.jlcontains functions for parsing and analyzing backtest results. -
05_dates.txtlists all backtest days, i.e., all days from 1 July 2020 through 30 June 2024 without days affected by transitions to or from daylight savings time.
Experiment-specific scripts: 1x.jl for x in {1,..,9}.
The data folder contains prices for all countries in the backtest.
regulation_signal.csv must be placed in the data folder and is available via a GitHub release.
The data_processing folder contains the source data for the backtest and data download, cleaning, and analysis files.
The notebooks folder contains example_1.ipynb for generating the data underlying Figure 2, and input_analysis.ipynb for analyzing input data and generating Figure A1.
Finally, the results contains results_overview.xlsx contains the data for Table A1 and Figures 7, A2, and A3, as well as empty folders 01..09 for the outputs of each numerical experiment.
Release v0.1.0-submission is the version of the repository used in the initial submission of the paper for peer review.