Genetic Algorithm

General concept

Five phases:

  1. Initial population

    • Consists of candidate solutions (also called individuals) which have a set of properties (also called parameters, variables, genes)

  2. Fitness function (evaluation)

  3. Selection

  4. Crossover

  5. Mutation

Abort criteria:

  • Maximum number of generations

  • Satisfactory fitness level has been reached

Routing Problem

Phases:

  1. Initial population

    • route_through_array

  2. Fitness function (evaluation)

    • mariPower

  3. Selection

  4. Crossover

    • only routes which cross geometrically are used for crossover

  5. Mutation

    • in principle random but can be restricted

Variable definitions: debug output

  • n_gen: current generation

  • n_nds: number of non-dominating solutions

  • cv_min: minimum constraint violation

  • cv_avg: average constraint violation

  • eps: epsilon?

  • indicator: indicator to monitor algorithm performance; can be Hypervolume, Running Metric …

General Notes

  • res.F = None: quick-and-dirty hack possible by passing return_least_infeasible = True to init function of NSGAII

  • chain of function calls until RoutingProblem._evaluate() is called:

    • core/algorithms.run -> core/algorithms.next -> core/evaluator.eval -> core/evaluator._eval

  • chain of function calls until crossover/mutation/selection are called:

    • core/algorithms.run -> core/algorithms.next -> core/algorithm.infill -> algorithms/base/genetic._infill