Swarm Intelligence Search
Shuffled Frog Learping Algorighm
Solver name is “SFLA”.
- class flopt.solvers.shuffled_frog_leaping_search.ShuffledFrogLeapingSearch[source]
SFLA (Shuffled Frog Leaping Search) It has a incumbent solution anytime.
Generate new solutions as frogs at random.
Divide frog set into some memeplexes.
Improve each memeplex a certain number of times respectively.
Update best solution.
Redistribute memeplexes.
Repeat step3 to step5
- Parameters:
n_trial (int (default 1e10)) – number of memetic evolution
max_step (float (default 1e10)) – maximum size of one step
n_memetic_iter (int (default 100)) – number of evolution in each memeplex
n_memeplex (int (default 5)) – number of memeplex
n_frog_per_memeplex (int (default 10)) – number of frog per memeplex
inc_flogsize (float) – Multiplier for increasing population size before each restart
Examples
import flopt x = flopt.Variable("x", lowBound=-1, upBound=1, cat="Continuous") y = flopt.Variable("y", lowBound=-1, upBound=1, cat="Continuous") prob = flopt.Problem() prob += 2*x*x + x*y + y*y + x + y status, log = prob.solve(solver="SFLA", msg=True, timelimit=1) print("obj =", flopt.Value(prob.obj)) print("x =", flopt.Value(x)) print("y =", flopt.Value(y))