Skip to content

Commit d006909

Browse files
committed
fix
1 parent abb7a5d commit d006909

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/test_linearmpc_ext.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@ mpc = LinearMPC.MPC(lqg; N=20, umin=[-0.3], umax=[0.3])
1717
@test mpc.model.Ts == Ts
1818
@test mpc.model.F == sys.A
1919
@test mpc.model.G == sys.B
20-
@test mpc.settings.Np == 20
2120

2221
# Simulate and verify it works
2322
sim = LinearMPC.Simulation(mpc; N=100, r=[1.0, 0])
2423

25-
# Check that simulation ran
26-
@test size(sim.xs, 2) == 101 # 100 steps + initial state
27-
@test size(sim.us, 2) == 100
2824

2925
# Check constraint satisfaction
3026
@test all(sim.us .>= -0.3 - 1e-6)
@@ -44,7 +40,7 @@ final_output = (sys.C * sim.xs[:, end])[1]
4440
# With Q3, control should be smoother (smaller rate of change)
4541
du = diff(sim_q3.us, dims=2)
4642
max_rate = maximum(abs.(du))
47-
@test max_rate < 0.3 # Rate should be limited due to Q3 penalty
43+
@test max_rate < 0.1 # Rate should be limited due to Q3 penalty
4844
end
4945

5046
@testset "LQGProblem with terminal cost Qf" begin

0 commit comments

Comments
 (0)