Open TorkelE opened 6 months ago
Does ProblemState
and SymbolCache
combined solve your problem? I could make it so that ProblemCache
can store an index provider, so you don't need to maintain both objects. Basically,
Current:
temp_sys = SymbolCache(nothing, [p1, p2, p3])
ssi_vec = ProblemCache(; p = [1.0, 2.0, 3.0])
getp(temp_sys, sym)(ssi_vec)
With the suggestion above:
ssi_vec = ProblemState(; p = [1.0, 2.0, 3.0], index_provider = SymbolCache(nothing, [p1, p2, p3]))
getp(ssi_vec, sym)(ssi_vec)
This will handle all SII functionality except observed
(because SII only does that for Symbol
/Expr
, and doesn't have a hook for it)
Would it be possible to have something like:
and then have all of SII's functionality work on that?
There are a couple of cases where I have vectors and it would be nice to have a easy-to-use way of augmenting them with SII stuff without creating this thing myself for each case.