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

Error with DDEProblem when u_0 is a LabelledArray with slices

Open pcjentsch opened this issue 5 years ago • 2 comments

MWE

using DelayDiffEq
using LabelledArrays
function bc_model(du,u,h,p,t)
  du.x .= -1 .* u.x
  du.y .= -1 .* u.y
end
lags = [tau]
h(p, t) = @LArray fill(0.0,6) (x = 1:3, y= 4:6)
tspan = (0.0,10.0)
u0 = @LArray fill(0.0,6) (x = 1:3, y= 4:6)
prob = DDEProblem(bc_model,u0,h,tspan,constant_lags = lags)
alg = MethodOfSteps(Tsit5())
sol = solve(prob,alg)
ERROR: LoadError: type Array has no field x
Stacktrace:
 [1] getproperty(::Array{Float64,1}, ::Symbol) at ./Base.jl:33
 [2] bc_model(::Array{Float64,1}, ::LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)}, ::Function, ::DiffEqBase.NullParameters, ::Float64) at /home/peterj/Projects/delay_test.jl:4
 [3] (::DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing})(::Array{Float64,1}, ::LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)}, ::DiffEqBase.NullParameters, ::Float64) at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/functionwrapper.jl:59
 [4] initialize!(::DelayDiffEq.DDEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DelayDiffEq.DDEStats},DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DelayDiffEq.FPSolver{NLFunctional{Rational{Int64},Rational{Int64}},true,Float64,DelayDiffEq.FPFunctionalCache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)}}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,Base.Order.ForwardOrdering},DataStructures.BinaryHeap{Discontinuity{Float64},Base.Order.ForwardOrdering},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Discontinuity{Float64},1}},Float64,Int64,DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},Array{Float64,1},Float64,Nothing}, ::OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}) at /home/peterj/.julia/packages/OrdinaryDiffEq/pH3tP/src/perform_step/low_order_rk_perform_step.jl:623
 [5] initialize!(::DelayDiffEq.DDEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,DiffEqBase.NullParameters,Float64,Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DelayDiffEq.DDEStats},DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DelayDiffEq.FPSolver{NLFunctional{Rational{Int64},Rational{Int64}},true,Float64,DelayDiffEq.FPFunctionalCache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)}}},OrdinaryDiffEq.DEOptions{Float64,Float64,Float64,Float64,typeof(DiffEqBase.ODE_DEFAULT_NORM),typeof(LinearAlgebra.opnorm),CallbackSet{Tuple{},Tuple{}},typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN),typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE),typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK),DataStructures.BinaryHeap{Float64,Base.Order.ForwardOrdering},DataStructures.BinaryHeap{Discontinuity{Float64},Base.Order.ForwardOrdering},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Discontinuity{Float64},1}},Float64,Int64,DelayDiffEq.HistoryFunction{typeof(h),DelayDiffEq.HistoryODEIntegrator{Tsit5,true,LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Float64,Float64,Array{Array{Float64,1},1},ODESolution{Float64,2,Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,1},1},1},ODEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},true,DiffEqBase.NullParameters,DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},DiffEqBase.StandardODEProblem},Tsit5,OrdinaryDiffEq.InterpolationData{DelayDiffEq.ODEFunctionWrapper{true,typeof(bc_model),typeof(h),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1},Array{Float64,1},Array{Array{Array{Float64,1},1},1},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}},DiffEqBase.DEStats},OrdinaryDiffEq.Tsit5Cache{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Array{Float64,1},LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}}},Array{Float64,1},Float64,Nothing}) at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/integrators/interface.jl:145
 [6] __init(::DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::MethodOfSteps{Tsit5,NLFunctional{Rational{Int64},Rational{Int64}},false}, ::Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1}, ::Array{Float64,1}, ::Array{Any,1}; saveat::Array{Float64,1}, tstops::Array{Float64,1}, d_discontinuities::Array{Discontinuity{Float64},1}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Bool, callback::Nothing, dense::Bool, calck::Bool, dt::Float64, dtmin::Float64, dtmax::Float64, force_dtmin::Bool, adaptive::Bool, gamma::Rational{Int64}, abstol::Nothing, reltol::Nothing, qmin::Rational{Int64}, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, qoldinit::Rational{Int64}, fullnormalize::Bool, failfactor::Int64, beta1::Nothing, beta2::Nothing, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(LinearAlgebra.opnorm), isoutofdomain::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), unstable_check::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), verbose::Bool, timeseries_errors::Bool, dense_errors::Bool, advance_to_tstop::Bool, stop_at_next_tstop::Bool, initialize_save::Bool, progress::Bool, progress_steps::Int64, progress_name::String, progress_message::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), userdata::Nothing, allow_extrapolation::Bool, initialize_integrator::Bool, alias_u0::Bool, discontinuity_interp_points::Int64, discontinuity_abstol::Float64, discontinuity_reltol::Int64, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/solve.jl:315
 [7] __init(::DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::MethodOfSteps{Tsit5,NLFunctional{Rational{Int64},Rational{Int64}},false}, ::Array{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},1}, ::Array{Float64,1}, ::Array{Any,1}) at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/solve.jl:68 (repeats 2 times)
 [8] __solve(::DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::MethodOfSteps{Tsit5,NLFunctional{Rational{Int64},Rational{Int64}},false}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/solve.jl:4
 [9] __solve at /home/peterj/.julia/packages/DelayDiffEq/ilVND/src/solve.jl:4 [inlined]
 [10] #solve_call#456 at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:65 [inlined]
 [11] solve_call at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:52 [inlined]
 [12] #solve_up#458 at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:86 [inlined]
 [13] solve_up at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:79 [inlined]
 [14] #solve#457 at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:74 [inlined]
 [15] solve(::DDEProblem{LArray{Float64,1,Array{Float64,1},(x = 1:3, y = 4:6)},Tuple{Float64,Float64},Array{Float64,1},Tuple{},true,DiffEqBase.NullParameters,DDEFunction{true,typeof(bc_model),LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},typeof(h),Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}}, ::MethodOfSteps{Tsit5,NLFunctional{Rational{Int64},Rational{Int64}},false}) at /home/peterj/.julia/packages/DiffEqBase/3iigH/src/solve.jl:72

versioninfo() Julia Version 1.5.3 Commit 788b2c77c1 (2020-11-09 13:37 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: AMD Ryzen 9 3950X 16-Core Processor WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-9.0.1 (ORCJIT, znver2)

pcjentsch avatar Nov 17 '20 18:11 pcjentsch

I tried to figure out what in DelayDiffEq causes this problem (and wanted to transfer the issue to the DelayDiffEq repo) but it seems it is caused by https://github.com/SciML/OrdinaryDiffEq.jl/blob/2c9f42d7481fe0cc3718257b034b6fe4dc926711/src/initdt.jl#L22-L23 in OrdinaryDiffEq (and ultimately LabelledArrays?) since

julia> u0 = @LArray fill(0.0,6) (x = 1:3, y= 4:6);

julia> t = 0.0;

julia> zero.(u0 ./ t)
6-element Array{Float64,1}:
 0.0
 0.0
 0.0
 0.0
 0.0
 0.0

Due to the check in https://github.com/SciML/OrdinaryDiffEq.jl/blob/2c9f42d7481fe0cc3718257b034b6fe4dc926711/src/initdt.jl#L16 the problem does not occur for ODEProblems.

devmotion avatar Nov 18 '20 16:11 devmotion

So the workaround would be to set an initial dt like dt=0.01. It's a bit odd that this broadcast doesn't make a LabelledArray though.

ChrisRackauckas avatar Nov 20 '20 00:11 ChrisRackauckas