Skip to content

Commit eb816fa

Browse files
authored
Merge pull request #318 from JuliaControl/debug_precompile
debug: avoid duplicate precompile macros
2 parents 37392e4 + 3b71fa2 commit eb816fa

File tree

3 files changed

+9
-15
lines changed

3 files changed

+9
-15
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ModelPredictiveControl"
22
uuid = "61f9bdb8-6ae4-484a-811f-bbf86720c31c"
3-
version = "1.16.1"
3+
version = "1.16.2"
44
authors = ["Francis Gagnon"]
55

66
[deps]

benchmark/3_bench_predictive_control.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,11 @@ CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["MadNLP"]["SingleShooting"] =
410410
sim!($nmpc_madnlp_ss, $N, $ry; plant=$plant, x_0=$x_0, x̂_0=$x̂_0, progress=false),
411411
samples=samples, evals=evals, seconds=seconds
412412
)
413-
CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["Uno"]["MultipleShooting (Hessian)"] =
414-
@benchmarkable(
415-
sim!($nmpc_uno_ms_hess, $N, $ry; plant=$plant, x_0=$x_0, x̂_0=$x̂_0, progress=false),
416-
samples=samples, evals=evals, seconds=seconds
417-
)
413+
# CASE_MPC["Pendulum"]["NonLinMPC"]["Noneconomic"]["Uno"]["MultipleShooting (Hessian)"] =
414+
# @benchmarkable(
415+
# sim!($nmpc_uno_ms_hess, $N, $ry; plant=$plant, x_0=$x_0, x̂_0=$x̂_0, progress=false),
416+
# samples=samples, evals=evals, seconds=seconds
417+
# )
418418

419419
# ----------------- Case study: Pendulum economic --------------------------------
420420
model2, p = pendulum_model2, pendulum_p2

src/ModelPredictiveControl.jl

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,8 @@ include("state_estim.jl")
5757
include("predictive_control.jl")
5858
include("plot_sim.jl")
5959

60-
@setup_workload begin
61-
# Putting some things in `@setup_workload` instead of `@compile_workload` can reduce the
62-
# size of the precompile file and potentially make loading faster.
63-
@compile_workload begin
64-
# all calls in this block will be precompiled, regardless of whether
65-
# they belong to your package or not (on Julia 1.8 and higher)
66-
include("precompile.jl")
67-
end
68-
end
60+
61+
include("precompile.jl")
62+
6963

7064
end

0 commit comments

Comments
 (0)