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

cumulative flow states #1819

Merged
merged 26 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
caf0089
First steps
SouthEndMusic Sep 11, 2024
20f7d42
basic transient POC
SouthEndMusic Sep 11, 2024
6a2ab3f
Small fixes
SouthEndMusic Sep 11, 2024
21ecb45
Merge branch 'main' into integrated_flow_states
SouthEndMusic Sep 11, 2024
6b706f5
More output writing compatability
SouthEndMusic Sep 11, 2024
c77330d
More compatibility: certain models can fully run
SouthEndMusic Sep 12, 2024
f250f7e
Fix many tests
SouthEndMusic Sep 12, 2024
932ecaf
Pass more tests
SouthEndMusic Sep 12, 2024
98afc35
Pass all tests
SouthEndMusic Sep 16, 2024
e505969
Merge branch 'main' into integrated_flow_states
SouthEndMusic Sep 16, 2024
cff93d3
Some cleanup
SouthEndMusic Sep 16, 2024
1cf40f8
Some more cleanup
SouthEndMusic Sep 16, 2024
d373b83
Fix docs
SouthEndMusic Sep 16, 2024
0e9c804
Fix docs v2
SouthEndMusic Sep 16, 2024
fd63588
Merge branch 'main' into integrated_flow_states
SouthEndMusic Sep 16, 2024
733afbf
Docs update
SouthEndMusic Sep 17, 2024
81f4915
Check water balance error at each save
SouthEndMusic Sep 17, 2024
380ad01
Some fixes
SouthEndMusic Sep 17, 2024
6d08366
Merge branch 'main' into integrated_flow_states
SouthEndMusic Sep 17, 2024
a622e46
Fix problem where edge_data dict of graph makes node ids in flow tabl…
SouthEndMusic Sep 18, 2024
a4f6961
Close db in tests & fix backwater model
SouthEndMusic Sep 18, 2024
0b4f2c7
Most comments adressed
SouthEndMusic Sep 18, 2024
6014878
Make a single function `get_state_index` with methods for getting it …
SouthEndMusic Sep 18, 2024
28e217b
Fix vertical_flux_bmi initialization
SouthEndMusic Sep 19, 2024
c353c7a
Remove print statements
SouthEndMusic Sep 19, 2024
46abbdb
Use pairs
visr Sep 19, 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
4 changes: 2 additions & 2 deletions core/src/allocation_optim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ function get_basin_data(
u::ComponentVector,
node_id::NodeID,
)
(; graph, allocation) = p
(; graph, allocation, basin) = p
(; Δt_allocation) = allocation_model
(; mean_input_flows) = allocation
@assert node_id.type == NodeType.Basin
influx = mean_input_flows[(node_id, node_id)][]
storage_basin = u.storage[node_id.idx]
storage_basin = basin.current_storage[parent(u)][node_id.idx]
control_inneighbors = inneighbor_labels_type(graph, node_id, EdgeType.control)
if isempty(control_inneighbors)
level_demand_idx = 0
Expand Down
2 changes: 1 addition & 1 deletion core/src/bmi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end

function BMI.get_value_ptr(model::Model, name::AbstractString)::AbstractVector{Float64}
if name == "basin.storage"
model.integrator.u.storage
model.integrator.p.basin.current_storage[parent(model.integrator.u)]
elseif name == "basin.level"
model.integrator.p.basin.current_level[parent(model.integrator.u)]
elseif name == "basin.infiltration"
Expand Down
Loading
Loading