You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was notified that running step on a system with a small delay creates some problem with dt <= dtmin from DifferentialEquations.jl which generates a warning and it seems like it does not create the saved values which errors when we try to index into them.
julia>step(delay(0.01))
t =0.0:0.07:14.000000000000002
┌ Warning: dt <= dtmin. Aborting. There is either an error in your model specification or the true solution is unstable.
└ @ SciMLBase ~/.julia/packages/SciMLBase/EFFG1/src/integrator_interface.jl:345
ERROR: BoundsError: attempt to access 4-element Vector{Tuple{Vector{Float64}, Vector{Float64}}} at index [5]
Stacktrace:
[1] getindex
@ ./array.jl:801 [inlined]
[2] _lsim(sys::DelayLtiSystem{Float64, Float64}, u!::Any, t::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}, x0::Vector{Float64}, alg::DelayDiffEq.MethodOfSteps{OrdinaryDiffEq.Tsit5, DiffEqBase.NLFunctional{Rational{Int64}, Rational{Int64}}, false}; kwargs::Base.Iterators.Pairs{Symbol, Float64, Tuple{Symbol, Symbol}, NamedTuple{(:abstol, :reltol), Tuple{Float64, Float64}}})
@ ControlSystems ~/.julia/dev/ControlSystems/src/delay_systems.jl:204
[3] lsim(sys::DelayLtiSystem{Float64, Float64}, u::ControlSystems.var"#299#300", t::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}; x0::Vector{Float64}, alg::DelayDiffEq.MethodOfSteps{OrdinaryDiffEq.Tsit5, DiffEqBase.NLFunctional{Rational{Int64}, Rational{Int64}}, false}, abstol::Float64, reltol::Float64, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ ControlSystems ~/.julia/dev/ControlSystems/src/delay_systems.jl:99
[4] step(sys::DelayLtiSystem{Float64, Float64}, t::StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ ControlSystems ~/.julia/dev/ControlSystems/src/delay_systems.jl:246
[5] step
@ ~/.julia/dev/ControlSystems/src/delay_systems.jl:238 [inlined]
[6] #step#164
@ ~/.julia/dev/ControlSystems/src/timeresp.jl:33 [inlined]
[7] step(sys::DelayLtiSystem{Float64, Float64})
@ ControlSystems ~/.julia/dev/ControlSystems/src/timeresp.jl:33
[8] top-level scope
@ REPL[21]:1
Here is a stripped down version of the code causing this problem, not sure if this is something that should be reported to DifferentialEquations or if we should work around it on our side.
using DelayDiffEq, DifferentialEquations
using ControlSystems
using LinearAlgebra
functionf(du, u, h, p, t)
tau = p
# This is system for delay(tau) using two states based on our partitioned state space# y(t) = d(t-tau)# d(t) = u(t)
hout =h(p, t-tau, Val{1}, idxs=2)
du .+= [hout; 1]
end
t =0:0.01:10
x0 = [0.0, 0.0]
p =0.01h!(p, t, deriv::Type{Val{1}}; idxs=0) =0
prob =DDEProblem{true}(f, x0, h!,
(t[1], t[end]),
p,
constant_lags=p,# Not sure if sort needed
neutral=true, # We have derivatives on RHS (d(t))
)
sol =solve(prob, Tsit5(); tstops=t, saveat=t)
The text was updated successfully, but these errors were encountered:
Was notified that running
step
on a system with a small delay creates some problem withdt <= dtmin
from DifferentialEquations.jl which generates a warning and it seems like it does not create the saved values which errors when we try to index into them.Here is a stripped down version of the code causing this problem, not sure if this is something that should be reported to DifferentialEquations or if we should work around it on our side.
The text was updated successfully, but these errors were encountered: