best = INFTY
bias = 0
n_succ = 0
n_fail = 0
while (rho > rho_lower_bound)
generate dx
curr = f(x + dx + bias)
if (curr < best)
bias = 0.2 * bias + 0.4 * (dx + bias)
x += dx + bias
n_succ++
n_fail=0
else
curr = f(x - dx - bias)
if (curr < best)
bias = bias - 0.4 * (dx + bias)
x -= dx + bias
n_succ++
n_fail=0
else
bias = bias/2
n_fail++
n_succ=0
endif
endif
if (n_succ >= max_succ)
n_succ=0
rho = ex_factor * rho
endif
if (n_fail >= max_fail)
n_fail=0
rho = ct_factor * rho
endif
endwhile
SW-1: Pseudo-code for the Solis-Wets algorithms.
Classes SWOpt1 and SWOpt2 differ in their definition of the private method gen_new_point
, which is used to generate a new iterate. SWOpt1 generates a iterate using normally distributed deviates with standard deviation rho
. SWOpt2 generates a new iterate using uniformly distributed deviates from the range
rho
, rho
.