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

test is_flow_constraining #1182

Merged
merged 2 commits into from
Feb 26, 2024
Merged

Conversation

SouthEndMusic
Copy link
Collaborator

Fixes #1128.

I'm pretty sure this wasn't an issue to begin with, since LinearResistance was automatically detected as a flow restricting node now that the struct has a max_flow_rate field. I just added a test for the is_flow_constraining function to be sure.


for type in Ribasim.nodefields(p)
node = getfield(p, type)
println(node)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
println(node)

@testitem "constrains_from_nodes" begin
toml_path = normpath(@__DIR__, "../../generated_testmodels/basic/ribasim.toml")
@test ispath(toml_path)
model = Ribasim.BMI.initialize(Ribasim.Model, toml_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
model = Ribasim.BMI.initialize(Ribasim.Model, toml_path)
model = Ribasim.Model(toml_path)

@@ -299,3 +299,21 @@ end
2.0,
) === 1.0
end

@testitem "constrains_from_nodes" begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@testitem "constrains_from_nodes" begin
@testitem "constraints_from_nodes" begin

@SouthEndMusic SouthEndMusic merged commit 5b3b85d into main Feb 26, 2024
20 of 21 checks passed
@SouthEndMusic SouthEndMusic deleted the LinearResistance-capacity-in-allocation branch February 26, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use LinearResistance capacity in allocation
2 participants