Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split collecting subnetwork demand into internal sources and main network phases #1235

Merged
merged 39 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
934177a
Introduce optimization types for allocation
SouthEndMusic Mar 12, 2024
f0e6ae0
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 12, 2024
747d04a
Simplify upstream basin storage reduction factor computation
SouthEndMusic Mar 12, 2024
433ee9e
Refactor allocate!
SouthEndMusic Mar 13, 2024
f5e6971
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 13, 2024
df04929
small fixes
SouthEndMusic Mar 13, 2024
a30d577
Fix julia code in allocation.qmd
SouthEndMusic Mar 13, 2024
02b7791
Fix tests
SouthEndMusic Mar 13, 2024
541c81b
Compute reduced user demands for subnetwork demand collection
SouthEndMusic Mar 13, 2024
b01d589
get demand from demand vector for non-timeseries demand in formulate_…
SouthEndMusic Mar 14, 2024
5e1fd93
Fix tests
SouthEndMusic Mar 14, 2024
df14ff2
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 14, 2024
811bf77
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 14, 2024
3fe9341
Docs fix
SouthEndMusic Mar 14, 2024
cf3982d
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 18, 2024
6a4c370
start implementation of set_initial_demands_level
SouthEndMusic Mar 18, 2024
4b8276f
Finish separate functions for setting and adjusting level demand
SouthEndMusic Mar 18, 2024
4ee0eb0
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 18, 2024
7e5b24b
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 19, 2024
4a9aed9
Add/update docstrings
SouthEndMusic Mar 19, 2024
cdd01aa
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 19, 2024
98357da
Update docs
SouthEndMusic Mar 19, 2024
e62b513
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 19, 2024
b48930f
Adapt flow demand to optimization types
SouthEndMusic Mar 19, 2024
7bf22ce
Fix main network to subnetwork inlet capacity handling
SouthEndMusic Mar 19, 2024
2b6cf38
Fix optimization problem example in docs
SouthEndMusic Mar 19, 2024
3295437
merge main
SouthEndMusic Mar 19, 2024
a5357d4
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 21, 2024
047fb7f
Remove @show
SouthEndMusic Mar 21, 2024
f6052b2
Small docstring fix
SouthEndMusic Mar 21, 2024
fa0b606
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 26, 2024
4b6e14e
Add tests
SouthEndMusic Mar 27, 2024
2f2272d
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Mar 27, 2024
c5caacb
Update docs/core/allocation.qmd
SouthEndMusic Apr 2, 2024
15142e2
Update docs/core/allocation.qmd
SouthEndMusic Apr 2, 2024
8202b63
Update docs/core/allocation.qmd
SouthEndMusic Apr 2, 2024
fbb644f
Merge branch 'main' into better_subnetwork_demand_collection
SouthEndMusic Apr 2, 2024
43c5331
Merge branch 'better_subnetwork_demand_collection' of https://github.…
SouthEndMusic Apr 2, 2024
d1df84d
comments adressed
SouthEndMusic Apr 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions core/src/allocation_init.jl
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ function add_variables_basin!(
(; graph) = p
node_ids_basin = [
node_id for node_id in graph[].node_ids[allocation_network_id] if
graph[node_id].type == :basin &&
has_external_demand(graph, node_id, :level_demand)[1]
graph[node_id].type == :basin
]
problem[:F_basin_in] =
JuMP.@variable(problem, F_basin_in[node_id = node_ids_basin,] >= 0.0)
Expand Down Expand Up @@ -425,8 +424,7 @@ function add_variables_absolute_value!(
type = node_id.type
if type == NodeType.UserDemand
push!(node_ids_user_demand, node_id)
elseif type == NodeType.Basin &&
has_external_demand(graph, node_id, :level_demand)[1]
elseif type == NodeType.Basin
push!(node_ids_level_demand, node_id)
elseif has_external_demand(graph, node_id, :flow_demand)[1]
push!(node_ids_flow_demand, node_id)
Expand Down
Loading
Loading