Package org.opt4j.core
Class Objective
java.lang.Object
org.opt4j.core.Criterion
org.opt4j.core.Objective
- All Implemented Interfaces:
Comparable<Objective>
The Objective
is the identifier for a single objective in the
Objectives
. It is specified by the following properties:
- Name
- Minimization or Maximization
- Rank (use for ordering)
Each Evaluator
sets a specific amount of
Objective
- Value
pairs.
Use the ObjectivesMonitor
to get all
Objective
s of the optimization task.
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Value<?>
Identifier for infeasible results (null
).protected final int
static final int
High priority rank (-100).static final int
Standard rank of an objective (0).protected final Objective.Sign
-
Constructor Summary
ConstructorDescriptionConstructs anObjective
with a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).Objective
(String name, Objective.Sign sign) Constructs anObjective
with a given name, sign, and rank=RANK_OBJECTIVE(0).Objective
(String name, Objective.Sign sign, int rank) Constructs anObjective
with a given name, sign, and rank. -
Method Summary
-
Field Details
-
RANK_OBJECTIVE
public static final int RANK_OBJECTIVEStandard rank of an objective (0).- See Also:
-
RANK_ERROR
public static final int RANK_ERRORHigh priority rank (-100).- See Also:
-
INFEASIBLE
Identifier for infeasible results (null
). -
sign
-
rank
protected final int rank
-
-
Constructor Details
-
Objective
Constructs anObjective
with a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).- Parameters:
name
- the name
-
Objective
Constructs anObjective
with a given name, sign, and rank=RANK_OBJECTIVE(0).- Parameters:
name
- the namesign
- the sign of the objective
-
Objective
Constructs anObjective
with a given name, sign, and rank.- Parameters:
name
- the namesign
- the sign of the objectiverank
- the rank
-
-
Method Details
-
getSign
Returns the sign.- Returns:
- the sign
-
getRank
public int getRank()Returns the rank.- Returns:
- the rank
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Objective>
-
toString
-