Skip to content

Commit dbfd91b

Browse files
test: add state priority to tests for predictable state selection
1 parent bf170ff commit dbfd91b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ModelingToolkitBase/test/odesystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ if @isdefined(ModelingToolkit)
777777
## double integrator
778778

779779
function double_int(; name)
780-
@variables u(t) x(t) v(t)
780+
@variables u(t) x(t) [state_priority = 1] v(t) [state_priority = 1]
781781

782782
eqs = [D(x) ~ v, D(v) ~ u]
783783
return System(eqs, t; name)

test/structural_transformation/tearing.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ newsys = tearing(nlsys)
154154
###
155155
using ModelingToolkit, OrdinaryDiffEq, BenchmarkTools
156156
@parameters p
157-
@variables x(t) y(t) z(t)
157+
@variables x(t) [state_priority = 1] y(t) z(t)
158158
eqs = [
159159
D(x) ~ z * h
160160
0 ~ x - y

0 commit comments

Comments
 (0)