@@ -35,9 +35,6 @@ edges, vars, vars_asso = sys2bigraph(pendulum)
35
35
36
36
edges, assign, vars_asso, eqs_asso = ModelingToolkit. pantelides (pendulum)
37
37
38
- function new_system (sys, assign, vars_asso, eqs_asso)
39
- end
40
-
41
38
@test sort .(edges) == sort .([
42
39
[5 , 3 ], # 1
43
40
[6 , 4 ], # 2
49
46
[6 , 4 , 11 , 8 ], # 8
50
47
[2 , 1 , 6 , 5 , 11 , 10 ], # 9
51
48
])
52
- # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
53
- # [x, y, w, z, x', y' , w', z', T, x'', y''] -- how can I get this vector of symbols?
54
- @test vars_asso == [5 , 6 , 7 , 8 , 10 , 11 , 0 , 0 , 0 , 0 , 0 ]
49
+ # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
50
+ # [x, y, w, z, xˍt, yˍt , w', z', T, xˍt', yˍt']
51
+ @test vars_asso == [5 , 6 , 7 , 8 , 10 , 11 , 0 , 0 , 0 , 0 , 0 ]
55
52
# 1: D(x) ~ w
56
53
# 2: D(y) ~ z
57
54
# 3: D(w) ~ T*x
@@ -75,12 +72,9 @@ idx1_pendulum = [D(x) ~ w,
75
72
D (z) ~ T* y - g,
76
73
# 0 ~ x^2 + y^2 - L^2,
77
74
# 0 ~ 2x*w + 2y*z,
78
- # D(xˍt) ~ D(w),
79
- D (xˍt) ~ T* x,
80
75
# D(D(x)) ~ D(w) and substitute the rhs
81
- # D(D(x) ) ~ T*x,
76
+ D (xˍt ) ~ T* x,
82
77
# D(D(y)) ~ D(z) and substitute the rhs
83
- # D(D(y)) ~ T*y - g,
84
78
D (yˍt) ~ T* y - g,
85
79
# 2x*D(D(x)) + 2*D(x)*D(x) + 2y*D(D(y)) + 2*D(y)*D(y) and
86
80
# substitute the rhs
@@ -90,8 +84,6 @@ first_order_idx1_pendulum = ode_order_lowering(idx1_pendulum)
90
84
91
85
using OrdinaryDiffEq
92
86
using LinearAlgebra
93
- # [x, y, w, z, xˍt, yˍt, T]
94
- # M = Diagonal([1, 1, 1, 1, 1, 1, 0])
95
87
prob = ODEProblem (ODEFunction (first_order_idx1_pendulum),
96
88
# [x, y, w, z, xˍt, yˍt, T]
97
89
[1 , 0 , 0 , 0 , 0 , 0 , 0.0 ],# 0, 0, 0, 0],
0 commit comments