This repository contains the data, code, and test runs to reproduce the modeled output from the renewable capacity expansion model for western U.S. states for the study "Coordinating Power Sector Climate Transitions Under Policy Uncertainty". The model is written using JuMP for Julia, and the analysis scripts are written in Python.
The code should work well on a "normal" desktop computer or laptop with either Windows or Mac OS operating systems. To ensure efficient I/O operations, we recommend that you have at least 1 GB of available hard disk space, a 4 GB or higher RAM, and an Intel Core i3 or equivalent AMD processor.
The capacity expansion model is written in Julia. The required Julia packages including version numbers are listed below:
- JuMP v1.15.1
- PyPlot v2.11.2
- DataFrames v1.6.1
- CSV v0.10.11
- Gurobi v1.0.4
- Missings v1.1.0
- PyCall v1.96.1
- Statistics v1.9.0
- TimerOutputs v0.5.23
The analysis scripts including visualization are written in Python. The required Python packages including version numbers are listed below:
- Python v3.9
- pandas v1.5.3
- matplotlib v3.7.1
- numpy v1.24.3
- seaborn v0.12.2
- geopandas v0.12.2
- geoplot v0.4.3
Make sure that you have a valid Gurobi license for using the Gurobi optimization package. You should be able to obtain free academic licenses on their website.
The installation consists of two parts: WECC-model (the capacity expansion model) and WECC-data (data inputs) in parallel to the model.
WECC-model: This folder includes the main optimization model, results, visualization/analysis Jupyter notebooks, and the generated plots. Additionally, we also include the shell scripts for running the model on a cloud computing system.WECC-data: This folder includes a settings file to run PowerGenome, and the corresponding PowerGenome results such as generators variability and load predictions. These outputs are used as input for the capacity expansion model.
The total file size for all three folders is around 500 MB, so it should only take a few minutes to install with a "normal" internet connection.
In the paper, the modeled output is obtained using 6 representative weeks of data.
For demo purposes, we have provided a smaller test dataset that includes only 1 week of data. The test dataset is already in the WECC-data/powergenome_output/demo_1week/ folder, and by default, you will use this dataset to obtain the results.
To run the model on the test dataset locally on your desktop computer, open the Terminal and enter the following command lines:
$ cd <path_to_WECC-model>
$ julia Run.jl $run_nameHere, $run_name tells the model about the scenarios that you are examining. As an example, set the $run_name as m2050_tbaseline_pregionalces_rbaseline_linear.
- The first part,
m2050, indicates that we are looking at the year 2050 for capacity expansion decisions. - The second part,
tbaseline, indicates that the transmission scenario is baseline. - The third part,
pregionalces, indicates that the policy scenario is a region-wide 100% clean energy standard. You can also change it frompregionalcestopstateif there are only state-level clean energy targets. - The fourth part,
rbaseline, indicates that the regionalization scenario is baseline. You can also change it fromrbaselinetorexpandedEIMorrregionalized. In the case ofrbaseline, we assume a non-zero hurdle rate cost, zone-level operating reserves and zone-level planning reserves. In the case ofrexpandedEIM, we assume that the planning reserve is zonally met, but the import and export capabilities of states increase. In the case ofrregionalized, we assume a complete regional market with all three coordination functions--frictionless electricity trade across multi-jurisdictions, shared operating reserve, and resource adequacy requirements. - The last part,
linear, indicates the transmission cost sensitivities, which go beyond the scope of this paper.
The test results will be saved to the WECC-model/Batch/Results_$run_name folder, including the capacity expansion decisions and operational results. For sanity check, you can examine the cost components and storage capacities at the state level, assuming the $run_name is set as m2050_tbaseline_pregionalces_rbaseline_linear. Results will vary if you use other scenarios.
- Cost components: in
cost_components.csv, you should see a 3.11e6 value for fixed generator costs, a 462668 value for fixed storage costs, and an 84817 value for fixed transmission line costs. - State-level storage capacities: in
allcap_aggregate.csv, you should see that Arizona (AZ) has a 1490 MW of storage capacity, and Colorado (CO) has a 2741 MW of storage capacity.
The total expected run time for the small test dataset is 1-2 mins.
To run the model on a complete 6-week dataset locally on your desktop computer, you will need to change the input path in Paths.jl Line 10 from demo_1week to other PowerGenome folders, such as reference_cost. The folder name indicates the renewable and natural gas cost scenarios.
Then, the steps are similar to the demo. Open the Terminal and enter the following command lines:
$ cd <path_to_WECC-model>
$ julia Run.jl $run_nameWe have also provided all the shell scripts for running the model on a high-performance cloud computing system. To do so, move the WECC-model and WECC-data folders onto your cloud computing system, go to the directory of WECC-model/Batch, and then submit the shell script tasks from there.
To run the shell scripts in the sensitivity analysis folder, copy paste those scripts to the WECC-model/Batch directory and submit from there as well.
To reproduce all the quantitative results in the manuscript, you will just have to change the $run_name mentioned in Section 3.
Here, we provide a complete list of $run_name for all the scenarios and sensitivity analysis that we have conducted.
-
Continued State Policy scenario
- Incomplete Coordination:
m2050_tbaseline_pstate_rbaseline_linear_limited_coordination - BAU:
m2050_tbaseline_pstate_rbaseline_linear - Expanded EIM:
m2050_tbaseline_pstate_rexpandedEIM_linear - Regional Market:
m2050_tbaseline_pstate_rregionalized_linear - Full coordination:
m2050_tbaseline_pstate_rregionalized_linear_0CES
- Incomplete Coordination:
-
Regional 100% CES scenario
- BAU:
m2050_tbaseline_pregionalces_rbaseline_linear - Expanded EIM:
m2050_tbaseline_pregionalces_rexpandedEIM_linear - Regional Market:
m2050_tbaseline_pregionalces_rregionalized_linear
- BAU:
-
Sensitivity analysis
- In-state CES/RPS ratios: add
_0CES,_25CES,_50CES,_87CES, or_100CESto the$run_namelisted in the previous two sections. If no CES/RPS ratio is specified, a default 75% value will be used. The shell scripts are stored in theWECC-model/Batch/Batch_CESdirectory. - Operating reserve requirements: add
_3+10RES, or_5+10RESto the$run_namelisted in the previous two sections. If no operating reserve requirement is specified, a default "3+5" heuristic rule will be applied. The shell scripts are stored in theWECC-model/Batch/Batch_OpResdirectory. - Hurdle rates: add
_altHRCor_lowHRCto the$run_namelisted in the previous two sections. If no hurdle rate cost is specified, we will use the default CEC hurdle costs. The shell scripts are stored in theWECC-model/Batch/Batch_HRCdirectory. - Renewable and natural gas costs: change the input path in
Paths.jlLine 10fromreference_costto other PowerGenome folders includinghigh_cost_gas,low_cost_battery,low_cost_solar, andlow_cost_wind. Then, repeat the previous two steps.
- In-state CES/RPS ratios: add
The software folder structure of WECC-model is as below:
Paths.jl: It gets the input data path and results folder path. Users need to create a folder for results and give its path. It gets some user inputs. It also gets capacity bounds for new build resources.CreateBarline.jl: This creates bar lines for the figures.ExpansionModel.jl: This is the optimization model.ProcessDispatch.jl: This script processes the optimization outputs.ReadFiles.jl: It reads the data files for generators, fuels, demand, network, and generator variability.RecordCSV.jlandRecordPlot.jl: These two scripts write optimal values of decision variables into CSV files and create relevant plots.Run.jl: This is the main script that puts together all the other scripts and calls on the optimization model. User can directly run this file to get the optimization results.SetCreation.jl: This constructs several sets, ready to be used by the optimization model.Batch: This folder contains the shell scripts for running the model on a cloud computing system and all the result folders.solver_params.csv: This CSV file contains the solver parameters for Gurobi.