macop.algorithms.mono¶
Mono-objective available algorithms
Classes
|
Hill Climber Best Improvment used as exploitation optimisation algorithm |
|
Hill Climber First Improvment used as quick exploration optimisation algorithm |
|
Iterated Local Search used to avoid local optima and increave EvE (Exploration vs Exploitation) compromise |
-
class
macop.algorithms.mono.
HillClimberBestImprovment
(initalizer, evaluator, operators, policy, validator, maximise=True, parent=None, verbose=True)[source]¶ Hill Climber Best Improvment used as exploitation optimisation algorithm
First, this algorithm do a neighborhood exploration of a new generated solution (by doing operation on the current solution obtained) in order to find the best solution from the neighborhood space.
Then replace the best solution found from the neighbordhood space as current solution to use.
And do these steps until a number of evaluation (stopping criterion) is reached.
-
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 optimisation 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
-
class
macop.algorithms.mono.
HillClimberFirstImprovment
(initalizer, evaluator, operators, policy, validator, maximise=True, parent=None, verbose=True)[source]¶ Hill Climber First Improvment used as quick exploration optimisation algorithm
First, this algorithm do a neighborhood exploration of a new generated solution (by doing operation on the current solution obtained) in order to find a better solution from the neighborhood space.
Then replace the current solution by the first one from the neighbordhood space which is better than the current solution.
And do these steps until a number of evaluation (stopping criterion) is reached.
-
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 optimisation 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
-
class
macop.algorithms.mono.
IteratedLocalSearch
(initalizer, evaluator, operators, policy, validator, maximise=True, parent=None, verbose=True)[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 optimisation 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
-