Skip to content

Fix handling of != and == in event triggers #2912

@dweindl

Description

@dweindl

The recently introduced handling of == and != (#2708, #2716), while logically correct, does not work in the context of root finding.

For example, a != 1 will results in r(t, ...) = Max(1 - a, a - 1) which is 0 for a = 1, so an event will trigger although it should not. The same is true for any "hidden" !=, as in a > 1 OR a < 1 (which is what is currently done behind the scenes).

Handling of == and != should be restricted to fixed-parameter arguments (useful for indicator variables) and implemented as boolean expression in that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugeventsrelated to handing discrete events

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions