Skip to content

Commit 60e98c5

Browse files
committed
test: LinMPC, MultipleShooting, moveinput!
1 parent a868fc4 commit 60e98c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/3_test_predictive_control.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,13 @@ end
8282
u = moveinput!(mpc3, [0], R̂u=fill(12, mpc3.Hp))
8383
@test u [12] atol=1e-2
8484
model2 = LinModel{Float32}(0.5*ones(1,1), ones(1,1), ones(1,1), zeros(1,0), zeros(1,0), 1.0)
85-
mpc4 = LinMPC(model2)
85+
mpc4 = LinMPC(model2)
8686
preparestate!(mpc4, [0])
8787
moveinput!(mpc4, [0]) [0.0]
8888
@test_nowarn ModelPredictiveControl.info2debugstr(info)
89+
mpc5 = LinMPC(linmodel, Hp=100, Hc=10, transcription=MultipleShooting())
90+
preparestate!(mpc5, [0])
91+
moveinput!(mpc5, [1]) [0.2]
8992

9093
@test_throws DimensionMismatch moveinput!(mpc1, [0,0,0])
9194
@test_throws DimensionMismatch moveinput!(mpc1, [0], [0,0])

0 commit comments

Comments
 (0)