From 3feb2f592eeabfb98a9e58739f66447d2d64133e Mon Sep 17 00:00:00 2001 From: franckgaga Date: Mon, 22 Jun 2026 10:07:40 -0400 Subject: [PATCH] changed: `Cwt=1e4` in custom constraints case study --- benchmark/3_bench_predictive_control.jl | 2 +- docs/src/manual/nonlinmpc.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmark/3_bench_predictive_control.jl b/benchmark/3_bench_predictive_control.jl index ed4658bef..5bbf472cf 100644 --- a/benchmark/3_bench_predictive_control.jl +++ b/benchmark/3_bench_predictive_control.jl @@ -575,7 +575,7 @@ function gc!(LHS, Ue, Ŷe, _, p, ϵ) end return nothing end -Cwt, Pmax, nc = 1e5, 3, Hp+1 +Cwt, Pmax, nc = 1e4, 3, Hp+1 x_0 = [0, 0]; x̂_0 = [0, 0, 0]; ry = [180; 0] optim = JuMP.Model(optimizer_with_attributes(Ipopt.Optimizer,"sb"=>"yes"), add_bridges=false) diff --git a/docs/src/manual/nonlinmpc.md b/docs/src/manual/nonlinmpc.md index 5335354a9..1abcaa4fa 100644 --- a/docs/src/manual/nonlinmpc.md +++ b/docs/src/manual/nonlinmpc.md @@ -288,7 +288,7 @@ We construct the controller by enabling relaxation with the `Cwt` argument, and specifying the number of custom inequality constraints `nc`: ```@example man_nonlin -Cwt, Pmax, nc = 1e5, 3, Hp+1 +Cwt, Pmax, nc = 1e4, 3, Hp+1 nmpc2 = NonLinMPC(estim2; Hp, Hc, Nwt=Nwt, Mwt=[0.5, 0], Cwt, gc!, nc, p=Pmax) nmpc2 = setconstraint!(nmpc2; umin, umax) using JuMP; unset_time_limit_sec(nmpc2.optim) # hide @@ -499,4 +499,4 @@ savefig("plot13_NonLinMPC.svg"); nothing # hide ![plot13_NonLinMPC](plot13_NonLinMPC.svg) The computations of the successive linearization MPC are about 75 times faster than the -nonlinear MPC on average, an impressive gain for similar closed-loop performances! \ No newline at end of file +nonlinear MPC on average, an impressive gain for similar closed-loop performances!