Skip to content

violating constraint during optimization #124

Description

@ArnoStrouwen

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))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions