macop.evaluators.base

Abstract Evaluator class for computing fitness score associated to a solution

  • stores into its _data dictionary attritute required measures when computing a solution

  • compute abstract method enable to compute and associate a score to a given solution

Classes

Evaluator(data)

Abstract Evaluator class which enables to compute solution using specific _data

class macop.evaluators.base.Evaluator(data)[source]

Abstract Evaluator class which enables to compute solution using specific _data

abstract compute(solution)[source]

Apply the computation of fitness from solution

Fitness is a float value for mono-objective or set of float values if multi-objective evaluation

Parameters

solution – {Solution} – Solution instance

Returns

{float} – computed solution score (float or set of float if multi-objective evaluation)

setAlgo(algo)[source]
Keep into evaluator reference of the whole algorithm

The reason is to better manage evaluator instance if necessary

Parameters

algo – {Algorithm} – the algorithm reference runned