com.opttek.optquest
Class COptQuestObjective

java.lang.Object
  extended by com.opttek.optquest.COptQuestObjective
Direct Known Subclasses:
COptQuestMultiObjective, COptQuestObjectiveFunction, COptQuestPortfolioObjective, COptQuestStringObjective, COptQuestUserControlledObjective

public abstract class COptQuestObjective
extends java.lang.Object

The COptQuestObjective class is a pure virtual class that defines the objective of the optimization.


Constructor Summary
COptQuestObjective()
           
COptQuestObjective(java.lang.String name)
           
 
Method Summary
 boolean GetBestFeasible()
          Deprecated. Use COptQuestOptimization::GetBestSolution().IsFeasible()
 double GetBestValue()
          Deprecated. Use COptQuestOptimization::GetBestSolution().GetObjectiveValue()
 boolean GetCurrentFeasible()
          Deprecated. Use COptQuestOptimization::GetCurrentSolution().IsFeasible()
 boolean GetCurrentFeasible(int pID)
          Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).IsFeasible()
 double GetCurrentValue()
          Deprecated. Use COptQuestOptimization::GetCurrentSolution().GetObjectiveValue()
 double GetCurrentValue(int pID)
          Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).GetObjectiveValue() method to
 java.lang.String GetName()
          Returns the name assigned to the objective.
 boolean GetNthBestFeasible()
          Deprecated. Use COptQuestOptimization::GetNthBestSolution().IsFeasible()
 double GetNthBestValue()
          Deprecated. Use COptQuestOptimization::GetNthBestSolution().GetObjectiveValue().
 int GetReplicationConfidenceLevel()
          Returns the confidence level set by the call to SetReplicationConfidence().
 double GetReplicationConfidencePercent()
          Return the confidence error percent set by the call to SetReplicationConfidence()
 int GetReplicationConfidenceType()
          Returns the confidence type set by the call to SetReplicationConfidence();
 boolean IsLinear()
          Returns true if the objective is a linear function.
 boolean IsMaximize()
          Returns true if the goal of the optimization is to maximize the objective value.
 boolean IsMinimize()
          Returns true if the goal of the optimization is to minimize the objective value.
 void SetCurrentValue(double val)
          Deprecated. Use COptQuestOptimization::GetCurrentSolution().SetObjectiveValue()
 void SetCurrentValue(int pID, double val)
          Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).SetObjectiveValue()
 void SetMaximize()
          Sets the goal of the optimization to maximize the objective value.
 void SetMinimize()
          Sets the goal of the optimization to minimize the objective value.
 void SetName(java.lang.String name)
          Assigns a name to the objective function
 void SetReplicationConfidence(int type, int level, double errPercent)
          Sets the values used for replication confidence testing.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestObjective

public COptQuestObjective()

COptQuestObjective

public COptQuestObjective(java.lang.String name)
Method Detail

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 optimization is to maximize 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 optimization is to minimize 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(java.lang.String name)
Assigns a name to the objective function

Parameters:
name -

GetName

public java.lang.String GetName()
Returns the name assigned to the objective.

Returns:
te name assigned to the objective

GetBestValue

public double GetBestValue()
                    throws COptQuestException
Deprecated. Use COptQuestOptimization::GetBestSolution().GetObjectiveValue()

Throws:
COptQuestException

GetNthBestValue

public double GetNthBestValue()
                       throws COptQuestException
Deprecated. Use COptQuestOptimization::GetNthBestSolution().GetObjectiveValue().

Throws:
COptQuestException

GetBestFeasible

public boolean GetBestFeasible()
Deprecated. Use COptQuestOptimization::GetBestSolution().IsFeasible()


GetNthBestFeasible

public boolean GetNthBestFeasible()
Deprecated. Use COptQuestOptimization::GetNthBestSolution().IsFeasible()


GetCurrentFeasible

public boolean GetCurrentFeasible()
                           throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution().IsFeasible()

Throws:
COptQuestException

GetCurrentValue

public double GetCurrentValue()
                       throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution().GetObjectiveValue()

Throws:
COptQuestException

SetCurrentValue

public void SetCurrentValue(double val)
                     throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution().SetObjectiveValue()

Throws:
COptQuestException

SetCurrentValue

public void SetCurrentValue(int pID,
                            double val)
                     throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).SetObjectiveValue()

Throws:
COptQuestException

GetCurrentValue

public double GetCurrentValue(int pID)
                       throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).GetObjectiveValue() method to

Throws:
COptQuestException

GetCurrentFeasible

public boolean GetCurrentFeasible(int pID)
                           throws COptQuestException
Deprecated. Use COptQuestOptimization::GetCurrentSolution(int pID).IsFeasible()

Throws:
COptQuestException

SetReplicationConfidence

public void SetReplicationConfidence(int type,
                                     int level,
                                     double errPercent)
                              throws COptQuestException
Sets the values used for replication confidence testing.

Parameters:
type -
0 = no confidence testing is to be used. Use this value to run a fixed number of replications.
1 = indicates the replications should stop after the minimum replications have been run and when the confidence level is reached or the maximum number of replications is run.
2 = indicates the replications should stop after the minimum replications are run and the confidence level is reached, or when the best solution does not fall within current solutions confidence level.
level -
  • 1 = 80%
  • 2 = 90%
  • 3 - 95%
  • 4 = 98%
  • 5 = 99%
  • 6 = 100%

GetReplicationConfidenceType

public int GetReplicationConfidenceType()
                                 throws COptQuestException
Returns the confidence type set by the call to SetReplicationConfidence();

Returns:
0,1 or 2 indicating the confidence type.
Throws:
COptQuestException

GetReplicationConfidenceLevel

public int GetReplicationConfidenceLevel()
                                  throws COptQuestException
Returns the confidence level set by the call to SetReplicationConfidence().

Returns:
1 = 80%, 2 = 90%, 3 - 95%, 4 = 98%, 5 = 99%, 6 = 100%
Throws:
COptQuestException

GetReplicationConfidencePercent

public double GetReplicationConfidencePercent()
                                       throws COptQuestException
Return the confidence error percent set by the call to SetReplicationConfidence()

Returns:
a value > 0 and < 1.
Throws:
COptQuestException