@@ -34,7 +34,7 @@ pendulum = ODESystem(eqs, t, [x, y, w, z, T], [L, g], name=:pendulum)
34
34
pendulum = initialize_system_structure (pendulum)
35
35
sss = structure (pendulum)
36
36
@unpack graph, fullvars, varassoc = sss
37
- @test StructuralTransformations. matching (sss, varassoc .== 0 ) == map (x -> x == 0 ? StructuralTransformations. UNASSIGNED : x, [0 , 0 , 0 , 0 , 1 , 2 , 3 , 4 , 0 ])
37
+ @test StructuralTransformations. matching (sss, varassoc .== 0 ) == map (x -> x == 0 ? StructuralTransformations. UNASSIGNED : x, [1 , 0 , 2 , 0 , 3 , 4 , 0 , 0 , 0 ])
38
38
39
39
sys, assign, eqassoc = StructuralTransformations. pantelides! (pendulum)
40
40
sss = structure (sys)
@@ -49,19 +49,17 @@ scc = StructuralTransformations.find_scc(graph, assign)
49
49
]
50
50
51
51
@test graph. fadjlist == sort .([
52
- [5 , 3 ], # 1
53
- [6 , 4 ], # 2
54
- [7 , 9 , 1 ], # 3
55
- [8 , 9 , 2 ], # 4
56
- [2 , 1 ], # 5
57
- [2 , 1 , 6 , 5 ], # 6
58
- [5 , 3 , 10 , 7 ], # 7
59
- [6 , 4 , 11 , 8 ], # 8
60
- [2 , 1 , 6 , 5 , 11 , 10 ], # 9
52
+ [1 , 2 ],
53
+ [3 , 4 ],
54
+ [5 , 6 , 7 ],
55
+ [6 , 8 , 9 ],
56
+ [7 , 9 ],
57
+ [1 , 3 , 7 , 9 ],
58
+ [1 , 2 , 5 , 10 ],
59
+ [3 , 4 , 8 , 11 ],
60
+ [1 , 3 , 7 , 9 , 10 , 11 ],
61
61
])
62
- # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
63
- # [x, y, w, z, xˍt, yˍt, w', z', T, xˍt', yˍt']
64
- @test varassoc == [5 , 6 , 7 , 8 , 10 , 11 , 0 , 0 , 0 , 0 , 0 ]
62
+ @test varassoc == [10 , 5 , 11 , 8 , 0 , 0 , 1 , 0 , 3 , 0 , 0 ]
65
63
# 1: D(x) ~ w
66
64
# 2: D(y) ~ z
67
65
# 3: D(w) ~ T*x
0 commit comments