Skip to content

Commit ca589bb

Browse files
committed
fix: simplify if not simplified
1 parent 0efb9ad commit ca589bb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/linearization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function linearization_function(sys::AbstractSystem, inputs = unbound_inputs(sys
4646
warn_empty_op = true,
4747
kwargs...)
4848
if !iscomplete(sys)
49-
error("A completed `ODESystem` is required. Call `complete` or `mtkbuild` on the system before creating the linearization.")
49+
sys = mtkbuild(sys; inputs, outputs)
5050
end
5151
op = Dict(op)
5252
if isempty(op) && warn_empty_op

test/downstream/linearize.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ closed_loop = ODESystem(connections, t, systems = [model, pid, filt, sensor, r,
268268
filt.x => 0.0,
269269
filt.xd => 0.0
270270
])
271-
closed_loop = mtkbuild(closed_loop)
272271

273272
@test_nowarn linearize(closed_loop, :r, :y; warn_empty_op = false)
274273

0 commit comments

Comments
 (0)