Skip to content

Commit

Permalink
Merge pull request #1208 from blue-marble/develop
Browse files Browse the repository at this point in the history
GridPath v2025.2.0
  • Loading branch information
anamileva authored Jan 21, 2025
2 parents 4be194a + 45dd0c2 commit 6d09bd9
Show file tree
Hide file tree
Showing 46 changed files with 538 additions and 333 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
water_node,target_volume_scenario_id,target_release_scenario_id,minimum_volume_volumeunit,maximum_volume_volumeunit,max_spill,evaporation_coefficient,elevation_type,exogenous_elevation_id,volume_to_elevation_curve_id
Water_Node_1,1,,22500,25000,0.1,0,endogenous,,1
Water_Node_2,1,,1250,1750,0.1,0,endogenous,,1
Water_Node_3,1,,50,75,0.1,0,endogenous,,1
water_node,target_volume_scenario_id,target_release_scenario_id,minimum_volume_volumeunit,maximum_volume_volumeunit,max_spill,evaporation_coefficient,elevation_type,constant_elevation,exogenous_elevation_id,volume_to_elevation_curve_id
Water_Node_1,1,,22500,25000,0.1,0,endogenous,,,1
Water_Node_2,1,,1250,1750,0.1,0,endogenous,,,1
Water_Node_3,1,,50,75,0.1,0,endogenous,,,1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
water_node,target_volume_scenario_id,target_release_scenario_id,minimum_volume_volumeunit,maximum_volume_volumeunit,max_spill,evaporation_coefficient,elevation_type,exogenous_elevation_id,volume_to_elevation_curve_id
Water_Node_1,1,,22500,25000,0.1,0,exogenous,1,
Water_Node_2,1,,1250,1750,0.1,0,exogenous,1,
Water_Node_3,1,,50,75,0.1,0,exogenous,1,
water_node,target_volume_scenario_id,target_release_scenario_id,minimum_volume_volumeunit,maximum_volume_volumeunit,max_spill,evaporation_coefficient,elevation_type,constant_elevation,exogenous_elevation_id,volume_to_elevation_curve_id
Water_Node_1,1,,22500,25000,0.1,0,exogenous,,1,
Water_Node_2,1,,1250,1750,0.1,0,exogenous,,1,
Water_Node_3,1,,50,75,0.1,0,constant,265,,

This file was deleted.

44 changes: 28 additions & 16 deletions db/db_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1110,6 +1110,7 @@ CREATE TABLE inputs_system_water_node_reservoirs
max_spill FLOAT,
evaporation_coefficient FLOAT,
elevation_type TEXT,
constant_elevation FLOAT,
exogenous_elevation_id INTEGER,
volume_to_elevation_curve_id INTEGER,
PRIMARY KEY (water_node_reservoir_scenario_id, water_node),
Expand Down Expand Up @@ -6137,7 +6138,8 @@ CREATE TABLE results_system_market_participation
final_buy_power FLOAT,
final_net_buy_power FLOAT,
PRIMARY KEY (scenario_id, load_zone, market, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

DROP TABLE IF EXISTS results_system_lf_reserves_up;
Expand All @@ -6161,7 +6163,8 @@ CREATE TABLE results_system_lf_reserves_up
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, lf_reserves_up_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

DROP TABLE IF EXISTS results_system_lf_reserves_down;
Expand All @@ -6185,7 +6188,8 @@ CREATE TABLE results_system_lf_reserves_down
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, lf_reserves_down_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

DROP TABLE IF EXISTS results_system_regulation_up;
Expand All @@ -6209,7 +6213,8 @@ CREATE TABLE results_system_regulation_up
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, regulation_up_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

DROP TABLE IF EXISTS results_system_regulation_down;
Expand All @@ -6233,7 +6238,8 @@ CREATE TABLE results_system_regulation_down
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, regulation_down_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

DROP TABLE IF EXISTS results_system_frequency_response;
Expand All @@ -6257,7 +6263,8 @@ CREATE TABLE results_system_frequency_response
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, frequency_response_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, timepoint)
);

-- TODO: frequency_response_partial_ba is the same as frequency_response_ba
Expand Down Expand Up @@ -6308,7 +6315,8 @@ CREATE TABLE results_system_spinning_reserves
dual FLOAT,
marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, spinning_reserves_ba, weather_iteration,
hydro_iteration, subproblem_id, stage_id, timepoint)
hydro_iteration, availability_iteration,
subproblem_id, stage_id, timepoint)
);

-- Carbon emissions
Expand Down Expand Up @@ -6338,7 +6346,8 @@ CREATE TABLE results_system_carbon_cap
dual FLOAT,
carbon_cap_marginal_cost_per_emission FLOAT,
PRIMARY KEY (scenario_id, carbon_cap_zone, weather_iteration,
hydro_iteration, subproblem_id, stage_id, period)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, period)
);

-- Carbon tax emissions
Expand All @@ -6363,7 +6372,8 @@ CREATE TABLE results_system_carbon_tax
total_carbon_tax_cost FLOAT,
dual FLOAT,
PRIMARY KEY (scenario_id, carbon_tax_zone, weather_iteration,
hydro_iteration, subproblem_id, stage_id, period)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, period)
);

-- Performance standard
Expand Down Expand Up @@ -6414,7 +6424,7 @@ CREATE TABLE results_system_carbon_credits
sell_credits FLOAT,
buy_credits FLOAT,
PRIMARY KEY (scenario_id, carbon_credits_zone, weather_iteration,
hydro_iteration,
hydro_iteration, availability_iteration,
subproblem_id, stage_id, period)
);

Expand Down Expand Up @@ -6467,8 +6477,8 @@ CREATE TABLE results_system_horizon_energy_target
energy_target_shortage_mwh FLOAT,
dual FLOAT,
PRIMARY KEY (scenario_id, energy_target_zone, weather_iteration,
hydro_iteration, subproblem_id, stage_id,
balancing_type_horizon, horizon)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, balancing_type_horizon, horizon)
);

-- instantaneous penetration
Expand Down Expand Up @@ -6498,7 +6508,9 @@ CREATE TABLE results_system_instantaneous_penetration
instantaneous_penetration_min_marginal_price_per_mw FLOAT,
dual_instantaneous_penetration_max FLOAT,
instantaneous_penetration_max_marginal_price_per_mw FLOAT,
PRIMARY KEY (scenario_id, instantaneous_penetration_zone, subproblem_id,
PRIMARY KEY (scenario_id, instantaneous_penetration_zone,
weather_iteration, hydro_iteration,
availability_iteration, subproblem_id,
stage_id, timepoint)
);

Expand Down Expand Up @@ -6592,8 +6604,8 @@ CREATE TABLE results_system_policy_requirements
dual FLOAT,
policy_requirement_marginal_cost_per_unit FLOAT,
PRIMARY KEY (scenario_id, policy_name, policy_zone, weather_iteration,
hydro_iteration, subproblem_id, stage_id,
balancing_type_horizon, horizon)
hydro_iteration, availability_iteration, subproblem_id,
stage_id, balancing_type_horizon, horizon)
);


Expand Down Expand Up @@ -6621,7 +6633,7 @@ CREATE TABLE results_system_prm
dual FLOAT,
prm_marginal_cost_per_mw FLOAT,
PRIMARY KEY (scenario_id, prm_zone, period, weather_iteration,
hydro_iteration,
hydro_iteration, availability_iteration,
subproblem_id, stage_id)
);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reservoir constant_elevation
Water_Node_3 265.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,3 @@ Water_Node_2 21 600
Water_Node_2 22 600
Water_Node_2 23 600
Water_Node_2 24 600
Water_Node_3 1 265
Water_Node_3 2 265
Water_Node_3 3 265
Water_Node_3 4 265
Water_Node_3 5 265
Water_Node_3 6 265
Water_Node_3 7 265
Water_Node_3 8 265
Water_Node_3 9 265
Water_Node_3 10 265
Water_Node_3 11 265
Water_Node_3 12 265
Water_Node_3 13 265
Water_Node_3 14 265
Water_Node_3 15 265
Water_Node_3 16 265
Water_Node_3 17 265
Water_Node_3 18 265
Water_Node_3 19 265
Water_Node_3 20 265
Water_Node_3 21 265
Water_Node_3 22 265
Water_Node_3 23 265
Water_Node_3 24 265
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
water_node minimum_volume_volumeunit maximum_volume_volumeunit max_spill evaporation_coefficient elevation_type
Water_Node_1 22500.0 25000.0 0.1 0.0 exogenous
Water_Node_2 1250.0 1750.0 0.1 0.0 exogenous
Water_Node_3 50.0 75.0 0.1 0.0 exogenous
Water_Node_3 50.0 75.0 0.1 0.0 constant
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
reservoir constant_elevation
Water_Node_3 265.0
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,3 @@ Water_Node_2 21 600
Water_Node_2 22 600
Water_Node_2 23 600
Water_Node_2 24 600
Water_Node_3 1 265
Water_Node_3 2 265
Water_Node_3 3 265
Water_Node_3 4 265
Water_Node_3 5 265
Water_Node_3 6 265
Water_Node_3 7 265
Water_Node_3 8 265
Water_Node_3 9 265
Water_Node_3 10 265
Water_Node_3 11 265
Water_Node_3 12 265
Water_Node_3 13 265
Water_Node_3 14 265
Water_Node_3 15 265
Water_Node_3 16 265
Water_Node_3 17 265
Water_Node_3 18 265
Water_Node_3 19 265
Water_Node_3 20 265
Water_Node_3 21 265
Water_Node_3 22 265
Water_Node_3 23 265
Water_Node_3 24 265
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
water_node minimum_volume_volumeunit maximum_volume_volumeunit max_spill evaporation_coefficient elevation_type
Water_Node_1 22500.0 25000.0 0.1 0.0 exogenous
Water_Node_2 1250.0 1750.0 0.1 0.0 exogenous
Water_Node_3 50.0 75.0 0.1 0.0 exogenous
Water_Node_3 50.0 75.0 0.1 0.0 constant
3 changes: 3 additions & 0 deletions gridpath/project/operations/cap_factor_limits.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ def export_results(
with open(
os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"results",
Expand Down
6 changes: 6 additions & 0 deletions gridpath/project/operations/carbon_credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ def load_model_data(

prj_carbon_credits_file = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
str(subproblem),
str(stage),
"inputs",
Expand All @@ -438,6 +441,9 @@ def load_model_data(

prj_carbon_credits_purchase_file = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
str(subproblem),
str(stage),
"inputs",
Expand Down
6 changes: 6 additions & 0 deletions gridpath/project/operations/carbon_tax.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ def load_model_data(
# Average heat rate
hr_curves_file = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand All @@ -295,6 +298,9 @@ def load_model_data(
)
carbon_tax_allowance_file = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,7 @@ def load_startup_chars(

startup_chars_file = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
3 changes: 3 additions & 0 deletions gridpath/project/operations/operational_types/flex_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
3 changes: 3 additions & 0 deletions gridpath/project/operations/operational_types/gen_hydro.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def load_model_data(
# Linked timepoint params
linked_inputs_filename = os.path.join(
scenario_directory,
weather_iteration,
hydro_iteration,
availability_iteration,
subproblem,
stage,
"inputs",
Expand Down
Loading

0 comments on commit 6d09bd9

Please sign in to comment.