Everything works well unitl here. Then invoking
Stacktrace:
[1] getindex at ./number.jl:78 [inlined]
[2] ##363(::Array{Float64,2}, ::Array{Float64,2}, ::Int64, ::Float64) at /home/goran/.julia/packages/ModelingToolkit/3e5pc/src/utils.jl:55
[3] macro expansion at /home/goran/.julia/packages/ModelingToolkit/3e5pc/src/utils.jl:102 [inlined]
[4] macro expansion at ./none:0 [inlined]
[5] fast_invokelatest at ./none:0 [inlined]
[6] out_f_safe at /home/goran/.julia/packages/ModelingToolkit/3e5pc/src/systems/diffeqs/diffeqsystem.jl:218 [inlined]
[7] ODEFunction at /home/goran/.julia/packages/DiffEqBase/aPwRz/src/diffeqfunction.jl:193 [inlined]
[8] initialize!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},true,Array{Float64,2},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,2},1},OrdinaryDiffEq.ODECompositeSolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,2},Nothing},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},DefaultLinSolve,DiffEqDiffTools.JacobianCache{Array{Float64,2},Array{Float64,2},Array{Float64,2},UnitRange{Int64},Nothing,Val{:forward},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,2},Array{Float64,2},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}}},ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,2},Nothing},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},DefaultLinSolve,DiffEqDiffTools.JacobianCache{Array{Float64,2},Array{Float64,2},Array{Float64,2},UnitRange{Int64},Nothing,Val{:forward},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,2},Array{Float64,2},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},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,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,2},Float64,Nothing}, ::OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}}) at /home/goran/.julia/packages/OrdinaryDiffEq/BhP0W/src/perform_step/low_order_rk_perform_step.jl:623
[9] initialize!(::OrdinaryDiffEq.ODEIntegrator{CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},true,Array{Float64,2},Float64,Nothing,Float64,Float64,Float64,Array{Array{Float64,2},1},OrdinaryDiffEq.ODECompositeSolution{Float64,3,Array{Array{Float64,2},1},Nothing,Nothing,Array{Float64,1},Array{Array{Array{Float64,2},1},1},ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem},CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},OrdinaryDiffEq.CompositeInterpolationData{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Array{Float64,2},1},Array{Float64,1},Array{Array{Array{Float64,2},1},1},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,2},Nothing},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},DefaultLinSolve,DiffEqDiffTools.JacobianCache{Array{Float64,2},Array{Float64,2},Array{Float64,2},UnitRange{Int64},Nothing,Val{:forward},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,2},Array{Float64,2},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}}},ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,2},Nothing},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},DefaultLinSolve,DiffEqDiffTools.JacobianCache{Array{Float64,2},Array{Float64,2},Array{Float64,2},UnitRange{Int64},Nothing,Val{:forward},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,2},Array{Float64,2},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}},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,DataStructures.LessThan},DataStructures.BinaryHeap{Float64,DataStructures.LessThan},Nothing,Nothing,Int64,Array{Float64,1},Array{Float64,1},Array{Float64,1}},Array{Float64,2},Float64,Nothing}, ::OrdinaryDiffEq.CompositeCache{Tuple{OrdinaryDiffEq.Tsit5Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Tsit5ConstantCache{Float64,Float64}},OrdinaryDiffEq.Rosenbrock23Cache{Array{Float64,2},Array{Float64,2},Array{Float64,2},Array{Float64,2},OrdinaryDiffEq.Rosenbrock23ConstantCache{Float64,typeof(identity),typeof(identity)},DiffEqDiffTools.TimeGradientWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Array{Float64,2},Nothing},DiffEqDiffTools.UJacobianWrapper{ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Float64,Nothing},DefaultLinSolve,DiffEqDiffTools.JacobianCache{Array{Float64,2},Array{Float64,2},Array{Float64,2},UnitRange{Int64},Nothing,Val{:forward},Float64,Val{true}},DiffEqDiffTools.GradientCache{Nothing,Array{Float64,2},Array{Float64,2},Val{:forward},Float64,Val{true}}}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}) at /home/goran/.julia/packages/OrdinaryDiffEq/BhP0W/src/perform_step/composite_perform_step.jl:38
[10] #__init#346(::Array{Float64,1}, ::Array{Float64,1}, ::Array{Float64,1}, ::Nothing, ::Bool, ::Bool, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Float64, ::Float64, ::Float64, ::Bool, ::Bool, ::Rational{Int64}, ::Nothing, ::Nothing, ::Rational{Int64}, ::Int64, ::Int64, ::Int64, ::Rational{Int64}, ::Bool, ::Int64, ::Nothing, ::Nothing, ::Int64, ::typeof(DiffEqBase.ODE_DEFAULT_NORM), ::typeof(LinearAlgebra.opnorm), ::typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), ::typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Bool, ::Int64, ::String, ::typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), ::Nothing, ::Bool, ::Bool, ::Bool, ::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}, ::Array{Array{Float64,2},1}, ::Array{Float64,1}, ::Array{Any,1}, ::Type{Val{true}}) at /home/goran/.julia/packages/OrdinaryDiffEq/BhP0W/src/solve.jl:338
[11] (::getfield(DiffEqBase, Symbol(β#kw##__initβ)))(::NamedTuple{(:default_set,),Tuple{Bool}}, ::typeof(DiffEqBase.__init), ::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}, ::Array{Array{Float64,2},1}, ::Array{Float64,1}, ::Array{Any,1}, ::Type{Val{true}}) at ./none:0 (repeats 5 times)
[12] #__solve#345(::Base.Iterators.Pairs{Symbol,Bool,Tuple{Symbol},NamedTuple{(:default_set,),Tuple{Bool}}}, ::Function, ::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}) at /home/goran/.julia/packages/OrdinaryDiffEq/BhP0W/src/solve.jl:4
[13] (::getfield(DiffEqBase, Symbol(β#kw##__solveβ)))(::NamedTuple{(:default_set,),Tuple{Bool}}, ::typeof(DiffEqBase.__solve), ::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::CompositeAlgorithm{Tuple{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType}},AutoSwitch{Tsit5,Rosenbrock23{0,false,DefaultLinSolve,DataType},Rational{Int64},Float64}}) at ./none:0
[14] #__solve#2(::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}, ::Nothing) at /home/goran/.julia/packages/DifferentialEquations/4jSpr/src/default_solve.jl:15
[15] #__solve at ./none:0 [inlined]
[16] #__solve#1 at /home/goran/.julia/packages/DifferentialEquations/4jSpr/src/default_solve.jl:5 [inlined]
[17] __solve at /home/goran/.julia/packages/DifferentialEquations/4jSpr/src/default_solve.jl:2 [inlined]
[18] #solve#381 at /home/goran/.julia/packages/DiffEqBase/aPwRz/src/solve.jl:41 [inlined]
[19] solve(::ODEProblem{Array{Float64,2},Tuple{Float64,Float64},true,Nothing,ODEFunction{true,getfield(ModelingToolkit, Symbol(β#out_f_safe#62β)){getfield(ModelingToolkit, Symbol(β###363β))},LinearAlgebra.UniformScaling{Bool},Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing,Nothing},Nothing,DiffEqBase.StandardODEProblem}) at /home/goran/.julia/packages/DiffEqBase/aPwRz/src/solve.jl:27
[20] top-level scope at In[38]:1