From 12dd4ce61648d48b5afc7b53f35687006c0c2db7 Mon Sep 17 00:00:00 2001 From: lbonaldo Date: Tue, 20 Feb 2024 19:08:09 -0500 Subject: [PATCH] Rename Reserves to OperationalReserves --- .../IEEE_9BUS/Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 5 --- .../OneZone/Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 5 --- .../Settings/genx_settings.yml | 5 --- ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 2 +- ...{Reserves.csv => Operational_reserves.csv} | 0 .../ISONE_Trizone/Settings/genx_settings.yml | 2 +- ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 ...{Reserves.csv => Operational_reserves.csv} | 0 ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 .../OneZone/Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - ...{Reserves.csv => Operational_reserves.csv} | 0 ...{Reserves.csv => Operational_reserves.csv} | 0 ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 2 +- ...{Reserves.csv => Operational_reserves.csv} | 0 .../ThreeZones/Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 1 - .../Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 1 - .../Settings/genx_settings.yml | 1 - docs/src/core.md | 4 +- docs/src/data_documentation.md | 20 +++++----- src/configure_settings/configure_settings.jl | 9 ++++- src/load_inputs/load_dataframe.jl | 2 +- src/load_inputs/load_inputs.jl | 6 +-- ...serves.jl => load_operational_reserves.jl} | 13 +++--- src/load_inputs/load_resources_data.jl | 4 +- .../{reserves.jl => operational_reserves.jl} | 40 +++++++++---------- src/model/generate_model.jl | 8 ++-- .../curtailable_variable_renewable.jl | 16 ++++---- src/model/resources/hydro/hydro_res.jl | 12 +++--- src/model/resources/hydrogen/electrolyzer.jl | 2 +- src/model/resources/resources.jl | 3 +- src/model/resources/storage/storage.jl | 7 ++-- src/model/resources/storage/storage_all.jl | 8 ++-- .../resources/storage/storage_asymmetric.jl | 10 ++--- .../resources/storage/storage_symmetric.jl | 10 ++--- src/model/resources/thermal/thermal_commit.jl | 16 ++++---- .../resources/thermal/thermal_no_commit.jl | 10 ++--- src/model/resources/vre_stor/vre_stor.jl | 14 +++---- src/write_outputs/write_costs.jl | 2 +- src/write_outputs/write_emissions.jl | 2 +- src/write_outputs/write_net_revenue.jl | 4 +- src/write_outputs/write_outputs.jl | 4 +- ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 2 +- ...{Reserves.csv => Operational_reserves.csv} | 0 .../Settings/genx_settings.yml | 2 +- .../Inputs_p1/Operational_reserves.csv | 0 .../Inputs_p2/Operational_reserves.csv | 0 .../Inputs_p3/Operational_reserves.csv | 0 .../Operational_reserves.csv} | 0 .../Operational_reserves.csv} | 0 .../Operational_reserves.csv} | 0 .../Inputs_p1/Operational_reserves.csv} | 0 .../Inputs_p2/Operational_reserves.csv} | 0 .../Inputs_p3/Operational_reserves.csv} | 0 .../New_Build/Inputs_p3/Reserves.csv | 2 - .../Operational_reserves.csv} | 0 test/TDR/Reserves.csv | 2 - .../Operational_reserves.csv} | 0 test/ThreeZones/Reserves.csv | 2 - test/test_load_resource_data.jl | 4 +- test/test_multistage.jl | 2 +- 79 files changed, 124 insertions(+), 153 deletions(-) rename Example_Systems/RealSystemExample/ISONE_Singlezone/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/ISONE_Trizone/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p1/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p2/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p3/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone_3VREBin/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone_MultiFuels/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p1/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p2/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p3/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/ThreeZones/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/{ThreeZones_MultiStage/Inputs/Inputs_p1/Reserves.csv => ThreeZones_Slack_Variables_Example/Operational_reserves.csv} (100%) rename src/load_inputs/{load_reserves.jl => load_operational_reserves.jl} (84%) rename src/model/core/{reserves.jl => operational_reserves.jl} (90%) rename test/LoadResourceData/test_gen_non_colocated/{Reserves.csv => Operational_reserves.csv} (100%) rename test/LoadResourceData/test_gen_vre_stor/{Reserves.csv => Operational_reserves.csv} (100%) rename Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p2/Reserves.csv => test/MultiStage/Can_Retire/Inputs_p1/Operational_reserves.csv (100%) rename Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p3/Reserves.csv => test/MultiStage/Can_Retire/Inputs_p2/Operational_reserves.csv (100%) rename Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Reserves.csv => test/MultiStage/Can_Retire/Inputs_p3/Operational_reserves.csv (100%) rename test/MultiStage/{Can_Retire/Inputs_p1/Reserves.csv => Inputs_p1/Operational_reserves.csv} (100%) rename test/MultiStage/{Can_Retire/Inputs_p2/Reserves.csv => Inputs_p2/Operational_reserves.csv} (100%) rename test/MultiStage/{Can_Retire/Inputs_p3/Reserves.csv => Inputs_p3/Operational_reserves.csv} (100%) rename test/MultiStage/{Inputs_p1/Reserves.csv => New_Build/Inputs_p1/Operational_reserves.csv} (100%) rename test/MultiStage/{Inputs_p2/Reserves.csv => New_Build/Inputs_p2/Operational_reserves.csv} (100%) rename test/MultiStage/{Inputs_p3/Reserves.csv => New_Build/Inputs_p3/Operational_reserves.csv} (100%) delete mode 100644 test/MultiStage/New_Build/Inputs_p3/Reserves.csv rename test/{MultiStage/New_Build/Inputs_p1/Reserves.csv => TDR/Operational_reserves.csv} (100%) delete mode 100644 test/TDR/Reserves.csv rename test/{MultiStage/New_Build/Inputs_p2/Reserves.csv => ThreeZones/Operational_reserves.csv} (100%) delete mode 100644 test/ThreeZones/Reserves.csv diff --git a/Example_Systems/DC_OPF/IEEE_9BUS/Settings/genx_settings.yml b/Example_Systems/DC_OPF/IEEE_9BUS/Settings/genx_settings.yml index b4d2f16086..5cb832d34d 100644 --- a/Example_Systems/DC_OPF/IEEE_9BUS/Settings/genx_settings.yml +++ b/Example_Systems/DC_OPF/IEEE_9BUS/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 1 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 0 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 0 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = load + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/DC_OPF/IEEE_9BUS_timeseries/Settings/genx_settings.yml b/Example_Systems/DC_OPF/IEEE_9BUS_timeseries/Settings/genx_settings.yml index 677068390e..a6f1cba9ec 100644 --- a/Example_Systems/DC_OPF/IEEE_9BUS_timeseries/Settings/genx_settings.yml +++ b/Example_Systems/DC_OPF/IEEE_9BUS_timeseries/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 1 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 0 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 0 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = load + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/Electrolyzer_Example/Settings/genx_settings.yml b/Example_Systems/Electrolyzer_Example/Settings/genx_settings.yml index 8a8206feeb..4e09438865 100644 --- a/Example_Systems/Electrolyzer_Example/Settings/genx_settings.yml +++ b/Example_Systems/Electrolyzer_Example/Settings/genx_settings.yml @@ -15,11 +15,6 @@ UCommit: 2 ## Policy settings # --------------- -# Regulation (primary) and operating (secondary) reserves -# 0 = not active -# 1 = active systemwide -# Reserves: 0 - # Minimum qualifying renewables penetration # 0 = not active # 1 = active systemwide diff --git a/Example_Systems/MethodofMorrisExample/OneZone/Settings/genx_settings.yml b/Example_Systems/MethodofMorrisExample/OneZone/Settings/genx_settings.yml index 470534eee4..981c742b0a 100644 --- a/Example_Systems/MethodofMorrisExample/OneZone/Settings/genx_settings.yml +++ b/Example_Systems/MethodofMorrisExample/OneZone/Settings/genx_settings.yml @@ -2,7 +2,6 @@ MacOrWindows: Mac # Set to either "Mac" (also works for Linux) or "Windows" to PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 0 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/PiecewiseFuel_CO2_Example/Settings/genx_settings.yml b/Example_Systems/PiecewiseFuel_CO2_Example/Settings/genx_settings.yml index f24ebf08da..e551ba0897 100644 --- a/Example_Systems/PiecewiseFuel_CO2_Example/Settings/genx_settings.yml +++ b/Example_Systems/PiecewiseFuel_CO2_Example/Settings/genx_settings.yml @@ -15,11 +15,6 @@ UCommit: 2 ## Policy settings # --------------- -# Regulation (primary) and operating (secondary) reserves -# 0 = not active -# 1 = active systemwide -# Reserves: 0 - # Minimum qualifying renewables penetration # 0 = not active # 1 = active systemwide diff --git a/Example_Systems/ProprietarySolver/Settings/genx_settings.yml b/Example_Systems/ProprietarySolver/Settings/genx_settings.yml index d997679749..3af8713375 100644 --- a/Example_Systems/ProprietarySolver/Settings/genx_settings.yml +++ b/Example_Systems/ProprietarySolver/Settings/genx_settings.yml @@ -15,11 +15,6 @@ UCommit: 2 ## Policy settings # --------------- -# Regulation (primary) and operating (secondary) reserves -# 0 = not active -# 1 = active systemwide -# Reserves: 0 - # Minimum qualifying renewables penetration # 0 = not active # 1 = active systemwide diff --git a/Example_Systems/RealSystemExample/ISONE_Singlezone/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Singlezone/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Singlezone/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Singlezone/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Singlezone/Settings/genx_settings.yml b/Example_Systems/RealSystemExample/ISONE_Singlezone/Settings/genx_settings.yml index 19d3dd63d7..4e9839146d 100644 --- a/Example_Systems/RealSystemExample/ISONE_Singlezone/Settings/genx_settings.yml +++ b/Example_Systems/RealSystemExample/ISONE_Singlezone/Settings/genx_settings.yml @@ -2,7 +2,7 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide +OperationalReserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 1 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Trizone/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Trizone/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Trizone/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone/Settings/genx_settings.yml b/Example_Systems/RealSystemExample/ISONE_Trizone/Settings/genx_settings.yml index 5fd394e64e..78a7b553b7 100644 --- a/Example_Systems/RealSystemExample/ISONE_Trizone/Settings/genx_settings.yml +++ b/Example_Systems/RealSystemExample/ISONE_Trizone/Settings/genx_settings.yml @@ -2,7 +2,7 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide +OperationalReserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 1 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml b/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml index a4c29f8a01..a31efb8070 100644 --- a/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml +++ b/Example_Systems/RealSystemExample/ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 1 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p1/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p1/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p1/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p1/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p2/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p2/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p2/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p2/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p3/Reserves.csv b/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p3/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p3/Reserves.csv rename to Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Inputs/Inputs_p3/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Settings/genx_settings.yml b/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Settings/genx_settings.yml index 6972337a02..cb18f7b469 100644 --- a/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Settings/genx_settings.yml +++ b/Example_Systems/RealSystemExample/ISONE_Trizone_MultiStage/Settings/genx_settings.yml @@ -3,7 +3,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 0 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Reserves.csv b/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Operational_reserves.csv similarity index 100% rename from Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Reserves.csv rename to Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Operational_reserves.csv diff --git a/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml b/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml index 88b4fe9e9f..d8ac96f8cf 100644 --- a/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml +++ b/Example_Systems/RealSystemExample/MGA_ISONE_Trizone_FullTimeseries/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 1 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/RetrofitExample/RetrofitExample_MultiStage/Settings/genx_settings.yml b/Example_Systems/RetrofitExample/RetrofitExample_MultiStage/Settings/genx_settings.yml index 28e19171a1..5aa452f5f8 100644 --- a/Example_Systems/RetrofitExample/RetrofitExample_MultiStage/Settings/genx_settings.yml +++ b/Example_Systems/RetrofitExample/RetrofitExample_MultiStage/Settings/genx_settings.yml @@ -3,7 +3,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/OneZone/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/OneZone/Settings/genx_settings.yml index fc1d6bf582..7adc76f6ee 100644 --- a/Example_Systems/SmallNewEngland/OneZone/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/OneZone/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/OneZone_3VREBin/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone_3VREBin/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone_3VREBin/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone_3VREBin/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone_3VREBin/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/OneZone_3VREBin/Settings/genx_settings.yml index c7577b5510..57873271e6 100644 --- a/Example_Systems/SmallNewEngland/OneZone_3VREBin/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/OneZone_3VREBin/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone_MultiFuels/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone_MultiFuels/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Settings/genx_settings.yml index c4f7e8fbfc..82914466cb 100644 --- a/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/OneZone_MultiFuels/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 1 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 1 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 0 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p1/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p1/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p1/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p1/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p2/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p2/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p2/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p2/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p3/Reserves.csv b/Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p3/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p3/Reserves.csv rename to Example_Systems/SmallNewEngland/OneZone_MultiStage/Inputs/Inputs_p3/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/OneZone_MultiStage/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/OneZone_MultiStage/Settings/genx_settings.yml index 541e88e3c1..30a41f45ca 100644 --- a/Example_Systems/SmallNewEngland/OneZone_MultiStage/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/OneZone_MultiStage/Settings/genx_settings.yml @@ -3,7 +3,7 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 0 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide +OperationalReserves: 1 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/ThreeZones/Reserves.csv b/Example_Systems/SmallNewEngland/ThreeZones/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/ThreeZones/Reserves.csv rename to Example_Systems/SmallNewEngland/ThreeZones/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/ThreeZones/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/ThreeZones/Settings/genx_settings.yml index 4536e68897..334043d797 100644 --- a/Example_Systems/SmallNewEngland/ThreeZones/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/ThreeZones/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Settings/genx_settings.yml index b4641ca2a3..093d62b429 100644 --- a/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Settings/genx_settings.yml @@ -3,7 +3,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p1/Reserves.csv b/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p1/Reserves.csv rename to Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Settings/genx_settings.yml b/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Settings/genx_settings.yml index 68c2b0b382..3af85d42e8 100644 --- a/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Settings/genx_settings.yml +++ b/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Settings/genx_settings.yml @@ -2,7 +2,6 @@ OverwriteResults: 0 # Overwrite existing results in output folder or create a ne PrintModel: 0 # Write the model formulation as an output; 0 = active; 1 = not active NetworkExpansion: 1 # Transmission network expansionl; 0 = not active; 1 = active systemwide Trans_Loss_Segments: 1 # Number of segments used in piecewise linear approximation of transmission losses; 1 = linear, >2 = piecewise quadratic -Reserves: 0 # Regulation (primary) and operating (secondary) reserves; 0 = not active, 1 = active systemwide EnergyShareRequirement: 0 # Minimum qualifying renewables penetration; 0 = not active; 1 = active systemwide CapacityReserveMargin: 0 # Number of capacity reserve margin constraints; 0 = not active; 1 = active systemwide CO2Cap: 2 # CO2 emissions cap; 0 = not active (no CO2 emission limit); 1 = mass-based emission limit constraint; 2 = demand + rate-based emission limit constraint; 3 = generation + rate-based emission limit constraint diff --git a/Example_Systems/VREStor_Example/Settings/genx_settings.yml b/Example_Systems/VREStor_Example/Settings/genx_settings.yml index 557653af09..cb4fa188f3 100644 --- a/Example_Systems/VREStor_Example/Settings/genx_settings.yml +++ b/Example_Systems/VREStor_Example/Settings/genx_settings.yml @@ -9,7 +9,6 @@ Trans_Loss_Segments: 1 CapacityReserveMargin: 1 ModelingtoGenerateAlternativeSlack: 0.1 MethodofMorris: 0 -Reserves: 0 StorageLosses: 1 OverwriteResults: 1 UCommit: 2 diff --git a/docs/src/core.md b/docs/src/core.md index 00bca332e2..0703e5d69f 100644 --- a/docs/src/core.md +++ b/docs/src/core.md @@ -12,10 +12,10 @@ Modules = [GenX] Pages = ["non_served_energy.jl"] ``` -## Reserves +## Operational Reserves ```@autodocs Modules = [GenX] -Pages = ["reserves.jl"] +Pages = ["operational_reserves.jl"] ``` ## Transmission diff --git a/docs/src/data_documentation.md b/docs/src/data_documentation.md index ecb30301e8..a3b151ff8e 100644 --- a/docs/src/data_documentation.md +++ b/docs/src/data_documentation.md @@ -26,8 +26,8 @@ Note that all settings parameters are case sensitive. |Trans\_Loss\_Segments | Number of segments to use in piece-wise linear approximation of losses.| ||1: linear| ||>=2: piece-wise quadratic| -|Reserves | Flag for modeling operating reserves .| -||0 = No operating reserves considered. | +|OperationalReserves | Flag for modeling operating operational reserves .| +||0 = No operational reserves considered. | ||1 = Consider regulation (primary) and spinning (secondary) reserves. | |StorageLosses | Flag to account for storage related losses.| ||0 = VRE and CO2 constraints DO NOT account for energy lost. | @@ -348,7 +348,7 @@ Each file contains cost and performance parameters for various generators and ot |Down\_Time |Minimum amount of time a resource has to remain in the shutdown state.| |Start\_Cost\_per\_MW |Cost per MW of nameplate capacity to start a generator ($/MW per start). Multiplied by the number of generation units (each with a pre-specified nameplate capacity) that is turned on.| |Start\_Fuel\_MMBTU\_per\_MW |Startup fuel use per MW of nameplate capacity of each generator (MMBtu/MW per start).| -|**Reserves = 1** | | +|**OperationalReserves = 1** | | |Reg\_Cost |Cost of providing regulation reserves ($/MW per time step/hour).| |Rsv\_Cost |Cost of providing upwards spinning or contingency reserves ($/MW per time step/hour).| |Reg\_Max |[0,1], Fraction of nameplate capacity that can committed to provided regulation reserves. .| @@ -366,7 +366,7 @@ Each file contains cost and performance parameters for various generators and ot --- |**Column Name** | **Description**| | :------------ | :-----------| -|**Reserves = 1** | | +|**OperationalReserves = 1** | | |Reg\_Cost |Cost of providing regulation reserves ($/MW per time step/hour).| |Rsv\_Cost |Cost of providing upwards spinning or contingency reserves ($/MW per time step/hour).| |Reg\_Max |[0,1], Fraction of nameplate capacity that can committed to provided regulation reserves. .| @@ -388,7 +388,7 @@ Each file contains cost and performance parameters for various generators and ot --- |**Column Name** | **Description**| | :------------ | :-----------| -|**Reserves = 1** | | +|**OperationalReserves = 1** | | |Reg\_Cost |Cost of providing regulation reserves ($/MW per time step/hour).| |Rsv\_Cost |Cost of providing upwards spinning or contingency reserves ($/MW per time step/hour).| |Reg\_Max |[0,1], Fraction of nameplate capacity that can committed to provided regulation reserves. .| @@ -429,7 +429,7 @@ Each file contains cost and performance parameters for various generators and ot --- |**Column Name** | **Description**| | :------------ | :-----------| -|**Reserves = 1** | | +|**OperationalReserves = 1** | | |Reg\_Cost |Cost of providing regulation reserves ($/MW per time step/hour).| |Rsv\_Cost |Cost of providing upwards spinning or contingency reserves ($/MW per time step/hour).| |Reg\_Max |[0,1], Fraction of nameplate capacity that can committed to provided regulation reserves. .| @@ -559,7 +559,7 @@ Each co-located VRE and storage resource can be easily configured to contain eit --- |**Column Name** | **Description**| | :------------ | :-----------| -|**Reserves = 1** | | +|**OperationalReserves = 1** | | |Reg\_Cost |Cost of providing regulation reserves ($/MW per time step/hour).| |Rsv\_Cost |Cost of providing upwards spinning or contingency reserves ($/MW per time step/hour).| |Reg\_Max |[0,1], Fraction of nameplate capacity that can committed to provided regulation reserves. .| @@ -738,11 +738,11 @@ Modeling grid operations for each hour of the year can be computationally expens -#### 2.2.2 Reserves.csv +#### 2.2.2 Operational_reserves.csv -This file includes parameter inputs needed to model time-dependent procurement of regulation and spinning reserves. This file is needed if `Reserves` flag is activated in the YAML file `genx_settings.yml`. +This file includes parameter inputs needed to model time-dependent procurement of regulation and spinning reserves. This file is needed if `OperationalReserves` flag is activated in the YAML file `genx_settings.yml`. -###### Table 8: Structure of the Reserves.csv file +###### Table 8: Structure of the Operational_reserves.csv file --- |**Column Name** | **Description**| | :------------ | :-----------| diff --git a/src/configure_settings/configure_settings.jl b/src/configure_settings/configure_settings.jl index 4f0f065bba..49072ac162 100644 --- a/src/configure_settings/configure_settings.jl +++ b/src/configure_settings/configure_settings.jl @@ -4,7 +4,7 @@ function default_settings() "OverwriteResults" => 0, "NetworkExpansion" => 0, "Trans_Loss_Segments" => 1, - "Reserves" => 0, + "OperationalReserves" => 0, "EnergyShareRequirement" => 0, "CapacityReserveMargin" => 0, "CO2Cap" => 0, @@ -62,6 +62,13 @@ function validate_settings!(settings::Dict{Any,Any}) Please see the Methods page in the documentation.""" maxlog=1 end + if haskey(settings, "Reserves") + Base.depwarn("""The Reserves setting has been deprecated. Please use the + OperationalReserves setting instead.""", :validate_settings!, force=true) + settings["OperationalReserves"] = settings["Reserves"] + delete!(settings, "Reserves") + end + if settings["EnableJuMPStringNames"]==0 && settings["ComputeConflicts"]==1 settings["EnableJuMPStringNames"]=1; end diff --git a/src/load_inputs/load_dataframe.jl b/src/load_inputs/load_dataframe.jl index 0e5d74c92d..4d8cfe6126 100644 --- a/src/load_inputs/load_dataframe.jl +++ b/src/load_inputs/load_dataframe.jl @@ -64,7 +64,7 @@ function load_dataframe(dir::AbstractString, basenames::Vector{String})::DataFra target = look_for_file_with_alternate_case(dir, base) # admonish if target != FILENOTFOUND - @info """The filename '$target' is deprecated. '$best_basename' is preferred.""" + Base.depwarn("""The filename '$target' is deprecated. '$best_basename' is preferred.""", :load_dataframe, force=true) return load_dataframe_from_file(joinpath(dir, target)) end end diff --git a/src/load_inputs/load_inputs.jl b/src/load_inputs/load_inputs.jl index 16b3b22c31..a18e2737e4 100644 --- a/src/load_inputs/load_inputs.jl +++ b/src/load_inputs/load_inputs.jl @@ -41,9 +41,9 @@ function load_inputs(setup::Dict,path::AbstractString) end end - # Read in general configuration parameters for reserves (resource-specific reserve parameters are read in generators_data()) - if setup["Reserves"]==1 - load_reserves!(setup, path, inputs) + # Read in general configuration parameters for operational reserves (resource-specific reserve parameters are read in load_resources_data) + if setup["OperationalReserves"]==1 + load_operational_reserves!(setup, path, inputs) end if setup["MinCapReq"] == 1 diff --git a/src/load_inputs/load_reserves.jl b/src/load_inputs/load_operational_reserves.jl similarity index 84% rename from src/load_inputs/load_reserves.jl rename to src/load_inputs/load_operational_reserves.jl index 19ac515f5f..35508e9f5f 100644 --- a/src/load_inputs/load_reserves.jl +++ b/src/load_inputs/load_operational_reserves.jl @@ -1,11 +1,12 @@ @doc raw""" - load_reserves!(setup::Dict,path::AbstractString, inputs::Dict) + load_operational_reserves!(setup::Dict,path::AbstractString, inputs::Dict) Read input parameters related to frequency regulation and operating reserve requirements """ -function load_reserves!(setup::Dict, path::AbstractString, inputs::Dict) - filename = "Reserves.csv" - res_in = load_dataframe(joinpath(path, filename)) +function load_operational_reserves!(setup::Dict, path::AbstractString, inputs::Dict) + filename = "Operational_reserves.csv" + deprecated_synonym = "Reserves.csv" + res_in = load_dataframe(path, [filename, deprecated_synonym]) gen = inputs["RESOURCES"] @@ -18,7 +19,7 @@ function load_reserves!(setup::Dict, path::AbstractString, inputs::Dict) end for col in columns if col in all_columns - @info "The column name $col in file $filename is deprecated; prefer $best" + Base.depwarn("The column name $col in file $filename is deprecated; prefer $best", :load_operational_reserves, force=true) return float(df[firstrow, col]) end end @@ -48,7 +49,7 @@ function load_reserves!(setup::Dict, path::AbstractString, inputs::Dict) if setup["UCommit"] >= 1 inputs["pDynamic_Contingency"] = convert(Int8, res_in[1,:Dynamic_Contingency] ) # Set BigM value used for dynamic contingencies cases to be largest possible cluster size - # Note: this BigM value is only relevant for units in the COMMIT set. See reserves.jl for details on implementation of dynamic contingencies + # Note: this BigM value is only relevant for units in the COMMIT set. See operational_reserves.jl for details on implementation of dynamic contingencies if inputs["pDynamic_Contingency"] > 0 inputs["pContingency_BigM"] = zeros(Float64, inputs["G"]) for y in inputs["COMMIT"] diff --git a/src/load_inputs/load_resources_data.jl b/src/load_inputs/load_resources_data.jl index 4b744d0c13..53d8fab4bb 100644 --- a/src/load_inputs/load_resources_data.jl +++ b/src/load_inputs/load_resources_data.jl @@ -912,8 +912,8 @@ function add_resources_to_input_data!(inputs::Dict, setup::Dict, case_path::Abst error("The Retrofits feature, which is activated by nonzero data in a 'RETRO' column in any of the resource .csv files, is under development and is not ready for public use. Disable this message to enable this *experimental* feature.") end - ## Reserves - if setup["Reserves"] >= 1 + ## Operational Reserves + if setup["OperationalReserves"] >= 1 # Set for resources with regulation reserve requirements inputs["REG"] = ids_with_regulation_reserve_requirements(gen) # Set for resources with spinning reserve requirements diff --git a/src/model/core/reserves.jl b/src/model/core/operational_reserves.jl similarity index 90% rename from src/model/core/reserves.jl rename to src/model/core/operational_reserves.jl index e3601acec5..ef26fbe01e 100644 --- a/src/model/core/reserves.jl +++ b/src/model/core/operational_reserves.jl @@ -1,34 +1,34 @@ ########################################################################################################################################## -# The reserves.jl module contains functions to creates decision variables related to frequency regulation and reserves provision +# The operational_reserves.jl module contains functions to creates decision variables related to frequency regulation and reserves provision # and constraints setting overall system requirements for regulation and operating reserves. ########################################################################################################################################## @doc raw""" - reserves!(EP::Model, inputs::Dict, setup::Dict) + operational_reserves!(EP::Model, inputs::Dict, setup::Dict) -This function sets up reserve decisions and constraints, using the reserves_core()` and reserves_contingency()` functions. +This function sets up reserve decisions and constraints, using the operational_reserves_core()` and operational_reserves_contingency()` functions. """ -function reserves!(EP::Model, inputs::Dict, setup::Dict) +function operational_reserves!(EP::Model, inputs::Dict, setup::Dict) UCommit = setup["UCommit"] if inputs["pStatic_Contingency"] > 0 || (UCommit >= 1 && inputs["pDynamic_Contingency"] >= 1) - reserves_contingency!(EP, inputs, setup) + operational_reserves_contingency!(EP, inputs, setup) end - reserves_core!(EP, inputs, setup) + operational_reserves_core!(EP, inputs, setup) end @doc raw""" - reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) + operational_reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) -This function establishes several different versions of contingency reserve requirement expression, $CONTINGENCY$ used in the reserves_core() function below. +This function establishes several different versions of contingency reserve requirement expression, $CONTINGENCY$ used in the operational_reserves_core() function below. -Contingency reserves represent requirements for upward ramping capability within a specified time frame to compensated for forced outages or unplanned failures of generators or transmission lines (e.g. N-1 contingencies). +Contingency operational reserves represent requirements for upward ramping capability within a specified time frame to compensated for forced outages or unplanned failures of generators or transmission lines (e.g. N-1 contingencies). There are three options for the $Contingency$ expression, depending on user settings: - 1. a static contingency, in which the contingency requirement is set based on a fixed value (in MW) specified in the '''reserves.csv''' input file; + 1. a static contingency, in which the contingency requirement is set based on a fixed value (in MW) specified in the '''Operational_reserves.csv''' input file; 2. a dynamic contingency based on installed capacity decisions, in which the largest 'installed' generator is used to determine the contingency requirement for all time periods; and 3. dynamic unit commitment based contingency, in which the largest 'committed' generator in any time period is used to determine the contingency requirement in that time period. @@ -67,9 +67,9 @@ Option 3 (dynamic commitment-based contingency) is expressed by the following se where $M_y$ is a `big M' constant equal to the largest possible capacity that can be installed for generation cluster $y$, and $Contingency\_Aux_{y,z,t} \in [0,1]$ is a binary auxiliary variable that is forced by the second and third equations above to be 1 if the commitment state for that generation cluster $\nu_{y,z,t} > 0$ for any generator $y \in \mathcal{UC}$ and zone $z$ and time period $t$, and can be 0 otherwise. Note that this dynamic commitment-based contingency can only be specified if discrete unit commitment decisions are used (e.g. it will not work if relaxed unit commitment is used). """ -function reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) +function operational_reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) - println("Reserves Contingency Module") + println("Operational Reserves Contingency Module") gen = inputs["RESOURCES"] @@ -83,7 +83,7 @@ function reserves_contingency!(EP::Model, inputs::Dict, setup::Dict) ### Variables ### - # NOTE: If Dynamic_Contingency == 0, then contingency is a fixed parameter equal the value specified in reserves.csv via pStatic_Contingency. + # NOTE: If Dynamic_Contingency == 0, then contingency is a fixed parameter equal the value specified in Operational_reserves.csv via pStatic_Contingency. if UCommit == 1 && pDynamic_Contingency == 1 # Contingency = largest installed thermal unit @variable(EP, vLARGEST_CONTINGENCY >= 0) @@ -135,7 +135,7 @@ end @doc raw""" - reserves_core!(EP::Model, inputs::Dict, setup::Dict) + operational_reserves_core!(EP::Model, inputs::Dict, setup::Dict) This function creates decision variables related to frequency regulation and reserves provision and constraints setting overall system requirements for regulation and operating reserves. @@ -148,7 +148,7 @@ We assume frequency regulation is symmetric (provided in equal quantity towards Storage resources ($y \in \mathcal{O}$) have two pairs of auxilary variables to reflect contributions to regulation and reserves when charging and discharging, where the primary variables ($f_{y,z,t}$ \& $r_{y,z,t}$) becomes equal to sum of these auxilary variables. -Co-located VRE-STOR resources are described further in the reserves function for colocated VRE and storage resources (```vre_stor_reserves!()```). +Co-located VRE-STOR resources are described further in the reserves function for colocated VRE and storage resources (```vre_stor_operational_reserves!()```). **Unmet operating reserves** @@ -198,14 +198,14 @@ $\rho^{max,wind}_{y,z,t}$ is the forecasted capacity factor for co-located wind $\Delta^{\text{total}}_{y,z}$ is the total installed capacity of standalone variable renewable resources $y \in VRE$ and zone $z$; $\Delta^{\text{total,pv}}_{y,z}$ is the total installed capacity of co-located solar PV resources $y \in \mathcal{VS}^{pv}$ and zone $z$; $\Delta^{\text{total,wind}}_{y,z}$ is the total installed capacity of co-located wind resources $y \in \mathcal{VS}^{wind}$ and zone $z$; -and $\epsilon^{demand}_{rsv}$ and $\epsilon^{vre}_{rsv}$ are parameters specifying the required contingency reserves as a fraction of forecasted demand and variable renewable generation. $Contingency$ is an expression defined in the reserves\_contingency() function meant to represent the largest `N-1` contingency (unplanned generator outage) that the system operator must carry operating reserves to cover and depends on how the user wishes to specify contingency requirements. +and $\epsilon^{demand}_{rsv}$ and $\epsilon^{vre}_{rsv}$ are parameters specifying the required contingency reserves as a fraction of forecasted demand and variable renewable generation. $Contingency$ is an expression defined in the operational\_reserves\_contingency!() function meant to represent the largest `N-1` contingency (unplanned generator outage) that the system operator must carry operating reserves to cover and depends on how the user wishes to specify contingency requirements. """ -function reserves_core!(EP::Model, inputs::Dict, setup::Dict) +function operational_reserves_core!(EP::Model, inputs::Dict, setup::Dict) # DEV NOTE: After simplifying reserve changes are integrated/confirmed, should we revise such that reserves can be modeled without UC constraints on? # Is there a use case for economic dispatch constraints with reserves? - println("Reserves Core Module") + println("Operational Reserves Core Module") gen = inputs["RESOURCES"] UCommit = setup["UCommit"] @@ -226,7 +226,7 @@ function reserves_core!(EP::Model, inputs::Dict, setup::Dict) ## Integer Unit Commitment configuration for variables - ## Decision variables for reserves + ## Decision variables for operational reserves @variable(EP, vREG[y in REG, t=1:T] >= 0) # Contribution to regulation (primary reserves), assumed to be symmetric (up & down directions equal) @variable(EP, vRSV[y in RSV, t=1:T] >= 0) # Contribution to operating reserves (secondary reserves or contingency reserves); only model upward reserve requirements @@ -265,7 +265,7 @@ function reserves_core!(EP::Model, inputs::Dict, setup::Dict) add_to_expression!(EP[:eObj], eTotalCRsvPen) end -function reserves_constraints!(EP, inputs) +function operational_reserves_constraints!(EP, inputs) T = inputs["T"] # Number of time steps (hours) REG = inputs["REG"] diff --git a/src/model/generate_model.jl b/src/model/generate_model.jl index 279e0a4bec..11edf94ecb 100644 --- a/src/model/generate_model.jl +++ b/src/model/generate_model.jl @@ -131,8 +131,8 @@ function generate_model(setup::Dict,inputs::Dict,OPTIMIZER::MOI.OptimizerWithAtt co2!(EP, inputs) - if setup["Reserves"] > 0 - reserves!(EP, inputs, setup) + if setup["OperationalReserves"] > 0 + operational_reserves!(EP, inputs, setup) end if Z > 1 @@ -196,8 +196,8 @@ function generate_model(setup::Dict,inputs::Dict,OPTIMIZER::MOI.OptimizerWithAtt # Policies - if setup["Reserves"] > 0 - reserves_constraints!(EP, inputs) + if setup["OperationalReserves"] > 0 + operational_reserves_constraints!(EP, inputs) end # CO2 emissions limits diff --git a/src/model/resources/curtailable_variable_renewable/curtailable_variable_renewable.jl b/src/model/resources/curtailable_variable_renewable/curtailable_variable_renewable.jl index 5e624edbc0..0904d8e78f 100644 --- a/src/model/resources/curtailable_variable_renewable/curtailable_variable_renewable.jl +++ b/src/model/resources/curtailable_variable_renewable/curtailable_variable_renewable.jl @@ -10,7 +10,7 @@ For each VRE technology type $y$ and model zone $z$, the model allows for incorp \end{aligned} ``` The above constraint is defined as an inequality instead of an equality to allow for VRE power output to be curtailed if desired. This adds the possibility of introducing VRE curtailment as an extra degree of freedom to guarantee that generation exactly meets demand in each time step. -Note that if ```Reserves=1``` indicating that frequency regulation and operating reserves are modeled, then this function calls ```curtailable_variable_renewable_reserves!()```, which replaces the above constraints with a formulation inclusive of reserve provision. +Note that if ```OperationalReserves=1``` indicating that frequency regulation and operating reserves are modeled, then this function calls ```curtailable_variable_renewable_operational_reserves!()```, which replaces the above constraints with a formulation inclusive of reserve provision. """ function curtailable_variable_renewable!(EP::Model, inputs::Dict, setup::Dict) ## Controllable variable renewable generators @@ -20,7 +20,7 @@ function curtailable_variable_renewable!(EP::Model, inputs::Dict, setup::Dict) gen = inputs["RESOURCES"] - Reserves = setup["Reserves"] + OperationalReserves = setup["OperationalReserves"] CapacityReserveMargin = setup["CapacityReserveMargin"] T = inputs["T"] # Number of time steps (hours) @@ -48,10 +48,10 @@ function curtailable_variable_renewable!(EP::Model, inputs::Dict, setup::Dict) end ### Constraints ### - if Reserves == 1 + if OperationalReserves == 1 # Constraints on power output and contribution to regulation and reserves - curtailable_variable_renewable_reserves!(EP, inputs) - remove_reserves_for_binned_vre_resources!(EP, inputs) + curtailable_variable_renewable_operational_reserves!(EP, inputs) + remove_operational_reserves_for_binned_vre_resources!(EP, inputs) else # For resource for which we are modeling hourly power output for y in VRE_POWER_OUT @@ -79,7 +79,7 @@ function curtailable_variable_renewable!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - curtailable_variable_renewable_reserves!(EP::Model, inputs::Dict) + curtailable_variable_renewable_operational_reserves!(EP::Model, inputs::Dict) When modeling operating reserves, this function is called by ```curtailable_variable_renewable()```, which modifies the constraint for maximum power output in each time step from VRE resources to account for procuring some of the available capacity for frequency regulation ($f_{y,z,t}$) and upward operating (spinning) reserves ($r_{y,z,t}$). ```math \begin{aligned} @@ -101,7 +101,7 @@ The amount of frequency regulation and operating reserves procured in each time \end{aligned} ``` """ -function curtailable_variable_renewable_reserves!(EP::Model, inputs::Dict) +function curtailable_variable_renewable_operational_reserves!(EP::Model, inputs::Dict) gen = inputs["RESOURCES"] T = inputs["T"] @@ -133,7 +133,7 @@ function curtailable_variable_renewable_reserves!(EP::Model, inputs::Dict) @constraint(EP, [y in VRE_POWER_OUT, t in 1:T], expr[y, t] <= hourly_bin_capacity(y, t)) end -function remove_reserves_for_binned_vre_resources!(EP::Model, inputs::Dict) +function remove_operational_reserves_for_binned_vre_resources!(EP::Model, inputs::Dict) gen = inputs["RESOURCES"] VRE = inputs["VRE"] diff --git a/src/model/resources/hydro/hydro_res.jl b/src/model/resources/hydro/hydro_res.jl index 7d3da55db0..082841f836 100644 --- a/src/model/resources/hydro/hydro_res.jl +++ b/src/model/resources/hydro/hydro_res.jl @@ -80,7 +80,7 @@ function hydro_res!(EP::Model, inputs::Dict, setup::Dict) reserves_term = @expression(EP, [y in HYDRO_RES, t in 1:T], 0) regulation_term = @expression(EP, [y in HYDRO_RES, t in 1:T], 0) - if setup["Reserves"] > 0 + if setup["OperationalReserves"] > 0 HYDRO_RES_REG = intersect(HYDRO_RES, inputs["REG"]) # Set of reservoir hydro resources with regulation reserves HYDRO_RES_RSV = intersect(HYDRO_RES, inputs["RSV"]) # Set of reservoir hydro resources with spinning reserves regulation_term = @expression(EP, [y in HYDRO_RES, t in 1:T], @@ -149,9 +149,9 @@ function hydro_res!(EP::Model, inputs::Dict, setup::Dict) # Maximum energy stored in reservoir must be less than energy capacity in all hours - only applied to HYDRO_RES_KNOWN_CAP @constraint(EP, cHydroMaxEnergy[y in HYDRO_RES_KNOWN_CAP, t in 1:T], EP[:vS_HYDRO][y,t] <= hydro_energy_to_power_ratio(gen[y])*EP[:eTotalCap][y]) - if setup["Reserves"] == 1 + if setup["OperationalReserves"] == 1 ### Reserve related constraints for reservoir hydro resources (y in HYDRO_RES), if used - hydro_res_reserves!(EP, inputs) + hydro_res_operational_reserves!(EP, inputs) end ##CO2 Polcy Module Hydro Res Generation by zone @expression(EP, eGenerationByHydroRes[z=1:Z, t=1:T], # the unit is GW @@ -162,7 +162,7 @@ function hydro_res!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - hydro_res_reserves!(EP::Model, inputs::Dict) + hydro_res_operational_reserves!(EP::Model, inputs::Dict) This module defines the modified constraints and additional constraints needed when modeling operating reserves **Modifications when operating reserves are modeled** When modeling operating reserves, the constraints regarding maximum power flow limits are modified to account for procuring some of the available capacity for frequency regulation ($f_{y,z,t}$) and "updward" operating (or spinning) reserves ($r_{y,z,t}$). @@ -189,9 +189,9 @@ r_{y,z, t} \leq \upsilon^{rsv}_{y,z}\times \Delta^{total}_{y,z} \end{aligned} ``` """ -function hydro_res_reserves!(EP::Model, inputs::Dict) +function hydro_res_operational_reserves!(EP::Model, inputs::Dict) - println("Hydro Reservoir Reserves Module") + println("Hydro Reservoir Operational Reserves Module") gen = inputs["RESOURCES"] diff --git a/src/model/resources/hydrogen/electrolyzer.jl b/src/model/resources/hydrogen/electrolyzer.jl index 7d74de7d34..97af0811be 100644 --- a/src/model/resources/hydrogen/electrolyzer.jl +++ b/src/model/resources/hydrogen/electrolyzer.jl @@ -122,7 +122,7 @@ function electrolyzer!(EP::Model, inputs::Dict, setup::Dict) ### Minimum and maximum power output constraints (Constraints #3-4) # Electrolyzers currently do not contribute to operating reserves, so there is not - # special case (for Reserves == 1) here. + # special case (for OperationalReserves == 1) here. # Could allow them to contribute as a curtailable demand in future. @constraints(EP, begin # Minimum stable power generated per technology "y" at hour "t" Min_Power diff --git a/src/model/resources/resources.jl b/src/model/resources/resources.jl index 614672b190..e6dabe179e 100644 --- a/src/model/resources/resources.jl +++ b/src/model/resources/resources.jl @@ -637,8 +637,7 @@ ids_with_unit_commitment(rs::Vector{T}) where T <: AbstractResource = findall(r # Without unit commitment no_unit_commitment(rs::Vector{T}) where T <: AbstractResource = findall(r -> isa(r,Thermal) && r.model == 2, rs) -# Reserves -# cap reserve margin +# Operational Reserves ids_with_regulation_reserve_requirements(rs::Vector{T}) where T <: AbstractResource = findall(r -> reg_max(r) > 0, rs) ids_with_spinning_reserve_requirements(rs::Vector{T}) where T <: AbstractResource = findall(r -> rsv_max(r) > 0, rs) diff --git a/src/model/resources/storage/storage.jl b/src/model/resources/storage/storage.jl index 04895fd91f..fd080704a6 100644 --- a/src/model/resources/storage/storage.jl +++ b/src/model/resources/storage/storage.jl @@ -33,7 +33,7 @@ If reserves are modeled, the following two constraints replace those above: \end{aligned} ``` where $f^{charge}_{o,z,t}$ is the contribution of storage resources to frequency regulation while charging, $f^{discharge}_{o,z,t}$ is the contribution of storage resources to frequency regulation while discharging, and $r^{discharge}_{o,z,t}$ is the contribution of storage resources to upward reserves while discharging. Note that as storage resources can contribute to regulation and reserves while either charging or discharging, the proxy variables $f^{charge}_{o,z,t}, f^{discharge}_{o,z,t}$ and $r^{charge}_{o,z,t}, r^{discharge}_{o,z,t}$ are created for storage resources where the total contribution to regulation and reserves, $f_{o,z,t}, r_{o,z,t}$ is the sum of the proxy variables. -These constraints are created with the function ```storage_symmetric_reserves!()``` in ```storage_symmetric.jl```. +These constraints are created with the function ```storage_symmetric_operational_reserves!()``` in ```storage_symmetric.jl```. **Storage with asymmetric charge and discharge capacity** For storage technologies with asymmetric charge and discharge capacities (all $o \in \mathcal{O}^{asym}$), charge rate, $\Pi_{o,z,t}$, is constrained by the total installed charge capacity, $\Delta^{total, charge}_{o,z}$, as follows: ```math @@ -49,7 +49,7 @@ If reserves are modeled, the above constraint is replaced by the following: \end{aligned} ``` where $f^{+}_{y=o,z,t}$ is the contribution of storage resources to frequency regulation while charging. -These constraints are created with the function ```storage_asymmetric_reserves()``` in ```storage_asymmetric.jl```. +These constraints are created with the function ```storage_symmetric_operational_reserves!()``` in ```storage_asymmetric.jl```. **All storage resources** The following constraints apply to all storage resources, $o \in \mathcal{O}$, regardless of whether the charge/discharge capacities are symmetric or asymmetric. The following two constraints track the state of charge of the storage resources at the end of each time period, relating the volume of energy stored at the end of the time period, $\Gamma_{o,z,t}$, to the state of charge at the end of the prior time period, $\Gamma_{o,z,t-1}$, the charge and discharge decisions in the current time period, $\Pi_{o,z,t}, \Theta_{o,z,t}$, and the self discharge rate for the storage resource (if any), $\eta_{o,z}^{loss}$. The first of these two constraints enforces storage inventory balance for interior time steps $(t \in \mathcal{T}^{interior})$, while the second enforces storage balance constraint for the initial time step $(t \in \mathcal{T}^{start})$. @@ -126,7 +126,7 @@ Finally, the constraints on maximum discharge rate are replaced by the following & \Theta_{o,z,t} + \Theta^{CRM}_{o,z,t} + f^{discharge}_{o,z,t} + r^{discharge}_{o,z,t} \leq \Gamma_{o,z,t-1} & \quad \forall o \in \mathcal{O}, z \in \mathcal{Z}, t \in \mathcal{T} \end{aligned} ``` -The above reserve related constraints are established by ```storage_all_reserves!()``` in ```storage_all.jl``` +The above reserve related constraints are established by ```storage_all_operational_reserves!()``` in ```storage_all.jl``` """ function storage!(EP::Model, inputs::Dict, setup::Dict) @@ -138,7 +138,6 @@ function storage!(EP::Model, inputs::Dict, setup::Dict) p = inputs["hours_per_subperiod"] rep_periods = inputs["REP_PERIOD"] - Reserves = setup["Reserves"] EnergyShareRequirement = setup["EnergyShareRequirement"] CapacityReserveMargin = setup["CapacityReserveMargin"] IncludeLossesInESR = setup["IncludeLossesInESR"] diff --git a/src/model/resources/storage/storage_all.jl b/src/model/resources/storage/storage_all.jl index c44e88b241..f2dae280e5 100644 --- a/src/model/resources/storage/storage_all.jl +++ b/src/model/resources/storage/storage_all.jl @@ -8,7 +8,7 @@ function storage_all!(EP::Model, inputs::Dict, setup::Dict) println("Storage Core Resources Module") gen = inputs["RESOURCES"] - Reserves = setup["Reserves"] + OperationalReserves = setup["OperationalReserves"] CapacityReserveMargin = setup["CapacityReserveMargin"] virtual_discharge_cost = inputs["VirtualChargeDischargeCost"] @@ -107,8 +107,8 @@ function storage_all!(EP::Model, inputs::Dict, setup::Dict) end) # Storage discharge and charge power (and reserve contribution) related constraints: - if Reserves == 1 - storage_all_reserves!(EP, inputs, setup) + if OperationalReserves == 1 + storage_all_operational_reserves!(EP, inputs, setup) else if CapacityReserveMargin > 0 # Note: maximum charge rate is also constrained by maximum charge power capacity, but as this differs by storage type, @@ -151,7 +151,7 @@ function storage_all!(EP::Model, inputs::Dict, setup::Dict) end end -function storage_all_reserves!(EP::Model, inputs::Dict, setup::Dict) +function storage_all_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) gen = inputs["RESOURCES"] T = inputs["T"] diff --git a/src/model/resources/storage/storage_asymmetric.jl b/src/model/resources/storage/storage_asymmetric.jl index 98d375b171..f77fe0fa23 100644 --- a/src/model/resources/storage/storage_asymmetric.jl +++ b/src/model/resources/storage/storage_asymmetric.jl @@ -10,7 +10,7 @@ function storage_asymmetric!(EP::Model, inputs::Dict, setup::Dict) println("Storage Resources with Asmymetric Charge/Discharge Capacity Module") - Reserves = setup["Reserves"] + OperationalReserves = setup["OperationalReserves"] CapacityReserveMargin = setup["CapacityReserveMargin"] T = inputs["T"] # Number of time steps (hours) @@ -20,8 +20,8 @@ function storage_asymmetric!(EP::Model, inputs::Dict, setup::Dict) ### Constraints ### # Storage discharge and charge power (and reserve contribution) related constraints for symmetric storage resources: - if Reserves == 1 - storage_asymmetric_reserves!(EP, inputs, setup) + if OperationalReserves == 1 + storage_asymmetric_operational_reserves!(EP, inputs, setup) else if CapacityReserveMargin > 0 # Maximum charging rate (including virtual charging to move energy held in reserve back to available storage) must be less than charge power rating @@ -35,11 +35,11 @@ function storage_asymmetric!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - storage_asymmetric_reserves!(EP::Model, inputs::Dict) + storage_asymmetric_operational_reserves!(EP::Model, inputs::Dict) Sets up variables and constraints specific to storage resources with asymmetric charge and discharge capacities when reserves are modeled. See ```storage()``` in ```storage.jl``` for description of constraints. """ -function storage_asymmetric_reserves!(EP::Model, inputs::Dict, setup::Dict) +function storage_asymmetric_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) T = inputs["T"] CapacityReserveMargin = setup["CapacityReserveMargin"] > 0 diff --git a/src/model/resources/storage/storage_symmetric.jl b/src/model/resources/storage/storage_symmetric.jl index 569ff59498..3ac73f2ed2 100644 --- a/src/model/resources/storage/storage_symmetric.jl +++ b/src/model/resources/storage/storage_symmetric.jl @@ -10,7 +10,7 @@ function storage_symmetric!(EP::Model, inputs::Dict, setup::Dict) println("Storage Resources with Symmetric Charge/Discharge Capacity Module") - Reserves = setup["Reserves"] + OperationalReserves = setup["OperationalReserves"] CapacityReserveMargin = setup["CapacityReserveMargin"] T = inputs["T"] # Number of time steps (hours) @@ -20,8 +20,8 @@ function storage_symmetric!(EP::Model, inputs::Dict, setup::Dict) ### Constraints ### # Storage discharge and charge power (and reserve contribution) related constraints for symmetric storage resources: - if Reserves == 1 - storage_symmetric_reserves!(EP, inputs, setup) + if OperationalReserves == 1 + storage_symmetric_operational_reserves!(EP, inputs, setup) else if CapacityReserveMargin > 0 @constraints(EP, begin @@ -41,11 +41,11 @@ function storage_symmetric!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - storage_symmetric_reserves!(EP::Model, inputs::Dict) + storage_symmetric_operational_reserves!(EP::Model, inputs::Dict) Sets up variables and constraints specific to storage resources with symmetric charge and discharge capacities when reserves are modeled. See ```storage()``` in ```storage.jl``` for description of constraints. """ -function storage_symmetric_reserves!(EP::Model, inputs::Dict, setup::Dict) +function storage_symmetric_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) T = inputs["T"] CapacityReserveMargin = setup["CapacityReserveMargin"] > 0 diff --git a/src/model/resources/thermal/thermal_commit.jl b/src/model/resources/thermal/thermal_commit.jl index fc4be61a54..5dad1f6b72 100644 --- a/src/model/resources/thermal/thermal_commit.jl +++ b/src/model/resources/thermal/thermal_commit.jl @@ -98,7 +98,7 @@ If not modeling regulation and spinning reserves, thermal resources subject to u (See Constraints 7-8 the code) -If modeling reserves and regulation, these constraints are replaced by those established in this ```thermal_commit_reserves()```. +If modeling reserves and regulation, these constraints are replaced by those established in this ```thermal_commit_operational_reserves()```. **Minimum and maximum up and down time** @@ -144,7 +144,7 @@ function thermal_commit!(EP::Model, inputs::Dict, setup::Dict) reserves_term = @expression(EP, [y in THERM_COMMIT, t in 1:T], 0) regulation_term = @expression(EP, [y in THERM_COMMIT, t in 1:T], 0) - if setup["Reserves"] > 0 + if setup["OperationalReserves"] > 0 THERM_COMMIT_REG = intersect(THERM_COMMIT, inputs["REG"]) # Set of thermal resources with regulation reserves THERM_COMMIT_RSV = intersect(THERM_COMMIT, inputs["RSV"]) # Set of thermal resources with spinning reserves regulation_term = @expression(EP, [y in THERM_COMMIT, t in 1:T], @@ -191,9 +191,9 @@ function thermal_commit!(EP::Model, inputs::Dict, setup::Dict) ### Minimum and maximum power output constraints (Constraints #7-8) - if setup["Reserves"] == 1 - # If modeling with regulation and reserves, constraints are established by thermal_commit_reserves() function below - thermal_commit_reserves!(EP, inputs) + if setup["OperationalReserves"] == 1 + # If modeling with regulation and reserves, constraints are established by thermal_commit_operational_reserves() function below + thermal_commit_operational_reserves!(EP, inputs) else @constraints(EP, begin # Minimum stable power generated per technology "y" at hour "t" > Min power @@ -224,7 +224,7 @@ function thermal_commit!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - thermal_commit_reserves!(EP::Model, inputs::Dict) + thermal_commit_operational_reserves!(EP::Model, inputs::Dict) This function is called by the ```thermal_commit()``` function when regulation and reserves constraints are active and defines reserve related constraints for thermal power plants subject to unit commitment constraints on power plant start-ups and shut-down decisions. @@ -265,9 +265,9 @@ When modeling frequency regulation and spinning reserves contributions, thermal ``` """ -function thermal_commit_reserves!(EP::Model, inputs::Dict) +function thermal_commit_operational_reserves!(EP::Model, inputs::Dict) - println("Thermal Commit Reserves Module") + println("Thermal Commit Operational Reserves Module") gen = inputs["RESOURCES"] diff --git a/src/model/resources/thermal/thermal_no_commit.jl b/src/model/resources/thermal/thermal_no_commit.jl index f015f21858..975a8c67f3 100644 --- a/src/model/resources/thermal/thermal_no_commit.jl +++ b/src/model/resources/thermal/thermal_no_commit.jl @@ -75,9 +75,9 @@ function thermal_no_commit!(EP::Model, inputs::Dict, setup::Dict) end) ### Minimum and maximum power output constraints (Constraints #3-4) - if setup["Reserves"] == 1 - # If modeling with regulation and reserves, constraints are established by thermal_no_commit_reserves() function below - thermal_no_commit_reserves!(EP, inputs) + if setup["OperationalReserves"] == 1 + # If modeling with regulation and reserves, constraints are established by thermal_no_commit_operational_reserves() function below + thermal_no_commit_operational_reserves!(EP, inputs) else @constraints(EP, begin # Minimum stable power generated per technology "y" at hour "t" Min_Power @@ -92,7 +92,7 @@ function thermal_no_commit!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - thermal_no_commit_reserves!(EP::Model, inputs::Dict) + thermal_no_commit_operational_reserves!(EP::Model, inputs::Dict) This function is called by the ```thermal_no_commit()``` function when regulation and reserves constraints are active and defines reserve related constraints for thermal power plants not subject to unit commitment constraints on power plant start-ups and shut-down decisions. @@ -134,7 +134,7 @@ When modeling regulation and spinning reserves, thermal units not subject to uni Note there are multiple versions of these constraints in the code in order to avoid creation of unecessary constraints and decision variables for thermal units unable to provide regulation and/or reserves contributions due to input parameters (e.g. ```Reg_Max=0``` and/or ```RSV_Max=0```). """ -function thermal_no_commit_reserves!(EP::Model, inputs::Dict) +function thermal_no_commit_operational_reserves!(EP::Model, inputs::Dict) println("Thermal No Commit Reserves Module") diff --git a/src/model/resources/vre_stor/vre_stor.jl b/src/model/resources/vre_stor/vre_stor.jl index 1264000d4a..90f9f3dd8b 100644 --- a/src/model/resources/vre_stor/vre_stor.jl +++ b/src/model/resources/vre_stor/vre_stor.jl @@ -121,7 +121,7 @@ function vre_stor!(EP::Model, inputs::Dict, setup::Dict) MinCapReq = setup["MinCapReq"] MaxCapReq = setup["MaxCapReq"] IncludeLossesInESR = setup["IncludeLossesInESR"] - Reserves = setup["Reserves"] + OperationalReserves = setup["OperationalReserves"] by_rid(rid, sym) = by_rid_res(rid, sym, gen_VRE_STOR) @@ -274,9 +274,9 @@ function vre_stor!(EP::Model, inputs::Dict, setup::Dict) vre_stor_capres!(EP, inputs, setup) end - # Operating Reserves Requirement - if Reserves == 1 - vre_stor_reserves!(EP, inputs, setup) + # Operational Reserves Requirement + if OperationalReserves == 1 + vre_stor_operational_reserves!(EP, inputs, setup) end # Power Balance @@ -2147,7 +2147,7 @@ function vre_stor_capres!(EP::Model, inputs::Dict, setup::Dict) end @doc raw""" - vre_stor_reserves!(EP::Model, inputs::Dict, setup::Dict) + vre_stor_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) This function activates either or both frequency regulation and operating reserve options for co-located VRE-storage resources. Co-located VRE and storage resources ($y \in \mathcal{VS}$) have six pairs of @@ -2227,9 +2227,9 @@ Lastly, if the co-located resource has a variable renewable energy component, th \end{aligned} ``` """ -function vre_stor_reserves!(EP::Model, inputs::Dict, setup::Dict) +function vre_stor_operational_reserves!(EP::Model, inputs::Dict, setup::Dict) - println("VRE-STOR Reserves Module") + println("VRE-STOR Operational Reserves Module") ### LOAD DATA & CREATE SETS ### diff --git a/src/write_outputs/write_costs.jl b/src/write_outputs/write_costs.jl index 87676246e5..8cbe60e5c9 100644 --- a/src/write_outputs/write_costs.jl +++ b/src/write_outputs/write_costs.jl @@ -52,7 +52,7 @@ function write_costs(path::AbstractString, inputs::Dict, setup::Dict, EP::Model) dfCost[6,2] = value(EP[:eTotalCStart]) + value(EP[:eTotalCFuelStart]) end - if setup["Reserves"]==1 + if setup["OperationalReserves"]==1 dfCost[7,2] = value(EP[:eTotalCRsvPen]) end diff --git a/src/write_outputs/write_emissions.jl b/src/write_outputs/write_emissions.jl index 036ab35667..f4aaa00550 100644 --- a/src/write_outputs/write_emissions.jl +++ b/src/write_outputs/write_emissions.jl @@ -11,7 +11,7 @@ function write_emissions(path::AbstractString, inputs::Dict, setup::Dict, EP::Mo scale_factor = setup["ParameterScale"] == 1 ? ModelScalingFactor : 1 - if (setup["WriteShadowPrices"]==1 || setup["UCommit"]==0 || (setup["UCommit"]==2 && (setup["Reserves"]==0 || (setup["Reserves"]>0 && inputs["pDynamic_Contingency"]==0)))) # fully linear model + if (setup["WriteShadowPrices"]==1 || setup["UCommit"]==0 || (setup["UCommit"]==2 && (setup["OperationalReserves"]==0 || (setup["OperationalReserves"]>0 && inputs["pDynamic_Contingency"]==0)))) # fully linear model # CO2 emissions by zone if setup["CO2Cap"]>=1 diff --git a/src/write_outputs/write_net_revenue.jl b/src/write_outputs/write_net_revenue.jl index b1d4dd23de..3b3beb0772 100644 --- a/src/write_outputs/write_net_revenue.jl +++ b/src/write_outputs/write_net_revenue.jl @@ -15,7 +15,7 @@ function write_net_revenue(path::AbstractString, inputs::Dict, setup::Dict, EP:: COMMIT = inputs["COMMIT"] # Thermal units for unit commitment STOR_ALL = inputs["STOR_ALL"] - if setup["Reserves"] >= 1 + if setup["OperationalReserves"] >= 1 RSV = inputs["RSV"] # Generators contributing to operating reserves REG = inputs["REG"] # Generators contributing to regulation end @@ -152,7 +152,7 @@ function write_net_revenue(path::AbstractString, inputs::Dict, setup::Dict, EP:: # Add energy and subsidy revenue to the dataframe dfNetRevenue.OperatingReserveRevenue = zeros(nrow(dfNetRevenue)) dfNetRevenue.OperatingRegulationRevenue = zeros(nrow(dfNetRevenue)) - if setup["Reserves"] > 0 && has_duals(EP) + if setup["OperationalReserves"] > 0 && has_duals(EP) dfNetRevenue.OperatingReserveRevenue[RSV] = dfOpRsvRevenue.AnnualSum # Unit is confirmed to be US$ dfNetRevenue.OperatingRegulationRevenue[REG] = dfOpRegRevenue.AnnualSum # Unit is confirmed to be US$ end diff --git a/src/write_outputs/write_outputs.jl b/src/write_outputs/write_outputs.jl index e4e8638bf4..b0c0f6478c 100644 --- a/src/write_outputs/write_outputs.jl +++ b/src/write_outputs/write_outputs.jl @@ -174,7 +174,7 @@ function write_outputs(EP::Model, path::AbstractString, setup::Dict, inputs::Dic println("Time elapsed for writing shutdown is") println(elapsed_time_shutdown) end - if setup["Reserves"] == 1 + if setup["OperationalReserves"] == 1 if output_settings_d["WriteReg"] elapsed_time_reg = @elapsed write_reg(path, inputs, setup, EP) println("Time elapsed for writing regulation is") @@ -325,7 +325,7 @@ function write_outputs(EP::Model, path::AbstractString, setup::Dict, inputs::Dic dfOpRegRevenue = DataFrame() dfOpRsvRevenue = DataFrame() - if setup["Reserves"]==1 && has_duals(EP) + if setup["OperationalReserves"]==1 && has_duals(EP) elapsed_time_op_res_rev = @elapsed dfOpRegRevenue, dfOpRsvRevenue = write_operating_reserve_regulation_revenue(path, inputs, setup, EP) println("Time elapsed for writing oerating reserve and regulation revenue is") println(elapsed_time_op_res_rev) diff --git a/test/LoadResourceData/test_gen_non_colocated/Reserves.csv b/test/LoadResourceData/test_gen_non_colocated/Operational_reserves.csv similarity index 100% rename from test/LoadResourceData/test_gen_non_colocated/Reserves.csv rename to test/LoadResourceData/test_gen_non_colocated/Operational_reserves.csv diff --git a/test/LoadResourceData/test_gen_non_colocated/Settings/genx_settings.yml b/test/LoadResourceData/test_gen_non_colocated/Settings/genx_settings.yml index c210cd63a1..4c1c974d23 100644 --- a/test/LoadResourceData/test_gen_non_colocated/Settings/genx_settings.yml +++ b/test/LoadResourceData/test_gen_non_colocated/Settings/genx_settings.yml @@ -3,7 +3,7 @@ ParameterScale: 1 EnergyShareRequirement: 1 Trans_Loss_Segments: 1 CapacityReserveMargin: 1 -Reserves: 1 +OperationalReserves: 1 StorageLosses: 1 OverwriteResults: 1 UCommit: 2 diff --git a/test/LoadResourceData/test_gen_vre_stor/Reserves.csv b/test/LoadResourceData/test_gen_vre_stor/Operational_reserves.csv similarity index 100% rename from test/LoadResourceData/test_gen_vre_stor/Reserves.csv rename to test/LoadResourceData/test_gen_vre_stor/Operational_reserves.csv diff --git a/test/LoadResourceData/test_gen_vre_stor/Settings/genx_settings.yml b/test/LoadResourceData/test_gen_vre_stor/Settings/genx_settings.yml index c210cd63a1..4c1c974d23 100644 --- a/test/LoadResourceData/test_gen_vre_stor/Settings/genx_settings.yml +++ b/test/LoadResourceData/test_gen_vre_stor/Settings/genx_settings.yml @@ -3,7 +3,7 @@ ParameterScale: 1 EnergyShareRequirement: 1 Trans_Loss_Segments: 1 CapacityReserveMargin: 1 -Reserves: 1 +OperationalReserves: 1 StorageLosses: 1 OverwriteResults: 1 UCommit: 2 diff --git a/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p2/Reserves.csv b/test/MultiStage/Can_Retire/Inputs_p1/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p2/Reserves.csv rename to test/MultiStage/Can_Retire/Inputs_p1/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p3/Reserves.csv b/test/MultiStage/Can_Retire/Inputs_p2/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/ThreeZones_MultiStage/Inputs/Inputs_p3/Reserves.csv rename to test/MultiStage/Can_Retire/Inputs_p2/Operational_reserves.csv diff --git a/Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Reserves.csv b/test/MultiStage/Can_Retire/Inputs_p3/Operational_reserves.csv similarity index 100% rename from Example_Systems/SmallNewEngland/ThreeZones_Slack_Variables_Example/Reserves.csv rename to test/MultiStage/Can_Retire/Inputs_p3/Operational_reserves.csv diff --git a/test/MultiStage/Can_Retire/Inputs_p1/Reserves.csv b/test/MultiStage/Inputs_p1/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Can_Retire/Inputs_p1/Reserves.csv rename to test/MultiStage/Inputs_p1/Operational_reserves.csv diff --git a/test/MultiStage/Can_Retire/Inputs_p2/Reserves.csv b/test/MultiStage/Inputs_p2/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Can_Retire/Inputs_p2/Reserves.csv rename to test/MultiStage/Inputs_p2/Operational_reserves.csv diff --git a/test/MultiStage/Can_Retire/Inputs_p3/Reserves.csv b/test/MultiStage/Inputs_p3/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Can_Retire/Inputs_p3/Reserves.csv rename to test/MultiStage/Inputs_p3/Operational_reserves.csv diff --git a/test/MultiStage/Inputs_p1/Reserves.csv b/test/MultiStage/New_Build/Inputs_p1/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Inputs_p1/Reserves.csv rename to test/MultiStage/New_Build/Inputs_p1/Operational_reserves.csv diff --git a/test/MultiStage/Inputs_p2/Reserves.csv b/test/MultiStage/New_Build/Inputs_p2/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Inputs_p2/Reserves.csv rename to test/MultiStage/New_Build/Inputs_p2/Operational_reserves.csv diff --git a/test/MultiStage/Inputs_p3/Reserves.csv b/test/MultiStage/New_Build/Inputs_p3/Operational_reserves.csv similarity index 100% rename from test/MultiStage/Inputs_p3/Reserves.csv rename to test/MultiStage/New_Build/Inputs_p3/Operational_reserves.csv diff --git a/test/MultiStage/New_Build/Inputs_p3/Reserves.csv b/test/MultiStage/New_Build/Inputs_p3/Reserves.csv deleted file mode 100644 index b495df0dea..0000000000 --- a/test/MultiStage/New_Build/Inputs_p3/Reserves.csv +++ /dev/null @@ -1,2 +0,0 @@ -Reg_Req_Percent_Demand,Reg_Req_Percent_VRE,Rsv_Req_Percent_Demand,Rsv_Req_Percent_VRE,Unmet_Rsv_Penalty_Dollar_per_MW,Dynamic_Contingency,Static_Contingency_MW -0.01,0.0032,0.033,0.0795,1000,0,0 diff --git a/test/MultiStage/New_Build/Inputs_p1/Reserves.csv b/test/TDR/Operational_reserves.csv similarity index 100% rename from test/MultiStage/New_Build/Inputs_p1/Reserves.csv rename to test/TDR/Operational_reserves.csv diff --git a/test/TDR/Reserves.csv b/test/TDR/Reserves.csv deleted file mode 100644 index b495df0dea..0000000000 --- a/test/TDR/Reserves.csv +++ /dev/null @@ -1,2 +0,0 @@ -Reg_Req_Percent_Demand,Reg_Req_Percent_VRE,Rsv_Req_Percent_Demand,Rsv_Req_Percent_VRE,Unmet_Rsv_Penalty_Dollar_per_MW,Dynamic_Contingency,Static_Contingency_MW -0.01,0.0032,0.033,0.0795,1000,0,0 diff --git a/test/MultiStage/New_Build/Inputs_p2/Reserves.csv b/test/ThreeZones/Operational_reserves.csv similarity index 100% rename from test/MultiStage/New_Build/Inputs_p2/Reserves.csv rename to test/ThreeZones/Operational_reserves.csv diff --git a/test/ThreeZones/Reserves.csv b/test/ThreeZones/Reserves.csv deleted file mode 100644 index b495df0dea..0000000000 --- a/test/ThreeZones/Reserves.csv +++ /dev/null @@ -1,2 +0,0 @@ -Reg_Req_Percent_Demand,Reg_Req_Percent_VRE,Rsv_Req_Percent_Demand,Rsv_Req_Percent_VRE,Unmet_Rsv_Penalty_Dollar_per_MW,Dynamic_Contingency,Static_Contingency_MW -0.01,0.0032,0.033,0.0795,1000,0,0 diff --git a/test/test_load_resource_data.jl b/test/test_load_resource_data.jl index 891913bc37..8d6ed55717 100644 --- a/test/test_load_resource_data.jl +++ b/test/test_load_resource_data.jl @@ -219,7 +219,7 @@ end function test_load_resources_data() setup = Dict( "ParameterScale" => 0, - "Reserves" => 1, + "OperationalReserves" => 1, "UCommit" => 2, "MultiStage" => 1, "ResourcePath" => "Resources", @@ -266,7 +266,7 @@ function test_load_VRE_STOR_data() setup = Dict( "ParameterScale" => 0, - "Reserves" => 1, + "OperationalReserves" => 1, "UCommit" => 2, "MultiStage" => 0, "ResourcePath" => "Resources", diff --git a/test/test_multistage.jl b/test/test_multistage.jl index ea7f1b646b..466b627313 100644 --- a/test/test_multistage.jl +++ b/test/test_multistage.jl @@ -18,7 +18,7 @@ multistage_setup = Dict( genx_setup = Dict( "Trans_Loss_Segments" => 1, - "Reserves" => 1, + "OperationalReserves" => 1, "CO2Cap" => 2, "StorageLosses" => 1, "ParameterScale" => 1,