Package com.opttek.optquest
Class COptQuestObjective
java.lang.Object
com.opttek.optquest.COptQuestObjective
- Direct Known Subclasses:
COptQuestMultiObjective
,COptQuestSingleObjective
The COptQuestObjective class is a pure virtual class that defines the objective
of the optimization.
-
Constructor Summary
ConstructorDescriptionDefault constructorCOptQuestObjective
(String name) Constructor with objective name. -
Method Summary
Modifier and TypeMethodDescriptionboolean
GetName()
int
hashCode()
boolean
IsLinear()
Returns true if the objective is a linear function.boolean
Returns true if the goal of the objective is to maximize the objective value.boolean
Returns true if the goal of the objective is to minimize the objective value.void
Sets the goal of the optimization to maximize the objective value.void
Sets the goal of the optimization to minimize the objective value.void
Assigns a name to the objective function
-
Constructor Details
-
COptQuestObjective
public COptQuestObjective()Default constructor -
COptQuestObjective
Constructor with objective name.- Parameters:
name
- - objective name
-
-
Method Details
-
SetMaximize
public void SetMaximize()Sets the goal of the optimization to maximize the objective value. -
IsMaximize
public boolean IsMaximize()Returns true if the goal of the objective is to maximize the objective value. Returns false if the goal of the objective is to minimize the objective value.- Returns:
- true if the objective is being maximized. False if it is being minimized.
-
SetMinimize
public void SetMinimize()Sets the goal of the optimization to minimize the objective value. -
IsMinimize
public boolean IsMinimize()Returns true if the goal of the objective is to minimize the objective value. Returns false if the goal of the objective is to maximize the objective value.- Returns:
- true if the objective is being minimized. False if it is being maximized.
-
IsLinear
public boolean IsLinear()Returns true if the objective is a linear function. This is true if the user defined the objective as a COptQuestObjectiveFunction or if the user defined the objective as a COptQuestStringObjective and the string expression is a linear expression using decision variables and coefficients.- Returns:
- true if the objective is a linear function of the decision variables.
-
SetName
Assigns a name to the objective function -
GetName
- Returns:
- the name assigned to the objective
-
hashCode
public int hashCode() -
equals
-