Skip to content

Commit 3756f2b

Browse files
committed
Fix conflicts after merge v10
1 parent 728d28d commit 3756f2b

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

src/linearization.jl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,6 @@ function eq_idxs(sys::AbstractSystem)
143143
diff_idxs, alge_idxs
144144
end
145145

146-
"""
147-
Return the set of indexes of differential equations and algebraic equations in the simplified system.
148-
"""
149-
function eq_idxs(sys::AbstractSystem)
150-
eqs = equations(sys)
151-
alge_idxs = findall(!isdiffeq, eqs)
152-
diff_idxs = setdiff(1:length(eqs), alge_idxs)
153-
154-
diff_idxs, alge_idxs
155-
end
156-
157146
"""
158147
$(TYPEDEF)
159148
@@ -618,7 +607,7 @@ function markio!(state, orig_inputs, inputs, outputs, disturbances; check = true
618607
end
619608
(all(values(outputset)) || error(
620609
"Some specified outputs were not found in system. The following Dict indicates the found variables ",
621-
outputset))
610+
outputset))
622611
end
623612
state, orig_inputs
624613
end

test/downstream/linearize.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ connections = [f.y ~ c.r # filtered reference to controller reference
8787

8888
@named cl = ODESystem(connections, t, systems = [f, c, p])
8989

90-
lsys0, ssys = linearize(cl, [f.u], [p.x])
90+
lsys0, ssys = linearize(cl)
9191
desired_order = [f.x, p.x]
9292
lsys = ModelingToolkit.reorder_unknowns(lsys0, unknowns(ssys), desired_order)
93-
lsys1, ssys = linearize(cl, [f.u], [p.x]; autodiff = AutoFiniteDiff())
93+
lsys1, ssys = linearize(cl; autodiff = AutoFiniteDiff())
9494
lsys2 = ModelingToolkit.reorder_unknowns(lsys1, unknowns(ssys), desired_order)
9595

9696
@test lsys.A == lsys2.A == [-2 0; 1 -2]
@@ -266,7 +266,7 @@ closed_loop = ODESystem(connections, t, systems = [model, pid, filt, sensor, r,
266266
filt.xd => 0.0
267267
])
268268

269-
@test_nowarn linearize(closed_loop, :r, :y; warn_empty_op = false)
269+
@test_nowarn linearize(closed_loop; warn_empty_op = false)
270270

271271
# https://discourse.julialang.org/t/mtk-change-in-linearize/115760/3
272272
@mtkmodel Tank_noi begin

0 commit comments

Comments
 (0)