Skip to content

Commit e57a27f

Browse files
Export independent_variables, states, parameters, fix tests
1 parent af335f7 commit e57a27f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/ModelingToolkit.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ RuntimeGeneratedFunctions.init(@__MODULE__)
3535
using RecursiveArrayTools
3636

3737
import SymbolicIndexingInterface
38+
import SymbolicIndexingInterface: independent_variables, states, parameters
39+
export independent_variables, states, parameters
3840
import SymbolicUtils
3941
import SymbolicUtils: istree, arguments, operation, similarterm, promote_symtype,
4042
Symbolic, Term, Add, Mul, Pow, Sym, FnType,

test/odesystem.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,9 @@ let
930930
# TODO: maybe do not emit x_t
931931
sys4s = structural_simplify(sys4)
932932
prob = ODAEProblem(sys4s, [x => 1.0, D(x) => 1.0], (0, 1.0))
933-
@test string.(prob.f.syms) == ["x(t)", "xˍt(t)"]
934-
@test string.(prob.f.paramsyms) == ["pp"]
935-
@test string(prob.f.indepsym) == "t"
933+
@test string.(states(prob.f.sys)) == ["x(t)", "xˍt(t)"]
934+
@test string.(parameters(prob.f.sys)) == ["pp"]
935+
@test string.(independent_variables(prob.f.sys)) == ["t"]
936936
end
937937

938938
let

0 commit comments

Comments
 (0)