SciML / SciMLBase.jl

The Base interface of the SciML ecosystem
https://docs.sciml.ai/SciMLBase/stable
MIT License
118 stars 91 forks source link

Cannot create `DiscreteProblem` while providing tend only #719

Open TorkelE opened 2 weeks ago

TorkelE commented 2 weeks ago

MWE:

using ModelingToolkit

@variables t X(t)
@parameters p d
u0 = [X => 1.0]
ps = [p => 1.0, d => 0.2]

dprob = DiscreteProblem(u0, (0.0, 1.0), ps) # Works
dprob = DiscreteProblem(u0, 1.0, ps) # ERROR: MethodError: no method matching DiscreteProblem(::Vector{Pair{Num, Float64}}, ::Float64, ::Vector{Pair{Num, Float64}})

I think this works for all other problem types, but apparently not for DiscretProblems (and I am not sure what then happens if you provide these to JumpProblems).