|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.opttek.optquest.COptQuestVariable
COptQuestVariable is a pure virtual class that defines a decision variable.
| Constructor Summary | |
COptQuestVariable()
Default constructor |
|
COptQuestVariable(double lowerBound,
double upperBound)
Constructor that sets the lower bound and upper bound. |
|
COptQuestVariable(java.lang.String name)
Constructor that assigns a name to the variable. |
|
COptQuestVariable(java.lang.String name,
double lowerBound,
double upperBound)
Constructor that assigns a name to the variable and sets the lower bound and upper bound. |
|
| Method Summary | |
double |
GetBestValue()
Used to retrieve the value of the variable for the solution that produced the best objective value. |
double |
GetCurrentValue()
Used to retrieve the current solution value for the variable. |
double |
GetCurrentValue(int pID)
Used to retrieve the current solution value for the variable when using parallel optimzation. |
double |
GetExclusiveLowerBoundAt(int index)
Returns the lower bound of the exclusive range identified by the index |
double |
GetExclusiveUpperBoundAt(int index)
Returns the upper bound of the exclusive range identified by the index |
double |
GetLowerBound()
|
java.lang.String |
GetName()
|
double |
GetNthBestValue()
Used to retrieve the value of the variable for the solution that produced the Nth best objective value. |
int |
GetNumberOfExclusiveRanges()
Returns the number of exclusive ranges defined for this variable. |
int |
GetNumberOfObservations()
Returns the number of elements in the observations array. |
int |
GetNumberOfPeriods()
Returns the number of periods for project. |
double |
GetObservationAt(int index)
Returns the value of the observation at the specified index. |
double[] |
GetObservations()
Returns the array of observations set in the SetObservations() method |
double |
GetPeriodObservationAt(int periodNum,
int index)
Returns the value of the observations for the specified period and index |
double[] |
GetPeriodObservations(int periodNum)
Returns the array of observations for the requested period. |
double |
GetStepSize()
|
double |
GetSuggestedValue()
|
java.lang.String |
GetType()
|
double |
GetUpperBound()
|
void |
SetCurrentValue(double Value)
Method that sets the current value of the variable. |
void |
SetCurrentValue(int pID,
double Value)
Method that sets the current value of the variable when using parallel optimization. |
void |
SetExclusiveRange(double low,
double high)
Defines a range of values that will be excluded as possible solutions. |
void |
SetLowerBound(double lowerBound)
Sets the lower bound of the decision variable |
void |
SetName(java.lang.String name)
Assigns a name to the variable. |
void |
SetNumberOfPeriods(int numPeriods)
Sets the number of periods in the project. |
void |
SetObservations(int numObservations,
double[] observations)
Sets the observations for the project. |
void |
SetPeriodObservations(int numObservations,
int periodNum,
double[] observations)
Sets the observations by period for a portfolio optimization. |
void |
SetStepSize(double value)
|
void |
SetSuggestedValue(double Value)
Allows the user to suggest a solution by setting a suggested value for each variable. |
void |
SetUpperBound(double upperBound)
Sets the upper bound of the decision variable |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public COptQuestVariable(java.lang.String name)
name - alphanumeric name. Note: the name can contain blanks or special
characters. If the variable name is used in a COptQuestStringConstraint
equation, the name should be enclosed in square brackets [] in the
COptQuestStringConstraint string equation.public COptQuestVariable()
public COptQuestVariable(java.lang.String name,
double lowerBound,
double upperBound)
name - alphanumeric name. Note: the name can contain blanks or special
characters. If the variable name is used in a COptQuestStringConstraint
equation, the name should be enclosed in square brackets [] in the
COptQuestStringConstraint string equation.lowerBound - a value between -pow(2,31) and +pow(2,31)-1upperBound - a value between -pow(2,31) and +pow(2,31)-1
public COptQuestVariable(double lowerBound,
double upperBound)
lowerBound - a value between -pow(2,31) and +pow(2,31)-1upperBound - a value between -pow(2,31) and +pow(2,31)-1| Method Detail |
public void SetCurrentValue(double Value)
throws COptQuestException
Value - - value of the variable
COptQuestException
public void SetCurrentValue(int pID,
double Value)
throws COptQuestException
pID - parallel ID from COptQuestOptimization::Evaluate()Value - - value of the variable
COptQuestException
public void SetLowerBound(double lowerBound)
throws COptQuestException
lowerBound - a value between -pow(2,31) and +pow(2,31)-1
COptQuestException
public void SetUpperBound(double upperBound)
throws COptQuestException
upperBound - a value between -pow(2,31) and +pow(2,31)-1
COptQuestException
public void SetExclusiveRange(double low,
double high)
throws COptQuestException
low - - any value > low will be excludedhigh - - any value < high will be exluded
COptQuestExceptionpublic void SetSuggestedValue(double Value)
Value - - suggested value for this variable.public void SetName(java.lang.String name)
name - = name of the variable.
public double GetCurrentValue()
throws COptQuestException
COptQuestException
public double GetCurrentValue(int pID)
throws COptQuestException
pID - parallel ID from the COptQuestOptimization.Evaluate() method
COptQuestExceptionpublic double GetBestValue()
public double GetLowerBound()
public double GetUpperBound()
public double GetSuggestedValue()
public java.lang.String GetName()
public java.lang.String GetType()
public double GetStepSize()
public int GetNumberOfExclusiveRanges()
public double GetExclusiveLowerBoundAt(int index)
index - 0 based index
public double GetExclusiveUpperBoundAt(int index)
index - 0 based index
public double GetNthBestValue()
public void SetObservations(int numObservations,
double[] observations)
numObservations - - number of entries in the observations arrayobservations - - array representing the observations for the project.public int GetNumberOfObservations()
public double[] GetObservations()
public double GetObservationAt(int index)
throws COptQuestException
index - - value between 0 and the number of observations -1
COptQuestException
public double GetPeriodObservationAt(int periodNum,
int index)
throws COptQuestException
periodNum - - value between 1 and the total number of periods.index - - value between 0 and the number of observations -1
COptQuestException
public void SetNumberOfPeriods(int numPeriods)
throws COptQuestException
numPeriods - - value > 0
COptQuestExceptionpublic int GetNumberOfPeriods()
public void SetPeriodObservations(int numObservations,
int periodNum,
double[] observations)
throws COptQuestException
numObservations - - number of elements in the observations arrayperiodNum - - identifies the period number. The value must be
between 1 and the value set by the SetNumberOfPeriods() method.observations - - array representing the observations for the project.
COptQuestException - if the number of observations for this period
differs from the setting for another period.
public double[] GetPeriodObservations(int periodNum)
throws COptQuestException
periodNum - - Number from 1 to number of periods set by SetNumberOfPeriods();
COptQuestException
public void SetStepSize(double value)
throws COptQuestException
COptQuestException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||