Skip to content

Conversation

@MasonProtter
Copy link
Collaborator

The MTKExt package extension had some out of date dispatches that were stopping symbolic indexing with Nums from working.

e.g.

using Neuroblox, GraphDynamics, SymbolicIndexingInterface

let
    @named osc1 = HarmonicOscillator()
    @named osc2 = HarmonicOscillator()
    
    g = GraphSystem()
    add_connection!(g, osc1, osc2; weight=1.0)
    add_connection!(g, osc2, osc1; weight=1.0)
    sim_dur = 1e1
    prob = ODEProblem(g, [], (0.0, sim_dur),[])
    
    getp(prob, osc1.ω)(prob)
end

Before:

ERROR: Invalid symbol osc1₊ω for `getp`
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:44
 [2] _getp(sys::ODEProblem{…}, ::ScalarSymbolic, ::ScalarSymbolic, p::Num)
   @ SymbolicIndexingInterface ~/.julia/packages/SymbolicIndexingInterface/vXqJR/src/parameter_indexing.jl:368
 [3] getp(sys::ODEProblem{…}, p::Num)
   @ SymbolicIndexingInterface ~/.julia/packages/SymbolicIndexingInterface/vXqJR/src/parameter_indexing.jl:41
 [4] top-level scope
   @ REPL[18]:11
Some type information was truncated. Use `show(err)` to see complete types.

after

0.15707963267948966

@MasonProtter MasonProtter merged commit 86cfae6 into master Jun 17, 2025
7 checks passed
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 this pull request may close these issues.

2 participants