Skip to content

Commit edf6fcb

Browse files
feat: store observed equation lhs in symbol_to_variable mapping
1 parent c62cff0 commit edf6fcb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/systems/index_cache.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ function IndexCache(sys::AbstractSystem)
8080
end
8181
end
8282

83+
for eq in observed(sys)
84+
if symbolic_type(eq.lhs) != NotSymbolic() && hasname(eq.lhs)
85+
symbol_to_variable[getname(eq.lhs)] = eq.lhs
86+
end
87+
end
88+
8389
disc_buffers = Dict{Any, Set{BasicSymbolic}}()
8490
tunable_buffers = Dict{Any, Set{BasicSymbolic}}()
8591
constant_buffers = Dict{Any, Set{BasicSymbolic}}()

0 commit comments

Comments
 (0)