-
-
Notifications
You must be signed in to change notification settings - Fork 232
Closed
Description
I think it might be a good idea to use Operation
s everywhere. This should solve #415. The problem is that the states are variables but the equations can have an Operation
that behaves like a "variable", i.e.
julia> sys = ODESystem(eqs, t, [u,Dk(u)], [k])
ODESystem(Equation[Equation(derivative(u(t), t), -k * u(t)), Equation(derivative(derivative(u(t), k), t), -(u(t)) - k * derivative(u(t), k))], t, Variable[u, uˍk], Variable[k], Base.RefValue{Array{Expression,1}}(Expression[]), Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), Base.RefValue{Array{Expression,2}}(Array{Expression}(undef,0,0)), Symbol("##ODESystem#294"), ODESystem[])
julia> sys.eqs
2-element Array{Equation,1}:
Equation(derivative(u(t), t), -k * u(t))
Equation(derivative(derivative(u(t), k), t), -(u(t)) - k * derivative(u(t), k))
julia> sys.states
2-element Array{Variable,1}:
u
uˍk
Though this could break A LOT OF internal assumptions, and it will take some time to do this refactoring.
Metadata
Metadata
Assignees
Labels
No labels