macop.algorithms.mono.IteratedLocalSearch

Iterated Local Search Algorithm implementation

Classes

IteratedLocalSearch(_initalizer, _evaluator, …)

Iterated Local Search used to avoid local optima and increave EvE (Exploration vs Exploitation) compromise

class macop.algorithms.mono.IteratedLocalSearch.IteratedLocalSearch(_initalizer, _evaluator, _operators, _policy, _validator, _maximise=True, _parent=None)[source]

Iterated Local Search used to avoid local optima and increave EvE (Exploration vs Exploitation) compromise

initalizer

{function} – basic function strategy to initialize solution

evaluator

{function} – basic function in order to obtained fitness (mono or multiple objectives)

operators

{[Operator]} – list of operator to use when launching algorithm

policy

{Policy} – Policy class implementation strategy to select operators

validator

{function} – basic function to check if solution is valid or not under some constraints

maximise

{bool} – specify kind of optimization problem

currentSolution

{Solution} – current solution managed for current evaluation

bestSolution

{Solution} – best solution found so far during running algorithm

callbacks

{[Callback]} – list of Callback class implementation to do some instructions every number of evaluations and load when initializing algorithm

run(_evaluations, _ls_evaluations=100)[source]

Run the iterated local search algorithm using local search (EvE compromise)

Parameters
  • _evaluations – {int} – number of global evaluations for ILS

  • _ls_evaluations – {int} – number of Local search evaluations (default: 100)

Returns

{Solution} – best solution found