|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.opttek.optquest.COptQuestRequirement
public abstract class COptQuestRequirement
The COptQuestRequirement class is a pure virtual class that allows you to define
a non-linear constraint. You compute the value of the requirement and the OptQuest
Engine checks for feasiblity using the value you computed and the bounds you
defined. The requirement is feasible if the value you computed is between the
lower bound and upper bound of the requirement.
You would compute a value for the COptQuestRequirement object in the
COptQuestOptimization::Evaluate() method and then set the value using
the COptQuestSolution.SetRequirementValue() or
COptQuestRequirement::SetCurrentValue() method.
| Constructor Summary | |
|---|---|
COptQuestRequirement()
Default constructor |
|
COptQuestRequirement(double lower,
double upper)
Constructor that sets the lower and upper bound of the requirement. |
|
COptQuestRequirement(java.lang.String name,
double lower,
double upper)
Constructor that assigns a name to the requirement and sets the lower and upper bound of the requirement. |
|
| Method Summary | |
|---|---|
double |
GetBestValue()
Deprecated. Use COptQuestOptimization::GetBestSolution().GetRequirementValue(). |
double |
GetCurrentValue()
Deprecated. Call COptQuestOptimization::GetCurrentSolution().GetRequirementValue() |
double |
GetCurrentValue(int pID)
Deprecated. Use COptQuestSolution.GetRequirementValue() |
double |
GetLowerBound()
Returns the value of the requirement's lower bound |
java.lang.String |
GetName()
Returns the name of the requirement |
double |
GetNthBestValue()
Deprecated. Use COptQuestOptimization::GetNthBestSolution().GetRequirementValue(). |
int |
GetPortfolioMeasure()
Returns the portfolio measure set by the SetPortfolioMeasure() method. |
int |
GetPortfolioStatistic()
Returns the portfolio statistic defined by the SetPortfolioStatistic() method. |
double |
GetPortfolioStatisticValue()
Returns the statistic value defined by the SetPortfolioStatistic() method. |
java.lang.String |
GetType()
|
double |
GetUpperBound()
Returns the value of the requirement's upper bound |
boolean |
IsGoal()
Returns true if the requirement has been set as a goal rather than a hard requirement. |
void |
SetCurrentValue(double Value)
Deprecated. Use COptQuestOptimization::GetCurrentSolution().SetRequirementValue() |
void |
SetCurrentValue(int pID,
double Value)
Deprecated. Use COptQuestSolution.SetRequirementValue(); |
void |
SetGoal(boolean goalValue)
Makes the requirement a goal where the solution is not marked as infeasible. |
void |
SetLowerBound(double lowerBound)
Sets the lower bound to the input value |
void |
SetName(java.lang.String name)
Assigns a name to the requirement |
void |
SetPortfolioMeasure(int measure)
Defines the measure for the portfolio objective. |
void |
SetPortfolioStatistic(int statistic,
double statisticValue)
Used for portfolio optimizations which can define a requirement based on a measure and a statistic. |
void |
SetReplicationConfidence(int level,
double errPercent)
|
void |
SetTolerance(double tolerance)
|
void |
SetUpperBound(double upperBound)
Sets the upper bound to the input value |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public COptQuestRequirement(double lower,
double upper)
lower - a value between -pow(2,31) and +pow(2,31)-1upper - a value between -pow(2,31) and +pow(2,31)-1
public COptQuestRequirement(java.lang.String name,
double lower,
double upper)
name - - alphanumeric namelower - a value between -pow(2,31) and +pow(2,31)-1upper - a value between -pow(2,31) and +pow(2,31)-1public COptQuestRequirement()
| Method Detail |
|---|
public void SetName(java.lang.String name)
name - alphanumeric namepublic java.lang.String GetName()
public java.lang.String GetType()
public void SetGoal(boolean goalValue)
public boolean IsGoal()
public void SetCurrentValue(double Value)
throws COptQuestException
COptQuestException
public void SetCurrentValue(int pID,
double Value)
throws COptQuestException
COptQuestExceptionpublic void SetLowerBound(double lowerBound)
lowerBound - a value between -pow(2,31) and +pow(2,31)-1public void SetUpperBound(double upperBound)
upperBound - a value between -pow(2,31) and +pow(2,31)-1
public double GetCurrentValue()
throws COptQuestException
COptQuestException
public double GetCurrentValue(int pID)
throws COptQuestException
COptQuestExceptionpublic double GetBestValue()
public double GetLowerBound()
public double GetUpperBound()
public double GetNthBestValue()
public void SetPortfolioStatistic(int statistic,
double statisticValue)
throws COptQuestException
statistic - statisticValue - - target value for OCLP_PERCENTILE, OCLP_SEMI1STDDEV,
OCLP_SEMI2STDDEV and OCLP_PROBABILITY
COptQuestException
public int GetPortfolioStatistic()
throws COptQuestException
COptQuestException
public double GetPortfolioStatisticValue()
throws COptQuestException
COptQuestException
public void SetPortfolioMeasure(int measure)
throws COptQuestException
measure - COptQuestException - if the measure is invalid.
public int GetPortfolioMeasure()
throws COptQuestException
COptQuestExceptionpublic void SetTolerance(double tolerance)
public void SetReplicationConfidence(int level,
double errPercent)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||