-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalized implementation of simple pumped hydro with an example/tes…
…t case. This implementation requires the sequence of simple_hydro, storage in modules.txt. My goals were modeling accuracy, backwards compatibility, avoiding redundancy, checks to aid debugging of common errors, and allow pumped hydro to participate in reserves like any other generator. Pumped hydro is different from normal hydro because of need to the track energy balance, and that average dispatch is not solely determined by average stream flow (but also includes storage decisions). It's also different from normal storage because energy tracking needs to include both stream inflow and any spilled water. In this implementation, if any pumped hydro generators are specified, the simple_hydro module will validate that the storage module is also included. The pre-existing rules for maintaining average stream flow are restricted to non-pumped hydro. Special rules for pumped hydro energy tracking and streamflow are implemented with an extra few lines in the storage energy tracking constraint, which capture the mathematical requirements of average daily balancing and additionally tracks state-of-charge. If the pumped hydro terms are not available, the storage module will skip that stanza without complaint. Storage documentation updates: Describe how StateOfCharge is unbound for one timepoint in each timeseries (that is, the optimization can choose to start a day with an arbitrary storage level), because I found myself having to re-read through equations to convince myself of that behavior. Explicit describe units of various energy-based components in the storage model (to reduce confusion between power & energy). Rewrap line endings to conform to PEP-8 recommendations for reading two files side-by-side in a single screen (or a single file in large font on a small screen)
- Loading branch information
1 parent
b5b1a28
commit 9aa30bb
Showing
20 changed files
with
258 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
SYNOPSIS: | ||
|
||
switch solve --verbose --log-run | ||
|
||
This example illustrates modeling pumped hydro storage by using the hydro_simple module in concert with the storage module. | ||
|
||
This adds pumped hydro to the hydro_simple example, and illustrates pumped hydro being used for arbitrage within each example day. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
base_financial_year,interest_rate,discount_rate | ||
2015,0.07,0.05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
load_zone,fuel,period,fuel_cost | ||
South,NaturalGas,2020,4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
fuel,co2_intensity,upstream_co2_intensity | ||
NaturalGas,0.05306,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
GENERATION_PROJECT,build_year,gen_overnight_cost,gen_fixed_om,gen_storage_energy_overnight_cost | ||
S-NG_CC,2000.0,1143900.0,5868.3,. | ||
S-Central_PV-1,2000.0,2334300.0,41850.0,. | ||
S-Geothermal,1998.0,5524200.0,0.0,. | ||
Hydro,2000.0,10000000.0,100000.0,. | ||
Hydro_RoR,2000.0,1000000.0,100000.0,. | ||
Hydro_Pumped,2000.0,1000000.0,100000.0,0.0 | ||
S-Geothermal,2020.0,5524200.0,0.0,. | ||
S-NG_CC,2020.0,1143900.0,5868.3,. | ||
S-Central_PV-1,2020.0,2334300.0,41850.0,. |
7 changes: 7 additions & 0 deletions
7
examples/pumped_hydro_simple/inputs/gen_build_predetermined.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
GENERATION_PROJECT,build_year,gen_predetermined_cap | ||
S-NG_CC,2000,5.0 | ||
S-Central_PV-1,2000,1.0 | ||
S-Geothermal,1998,1.0 | ||
Hydro,2000,1.0 | ||
Hydro_RoR,2000,1.0 | ||
Hydro_Pumped,2000,5.0 |
7 changes: 7 additions & 0 deletions
7
examples/pumped_hydro_simple/inputs/generation_projects_info.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
GENERATION_PROJECT,gen_dbid,gen_tech,gen_load_zone,gen_connect_cost_per_mw,gen_capacity_limit_mw,gen_variable_om,gen_max_age,gen_min_build_capacity,gen_scheduled_outage_rate,gen_forced_outage_rate,gen_is_variable,gen_is_baseload,gen_is_cogen,gen_energy_source,gen_full_load_heat_rate,gen_is_pumped_hydro,gen_storage_efficiency | ||
S-Geothermal,33.0,Geothermal,South,134222.0,10.0,28.83,30,0,0.0075,0.0241,0,1,0,Geothermal,.,.,. | ||
S-NG_CC,34.0,NG_CC,South,57566.6,.,3.4131,20,0,0.04,0.06,0,0,0,NaturalGas,6.705,.,. | ||
S-Central_PV-1,41.0,Central_PV,South,74881.9,2.0,0.0,20,0,0.0,0.02,1,0,0,Solar,.,.,. | ||
Hydro,.,Hydro,South,0.0,1.0,0.1,100,0,0.019,0.05,0,0,0,Water,.,.,. | ||
Hydro_RoR,.,Hydro_RoR,South,0.0,1.0,0.0,30,0,0.019,0.05,1,0,0,Water,.,.,. | ||
Hydro_Pumped,.,Hydro_Pumped,South,0.0,5.0,0.1,100,0,0.019,0.05,0,0,0,Water,.,1.0,0.75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
hydro_project,timeseries,hydro_min_flow_mw,hydro_avg_flow_mw | ||
Hydro,2020_winter,0.6,0.75 | ||
Hydro,2020_summer,0.2,0.6 | ||
Hydro_Pumped,2020_winter,0.6,0.75 | ||
Hydro_Pumped,2020_summer,0.2,0.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
LOAD_ZONE,cost_multipliers,ccs_distance_km,dbid | ||
South,1,0,3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
LOAD_ZONE,TIMEPOINT,zone_demand_mw | ||
South,1,9.0 | ||
South,2,2.5 | ||
South,3,10.0 | ||
South,4,4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Core Modules | ||
switch_model | ||
switch_model.timescales | ||
switch_model.financials | ||
switch_model.balancing.load_zones | ||
switch_model.energy_sources.properties | ||
switch_model.generators.core.build | ||
switch_model.generators.core.dispatch | ||
switch_model.reporting | ||
# Custom Modules | ||
switch_model.generators.core.no_commit | ||
switch_model.energy_sources.fuel_costs.simple | ||
switch_model.generators.extensions.hydro_simple | ||
switch_model.generators.extensions.storage |
4 changes: 4 additions & 0 deletions
4
examples/pumped_hydro_simple/inputs/non_fuel_energy_sources.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
energy_source | ||
Solar | ||
Geothermal | ||
Water |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
INVESTMENT_PERIOD,period_start,period_end | ||
2020,2017,2026 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
timepoint_id,timestamp,timeseries | ||
1,2025011512,2020_winter | ||
2,2025011600,2020_winter | ||
3,2025071512,2020_summer | ||
4,2025071600,2020_summer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESERIES,ts_period,ts_duration_of_tp,ts_num_tps,ts_scale_to_period | ||
2020_winter,2020,12,2,1826 | ||
2020_summer,2020,12,2,1826 |
9 changes: 9 additions & 0 deletions
9
examples/pumped_hydro_simple/inputs/variable_capacity_factors.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
GENERATION_PROJECT,timepoint,gen_max_capacity_factor | ||
S-Central_PV-1,1,0.61 | ||
S-Central_PV-1,2,0.0 | ||
S-Central_PV-1,3,0.81 | ||
S-Central_PV-1,4,0.0 | ||
Hydro_RoR,1,0.25 | ||
Hydro_RoR,2,0.5 | ||
Hydro_RoR,3,0.2 | ||
Hydro_RoR,4,0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
30423392.46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.