Skip to content

Commit e99bdfc

Browse files
committed
bench: OrthogonalCollocation with UnoSolver
1 parent a9ca10d commit e99bdfc

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

benchmark/3_bench_predictive_control.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ nmpc_madnlp_ms_hess = NonLinMPC(estim; Hp, Hc, Mwt, Nwt, Cwt, optim, transcripti
395395
nmpc_madnlp_ms_hess = setconstraint!(nmpc_madnlp_ms_hess; umin, umax)
396396
JuMP.unset_time_limit_sec(nmpc_madnlp_ms_hess.optim)
397397

398+
optim = JuMP.Model(()->UnoSolver.Optimizer(preset="filtersqp"), add_bridges=false)
399+
transcription, hessian = OrthogonalCollocation(), true
400+
nmpc_uno_oc_hess = NonLinMPC(estim; Hp, Hc, Mwt, Nwt, Cwt, optim, transcription, hessian)
401+
nmpc_uno_oc_hess = setconstraint!(nmpc_uno_oc_hess; umin, umax)
402+
JuMP.unset_time_limit_sec(nmpc_uno_oc_hess.optim)
403+
398404
samples, evals, seconds = 100, 1, 15*60
399405
CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["Ipopt"]["SingleShooting"] =
400406
@benchmarkable(
@@ -461,7 +467,11 @@ CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["Uno"]["MultipleShooting (Hessi
461467
sim!($nmpc_uno_ms_hess, $N, $ry; plant=$plant, x_0=$x_0, x̂_0=$x̂_0, progress=false),
462468
samples=samples, evals=evals, seconds=seconds, setup=GC.gc()
463469
)
464-
470+
CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["Uno"]["OrthogonalCollocation (Hessian)"] =
471+
@benchmarkable(
472+
sim!($nmpc_uno_oc_hess, $N, $ry; plant=$plant, x_0=$x_0, x̂_0=$x̂_0, progress=false),
473+
samples=samples, evals=evals, seconds=seconds, setup=GC.gc()
474+
)
465475

466476
# ----------------- Case study: Pendulum economic --------------------------------
467477
model2, p = pendulum_model2, pendulum_p2

0 commit comments

Comments
 (0)