macop.algorithms.mono.LocalSearch

Local Search algorithm

Classes

LocalSearch(_initalizer, _evaluator, …[, …])

Local Search used as exploitation optimization algorithm

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

Local Search used as exploitation optimization algorithm

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

checkpoint

{Checkpoint} – Checkpoint class implementation to keep track of algorithm and restart

run(_evaluations)[source]

Run the local search algorithm

Parameters

_evaluations – {int} – number of Local search evaluations

Returns

{Solution} – best solution found