Skip to content

Commit c4af39a

Browse files
authored
Merge pull request #228 from JuliaControl/tune_bench
bench: increasing `samples` to reduce SD when needed
2 parents f0f8d2a + 8548074 commit c4af39a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

benchmark/2_bench_state_estim.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ mhe_lin_pred = MovingHorizonEstimator(linmodel, He=10, direct=false)
149149
mhe_nonlin_curr = MovingHorizonEstimator(nonlinmodel, He=10, direct=true)
150150
mhe_nonlin_pred = MovingHorizonEstimator(nonlinmodel, He=10, direct=false)
151151

152-
samples, evals, seconds = 5000, 1, 60
152+
samples, evals, seconds = 10000, 1, 60
153153
UNIT_ESTIM["MovingHorizonEstimator"]["preparestate!"]["LinModel"]["Current form"] =
154154
@benchmarkable(
155155
preparestate!($mhe_lin_curr, $y, $d),
@@ -260,7 +260,7 @@ mhe_cstr_ipopt_pred = MovingHorizonEstimator(model; He, nint_u, σQint_u, optim,
260260
mhe_cstr_ipopt_pred = setconstraint!(mhe_cstr_ipopt_pred; v̂min, v̂max)
261261
JuMP.unset_time_limit_sec(mhe_cstr_ipopt_pred.optim)
262262

263-
samples, evals = 5000, 1
263+
samples, evals = 10000, 1
264264
CASE_ESTIM["CSTR"]["MovingHorizonEstimator"]["OSQP"]["Current form"] =
265265
@benchmarkable(test_mhe($mhe_cstr_osqp_curr, $plant);
266266
samples=samples, evals=evals
@@ -332,7 +332,7 @@ mhe_pendulum_madnlp_pred = setconstraint!(mhe_pendulum_madnlp_pred; v̂min, v̂m
332332
JuMP.unset_time_limit_sec(mhe_pendulum_madnlp_pred.optim)
333333
JuMP.set_attribute(mhe_pendulum_madnlp_pred.optim, "tol", 1e-7)
334334

335-
samples, evals, seconds = 10, 1, 15*60
335+
samples, evals, seconds = 25, 1, 15*60
336336
CASE_ESTIM["Pendulum"]["MovingHorizonEstimator"]["Ipopt"]["Current form"] =
337337
@benchmarkable(
338338
sim!($mhe_pendulum_ipopt_curr, $N, $u; plant=$plant, x_0=$x_0, x̂_0=$x̂_0),

benchmark/3_bench_predictive_control.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ linmpc_ms = LinMPC(
1212
Mwt=[1, 1], Nwt=[0.1, 0.1], Lwt=[0.1, 0.1], Hp=10
1313
)
1414

15-
samples, evals, seconds = 5000, 1, 60
15+
samples, evals, seconds = 10000, 1, 60
1616
UNIT_MPC["LinMPC"]["moveinput!"]["SingleShooting"] =
1717
@benchmarkable(
1818
moveinput!($linmpc_ss, $y, $d),
@@ -51,7 +51,7 @@ nmpc_nonlin_ms = NonLinMPC(
5151
Mwt=[1, 1], Nwt=[0.1, 0.1], Lwt=[0.1, 0.1], Hp=10
5252
)
5353

54-
samples, evals, seconds = 5000, 1, 60
54+
samples, evals, seconds = 10000, 1, 60
5555
UNIT_MPC["NonLinMPC"]["moveinput!"]["LinModel"]["SingleShooting"] =
5656
@benchmarkable(
5757
moveinput!($nmpc_lin_ss, $y, $d),
@@ -446,7 +446,7 @@ mpc3_ipopt_ms = LinMPC(kf; Hp, Hc, Mwt, Nwt, Cwt, optim, transcription)
446446
mpc3_ipopt_ms = setconstraint!(mpc3_ipopt_ms; umin, umax)
447447
JuMP.unset_time_limit_sec(mpc3_ipopt_ms.optim)
448448

449-
samples, evals = 5000, 1
449+
samples, evals = 10000, 1
450450
CASE_MPC["Pendulum"]["LinMPC"]["Successive linearization"]["OSQP"]["SingleShooting"] =
451451
@benchmarkable(
452452
sim2!($mpc3_osqp_ss, $model, $N, $ry, $plant, $x_0, $x̂_0, $y_step),

0 commit comments

Comments
 (0)