Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SymbolicDiscreteCallback and SymbolicContiniuousCallback have different affect field names #2639

Open
TorkelE opened this issue Apr 14, 2024 · 3 comments · May be fixed by #3452
Open

SymbolicDiscreteCallback and SymbolicContiniuousCallback have different affect field names #2639

TorkelE opened this issue Apr 14, 2024 · 3 comments · May be fixed by #3452
Assignees
Labels
bug Something isn't working events

Comments

@TorkelE
Copy link
Member

TorkelE commented Apr 14, 2024

Not a bug really, but an internal oddity that is probably a mistake.

The affects field is called affect for ``. Since it can hold several affects, affects should probably be used.

struct SymbolicDiscreteCallback
    # condition can be one of:
    #   Δt::Real - Periodic with period Δt
    #   Δts::Vector{Real} - events trigger in this times (Preset)
    #   condition::Vector{Equation} - event triggered when condition is true
    # TODO: Iterative
    condition::Any
    affects::Any
struct SymbolicContinuousCallback
    eqs::Vector{Equation}
    affect::Union{Vector{Equation}, FunctionalAffect}

Might be intentional, and have no impact on stuff. However, since I noticed I figured I should point it out. Feel free to close this issue whenever you want.

@TorkelE TorkelE added the bug Something isn't working label Apr 14, 2024
@vyudu
Copy link
Member

vyudu commented Jan 17, 2025

This is breaking right? Should this go in v10?

@TorkelE
Copy link
Member Author

TorkelE commented Jan 17, 2025

Unless the old affect field is kept, yes. Personally, I am agnostic to whether this should be changed or not, but figured I should point it out at least so you guys in MTK can make a decision. If not, it might be good to put in a comment in the code pointing out whether this is an inconsistency or intentional and their is something distinguishing the two cases.

@ChrisRackauckas
Copy link
Member

This isn't documented API so I think this wouldn't be breaking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working events
Projects
None yet
4 participants