Open jmcastro2109 opened 1 year ago
Re-working the error code
:XTOL_REACHED
means that your coordinates are (practically) not changing, so the optimizer halts. Ie the new x
is ==
the previous one.
Hard to say more without an MWE.
Hi @tpapp thanks for the answer and sorry for the lack of clarity.
It is difficult to provide a MWE, although hopefully the following code snippet can provide some clarity on what is happening. The minimum should be 0, and for some reason whenever I increase maxeval
the objective function does not change. Moreover, it does not return the termination criterium.
local_method = MultistartOptimization.NLoptLocalMethod(NLopt.LN_BOBYQA; xtol_abs = 0.0, xtol_rel = 0.0, maxtime = 0.0, maxeval = 500)
p_brute = MultistartOptimization.multistart_minimization(multistart_method, local_method, P_brute; use_threads = false)
println("p_brute:", p_brute)
p_brute:(location = [38.04931640625, 0.4683843206787109, 59.28955078125, 93.4814453125, 66.0766604954834, 0.4233642578125], value = 0.1176349004423373)
local_method = MultistartOptimization.NLoptLocalMethod(NLopt.LN_BOBYQA; xtol_abs = 0.0, xtol_rel = 0.0, maxtime = 0.0, maxeval = 1000)
p_brute = MultistartOptimization.multistart_minimization(multistart_method, local_method, P_brute; use_threads = false)
println("p_brute:", p_brute)
p_brute:(location = [38.04931640625, 0.4683843206787109, 59.28955078125, 93.4814453125, 66.0766604954834, 0.4233642578125], value = 0.1176349004423373)
local_method = MultistartOptimization.NLoptLocalMethod(NLopt.LN_BOBYQA; xtol_abs = 0.0, xtol_rel = 0.0, maxtime = 0.0, maxeval = 1500)
p_brute = MultistartOptimization.multistart_minimization(multistart_method, local_method, P_brute; use_threads = false)
println("p_brute:", p_brute)
p_brute:(location = [38.04931640625, 0.4683843206787109, 59.28955078125, 93.4814453125, 66.0766604954834, 0.4233642578125], value = 0.1176349004423373)
SMALL UPDATE: it seems to be that what is happening is that when I increase maxeval
beyond some number, the optimizer is reporting the smallest value from the initial global phase.
`
Hi, I am trying to finish the local optimizers based on a time limit.
I am using the following code:
However, when the optimization finalizes I get the following return code,
p_brute:(value = 0.004157932864387097, location = [26.98036761207386, 0.39483019850986095, 24.10020993701281, 123.12567045769113, 65.26306039580315, 0.4295685034555466], ret = :XTOL_REACHED)
How is this possible?