Skip to content

Commit

Permalink
Add travel times
Browse files Browse the repository at this point in the history
  • Loading branch information
anamileva committed Nov 7, 2024
1 parent de1d4bc commit 23d90b2
Show file tree
Hide file tree
Showing 37 changed files with 1,047 additions and 227 deletions.
276 changes: 138 additions & 138 deletions db/csvs_test_examples/scenarios.csv

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
balancing_type_horizon,horizon,boundary
day,1,circular
day,1,circular
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
stage_id,balancing_type_horizon,horizon,tmp_start,tmp_start_spinup_or_lookahead,tmp_end,tmp_end_spinup_or_lookahead
1,day,1,1,0,24,0
1,day,1,1,0,24,0
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
water_link,water_node_from,water_node_to,water_link_flow_transport_time_hours
Water_Link_12,Water_Node_1,Water_Node_2,0
Water_Link_23,Water_Node_2,Water_Node_3,0
Water_Link_34,Water_Node_3,Water_Node_4,0
Water_Link_45,Water_Node_4,Water_Node_5,0
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ water_link,water_node_from,water_node_to,water_link_flow_transport_time_hours
Water_Link_12,Water_Node_1,Water_Node_2,1
Water_Link_23,Water_Node_2,Water_Node_3,2
Water_Link_34,Water_Node_3,Water_Node_4,1
Water_Link_45,Water_Node_4,Water_Node_5,2
Water_Link_45,Water_Node_4,Water_Node_5,2
5 changes: 3 additions & 2 deletions db/db_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6265,11 +6265,12 @@ CREATE TABLE results_system_water_link_timepoint
subproblem_id INTEGER,
stage_id INTEGER,
water_link VARCHAR(32),
timepoint INTEGER,
departure_timepoint INTEGER,
arrival_timepoint INTEGER,
water_flow_vol_per_sec FLOAT,
PRIMARY KEY (scenario_id, weather_iteration, hydro_iteration,
availability_iteration, subproblem_id, stage_id, water_link,
timepoint)
departure_timepoint)
);

DROP TABLE IF EXISTS results_system_water_node_timepoint;
Expand Down
8 changes: 4 additions & 4 deletions examples/hydro_system_exog_elev/inputs/water_network.tab
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
water_link water_node_from water_node_to water_link_flow_transport_time_hours
Water_Link_12 Water_Node_1 Water_Node_2 1.0
Water_Link_23 Water_Node_2 Water_Node_3 2.0
Water_Link_34 Water_Node_3 Water_Node_4 1.0
Water_Link_45 Water_Node_4 Water_Node_5 2.0
Water_Link_12 Water_Node_1 Water_Node_2 0.0
Water_Link_23 Water_Node_2 Water_Node_3 0.0
Water_Link_34 Water_Node_3 Water_Node_4 0.0
Water_Link_45 Water_Node_4 Water_Node_5 0.0
2 changes: 2 additions & 0 deletions examples/hydro_system_exog_elev_w_travel_time/features.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
features
water
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fuel period month fuel_price_per_mmbtu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fuel co2_intensity_tons_per_mmbtu fuel_group
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
horizon balancing_type_horizon timepoint
1 day 1
1 day 2
1 day 3
1 day 4
1 day 5
1 day 6
1 day 7
1 day 8
1 day 9
1 day 10
1 day 11
1 day 12
1 day 13
1 day 14
1 day 15
1 day 16
1 day 17
1 day 18
1 day 19
1 day 20
1 day 21
1 day 22
1 day 23
1 day 24
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
horizon balancing_type_horizon boundary
1 day circular
25 changes: 25 additions & 0 deletions examples/hydro_system_exog_elev_w_travel_time/inputs/load_mw.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
LOAD_ZONES timepoint load_mw
Zone1 1 77.84
Zone1 2 75.76
Zone1 3 73.52
Zone1 4 74.16
Zone1 5 74.16
Zone1 6 75.84
Zone1 7 78.96
Zone1 8 84.744
Zone1 9 88.264
Zone1 10 90.464
Zone1 11 93.984
Zone1 12 102.528
Zone1 13 103.872
Zone1 14 104.256
Zone1 15 106.272
Zone1 16 106.368
Zone1 17 111.456
Zone1 18 109.248
Zone1 19 107.904
Zone1 20 98.384
Zone1 21 96.096
Zone1 22 93.104
Zone1 23 82.656
Zone1 24 77.868
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
load_zone allow_overgeneration overgeneration_penalty_per_mw allow_unserved_energy unserved_energy_penalty_per_mwh unserved_energy_limit_mwh max_unserved_load_penalty_per_mw max_unserved_load_limit_mw export_penalty_cost_per_mwh
Zone1 1 99999999.0 1 99999999.0 . 0.0 . 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
period discount_factor period_start_year period_end_year hours_in_period_timepoints
2026 1.0 2026.0 2027.0 8760.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
powerhouse powerhouse_water_node tailwater_elevation headloss_factor turbine_efficiency
Powerhouse1 Water_Node_1 800.0 0.05 0.9
Powerhouse2 Water_Node_2 400.0 0.05 0.9
Powerhouse3 Water_Node_3 100.0 0.05 0.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
project capacity_type availability_type operational_type balancing_type_project technology load_zone variable_om_cost_per_mwh min_stable_level_fraction unit_size_mw startup_cost_per_mw shutdown_cost_per_mw startup_fuel_mmbtu_per_mw startup_plus_ramp_up_rate shutdown_plus_ramp_down_rate ramp_up_when_on_rate ramp_down_when_on_rate ramp_up_violation_penalty ramp_down_violation_penalty min_up_time_hours min_up_time_violation_penalty min_down_time_hours min_down_time_violation_penalty allow_startup_shutdown_power storage_efficiency charging_efficiency discharging_efficiency charging_capacity_multiplier discharging_capacity_multiplier minimum_duration_hours maximum_duration_hours aux_consumption_frac_capacity aux_consumption_frac_power last_commitment_stage curtailment_cost_per_pwh powerunithour_per_fuelunit soc_penalty_cost_per_energyunit soc_last_tmp_penalty_cost_per_energyunit partial_availability_threshold nonfuel_carbon_emissions_per_mwh powerhouse generator_efficiency
Gen11 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse1 0.95
Gen12 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse1 0.95
Gen21 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse2 0.95
Gen22 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse2 0.95
Gen31 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse3 0.95
Gen32 gen_spec exogenous gen_hydro_water day Hydro_Water Zone1 0.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Powerhouse3 0.95
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
reservoir timepoint exogenous_elevation
Water_Node_1 1 950
Water_Node_1 2 950
Water_Node_1 3 950
Water_Node_1 4 950
Water_Node_1 5 950
Water_Node_1 6 950
Water_Node_1 7 950
Water_Node_1 8 950
Water_Node_1 9 950
Water_Node_1 10 950
Water_Node_1 11 950
Water_Node_1 12 950
Water_Node_1 13 950
Water_Node_1 14 950
Water_Node_1 15 950
Water_Node_1 16 950
Water_Node_1 17 950
Water_Node_1 18 950
Water_Node_1 19 950
Water_Node_1 20 950
Water_Node_1 21 950
Water_Node_1 22 950
Water_Node_1 23 950
Water_Node_1 24 950
Water_Node_2 1 600
Water_Node_2 2 600
Water_Node_2 3 600
Water_Node_2 4 600
Water_Node_2 5 600
Water_Node_2 6 600
Water_Node_2 7 600
Water_Node_2 8 600
Water_Node_2 9 600
Water_Node_2 10 600
Water_Node_2 11 600
Water_Node_2 12 600
Water_Node_2 13 600
Water_Node_2 14 600
Water_Node_2 15 600
Water_Node_2 16 600
Water_Node_2 17 600
Water_Node_2 18 600
Water_Node_2 19 600
Water_Node_2 20 600
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
@@ -0,0 +1,4 @@
reservoir timepoint reservoir_target_volume
Water_Node_1 1.0 23750
Water_Node_2 1.0 1500
Water_Node_3 1.0 62.5
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
project period specified_capacity_mw hyb_gen_specified_capacity_mw hyb_stor_specified_capacity_mw specified_capacity_mwh fuel_production_capacity_fuelunitperhour fuel_release_capacity_fuelunitperhour fuel_storage_capacity_fuelunit fixed_cost_per_mw_yr hyb_gen_fixed_cost_per_mw_yr hyb_stor_fixed_cost_per_mw_yr fixed_cost_per_mwh_yr fuel_production_capacity_fixed_cost_per_fuelunitperhour_yr fuel_release_capacity_fixed_cost_per_fuelunitperhour_yr fuel_storage_capacity_fixed_cost_per_fuelunit_yr
Gen11 2026 225.0 0.0
Gen12 2026 225.0 0.0
Gen21 2026 80.0 0.0
Gen22 2026 80.0 0.0
Gen31 2026 85.0 0.0
Gen32 2026 85.0 0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
timepoint period timepoint_weight number_of_hours_in_timepoint previous_stage_timepoint_map month day_of_month hour_of_day
1 2026 365.0 1 . 1 1 1.0
2 2026 365.0 1 . 1 1 2.0
3 2026 365.0 1 . 1 1 3.0
4 2026 365.0 1 . 1 1 4.0
5 2026 365.0 1 . 1 1 5.0
6 2026 365.0 1 . 1 1 6.0
7 2026 365.0 1 . 1 1 7.0
8 2026 365.0 1 . 1 1 8.0
9 2026 365.0 1 . 1 1 9.0
10 2026 365.0 1 . 1 1 10.0
11 2026 365.0 1 . 1 1 11.0
12 2026 365.0 1 . 1 1 12.0
13 2026 365.0 1 . 1 1 13.0
14 2026 365.0 1 . 1 1 14.0
15 2026 365.0 1 . 1 1 15.0
16 2026 365.0 1 . 1 1 16.0
17 2026 365.0 1 . 1 1 17.0
18 2026 365.0 1 . 1 1 18.0
19 2026 365.0 1 . 1 1 19.0
20 2026 365.0 1 . 1 1 20.0
21 2026 365.0 1 . 1 1 21.0
22 2026 365.0 1 . 1 1 22.0
23 2026 365.0 1 . 1 1 23.0
24 2026 365.0 1 . 1 1 24.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
water_link timepoint min_flow_vol_per_second max_flow_vol_per_second
Water_Link_12 1.0 0.002 0.02
Water_Link_12 2.0 0.002 0.02
Water_Link_12 3.0 0.002 0.02
Water_Link_12 4.0 0.002 0.02
Water_Link_12 5.0 0.002 0.02
Water_Link_12 6.0 0.002 0.02
Water_Link_12 7.0 0.002 0.02
Water_Link_12 8.0 0.002 0.02
Water_Link_12 9.0 0.002 0.02
Water_Link_12 10.0 0.002 0.02
Water_Link_12 11.0 0.002 0.02
Water_Link_12 12.0 0.002 0.02
Water_Link_12 13.0 0.002 0.02
Water_Link_12 14.0 0.002 0.02
Water_Link_12 15.0 0.002 0.02
Water_Link_12 16.0 0.002 0.02
Water_Link_12 17.0 0.002 0.02
Water_Link_12 18.0 0.002 0.02
Water_Link_12 19.0 0.002 0.02
Water_Link_12 20.0 0.002 0.02
Water_Link_12 21.0 0.002 0.02
Water_Link_12 22.0 0.002 0.02
Water_Link_12 23.0 0.002 0.02
Water_Link_12 24.0 0.002 0.02
Water_Link_23 1.0 0.002 0.02
Water_Link_23 2.0 0.002 0.02
Water_Link_23 3.0 0.002 0.02
Water_Link_23 4.0 0.002 0.02
Water_Link_23 5.0 0.002 0.02
Water_Link_23 6.0 0.002 0.02
Water_Link_23 7.0 0.002 0.02
Water_Link_23 8.0 0.002 0.02
Water_Link_23 9.0 0.002 0.02
Water_Link_23 10.0 0.002 0.02
Water_Link_23 11.0 0.002 0.02
Water_Link_23 12.0 0.002 0.02
Water_Link_23 13.0 0.002 0.02
Water_Link_23 14.0 0.002 0.02
Water_Link_23 15.0 0.002 0.02
Water_Link_23 16.0 0.002 0.02
Water_Link_23 17.0 0.002 0.02
Water_Link_23 18.0 0.002 0.02
Water_Link_23 19.0 0.002 0.02
Water_Link_23 20.0 0.002 0.02
Water_Link_23 21.0 0.002 0.02
Water_Link_23 22.0 0.002 0.02
Water_Link_23 23.0 0.002 0.02
Water_Link_23 24.0 0.002 0.02
Water_Link_34 1.0 0.002 0.02
Water_Link_34 2.0 0.002 0.02
Water_Link_34 3.0 0.002 0.02
Water_Link_34 4.0 0.002 0.02
Water_Link_34 5.0 0.002 0.02
Water_Link_34 6.0 0.002 0.02
Water_Link_34 7.0 0.002 0.02
Water_Link_34 8.0 0.002 0.02
Water_Link_34 9.0 0.002 0.02
Water_Link_34 10.0 0.002 0.02
Water_Link_34 11.0 0.002 0.02
Water_Link_34 12.0 0.002 0.02
Water_Link_34 13.0 0.002 0.02
Water_Link_34 14.0 0.002 0.02
Water_Link_34 15.0 0.002 0.02
Water_Link_34 16.0 0.002 0.02
Water_Link_34 17.0 0.002 0.02
Water_Link_34 18.0 0.002 0.02
Water_Link_34 19.0 0.002 0.02
Water_Link_34 20.0 0.002 0.02
Water_Link_34 21.0 0.002 0.02
Water_Link_34 22.0 0.002 0.02
Water_Link_34 23.0 0.002 0.02
Water_Link_34 24.0 0.002 0.02
Water_Link_45 1.0 0.002 0.02
Water_Link_45 2.0 0.002 0.02
Water_Link_45 3.0 0.002 0.02
Water_Link_45 4.0 0.002 0.02
Water_Link_45 5.0 0.002 0.02
Water_Link_45 6.0 0.002 0.02
Water_Link_45 7.0 0.002 0.02
Water_Link_45 8.0 0.002 0.02
Water_Link_45 9.0 0.002 0.02
Water_Link_45 10.0 0.002 0.02
Water_Link_45 11.0 0.002 0.02
Water_Link_45 12.0 0.002 0.02
Water_Link_45 13.0 0.002 0.02
Water_Link_45 14.0 0.002 0.02
Water_Link_45 15.0 0.002 0.02
Water_Link_45 16.0 0.002 0.02
Water_Link_45 17.0 0.002 0.02
Water_Link_45 18.0 0.002 0.02
Water_Link_45 19.0 0.002 0.02
Water_Link_45 20.0 0.002 0.02
Water_Link_45 21.0 0.002 0.02
Water_Link_45 22.0 0.002 0.02
Water_Link_45 23.0 0.002 0.02
Water_Link_45 24.0 0.002 0.02
Loading

0 comments on commit 23d90b2

Please sign in to comment.