Skip to content

Commit ec4c32e

Browse files
fix: fix observed timeseries detection
1 parent 2f0f894 commit ec4c32e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/systems/index_cache.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ function IndexCache(sys::AbstractSystem)
299299
for v in vs
300300
if (idx = get(disc_idxs, v, nothing)) !== nothing
301301
push!(timeseries, idx.clock_idx)
302+
elseif iscall(v) && operation(v) === getindex &&
303+
(idx = get(disc_idxs, arguments(v)[1], nothing)) !== nothing
304+
push!(timeseries, idx.clock_idx)
302305
elseif haskey(observed_syms_to_timeseries, v)
303306
union!(timeseries, observed_syms_to_timeseries[v])
304307
elseif haskey(dependent_pars_to_timeseries, v)

0 commit comments

Comments
 (0)