We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 492e37a commit b6cc221Copy full SHA for b6cc221
test/state_selection.jl
@@ -12,6 +12,17 @@ eqs = [
12
]
13
@named sys = ODESystem(eqs, t)
14
15
+let dd = dummy_derivative(sys)
16
+ has_dx1 = has_dx2 = false
17
+ for eq in equations(dd)
18
+ vars = ModelingToolkit.vars(eq)
19
+ has_dx1 |= D(x1) in vars || D(D(x1)) in vars
20
+ has_dx2 |= D(x2) in vars || D(D(x2)) in vars
21
+ end
22
+ @test has_dx1 ⊻ has_dx2 # only one of x1 and x2 can be a dummy derivative
23
+ @test length(states(dd)) == length(equations(dd)) == 10
24
+end
25
+
26
let pss = partial_state_selection(sys)
27
@test length(equations(pss)) == 1
28
@test length(states(pss)) == 2
0 commit comments