Package org.opt4j.optimizer.ea
Class Normalizer
- java.lang.Object
-
- org.opt4j.optimizer.ea.Normalizer
-
- All Implemented Interfaces:
IndividualStateListener
public class Normalizer extends Object implements IndividualStateListener
TheNormalizercan be used to normalizeObjectives.
-
-
Constructor Summary
Constructors Constructor Description Normalizer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinidividualStateChanged(Individual individual)Invoked if theIndividualchanges its state.Objectivesnormalize(Objectives objectives)Returns normalized objectives.static doubletoMinProblem(Objective objective, Value<?> value)Transforms the theObjectiveto a minimization objective, i.e.
-
-
-
Method Detail
-
normalize
public Objectives normalize(Objectives objectives)
Returns normalized objectives. Each objective is in the range between 0 and 1 and has to be minimized. Here, 0 is the smallest value seen so far for this objective for all evaluatedIndividuals and 1 the biggest value, respectively. If an objective is infeasible, it is set to 1.- Parameters:
objectives- the objectives to normalize- Returns:
- the normalized objectives
-
inidividualStateChanged
public void inidividualStateChanged(Individual individual)
Description copied from interface:IndividualStateListenerInvoked if theIndividualchanges its state.- Specified by:
inidividualStateChangedin interfaceIndividualStateListener- Parameters:
individual- the individual that changes the state
-
toMinProblem
public static final double toMinProblem(Objective objective, Value<?> value)
Transforms the theObjectiveto a minimization objective, i.e. if the given objective is to be maximized, the negation of the given value is returned.- Parameters:
objective- the respective objectivevalue- the value to transform- Returns:
- the corresponding double value
-
-