public class Objectives extends CriterionSet<Objective>
Objectives contains the Objective-Values pairs of
an Individual. Additionally, the feasibility of the
Objectives can be set. The feasibility isFeasible() is
true by default. Set this value to false to indicate that the
corresponding Individual is infeasible (e.g., it violates
constraints).| Constructor and Description |
|---|
Objectives()
Deprecated.
|
Objectives(DominationStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Objective objective,
double value)
Adds the objective with the specified double value.
|
void |
add(Objective objective,
int value)
Adds the objective with the specified integer value.
|
void |
add(Objectives objectives)
Deprecated.
renamed to
addAll(Objectives) |
void |
add(Objective objective,
Value<?> value)
Adds the objective with the specified value.
|
void |
addAll(Objectives objectives)
Adds all objective with the specified value specified in
Objectives. |
double[] |
array()
Returns an array of all values which all have to be minimized.
|
double |
distance(Objectives other)
Calculates the euclidean distance of two
Objectives. |
boolean |
dominates(Objectives opponent)
Returns
true if this objectives dominate the specified
objectives. |
Value<?> |
get(Objective objective)
Returns the value that is assigned to the given objective.
|
Objective |
get(Value<?> value)
Returns the objective that is assigned to the given value.
|
Constraints |
getConstraints()
Returns the constraints.
|
DominationStrategy |
getDominationStrategy()
Returns the domination strategy of the Objective.
|
Collection<Objective> |
getKeys()
Returns all objectives.
|
Collection<Value<?>> |
getValues()
Returns all values.
|
boolean |
isEqual(Objectives opponent)
Returns
true if this objectives are equal to the specified
objectives. |
boolean |
isFeasible()
Returns the feasibility.
|
Iterator<Map.Entry<Objective,Value<?>>> |
iterator() |
void |
setConstraints(Constraints constraints)
Sets the constraints.
|
void |
setFeasible(boolean feasible)
Sets the feasibility.
|
int |
size()
Returns the number of set
Objectives. |
String |
toString() |
boolean |
weaklyDominates(Objectives opponent)
Returns
true if this objectives weakly dominates the specified
objectives. |
add, distance, isEqualequals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliterator@Deprecated public Objectives()
Provider<Objectives> object instead
and create Objectives objects with
provider.get().@Inject public Objectives(DominationStrategy strategy)
public Constraints getConstraints()
public void setConstraints(Constraints constraints)
constraints - the constraints to setpublic DominationStrategy getDominationStrategy()
public boolean isFeasible()
public void setFeasible(boolean feasible)
feasible - the feasibility to setpublic double[] array()
array in class CriterionSet<Objective>Value.getDouble()public int size()
Objectives.size in class CriterionSet<Objective>public Collection<Objective> getKeys()
getKeys in class CriterionSet<Objective>public Collection<Value<?>> getValues()
getValues in class CriterionSet<Objective>public Value<?> get(Objective objective)
null if the objective does not exist.get in class CriterionSet<Objective>objective - the given objectivepublic Objective get(Value<?> value)
null if the value does not exist.get in class CriterionSet<Objective>value - the given valuepublic void add(Objective objective, Value<?> value)
add in class CriterionSet<Objective>objective - the objectivevalue - the valuepublic void add(Objective objective, double value)
add in class CriterionSet<Objective>objective - the objectivevalue - the valuepublic void add(Objective objective, int value)
add in class CriterionSet<Objective>objective - the objectivevalue - the value@Deprecated public void add(Objectives objectives)
addAll(Objectives)Objectives.objectives - the objectivespublic void addAll(Objectives objectives)
Objectives.objectives - the objectivespublic boolean weaklyDominates(Objectives opponent)
true if this objectives weakly dominates the specified
objectives. This comparison depends on the chosen DominationStrategy.opponent - other objectivestrue if this objectives weakly dominate the
opponentpublic boolean dominates(Objectives opponent)
true if this objectives dominate the specified
objectives. This comparison depends on the chosen DominationStrategy.opponent - other objectivestrue if these objectives dominate the opponentpublic boolean isEqual(Objectives opponent)
true if this objectives are equal to the specified
objectives. This comparison is based on the array() values.opponent - other objectivestrue if these objectives dominate the opponentpublic double distance(Objectives other)
Objectives. This
calculation is based on the array() values.other - the second objectives