Skip to content

undefvar and bounds error in linearization_function #2907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
baggepinnen opened this issue Jul 30, 2024 · 0 comments · Fixed by #2912
Closed

undefvar and bounds error in linearization_function #2907

baggepinnen opened this issue Jul 30, 2024 · 0 comments · Fixed by #2912
Assignees

Comments

@baggepinnen
Copy link
Contributor

get_initprob_u_p = let p_getter,

@AayushSabharwal isn't there something missing in the expression let p_getter,?, e.g., let p_getter = p_getter,?

Making that change, I further get

ERROR: BoundsError: attempt to access Tuple{SymbolicIndexingInterface.ProblemState{Vector{Float64}, ModelingToolkit.MTKParameters{Tuple{Vector{Float64}}, Tuple{}, Tuple{}, Tuple{}, Tuple{}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋out, :ˍ₋arg1), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0x436e531f, 0xa1112b08, 0x3bf49a23, 0x855dd196, 0x09507fa9), Nothing}, RuntimeGeneratedFunctions.RuntimeGeneratedFunction{(:ˍ₋arg1,), ModelingToolkit.var"#_RGF_ModTag", ModelingToolkit.var"#_RGF_ModTag", (0xee8ca58d, 0x1958d6ce, 0x314ac4d0, 0xd540ea53, 0x6f246bd0), Nothing}}, Float64}} at index [2]
Stacktrace:
  [1] getindex(t::Tuple, i::Int64)
    @ Base ./tuple.jl:31
  [2] macro expansion
    @ ~/.julia/packages/RuntimeGeneratedFunctions/M9ZX8/src/RuntimeGeneratedFunctions.jl:162 [inlined]
  [3] macro expansion
    @ ./none:0 [inlined]
  [4] generated_callfunc
    @ ./none:0 [inlined]
  [5] (::RuntimeGeneratedFunctions.RuntimeGeneratedFunction{…})(args::SymbolicIndexingInterface.ProblemState{…})
    @ RuntimeGeneratedFunctions ~/.julia/packages/RuntimeGeneratedFunctions/M9ZX8/src/RuntimeGeneratedFunctions.jl:150
  [6] (::ModelingToolkit.var"#1253#1261"{})(u::Vector{…}, p::ModelingToolkit.MTKParameters{…}, t::Float64)
    @ ModelingToolkit ~/.julia/dev/ModelingToolkit/src/systems/abstractsystem.jl:2176
  [7] (::ModelingToolkit.var"#1255#1263"{})(u::Vector{…}, p::Dict{…}, t::Float64)
    @ ModelingToolkit ~/.julia/dev/ModelingToolkit/src/systems/abstractsystem.jl:2231
  [8] linearize(sys::ODESystem, lin_fun::ModelingToolkit.var"#1255#1263"{}; t::Float64, op::Dict{…}, allow_input_derivatives::Bool, p::SciMLBase.NullParameters)
    @ ModelingToolkit ~/.julia/packages/ModelingToolkit/3AmNp/src/systems/abstractsystem.jl:2385

reproducer exists, but it's not very minimal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants