From 2564e7ce8c32986d2fa545aafc6fb7332fedf5f2 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sat, 7 Sep 2024 19:41:36 +0200 Subject: [PATCH] add tune_4p to examples --- examples/menu.jl | 2 +- examples/tune_4p.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/menu.jl b/examples/menu.jl index e656739c..49eeeb85 100644 --- a/examples/menu.jl +++ b/examples/menu.jl @@ -8,7 +8,7 @@ options = ["autopilot_1p = include(\"autopilot_1p.jl\")", "parking_1p = include(\"parking_1p.jl\")", "parking_4p = include(\"parking_4p.jl\")", "parking_wind_dir = include(\"parking_wind_dir.jl\")", - "tune_4p = include(\"tune_4p.jl\"); tune_4p()", + "tune_4p_ = include(\"tune_4p.jl\"); tune_4p()", "quit"] function menu() diff --git a/examples/tune_4p.jl b/examples/tune_4p.jl index 940744a9..2c08391d 100644 --- a/examples/tune_4p.jl +++ b/examples/tune_4p.jl @@ -9,9 +9,9 @@ using KiteUtils set = deepcopy(load_settings("system.yaml")) set.abs_tol=0.00006 set.rel_tol=0.0001 -plt.close("all") using KiteControllers, KiteModels, BayesOpt, ControlPlots +plt.close("all") kcu::KCU = KCU(set) kps4::KPS4 = KPS4(kcu) @@ -120,7 +120,7 @@ function tune_4p() set_kernel!(config, "kMaternARD5") println(config.noise) # println(config.n_inner_iterations) - lowerbound = [10., 0., 0.]; upperbound = [120., 4.0, 100.] + lowerbound = [10., 0., 0.]; upperbound = [120., 4.0, 50.] optimizer, optimum = bayes_optimization(f, lowerbound, upperbound, config) println("Opimal parameters: p = $(optimizer[1]), i = $(optimizer[2]), d = $(optimizer[3])") println("Optimum value : $(optimum)")