Currently, constraints are only checked at the point of intervention.
But it is possible a constraint is violated before the intervention happens, and then dips below it again.
I think the current approach will miss that?
|
sol_preintervention = stop_at_threshold(prob_preintervention, obs, threshold; kw...) |
|
violation = x[1] - sol_preintervention.t[end] |
|
violation > 0 && return violation + (duration - (x[1] - t0)) |
Currently, constraints are only checked at the point of intervention.
But it is possible a constraint is violated before the intervention happens, and then dips below it again.
I think the current approach will miss that?
EasyModelAnalysis.jl/src/intervention.jl
Lines 38 to 40 in 796776b