-
-
Notifications
You must be signed in to change notification settings - Fork 10
Description
If getu(sys, sym::ArraySymbolic) with an ArraySymbolic, sym used to be collected. Now, it resolves the indices, idx = variable_indices(sys, sym) which, in my case, returns something like Int[1,2]. However this ends up as some _getp call
SymbolicIndexingInterface.jl/src/state_indexing.jl
Lines 242 to 245 in 82f1464
| ts_idxs = get_all_timeseries_indexes(sys, sym_arr) | |
| if !(ContinuousTimeseries() in ts_idxs) | |
| return getp(sys, sym) | |
| end |
because sym_arr = [1,2] which is neither variable nor parameter of my inpr thus the timeseries idx do not contain ContinuousTimeseries().
Can be solved if get_all_timeseries_indexes(inpr, sym) returns Set([SII.ContinuousTimeseries()]) for random inputs (in this case: integers). But does this really make sense? For example, that's not how it is defined in SymbolCache, which just returns an empty set.
SymbolicIndexingInterface.jl/src/symbol_cache.jl
Lines 141 to 149 in 82f1464
| function get_all_timeseries_indexes(sc::SymbolCache, sym) | |
| if is_variable(sc, sym) || is_independent_variable(sc, sym) | |
| return Set([ContinuousTimeseries()]) | |
| elseif is_timeseries_parameter(sc, sym) | |
| return Set([timeseries_parameter_index(sc, sym).timeseries_idx]) | |
| else | |
| return Set() | |
| end | |
| end |