DataDrivenProblem strange error

I have come across an error when running a data fitting problem of continuous time. I have created a MWE example to demonstrate with synthetic data. While the data might not have a good fit, the error produced does not seem to be related. Here is the code:

using ModelingToolkit, DataDrivenDiffEq, DataDrivenSparse

X = Float64.(randn(2, 31))
Y = X .^2 .+ 3 .* X .+ 5
DX = rand(2, 31)
t = 0:.1:3

@variables u[1:2]
b = [polynomial_basis(u, 5); sin.(u)]
basis = Basis(b, u);

λ = exp10.(-3:0.01:5)
opt = STLSQ(λ)

full_problem = DataDrivenProblem(X, t=t, DX = DX)
solve(full_problem, basis, opt, maxiter=100, progress=true)

The error occurs on the last line, with the stack trace:

ERROR: UndefVarError: u not defined
Stacktrace:
  [1] macro expansion
    @ ~/.julia/packages/SymbolicUtils/qulQp/src/code.jl:444 [inlined]
  [2] macro expansion
    @ ~/.julia/packages/RuntimeGeneratedFunctions/6v5Gn/src/RuntimeGeneratedFunctions.jl:137 [inlined]
  [3] macro expansion
    @ ./none:0 [inlined]
  [4] generated_callfunc
    @ ./none:0 [inlined]
  [5] (::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x0c2bcf03, 0xed76d180, 0x56aadc18, 0xacd9c0b5, 0x87e98b3c)})(::SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, ::SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, ::SubArray{Float64, 1, Vector{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true}, ::SubArray{Float64, 0, Vector{Float64}, Tuple{Int64}, true}, ::Matrix{Float64})
    @ RuntimeGeneratedFunctions ~/.julia/packages/RuntimeGeneratedFunctions/6v5Gn/src/RuntimeGeneratedFunctions.jl:124
  [6] _apply_function(f::DataDrivenDiffEq.DataDrivenFunction{false, false, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x0c2bcf03, 0xed76d180, 0x56aadc18, 0xacd9c0b5, 0x87e98b3c)}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x1ebf8895, 0x2dc4477d, 0x96f71acb, 0x211e7000, 0x510681b6)}}, du::SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, u::SubArray{Float64, 1, Matrix{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}, Int64}, true}, p::SubArray{Float64, 1, Vector{Float64}, Tuple{Base.Slice{Base.OneTo{Int64}}}, true}, t::SubArray{Float64, 0, Vector{Float64}, Tuple{Int64}, true}, c::Matrix{Float64})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/basis/build_function.jl:32
  [7] (::DataDrivenDiffEq.var"#1#2"{DataDrivenDiffEq.DataDrivenFunction{false, false, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x0c2bcf03, 0xed76d180, 0x56aadc18, 0xacd9c0b5, 0x87e98b3c)}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x1ebf8895, 0x2dc4477d, 0x96f71acb, 0x211e7000, 0x510681b6)}}, Matrix{Float64}, Matrix{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}})(i::Int64)
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/basis/build_function.jl:150
  [8] iterate
    @ ./generator.jl:47 [inlined]
  [9] _collect(c::Base.OneTo{Int64}, itr::Base.Generator{Base.OneTo{Int64}, DataDrivenDiffEq.var"#1#2"{DataDrivenDiffEq.DataDrivenFunction{false, false, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x0c2bcf03, 0xed76d180, 0x56aadc18, 0xacd9c0b5, 0x87e98b3c)}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x1ebf8895, 0x2dc4477d, 0x96f71acb, 0x211e7000, 0x510681b6)}}, Matrix{Float64}, Matrix{Float64}, Vector{Float64}, Vector{Float64}, Matrix{Float64}}}, #unused#::Base.EltypeUnknown, isz::Base.HasShape{1})
    @ Base ./array.jl:807
 [10] collect_similar
    @ ./array.jl:716 [inlined]
 [11] map
    @ ./abstractarray.jl:2933 [inlined]
 [12] _apply_vec_function(f::DataDrivenDiffEq.DataDrivenFunction{false, false, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x0c2bcf03, 0xed76d180, 0x56aadc18, 0xacd9c0b5, 0x87e98b3c)}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x1ebf8895, 0x2dc4477d, 0x96f71acb, 0x211e7000, 0x510681b6)}}, du::Matrix{Float64}, u::Matrix{Float64}, p::Vector{Float64}, t::Vector{Float64}, c::Matrix{Float64})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/basis/build_function.jl:148
 [13] (::Basis{false, false})(p::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/problem/type.jl:337
 [14] get_fit_targets
    @ ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/commonsolve.jl:39 [inlined]
 [15] init(prob::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous}, basis::Basis{false, false}, alg::STLSQ{Vector{Float64}, Float64}; options::DataDrivenCommonOptions{Float64, NamedTuple{(), Tuple{}}}, kwargs::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol}, NamedTuple{(:maxiter, :progress), Tuple{Int64, Bool}}})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/commonsolve.jl:57
 [16] solve(::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous}, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol}, NamedTuple{(:maxiter, :progress), Tuple{Int64, Bool}}})
    @ CommonSolve ~/.julia/packages/CommonSolve/u9cNO/src/CommonSolve.jl:23
 [17] top-level scope
    @ Untitled-1:26

I am using Julia 1.8.3. My Project.toml is:

Status `~/src/2022/basic_UODE/lotka-voltera/Project.toml`
  [2445eb08] DataDrivenDiffEq v1.0.1
  [5b588203] DataDrivenSparse v0.1.2
  [961ee093] ModelingToolkit v8.37.0

I also updated the modules in the package manager. Two submodules could not be upgraded. When typing status --outdated -m, I got the following:

status --outdated -m
Status `~/src/2022/basic_UODE/datadriven_continuous_mwe/Manifest.toml`
⌅ [5b8099bc] DomainSets v0.5.15 (<v0.6.2): ModelingToolkit, Symbolics
⌅ [8197267c] IntervalSets v0.7.3 (<v0.7.4): DomainSets
⌅ [2efcf032] SymbolicIndexingInterface v0.1.1 (<v0.2.1): ModelingToolkit
⌅ [8ea1fca8] TermInterface v0.2.3 (<v0.3.3): Metatheory

Only last night, all was well, although I had not tried this particular piece of code.

Thanks for any help,

Gordon

Yeah, if you were following the Lotka-Volterra tutorial that’s what it throws too (part of why it’s not done)

@Julius_Martensen do you know what’s going on there? Seems to be something from the v1.0 release. Did one of the sublibraries miss a release?

This should be fixed with DataDrivenDiffEq v1.0.1 .

If in doubt, use collect(u) before passing u into the basis.

Is the registry up to date ?

EDIT

sin.(u) is the problem. I think I have a fix ready. ( Forgot a .).
You should do Symbolics.scalarize(b) before passing the equations.

I removed the sin(u) basis function. I now get the error:

ERROR: MethodError: no method matching fit(::Type{ZScoreTransform}, ::Matrix{Vector{Num}}; dims=2, scale=false, center=false)
Closest candidates are:
  fit(::Type{ZScoreTransform}, ::AbstractVector{<:Real}; dims, center, scale) at ~/.julia/packages/StatsBase/XgjIN/src/transformations.jl:130
  fit(::Type{ZScoreTransform}, ::AbstractMatrix{<:Real}; dims, center, scale) at ~/.julia/packages/StatsBase/XgjIN/src/transformations.jl:109
  fit(::Type{StatsBase.Histogram}, ::Any...; kwargs...) at ~/.julia/packages/StatsBase/XgjIN/src/hist.jl:407
  ...
Stacktrace:
 [1] fit(#unused#::DataNormalization{Nothing}, data::Matrix{Vector{Num}})
   @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/utils/data_processing.jl:64
 [2] init(prob::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous}, basis::Basis{false, false}, alg::STLSQ{Vector{Float64}, Float64}; options::DataDrivenCommonOptions{Float64, NamedTuple{(), Tuple{}}}, kwargs::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol}, NamedTuple{(:maxiter, :progress), Tuple{Int64, Bool}}})
   @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Yfvcd/src/commonsolve.jl:84
 [3] solve(::DataDrivenProblem{Float64, false, DataDrivenDiffEq.Continuous}, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Integer, Tuple{Symbol, Symbol}, NamedTuple{(:maxiter, :progress), Tuple{Int64, Bool}}})
   @ CommonSolve ~/.julia/packages/CommonSolve/u9cNO/src/CommonSolve.jl:23
 [4] top-level scope
   @ ~/src/2022/basic_UODE/datadriven_continuous_mwe/datadriven_mwe.jl:16

Thanks.

THis morning, I noticed some updates to the libraries. However, I still get the error:

ERROR: MethodError: no method matching fit(::Type{ZScoreTransform}, ::Matrix{Vector{Num}}; dims=2, scale=false, center=false)
Closest candidates are:
  fit(::Type{ZScoreTransform}, ::AbstractVector{<:Real}; dims, center, scale) at ~/.julia/packages/StatsBase/XgjIN/src/transformations.jl:130
  fit(::Type{ZScoreTransform}, ::AbstractMatrix{<:Real}; dims, center, scale) at ~/.julia/packages/StatsBase/XgjIN/src/transformations.jl:109
  fit(::Type{StatsBase.Histogram}, ::Any...; kwargs...) at ~/.julia/packages/StatsBase/XgjIN/src/hist.jl:407
  ...

Here is my MWE:

using ModelingToolkit, DataDrivenDiffEq, DataDrivenSparse

X = Float64.(randn(2, 31))
Y = X .^2 .+ 3 .* X .+ 5
DX = rand(2, 31)
t = 0:.1:3

@variables u[1:2]
b = [polynomial_basis(u, 5)]
basis = Basis(b, u);

λ = exp10.(-3:0.01:5)
opt = STLSQ(λ)

full_problem = DataDrivenProblem(X, t=t, DX = DX)
solve(full_problem, basis, opt, maxiter=100, progress=true)

and my Project.toml:

  [2445eb08] DataDrivenDiffEq v1.0.2
  [5b588203] DataDrivenSparse v0.1.2
  [961ee093] ModelingToolkit v8.38.0

Thanks!

@erlebach we will get back to you on this. @Julius_Martensen can we aim to get SciMLDocs/missing_physics.md at main · SciML/SciMLDocs · GitHub working by the end of the week? At this point this is the last blocker to the new docs, and I think it’s pointing to a real bug in the new release of DDQ

Almost there :slight_smile:

@variables u[1:2]
b = [polynomial_basis(u, 5)]
basis = Basis(b, u);

creates a Vector{Vector{Num}}. You should just write

basis = Basis(polynomial_basis(u, 5), u)

Given that polynomial_basis returns a Vector{Num} already.

@ChrisRackauckas The example does not fit anymore due to a larger error in the trained NN. I will start a HyperOpt loop to get the right architecture and a more robust fit. I am positive to get it done provided I do not have unexpected issues :sweat_smile: .

Almost made it to the end. Yes, I know you’ll get back to me, so I am simply reporting.
I ran the code up to the line:

nn_res = solve(nn_problem, basis, opt, maxiter = 10000, progress = true, sampler = DataSampler(Batcher(n = 4, shuffle = true)))

Batcher is not found, and neither is DataSampler. I found a message related to this dating Oct. 28, that was never answered, at least not on this forum. I am not even sure what the DataSampler does and how, or the purpose of Batcher (perhaps creating batches? :slight_smile: )

Cheers,

This has changed with v1.0.0 :sweat_smile: . The current options for batching and sampler are within the
CommonOptions under with the corresponding struct here.

So a rough translation would be DataProcessing(split = 0.8, batchsize=size(X\_n, 2) / 4, shuffle = true).

@Julius_Martensen
That worked!

One more issue (we are almost at the end):

# Show the results
map(println, results)
# Show the results
map(println ∘ result, results)
# Show the identified parameters
map(println ∘ parameter_map, results)

If you look at the code, you will find that result is not found. I am not clear about the reason for the composition of println and result. Is result a function?

The last line of the code:

estimate = solve(estimation_prob, Tsit5(), saveat = solution.t)

also has issues. Namely

ERROR: BoundsError: attempt to access 0-element Vector{Any} at index [1]
Stacktrace:
  [1] getindex
    @ ./array.jl:924 [inlined]
  [2] macro expansion
    @ ~/.julia/packages/SymbolicUtils/qulQp/src/code.jl:444 [inlined]
  [3] macro expansion
    @ ~/.julia/packages/RuntimeGeneratedFunctions/6v5Gn/src/RuntimeGeneratedFunctions.jl:137 [inlined]
  [4] macro expansion
    @ ./none:0 [inlined]
  [5] generated_callfunc
    @ ./none:0 [inlined]
  [6] (::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x65bfadde, 0x49e0750f, 0x695972b9, 0x2d0dcf2d, 0xd9ff04b7)})(::Vector{Any}, ::Vector{Float64}, ::Vector{Any}, ::Num, ::Vector{Any})
    @ RuntimeGeneratedFunctions ~/.julia/packages/RuntimeGeneratedFunctions/6v5Gn/src/RuntimeGeneratedFunctions.jl:124
  [7] _apply_function
    @ ~/.julia/packages/DataDrivenDiffEq/Z5a34/src/basis/build_function.jl:32 [inlined]
  [8] (::DataDrivenDiffEq.DataDrivenFunction{false, false, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0x65bfadde, 0x49e0750f, 0x695972b9, 0x2d0dcf2d, 0xd9ff04b7)}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1, :ˍ₋arg2, :ˍ₋arg3, :ˍ₋arg4, :ˍ₋arg5), Symbolics.var"#_RGF_ModTag", Symbolics.var"#_RGF_ModTag", (0xfe18191c, 0x4e38f943, 0x4f3e6ad8, 0x2cd240c3, 0xe2a3879c)}})(u::Vector{Float64}, p::Vector{Any}, t::Num)
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Z5a34/src/basis/build_function.jl:52
  [9] (::Basis{false, false})(u::Vector{Float64}, p::Vector{Any}, t::Num)
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Z5a34/src/basis/type.jl:278
 [10] (::Basis{false, false})(u::Vector{Float64}, p::Vector{Any})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Z5a34/src/basis/type.jl:277
 [11] (::DataDrivenSolution{Float64})(::Vector{Float64}, ::Vararg{Any})
    @ DataDrivenDiffEq ~/.julia/packages/DataDrivenDiffEq/Z5a34/src/solution.jl:49
 [12] recovered_dynamics!(du::Vector{Float64}, u::Vector{Float64}, p::Vector{Any}, t::Float32)
    @ Main ~/src/2022/basic_UODE/lotka-voltera/Demo_Lotka-Volterra_hybrid_lux.jl:267
 [13] Void
    @ ~/.julia/packages/SciMLBase/VKnrY/src/utils.jl:462 [inlined]
 [14] (::FunctionWrappers.CallWrapper{Nothing})(f::SciMLBase.Void{typeof(recovered_dynamics!)}, arg1::Vector{Float64}, arg2::Vector{Float64}, arg3::Vector{Any}, arg4::Float32)
    @ FunctionWrappers ~/.julia/packages/FunctionWrappers/Q5cBx/src/FunctionWrappers.jl:65
 [15] macro expansion
    @ ~/.julia/packages/FunctionWrappers/Q5cBx/src/FunctionWrappers.jl:137 [inlined]
 [16] do_ccall
    @ ~/.julia/packages/FunctionWrappers/Q5cBx/src/FunctionWrappers.jl:125 [inlined]
 [17] FunctionWrapper
    @ ~/.julia/packages/FunctionWrappers/Q5cBx/src/FunctionWrappers.jl:144 [inlined]
 [18] _call
    @ ~/.julia/packages/FunctionWrappersWrappers/YyXoO/src/FunctionWrappersWrappers.jl:12 [inlined]
 [19] FunctionWrappersWrapper
    @ ~/.julia/packages/FunctionWrappersWrappers/YyXoO/src/FunctionWrappersWrappers.jl:10 [inlined]
 [20] ODEFunction
    @ ~/.julia/packages/SciMLBase/VKnrY/src/scimlfunctions.jl:2096 [inlined]
 [21] initialize!(integrator::OrdinaryDiffEq.ODEIntegrator{Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, true, Vector{Float64}, Nothing, Float32, Vector{Any}, Float32, Float64, Float64, Float32, Vector{Vector{Float64}}, ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float32}, Vector{Vector{Vector{Float64}}}, ODEProblem{Vector{Float64}, Tuple{Float32, Float32}, true, Vector{Any}, ODEFunction{true, SciMLBase.AutoSpecialize, FunctionWrappersWrappers.FunctionWrappersWrapper{Tuple{FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{Float64}, Vector{Float64}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Float64}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}}, false}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.InterpolationData{ODEFunction{true, SciMLBase.AutoSpecialize, FunctionWrappersWrappers.FunctionWrappersWrapper{Tuple{FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{Float64}, Vector{Float64}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Float64}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}}, false}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Vector{Vector{Float64}}, Vector{Float32}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float32}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}, DiffEqBase.DEStats, Nothing}, ODEFunction{true, SciMLBase.AutoSpecialize, FunctionWrappersWrappers.FunctionWrappersWrapper{Tuple{FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{Float64}, Vector{Float64}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Float64}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}}, false}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float32}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float32, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryHeap{Float32, DataStructures.FasterForward}, DataStructures.BinaryHeap{Float32, DataStructures.FasterForward}, Nothing, Nothing, Int64, Tuple{}, Vector{Float32}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, cache::OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float32}, typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False})
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/SRiFK/src/perform_step/low_order_rk_perform_step.jl:736
 [22] __init(prob::ODEProblem{Vector{Float64}, Tuple{Float32, Float32}, true, Vector{Any}, ODEFunction{true, SciMLBase.AutoSpecialize, FunctionWrappersWrappers.FunctionWrappersWrapper{Tuple{FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{Float64}, Vector{Float64}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, Float32}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Float64}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}, FunctionWrappers.FunctionWrapper{Nothing, Tuple{Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}, Vector{Any}, ForwardDiff.Dual{ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64}, Float64, 1}}}}, false}, UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, alg::Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}, timeseries_init::Tuple{}, ts_init::Tuple{}, ks_init::Tuple{}, recompile::Type{Val{true}}; saveat::Vector{Float32}, tstops::Tuple{}, d_discontinuities::Tuple{}, save_idxs::Nothing, save_everystep::Bool, save_on::Bool, save_start::Bool, save_end::Nothing, callback::Nothing, dense::Bool, calck::Bool, dt::Float32, dtmin::Nothing, dtmax::Float32, force_dtmin::Bool, adaptive::Bool, gamma::Rational{Int64}, abstol::Nothing, reltol::Nothing, qmin::Rational{Int64}, qmax::Int64, qsteady_min::Int64, qsteady_max::Int64, beta1::Nothing, beta2::Nothing, qoldinit::Rational{Int64}, controller::Nothing, fullnormalize::Bool, failfactor::Int64, maxiters::Int64, internalnorm::typeof(DiffEqBase.ODE_DEFAULT_NORM), internalopnorm::typeof(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, alias_du0::Bool, initializealg::OrdinaryDiffEq.DefaultInit, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ OrdinaryDiffEq ~/.julia/packages/OrdinaryDiffEq/SRiFK/src/solve.jl:493
 [23] #__solve#564
    @ ~/.julia/packages/OrdinaryDiffEq/SRiFK/src/solve.jl:5 [inlined]
 [24] #solve_call#21
    @ ~/.julia/packages/DiffEqBase/g7Alx/src/solve.jl:494 [inlined]
 [25] solve_up(prob::ODEProblem{Vector{Float64}, Tuple{Float32, Float32}, true, Vector{Any}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(recovered_dynamics!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, sensealg::Nothing, u0::Vector{Float64}, p::Vector{Any}, args::Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}; kwargs::Base.Pairs{Symbol, Vector{Float32}, Tuple{Symbol}, NamedTuple{(:saveat,), Tuple{Vector{Float32}}}})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/g7Alx/src/solve.jl:856
 [26] solve(prob::ODEProblem{Vector{Float64}, Tuple{Float32, Float32}, true, Vector{Any}, ODEFunction{true, SciMLBase.AutoSpecialize, typeof(recovered_dynamics!), UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing, Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, args::Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}; sensealg::Nothing, u0::Nothing, p::Nothing, wrap::Val{true}, kwargs::Base.Pairs{Symbol, Vector{Float32}, Tuple{Symbol}, NamedTuple{(:saveat,), Tuple{Vector{Float32}}}})
    @ DiffEqBase ~/.julia/packages/DiffEqBase/g7Alx/src/solve.jl:823
 [27] top-level scope
    @ ~/src/2022/basic_UODE/lotka-voltera/Demo_Lotka-Volterra_hybrid_lux.jl:273