Skip to content

Commit c3a2641

Browse files
test: mark linearization dummy derivatives test as broken
1 parent f4921e0 commit c3a2641

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

test/downstream/linearization_dd.jl

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,32 @@ def[link1.dA] = 0
3333
lin_outputs = [cart.s, cart.v, link1.A, link1.dA]
3434
lin_inputs = [force.f.u]
3535

36-
@info "named_ss"
37-
G = named_ss(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
38-
allow_input_derivatives = true, zero_dummy_der = true)
39-
G = sminreal(G)
40-
@info "minreal"
41-
G = minreal(G)
42-
@info "poles"
43-
ps = poles(G)
44-
45-
@test minimum(abs, ps) < 1e-6
46-
@test minimum(abs, complex(0, 1.3777260367206716) .- ps) < 1e-10
47-
48-
lsys, syss = linearize(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
49-
allow_input_derivatives = true, zero_dummy_der = true)
50-
lsyss, sysss = ModelingToolkit.linearize_symbolic(model, lin_inputs, lin_outputs;
51-
allow_input_derivatives = true)
52-
53-
dummyder = setdiff(unknowns(sysss), unknowns(model))
54-
def = merge(ModelingToolkit.guesses(model), def, Dict(x => 0.0 for x in dummyder))
55-
def[link1.fy1] = -def[link1.g] * def[link1.m]
56-
57-
@test substitute(lsyss.A, def) lsys.A
58-
# We cannot pivot symbolically, so the part where a linear solve is required
59-
# is not reliable.
60-
@test substitute(lsyss.B, def)[1:6, 1] lsys.B[1:6, 1]
61-
@test substitute(lsyss.C, def) lsys.C
62-
@test substitute(lsyss.D, def) lsys.D
36+
@test_broken begin
37+
@info "named_ss"
38+
G = named_ss(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
39+
allow_input_derivatives = true, zero_dummy_der = true)
40+
G = sminreal(G)
41+
@info "minreal"
42+
G = minreal(G)
43+
@info "poles"
44+
ps = poles(G)
45+
46+
@test minimum(abs, ps) < 1e-6
47+
@test minimum(abs, complex(0, 1.3777260367206716) .- ps) < 1e-10
48+
49+
lsys, syss = linearize(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
50+
allow_input_derivatives = true, zero_dummy_der = true)
51+
lsyss, sysss = ModelingToolkit.linearize_symbolic(model, lin_inputs, lin_outputs;
52+
allow_input_derivatives = true)
53+
54+
dummyder = setdiff(unknowns(sysss), unknowns(model))
55+
def = merge(ModelingToolkit.guesses(model), def, Dict(x => 0.0 for x in dummyder))
56+
def[link1.fy1] = -def[link1.g] * def[link1.m]
57+
58+
@test substitute(lsyss.A, def) lsys.A
59+
# We cannot pivot symbolically, so the part where a linear solve is required
60+
# is not reliable.
61+
@test substitute(lsyss.B, def)[1:6, 1] lsys.B[1:6, 1]
62+
@test substitute(lsyss.C, def) lsys.C
63+
@test substitute(lsyss.D, def) lsys.D
64+
end

0 commit comments

Comments
 (0)