This tool determines the optimal portfolio of storage needed to ensure reliable grid operation and avoid load shedding. It utilizes the outputs from a grid operations model to schedule storage dispatch, subject to the cost of investment in storage.
Portions of the codebase, particularly those related to configuration and parameterization, were developed with the assistance of GitHub Copilot.
The user must add data to a data directory to use this tool.
This tool relies on PNNL's ESGC storage cost database. The user must download the database in .xlsx format and add it to the data directory. It can be found at https://www.pnnl.gov/projects/esgc-cost-performance.
This tool relies on the outputs of a production cost model (PCM) to size storage.
- PCM outputs must be added to the data directory.
- If starting from a compatible h5 file, use the process_gridview.py script within the utils directory to create the necessary PCM inputs.
- h5 files should be located in the directory h5_inputs.
- Outputs will be saved to data.
- If starting from a compatible h5 file, use the process_gridview.py script within the utils directory to create the necessary PCM inputs.
- Expected zonal PCM outputs are curtailment, lmps, load, and load_shed.
- One CSV for each output.
- First column is expected to be the timepoint index. No specific time format is necessary.
- Subsequent columns denote the zones.
- All values should be in units of MW, or $/MW (for LMPs).
- PCM outputs should follow the naming convention "{output}_{scenario_name}.csv".
- Transmission PCM outputs are optional, but recommended.
- Import limits should be provided as "import_limits_{scenario_name}.csv"
- First column index should be zones
- Second column should be named "Limit" and contain the corresponding maximum import limit in MW
- Hourly net imports should be provided as "net_imports_{scenario_name}.csv
- First column is expected to be the timepoint index. No specific time format is necessary.
- Subsequent columns denote zones, with hourly net imports (i.e. imports - exports)
- Import limits should be provided as "import_limits_{scenario_name}.csv"
User may configure values using the config file for the following variables:
- estimate: Estimate of storage costs, corresponding to low, medium, or high costs.
- Valid values: Low, Point, High.
- scenario: Controls the PCM scenario to size storage for.
- Valid values: Any string associated with a set of PCM outputs in data.
- technology: Controls whether only currently commercially-viable technologies can be selected, or emerging technologies as well.
- Valid values: existing or advanced
- rep: Controls whether the optimization uses a full year or representative days.
- Valid values: True or False.
- solver: Solver to use for the optimization.
- Valid values: Any installed solver compatible with pyomo.
- Optional:
- data_dir: Location of input data. Recommended to use default value data
- out_dir: Location of outputs. Recommended to use default value results
- out_file: File name of outputs. Recommended to use default value, a string specifying the associated scenario, estimate, and technology availability.
- Modify the json config as needed.
- Run the script main.
- Results will be saved to the specified directory with the specified file name.
- Optional: run the script visuals to generate figures from the results.
Solver IPOPT is recommended for open-source needs. Commercial solvers like Gurobi or CPLEX have significantly better performance and should be used if possible. Solver must be specified using the solver variable within the main script.