Skip to content

Commit 8141b5c

Browse files
committed
Clean up
1 parent 1de3e76 commit 8141b5c

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

test/index_reduction.jl

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ edges, vars, vars_asso = sys2bigraph(pendulum)
3535

3636
edges, assign, vars_asso, eqs_asso = ModelingToolkit.pantelides(pendulum)
3737

38-
function new_system(sys, assign, vars_asso, eqs_asso)
39-
end
40-
4138
@test sort.(edges) == sort.([
4239
[5, 3], # 1
4340
[6, 4], # 2
@@ -49,9 +46,9 @@ end
4946
[6, 4, 11, 8], # 8
5047
[2, 1, 6, 5, 11, 10], # 9
5148
])
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]
5552
#1: D(x) ~ w
5653
#2: D(y) ~ z
5754
#3: D(w) ~ T*x
@@ -75,12 +72,9 @@ idx1_pendulum = [D(x) ~ w,
7572
D(z) ~ T*y - g,
7673
#0 ~ x^2 + y^2 - L^2,
7774
#0 ~ 2x*w + 2y*z,
78-
#D(xˍt) ~ D(w),
79-
D(xˍt) ~ T*x,
8075
# D(D(x)) ~ D(w) and substitute the rhs
81-
#D(D(x)) ~ T*x,
76+
D(xˍt) ~ T*x,
8277
# D(D(y)) ~ D(z) and substitute the rhs
83-
#D(D(y)) ~ T*y - g,
8478
D(yˍt) ~ T*y - g,
8579
# 2x*D(D(x)) + 2*D(x)*D(x) + 2y*D(D(y)) + 2*D(y)*D(y) and
8680
# substitute the rhs
@@ -90,8 +84,6 @@ first_order_idx1_pendulum = ode_order_lowering(idx1_pendulum)
9084

9185
using OrdinaryDiffEq
9286
using LinearAlgebra
93-
# [x, y, w, z, xˍt, yˍt, T]
94-
#M = Diagonal([1, 1, 1, 1, 1, 1, 0])
9587
prob = ODEProblem(ODEFunction(first_order_idx1_pendulum),
9688
# [x, y, w, z, xˍt, yˍt, T]
9789
[1, 0, 0, 0, 0, 0, 0.0],# 0, 0, 0, 0],

0 commit comments

Comments
 (0)