|
295 | 295 | setconstraint!(mpc, ymin=[-6, -11],ymax=[55, 35]) |
296 | 296 | @test mpc.con.Y0min ≈ [-6,-11] |
297 | 297 | @test mpc.con.Y0max ≈ [55,35] |
| 298 | + setconstraint!(mpc, wmin=[-7, -12], wmax=[75, 65]) |
| 299 | + @test mpc.con.Wmin ≈ [-7, -12, -7, -12] |
| 300 | + @test mpc.con.Wmax ≈ [75, 65, 75, 65] |
298 | 301 | setconstraint!(mpc, x̂min=[-21,-22,-23,-24,-25,-26], x̂max=[21,22,23,24,25,26]) |
299 | 302 | @test mpc.con.x̂0min ≈ [-21,-22,-23,-24,-25,-26] |
300 | 303 | @test mpc.con.x̂0max ≈ [21,22,23,24,25,26] |
|
308 | 311 | setconstraint!(mpc, c_ymin=[1.00,1.01], c_ymax=[1.02,1.03]) |
309 | 312 | @test -mpc.con.A_Ymin[:, end] ≈ [1.00,1.01] |
310 | 313 | @test -mpc.con.A_Ymax[:, end] ≈ [1.02,1.03] |
| 314 | + setconstraint!(mpc, c_wmin=[2.00,2.01], c_wmax=[2.02,2.03]) |
| 315 | + @test -mpc.con.A_Wmin[:, end] ≈ [2.00,2.01,2.00,2.01] |
| 316 | + @test -mpc.con.A_Wmax[:, end] ≈ [2.02,2.03,2.02,2.03] |
311 | 317 | setconstraint!(mpc, c_x̂min=[0.21,0.22,0.23,0.24,0.25,0.26], c_x̂max=[0.31,0.32,0.33,0.34,0.35,0.36]) |
312 | 318 | @test -mpc.con.A_x̂min[:, end] ≈ [0.21,0.22,0.23,0.24,0.25,0.26] |
313 | 319 | @test -mpc.con.A_x̂max[:, end] ≈ [0.31,0.32,0.33,0.34,0.35,0.36] |
|
324 | 330 | setconstraint!(mpc2, Ymin=-1(1:50).-3, Ymax=+1(1:50).+3) |
325 | 331 | @test mpc2.con.Y0min ≈ -1(1:50).-3 |
326 | 332 | @test mpc2.con.Y0max ≈ +1(1:50).+3 |
| 333 | + #setconstraint!(mpc3) |
327 | 334 |
|
328 | 335 | setconstraint!(mpc2, C_umin=+1(1:50).+4, C_umax=+1(1:50).+4) |
329 | 336 | @test -mpc2.con.A_Umin[:, end] ≈ +1(1:50).+4 |
|
0 commit comments