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

MTK cannot identify independent variables with new Symbolics convention

Open doppioandante opened this issue 3 years ago • 1 comments

This works:

@variables t x[1](t)
Dt = Differential(t)
@named sys = ODESystem([Dt(x[1]) ~ 3])

This doesn't:

@variables t x(t)[1]
Dt = Differential(t)
@named sys = ODESystem([Dt(x[1]) ~ 3])

with the following error:

ArgumentError: Variable (x(t))[1] is not a function of independent variable SymbolicUtils.Term{Real, Nothing}[(x(t))[1]].

doppioandante avatar Jul 29 '22 15:07 doppioandante

@shashi could you take a look?

YingboMa avatar Jul 29 '22 18:07 YingboMa

Removed the bad constructor

ChrisRackauckas avatar Feb 22 '24 16:02 ChrisRackauckas