Skip to content

Commit 2f75188

Browse files
committed
unknown_states
1 parent 4f52fdb commit 2f75188

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/SymbolicIndexingInterface.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ include("symbolcache.jl")
88
export independent_variables, is_indep_sym, states, state_sym_to_index, is_state_sym,
99
parameters, param_sym_to_index, is_param_sym, observed, observed_sym_to_index,
1010
is_observed_sym, get_state_dependencies, get_observed_dependencies,
11-
get_deps_of_observed, SymbolCache
11+
get_deps_of_observed, SymbolCache, unknown_states
1212

1313
end

src/interface.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,23 @@ states(::Any) = []
3131
"""
3232
$(TYPEDSIGNATURES)
3333
34+
Get an iterable over the unknown states for the given system. Default to an empty vector.
35+
"""
36+
function unknown_states end
37+
38+
unknown_states(::Any) = []
39+
40+
"""
41+
$(TYPEDSIGNATURES)
42+
3443
Find the index of the given sym in the given system. Default to the index of the first
3544
symbol in the iterable returned by `states` which matches the given `sym`. Return
3645
`nothing` if the given `sym` does not match.
3746
"""
3847
function state_sym_to_index end
3948

4049
function state_sym_to_index(store, sym)
50+
@show "why"
4151
findfirst(isequal(Symbol(sym)), Symbol.(states(store)))
4252
end
4353

0 commit comments

Comments
 (0)