ModelingToolkit.jl icon indicating copy to clipboard operation
ModelingToolkit.jl copied to clipboard

Identical systems that contain events are no longer equal

Open TorkelE opened this issue 6 months ago • 1 comments

After the v10 update, the events are created with identical input, but are no longer parsed as identical systems.

using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters p d
@variables X(t)
eqs = [D(X) ~ p - d*X]
continuous_events = [X ~ 1] => [X ~ Pre(X) + 1.0]
@mtkcompile sys1 = System(eqs, t; continuous_events)
@mtkcompile sys2 = System(eqs, t; continuous_events)
isequal(sys1, sys2) # false

TorkelE avatar Aug 26 '25 09:08 TorkelE

I think we might be abandoning system equality, however, I still think this is the case or the individual events not being identical.

TorkelE avatar Dec 01 '25 15:12 TorkelE