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

`DFBDF` fails for large DAE system

Open MarcBerliner opened this issue 4 years ago • 2 comments

@ChrisRackauckas

I have a system of 301 DAEs from the battery model PETLION that succeeds with Sundials but fails using DFBDF. Feel free to use this for benchmarking purposes too. Here's the file:

https://pastebin.com/raw/gk23J9dk

I'm using OrdinaryDiffEq v5.63.4. The error it spits out is:

MethodError: no method matching zero_offsets(::LayoutPointers.StridedPointer{Float64, 2, 2, -1, (2, 1), Tuple{Int64, Static.StaticInt{8}}, Tuple{Static.StaticInt{1}, Static.StaticInt{1}}})
Closest candidates are:
  zero_offsets(::Static.StaticInt{N}) where N at /Users/marc/.julia/packages/VectorizationBase/pTvQj/src/static.jl:126
  zero_offsets(::VectorizationBase.StridedPointer{T, N, C, B, R, X, O} where {X, O}) where {T, N, C, B, R} at /Users/marc/.julia/packages/VectorizationBase/pTvQj/src/strided_pointers/stridedpointers.jl:115
  zero_offsets(::VectorizationBase.FastRange{T, Static.StaticInt{0}, S, O} where {S, O}) where T<:Integer at /Users/marc/.julia/packages/VectorizationBase/pTvQj/src/strided_pointers/stridedpointers.jl:466
  ...

Stacktrace:
  [1] div_dispatch!
    @ ~/.julia/packages/TriangularSolve/pVj7v/src/TriangularSolve.jl:300 [inlined]
  [2] ldiv! (repeats 2 times)
    @ ~/.julia/packages/TriangularSolve/pVj7v/src/TriangularSolve.jl:339 [inlined]
  [3] reckernel!(A::StrideArraysCore.PtrArray{Tuple{Int64, Int64}, (true, true), Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{1}, Static.StaticInt{1}}}, pivot::Val{true}, m::Int64, n::Int64, ipiv::StrideArraysCore.PtrArray{Tuple{Int64}, (true,), Int64, 1, 1, 0, (1,), Tuple{Static.StaticInt{8}}, Tuple{Static.StaticInt{1}}}, info::Int64, blocksize::Int64, thread::Bool)
    @ RecursiveFactorization ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:165
  [4] reckernel!(A::StrideArraysCore.PtrArray{Tuple{Int64, Int64}, (true, true), Float64, 2, 1, 0, (1, 2), Tuple{Static.StaticInt{8}, Int64}, Tuple{Static.StaticInt{1}, Static.StaticInt{1}}}, pivot::Val{true}, m::Int64, n::Int64, ipiv::StrideArraysCore.PtrArray{Tuple{Int64}, (true,), Int64, 1, 1, 0, (1,), Tuple{Static.StaticInt{8}}, Tuple{Static.StaticInt{1}}}, info::Int64, blocksize::Int64, thread::Bool) (repeats 5 times)
    @ RecursiveFactorization ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:159
  [5] recurse!
    @ ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:76 [inlined]
  [6] lu!(A::Matrix{Float64}, ipiv::Vector{Int64}, pivot::Val{true}; check::Bool, blocksize::Int64, threshold::Int64)
    @ RecursiveFactorization ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:62
  [7] #lu!#2
    @ ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:27 [inlined]
  [8] lu! (repeats 2 times)
    @ ~/.julia/packages/RecursiveFactorization/8JZkJ/src/lu.jl:22 [inlined]
  [9] (::DefaultLinSolve)(x::Vector{Float64}, A::Matrix{Float64}, b::Vector{Float64}, update_matrix::Bool; reltol::Float64, kwargs::Base.Iterators.Pairs{Symbol, DiffEqBase.ScaleVector{Vector{Float64}}, Tuple{Symbol, Symbol}, NamedTuple{(:Pl, :Pr), Tuple{DiffEqBase.ScaleVector{Vector{Float64}}, DiffEqBase.ScaleVector{Vector{Float64}}}}})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/WKucm/src/linear_nonlinear.jl:112
 [10] compute_step!(nlsolver::OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, integrator::OrdinaryDiffEq.ODEIntegrator{DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, true, Vector{Float64}, Vector{Float64}, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, DAESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Nothing, Vector{Float64}, DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, OrdinaryDiffEq.InterpolationData{DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}}, DiffEqBase.DEStats}, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/nlsolve/newton.jl:286
 [11] nlsolve!(nlsolver::OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, integrator::OrdinaryDiffEq.ODEIntegrator{DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, true, Vector{Float64}, Vector{Float64}, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, DAESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Nothing, Vector{Float64}, DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, OrdinaryDiffEq.InterpolationData{DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}}, DiffEqBase.DEStats}, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, cache::OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, repeat_step::Bool)
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/nlsolve/nlsolve.jl:34
 [12] perform_step!(integrator::OrdinaryDiffEq.ODEIntegrator{DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, true, Vector{Float64}, Vector{Float64}, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, DAESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Nothing, Vector{Float64}, DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, OrdinaryDiffEq.InterpolationData{DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}}, DiffEqBase.DEStats}, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, cache::OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, repeat_step::Bool)
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/perform_step/dae_perform_step.jl:479
 [13] perform_step!
    @ ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/perform_step/dae_perform_step.jl:414 [inlined]
 [14] solve!(integrator::OrdinaryDiffEq.ODEIntegrator{DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, true, Vector{Float64}, Vector{Float64}, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, DAESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Nothing, Vector{Float64}, DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}, OrdinaryDiffEq.InterpolationData{DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}}, DiffEqBase.DEStats}, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, OrdinaryDiffEq.DFBDFCache{5, OrdinaryDiffEq.NLSolver{NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, true, Vector{Float64}, Float64, Nothing, Float64, OrdinaryDiffEq.NLNewtonCache{Vector{Float64}, Float64, Float64, Vector{Float64}, Matrix{Float64}, Matrix{Float64}, OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, SparseDiffTools.ForwardColorJacCache{Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{OrdinaryDiffEq.DAEResidualJacobianWrapper{true, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, SciMLBase.NullParameters, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, PreallocationTools.DiffCache{Vector{Float64}, Vector{ForwardDiff.Dual{nothing, Float64, 12}}}, Int64, Float64, Vector{Float64}, Vector{Float64}, Float64}, Float64}, Float64, 12}}, Vector{Float64}, Vector{Vector{NTuple{12, Float64}}}, UnitRange{Int64}, Nothing}, DefaultLinSolve}}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Float64, Vector{Float64}, Matrix{Float64}, StaticArrays.SMatrix{5, 6, Rational{Int64}, 30}, Float64, Vector{Float64}, Vector{Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float64, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit})
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/solve.jl:478
 [15] __solve(::DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, ::DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/solve.jl:5
 [16] __solve
    @ ~/.julia/packages/OrdinaryDiffEq/ajk4M/src/solve.jl:4 [inlined]
 [17] #solve_call#42
    @ ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:61 [inlined]
 [18] solve_call(_prob::DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, args::DFBDF{5, 12, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:48
 [19] solve_up(prob::DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, sensealg::Nothing, u0::Vector{Float64}, p::SciMLBase.NullParameters, args::DFBDF{5, 0, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing}; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:87
 [20] solve_up
    @ ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:78 [inlined]
 [21] #solve#43
    @ ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:73 [inlined]
 [22] solve(prob::DAEProblem{Vector{Float64}, Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, DAEFunction{true, var"#54#55", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}, Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, Vector{Bool}}, args::DFBDF{5, 0, true, DefaultLinSolve, NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}}, Val{:forward}, Nothing, Nothing})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/WKucm/src/solve.jl:68
 [23] top-level scope
    @ ./timing.jl:210 [inlined]
 [24] top-level scope
    @ ./In[94]:0
 [25] eval
    @ ./boot.jl:360 [inlined]
 [26] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:1094

MarcBerliner avatar Aug 31 '21 14:08 MarcBerliner

Hey, could you also provide the code that generates this model? Also, I think this should be fixed if you update your packages.

YingboMa avatar Sep 01 '21 13:09 YingboMa

Sure, this is equivalent to running

using PETLION
p = Params(LCO;
    N_p = 10,
    N_s = 10,
    N_n = 10,
    N_r_p = 10,
    N_r_n = 10,
    temperature = false,
)

model = run_model(p, 3600; I=-1,SOC=1)

I gave you the residuals function because I split it up into the DAE system into different functions. There are three in total: differential, algebraic, and the very last equation which determines how quickly it will charge (I=-1 can be understood as fully charge in 1 hour). When you run the above code, it will save the model files to your working directory in a folder called saved_models, and you can find the differential and algebraic functions in f_diff.jl and f_alg.jl respectively.

If you want to test on larger or smaller DAE systems, you can change the value of Ns above or turn on temperature. N_p, N_s, and N_n must be ≥3 and N_r_p and N_r_n must be ≥10.

MarcBerliner avatar Sep 01 '21 14:09 MarcBerliner