Skip to content

Commit

Permalink
Don't run allocation if not active during BMI runs (#1437)
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic authored Apr 29, 2024
1 parent 3ea6ac6 commit be32a44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/src/callback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,13 @@ function update_allocation!(integrator)::Nothing
(; p, t, u) = integrator
(; allocation) = p
(; allocation_models, mean_flows) = allocation

# Don't run the allocation algorithm if allocation is not active
# (Specifically for running Ribasim via the BMI)
if !is_active(allocation)
return nothing
end

(; Δt_allocation) = allocation_models[1]

# Divide by the allocation Δt to obtain the mean flows
Expand Down

0 comments on commit be32a44

Please sign in to comment.