Skip to content

Commit f0e8b16

Browse files
committed
test: debug number of nonlinear ineq. constraits
1 parent a52f151 commit f0e8b16

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/3_test_predictive_control.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -847,14 +847,14 @@ end
847847
nmpc16 = NonLinMPC(nonlinmodel, Hp=10, transcription=MultipleShooting(), nc=10, gc=gc!)
848848
@test nmpc16.transcription == MultipleShooting()
849849
@test length(nmpc16.Z̃) == nonlinmodel.nu*nmpc16.Hc + nmpc16.estim.nx̂*nmpc16.Hp + nmpc16.
850-
@test nmpc16.con.neq == nmpc16.estim.nx̂*nmpc16.Hp
851-
@test nmpc16.con.nc == 10
852-
nonlinmodel_c = NonLinModel((ẋ,x,u,_,_)->ẋ .= -0.1x .+ u, (y,x,_,_)->y.=x, 1, 1, 1, 1)
853-
nmpc16 = NonLinMPC(nonlinmodel_c, Hp=10, transcription=TrapezoidalCollocation(), nc=10, gc=gc!)
854-
@test nmpc16.transcription == TrapezoidalCollocation()
855-
@test length(nmpc16.Z̃) == nonlinmodel_c.nu*nmpc16.Hc + nmpc16.estim.nx̂*nmpc16.Hp + nmpc16.
856850
@test nmpc16.con.neq == nmpc16.estim.model.nx*nmpc16.Hp
857851
@test nmpc16.con.nc == 10
852+
nonlinmodel_c = NonLinModel((ẋ,x,u,_,_)->ẋ .= -0.1x .+ u, (y,x,_,_)->y.=x, 1, 1, 1, 1)
853+
nmpc17 = NonLinMPC(nonlinmodel_c, Hp=10, transcription=TrapezoidalCollocation(), nc=10, gc=gc!)
854+
@test nmpc17.transcription == TrapezoidalCollocation()
855+
@test length(nmpc17.Z̃) == nonlinmodel_c.nu*nmpc17.Hc + nmpc17.estim.nx̂*nmpc17.Hp + nmpc17.
856+
@test nmpc17.con.neq == nmpc17.estim.model.nx*nmpc17.Hp
857+
@test nmpc17.con.nc == 10
858858
nmpc18 = NonLinMPC(nonlinmodel, Hp=10,
859859
gradient=AutoFiniteDiff(),
860860
jacobian=AutoFiniteDiff(),

0 commit comments

Comments
 (0)