NSGA3Operations

class Object
trait Matchable
class Any

Type members

Classlikes

case
class DiscreteUnitSimplex(dimension: Int, divisions: Int, points: Vector[Point])

unit simplex points q: include generators? (n-1 generator vectors of dim n)

unit simplex points q: include generators? (n-1 generator vectors of dim n)

Value Params
dimension

dimension

divisions

divisions on each dimension

points

discrete point in the simplex

Companion
object
Companion
class
case
class Fraction(n: Int, d: Int, reduced: Boolean)

Field of fractions -> used for tricking comparison of vectors and have exact discrete points

Field of fractions -> used for tricking comparison of vectors and have exact discrete points

Value Params
d

denominator

n

numerator

reduced

reduced with gcd?

Companion
object
object Fraction
Companion
class
case
class Point(point: Vector[Fraction])

Fractional points

Fractional points

Value Params
point

coordinates

case
class ReferencePoints(references: Vector[Vector[Double]], normalized: Boolean)

reference points may either automatically computed given a fixed number, or provided by the user -> computation if needed done once and for all at initialization

reference points may either automatically computed given a fixed number, or provided by the user -> computation if needed done once and for all at initialization

Companion
object
Companion
class

Value members

Concrete methods

def adaptiveBreeding[S, I, G](fitness: I => Vector[Double], genome: I => G, continuousValues: G => Vector[Double], continuousOperator: G => Option[Int], discreteValues: G => Vector[Int], discreteOperator: G => Option[Int], discrete: Vector[D], buildGenome: (Vector[Double], Option[Int], Vector[Int], Option[Int]) => G, reject: Option[G => Boolean], operatorExploration: Double, lambda: Int): (S, I) => G

NSGA3 breeding: next provisory population is of size 2*mu filtering is done in elitism using reference points

NSGA3 breeding: next provisory population is of size 2*mu filtering is done in elitism using reference points

Type Params
G

genome

I

individual

S

state

Value Params
buildGenome

buildGenome

continuousOperator

continuousOperator

continuousValues

continuous genome values function

discrete

discrete

discreteOperator

discreteOperator

discreteValues

discrete values

fitness

fitness

genome

genome

lambda

breeded population size - in NSGA3, set at 2*population size - by default when lambda = -1

operatorExploration

operatorExploration

reject

reject

tournamentRounds

tournamentRounds

def associateReferencePoints[I](points: Vector[Vector[Double]], references: Vector[Vector[Double]], population: Vector[I]): Map[I, (Int, Double)]

Compute reference lines, distances, and associate points to references

Compute reference lines, distances, and associate points to references

  • unoptimized, shouldnt recreate the matrices at each run
Value Params
points

points

population

population

references

references

Returns

map point i => ref point j,distance

def computeReferencePoints(references: ReferencePoints, intercepts: Vector[Double]): Vector[Vector[Double]]

normalize ref points if needed (when non normalized reference points provided by the user are used)

normalize ref points if needed (when non normalized reference points provided by the user are used)

Value Params
intercepts

intercepts

references

references

def eliteWithReference[S, I](population: Vector[I], fitness: I => Vector[Double], references: ReferencePoints, mu: Int)(implicit rng: Random): Vector[I]

extract elite using ref point heuristic

extract elite using ref point heuristic

Type Params
I

individual

S

state

Value Params
fitness

fitness

mu

population size [size of elite is by default pop size / 2 (doubling population in breeding)]

population

population

references

reference

def elitism[S, I](fitness: I => Vector[Double], values: I => (Vector[Double], Vector[Int]), references: ReferencePoints, mu: Int): S => I

The particularity of nsga3 is at the elistism step

The particularity of nsga3 is at the elistism step

  • keep successive pareto fronts until having a population larger than the pop expected
  • remove the last front added
  • fill the remaining points with the reference points heuristic

Note: through normalization, ref points must be recomputed each time, even with user-defined points (option : number of points, taken within the objective simplex (tricky to compute ?) ; or user-defined)

Type Params
I

individual

S

state

Value Params
fitness

fitness

mu

population size

references

reference points

values

values

def normalize(fitnesses: Vector[Vector[Double]], references: ReferencePoints): (Vector[Vector[Double]], Vector[Vector[Double]])

normalize objectives and compute normalized reference points

normalize objectives and compute normalized reference points

  • for each dimension :
    • compute ideal point
    • translate objectives to have min at 0
    • compute extreme points
  • construct simplex and compute intercepts a_j
  • for each dimension, normalize translated objective
Value Params
fitnesses

vector of fitnesses

references

reference points

Returns

(normalized fitnesses ; normalized reference points)

def normalizeMax(points: Vector[Vector[Double]], maxvals: Vector[Double]): Vector[Vector[Double]]

normalize to have max at 1

normalize to have max at 1

Value Params
maxvals

max values for each dimension

points

points

def numberOfReferencePoints(divisions: Int, dimension: Int): Int
def pointsSelection[I](associationMap: Map[I, (Int, Double)], selected: Vector[(I, Int)], toselect: Int)(implicit rng: Random): (Map[I, (Int, Double)], Vector[(I, Int)])

Select points given the association to closest reference point

Select points given the association to closest reference point

Type Params
I

individual

Value Params
associationMap

association map: individual => (index of ref point, distance)

rng

rng

selected

points already selected

toselect

number of points to select

Returns

(association map, selected individuals)

def referenceNichingSelection[S, I](normalizedFitnesses: Vector[Vector[Double]], normalizedReferences: Vector[Vector[Double]], population: Vector[I], pointsNumber: Int)(implicit rng: Random): Vector[I]

Aggregate normalized fitnesses on reference points ; select on this.

Aggregate normalized fitnesses on reference points ; select on this.

Value Params
normalizedFitnesses

normalized fitness values

normalizedReferences

normalized reference points

pointsNumber

number of points to select

Returns

indices of selected individuals (population not needed at this stage)

def simplexIntercepts(maxPoints: Vector[Vector[Double]]): Vector[Double]

Compute the intercepts on each dimension axis of the simplex generated by the N points given

Compute the intercepts on each dimension axis of the simplex generated by the N points given

Value Params
maxPoints

(MUST have N points to have an hyperplan)

def simplexRefPoints(divisions: Int, dimension: Int): Vector[Vector[Double]]

Compute automatic reference points on the simplex (called at initialization)

Compute automatic reference points on the simplex (called at initialization)

Value Params
dimension

dimension of the space

divisions

number of segments on each simplex bord line

def successiveFronts[I](population: Vector[I], fitness: I => Vector[Double]): Vector[(Vector[I], Vector[Vector[Double]], Vector[Int])]

Exact successive fronts computation

Exact successive fronts computation

Type Params
I

individual

Value Params
fitness

fitness

population

population

Returns

Vector of fronts, coded by (individuals: Vector[I],fitnesses in same order: Vector(Vector(Double)),indices in initial population: Vector[Int])

def translateAndMaxPoints(fitnesses: Vector[Vector[Double]]): (Vector[Vector[Double]], Vector[Vector[Double]])

Translate to have ideal point at \vec{0} ; compute max points ! in case of a common max point for different dimensions, the intercepts can not be computed -> we remove the common point and recompute the max points

Translate to have ideal point at \vec{0} ; compute max points ! in case of a common max point for different dimensions, the intercepts can not be computed -> we remove the common point and recompute the max points

Value Params
fitnesses

fitnesses

Returns

(translated fitnesses , indices of max point for each dimension)