Skip to content

Commit

Permalink
Get avg flows for relevant subproblem only
Browse files Browse the repository at this point in the history
  • Loading branch information
anamileva committed Jan 24, 2025
1 parent 0603f61 commit 1422b5d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gridpath/system/water/water_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,10 @@ def get_inputs_from_database(
{subscenarios.WATER_NETWORK_SCENARIO_ID}
)
AND (balancing_type, horizon)
IN (SELECT balancing_type, horizon
FROM inputs_temporal_horizons
IN (SELECT DISTINCT balancing_type, horizon
FROM inputs_temporal_horizon_timepoints
WHERE temporal_scenario_id = {subscenarios.TEMPORAL_SCENARIO_ID}
AND subproblem_id = {subproblem}
)
;
"""
Expand All @@ -536,9 +537,10 @@ def get_inputs_from_database(
{subscenarios.WATER_NETWORK_SCENARIO_ID}
)
AND (balancing_type, horizon)
IN (SELECT balancing_type, horizon
FROM inputs_temporal_horizons
IN (SELECT DISTINCT balancing_type, horizon
FROM inputs_temporal_horizon_timepoints
WHERE temporal_scenario_id = {subscenarios.TEMPORAL_SCENARIO_ID}
AND subproblem_id = {subproblem}
)
;
"""
Expand Down

0 comments on commit 1422b5d

Please sign in to comment.