public class ConstraintCheckerImpl extends Object implements ConstraintChecker, IndividualSetListener, IndividualStateListener
ConstraintCheckerImpl calculates constraint violations of
infeasibility constraints.ConstraintChecker| Constructor and Description |
|---|
ConstraintCheckerImpl(Population population)
as this class listens on Population, it must be registered there
|
| Modifier and Type | Method and Description |
|---|---|
double |
getConstraintViolation(Objectives o)
Calculates the constraint violation of
Objectives. |
void |
individualAdded(IndividualSet collection,
Individual individual)
Invoked if the
Individual is added to the IndividualSet. |
void |
individualRemoved(IndividualSet collection,
Individual individual)
Invoked if the
Individual is removed from the
IndividualSet. |
void |
inidividualStateChanged(Individual individual)
Invoked if the
Individual changes its state. |
boolean |
isFeasible(Objectives o)
Checks, if
Objectives is feasible. |
@Inject public ConstraintCheckerImpl(Population population)
public double getConstraintViolation(Objectives o)
Objectives.getConstraintViolation in interface ConstraintCheckero - the objectives to checkpublic boolean isFeasible(Objectives o)
Objectives is feasible.isFeasible in interface ConstraintCheckero - the objectives to checkpublic void individualAdded(IndividualSet collection, Individual individual)
IndividualSetListenerIndividual is added to the IndividualSet.individualAdded in interface IndividualSetListenercollection - the observed collectionindividual - the added individualpublic void individualRemoved(IndividualSet collection, Individual individual)
IndividualSetListenerIndividual is removed from the
IndividualSet.individualRemoved in interface IndividualSetListenercollection - the observed collectionindividual - the removed individualpublic void inidividualStateChanged(Individual individual)
IndividualStateListenerIndividual changes its state.inidividualStateChanged in interface IndividualStateListenerindividual - the individual that changes the state