Class COptQuestObjective

java.lang.Object
com.opttek.optquest.COptQuestObjective
Direct Known Subclasses:
COptQuestMultiObjective, COptQuestSingleObjective

public abstract class COptQuestObjective extends Object
The COptQuestObjective class is a pure virtual class that defines the objective of the optimization.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
    Constructor with objective name.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    int
     
    boolean
    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

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • COptQuestObjective

      public COptQuestObjective()
      Default constructor
    • COptQuestObjective

      public COptQuestObjective(String name)
      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

      public void SetName(String name)
      Assigns a name to the objective function
    • GetName

      public String GetName()
      Returns:
      the name assigned to the objective
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object