Skip to content

Commit db2ae7b

Browse files
test: fix initialization of linearization_dd testset
1 parent 2a2b8b3 commit db2ae7b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/downstream/linearization_dd.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,11 @@ eqs = [connect(link1.TX1, cart.flange)
2525
connect(link1.TY1, fixed.flange)]
2626

2727
@named model = ODESystem(eqs, t, [], []; systems = [link1, cart, force, fixed])
28-
def = ModelingToolkit.defaults(model)
29-
def[cart.s] = 10
30-
def[cart.v] = 0
31-
def[link1.A] = -pi / 2
32-
def[link1.dA] = 0
3328
lin_outputs = [cart.s, cart.v, link1.A, link1.dA]
3429
lin_inputs = [force.f.u]
3530

31+
# => nothing to remove extra defaults
32+
op = Dict(cart.s => 10, cart.v => 0, link1.A => -pi/2, link1.dA => 0, force.f.u => 0, link1.x1 => nothing, link1.y1 => nothing, link1.x2 => nothing, link1.x_cm => nothing)
3633
@test_broken begin
3734
@info "named_ss"
3835
G = named_ss(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
@@ -46,7 +43,7 @@ lin_inputs = [force.f.u]
4643
@test minimum(abs, ps) < 1e-6
4744
@test minimum(abs, complex(0, 1.3777260367206716) .- ps) < 1e-10
4845

49-
lsys, syss = linearize(model, lin_inputs, lin_outputs, allow_symbolic = true, op = def,
46+
lsys, syss = linearize(model, lin_inputs, lin_outputs, allow_symbolic = true, op = op,
5047
allow_input_derivatives = true, zero_dummy_der = true)
5148
lsyss, sysss = ModelingToolkit.linearize_symbolic(model, lin_inputs, lin_outputs;
5249
allow_input_derivatives = true)

0 commit comments

Comments
 (0)