Skip to content
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

Symbolic arrays: NameState has no field symbolify #2720

Closed
baggepinnen opened this issue May 16, 2024 · 2 comments · Fixed by JuliaSymbolics/Symbolics.jl#1289
Closed

Symbolic arrays: NameState has no field symbolify #2720

baggepinnen opened this issue May 16, 2024 · 2 comments · Fixed by JuliaSymbolics/Symbolics.jl#1289
Labels
arrays bug Something isn't working usability

Comments

@baggepinnen
Copy link
Contributor

@variables x(t)[1:2] y(t)
eqs = [
    D(x) ~ -x
    y ~ sum(x.^2)
]
@mtkbuild sys = ODESystem(eqs, t)
prob = ODEProblem(sys, [x => [1.0, 2.0]], (0.0, 1.0))
julia> prob = ODEProblem(sys, [x => [1.0, 2.0]], (0.0, 1.0))
ERROR: type NameState has no field symbolify
Stacktrace:
  [1] getproperty
    @ ./Base.jl:37 [inlined]
  [2] toexpr(x::Symbolics.ArrayOp{AbstractVector{Real}}, st::SymbolicUtils.Code.NameState)
    @ Symbolics ~/.julia/packages/Symbolics/Eas9m/src/arrays.jl:993
  [3] (::SymbolicUtils.Code.var"#4#5"{SymbolicUtils.Code.NameState})(x::Symbolics.ArrayOp{AbstractVector{Real}})
    @ SymbolicUtils.Code ~/.julia/packages/SymbolicUtils/c0xQb/src/code.jl:187
  [4] iterate
    @ ./generator.jl:47 [inlined]
  [5] collect_to!(dest::Vector{…}, itr::Base.Generator{…}, offs::Int64, st::Int64)
    @ Base ./array.jl:892
  [6] collect_to!(dest::Vector{…}, itr::Base.Generator{…}, offs::Int64, st::Int64)
    @ Base ./array.jl:900
  [7] collect_to_with_first!(dest::Vector{…}, v1::Function, itr::Base.Generator{…}, st::Int64)
    @ Base ./array.jl:870
  [8] _collect(c::Vector{…}, itr::Base.Generator{…}, ::Base.EltypeUnknown, isz::Base.HasShape{…})
    @ Base ./array.jl:864
  [9] collect_similar(cont::Vector{Any}, itr::Base.Generator{Vector{…}, SymbolicUtils.Code.var"#4#5"{…}})
    @ Base ./array.jl:763
 [10] map(f::Function, A::Vector{Any})
    @ Base ./abstractarray.jl:3285
 [11] toexpr(O::SymbolicUtils.BasicSymbolic{Real}, st::SymbolicUtils.Code.NameState)
    @ SymbolicUtils.Code ~/.julia/packages/SymbolicUtils/c0xQb/src/code.jl:187
 [12] toexpr(a::SymbolicUtils.Code.Assignment, st::SymbolicUtils.Code.NameState)
    @ SymbolicUtils.Code ~/.julia/packages/SymbolicUtils/c0xQb/src/code.jl:97
@baggepinnen baggepinnen added bug Something isn't working arrays labels May 16, 2024
@Snowd1n
Copy link

Snowd1n commented Jun 21, 2024

Have you made any progress on this as I am running into this error message in a similar setting

@ChrisRackauckas
Copy link
Member

No progress yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays bug Something isn't working usability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants