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
Objectives of the optimization task.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Value<?>Identifier for infeasible results (null).protected final intstatic final intHigh priority rank (-100).static final intStandard rank of an objective (0).protected final Objective.Sign -
Constructor Summary
ConstructorsConstructorDescriptionConstructs anObjectivewith a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).Objective(String name, Objective.Sign sign) Constructs anObjectivewith a given name, sign, and rank=RANK_OBJECTIVE(0).Objective(String name, Objective.Sign sign, int rank) Constructs anObjectivewith 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 anObjectivewith a given name, sign=MIN, and rank=RANK_OBJECTIVE(0).- Parameters:
name- the name
-
Objective
Constructs anObjectivewith a given name, sign, and rank=RANK_OBJECTIVE(0).- Parameters:
name- the namesign- the sign of the objective
-
Objective
Constructs anObjectivewith 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:
compareToin interfaceComparable<Objective>
-
toString
-