Skip to content

Commit 21e6ec1

Browse files
committed
fix wrong function signature ared
1 parent b20cb53 commit 21e6ec1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_predictive_control.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ end
235235
@testset "LinMPC terminal cost" begin
236236
model = LinModel(ss([0.5 -0.4;0.6 0.5], [1 0;0 1], [1 0; 0 1], 0, 1))
237237
K = lqr(Discrete, model.A, model.Bu, I, 0.5I)
238-
M_end, _ = ControlSystemsBase.ared(model.A, model.Bu, I, 0.5I)
238+
M_end = ControlSystemsBase.are(Discrete, model.A, model.Bu, I, 0.5I)
239239
M_Hp = [I(4) zeros(4,2); zeros(2,4) M_end]
240240
mpc = LinMPC(model; Hp=3, Hc=3, M_Hp, Nwt=[0; 0], Lwt=[0.5, 0.5], nint_ym=0)
241241
X_mpc = zeros(2,20)
@@ -255,7 +255,7 @@ end
255255
X_lqr[:,i] = x
256256
x = model.A*x + model.Bu*u
257257
end
258-
@test all(isapprox.(X_mpc, X_lqr, atol=1e-3))
258+
@test all(isapprox.(X_mpc, X_lqr, atol=1e-5))
259259
end
260260

261261
@testset "ExplicitMPC construction" begin

0 commit comments

Comments
 (0)