Skip to content

Commit

Permalink
fix algorithm
Browse files Browse the repository at this point in the history
The visited minimum was not updated. This improves benchmarks, too.
  • Loading branch information
tpapp committed Dec 7, 2019
1 parent b6e10ec commit f733fa4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Number of function evaluations for

| | ShiftedQuadratic | Griewank | LevyMontalvo2 | Rastrigin | Rosenbrock |
| ---- | ---- | ---- | ---- | ---- | ---- |
| `LN_BOBYQA` | 554 | 2656 | 4223 | **FAIL** | 11297 |
| `LN_NELDERMEAD` | 15677 | 17255 | 33117 | **FAIL** | 50334 |
| `LN_NEWUOA_BOUND` | 580 | 2059 | 2183 | **FAIL** | 17811 |
| `LN_SBPLX` | 12318 | 11787 | 11280 | **FAIL** | 6788573 |
| `LN_COBYLA` | 16922 | **FAIL** | 32810 | **FAIL** | **FAIL** |
| `LN_PRAXIS` | 1856 | 10154 | 8144 | **FAIL** | 15198 |
| `LN_BOBYQA` | 569 | 2633 | 4235 | **FAIL** | 10995 |
| `LN_NELDERMEAD` | 15750 | 17108 | 33088 | **FAIL** | 42785 |
| `LN_NEWUOA_BOUND` | 580 | 2088 | 2253 | **FAIL** | 13409 |
| `LN_SBPLX` | 12329 | 11806 | 11447 | **FAIL** | 7020038 |
| `LN_COBYLA` | 16943 | 37414 | 32792 | **FAIL** | 985676 |
| `LN_PRAXIS` | 1850 | 9886 | 8548 | **FAIL** | 15436 |
7 changes: 4 additions & 3 deletions src/MultistartOptimization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ function multistart_minimization(multistart_method::TikTak, local_method,
@unpack quasirandom_N, initial_N, θ_min, θ_max, θ_pow = multistart_method
quasirandom_points = sobol_starting_points(minimization_problem, quasirandom_N)
initial_points = _keep_lowest(quasirandom_points, initial_N)
function _step(best_point, (i, initial_point))
function _step(visited_minimum, (i, initial_point))
θ = _weight_parameter(multistart_method, i)
x = @. (1 - θ) * initial_point.location + θ * best_point.location
local_minimization(local_method, minimization_problem, x)
x = @. (1 - θ) * initial_point.location + θ * visited_minimum.location
local_minimum = local_minimization(local_method, minimization_problem, x)
local_minimum.value < visited_minimum.value ? local_minimum : visited_minimum
end
foldl(_step, enumerate(initial_points); init = first(initial_points))
end
Expand Down

0 comments on commit f733fa4

Please sign in to comment.