Skip to content

Commit

Permalink
Guide documentation for cascade polder basins (#1258)
Browse files Browse the repository at this point in the history
Fixes #1017 

A example model for a cascade of polder basin with local PID controller was made. 
Wiki page updated with this guidance document.
  • Loading branch information
Jingru923 authored Apr 8, 2024
1 parent 2adaec4 commit ef7b43e
Show file tree
Hide file tree
Showing 5 changed files with 614 additions and 3 deletions.
6 changes: 4 additions & 2 deletions core/src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,16 @@ function continuous_control!(

factor_outlet = 1.0

# No flow of outlet if source level is lower than target level
# No flow out of outlet if source level is lower than reference level
if !(src_level === nothing || dst_level === nothing)
Δlevel = src_level - dst_level
factor_outlet *= reduction_factor(Δlevel, 0.1)
end

# No flow out outlet if source level is lower than minimum crest level
# No flow out of outlet if source level is lower than minimum crest level
if src_level !== nothing
controlled_node_idx = findsorted(outlet.node_id, controlled_node_id)

factor_outlet *= reduction_factor(
src_level - outlet.min_crest_level[controlled_node_idx],
0.1,
Expand Down
Loading

0 comments on commit ef7b43e

Please sign in to comment.