Skip to content

Commit

Permalink
feat: add new all-symbols methods from SII
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Dec 18, 2023
1 parent ab2c452 commit 71c23ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SimpleNonlinearSolve = "0.1.0, 1"
SparseArrays = "1"
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
StaticArrays = "0.10, 0.11, 0.12, 1.0"
SymbolicIndexingInterface = "0.3"
SymbolicIndexingInterface = "0.3.1"
SymbolicUtils = "1.0"
Symbolics = "5.7"
URIs = "1"
Expand Down
8 changes: 8 additions & 0 deletions src/systems/abstractsystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,14 @@ SymbolicIndexingInterface.is_time_dependent(::AbstractTimeIndependentSystem) = f

SymbolicIndexingInterface.constant_structure(::AbstractSystem) = true

function SymbolicIndexingInterface.all_solvable_symbols(sys::AbstractSystem)
vcat(variable_symbols(sys), getproperty.(observed(sys), :lhs))
end

function SymbolicIndexingInterface.all_symbols(sys::AbstractSystem)
vcat(all_solvable_symbols(sys), parameter_symbols(sys), independent_variable_symbols(sys))
end

iscomplete(sys::AbstractSystem) = isdefined(sys, :complete) && getfield(sys, :complete)

"""
Expand Down

0 comments on commit 71c23ce

Please sign in to comment.