com.opttek.optquest
Class COptQuestProjectVariable

java.lang.Object
  extended bycom.opttek.optquest.COptQuestVariable
      extended bycom.opttek.optquest.COptQuestContinuousVariable
          extended bycom.opttek.optquest.COptQuestProjectVariable

public class COptQuestProjectVariable
extends COptQuestContinuousVariable

The COptQuestProjectVariable class defines a portfolio project variable that is used in portfolio optimization. A COptQuestProjectVariable is defined for each project in the portfolio.

Typically, a project decision variable is defined with a lower bound of 0 and an upper bound of 1 and its value represents the percentage of investment in that project.
Portfolio optimization supports 3 types of project investment.

For case 1 the lower bound and the upper bound define the range of investment.
For case 2, the lower bound is set to 0 and the COptQuestVariable::SetExclusiveRange() method is used to define the range of variables that must be excluded from the solution. For example, if a project's funding can be 0 or any value greater than .25 (25%), you would define the lower bound as 0, the upper bound as 1 and define an exclusive range between 0 and .25. (0 and .25 will be included as possible solutions.)
For case 3, the project is defined with a low bound of 0, a high bound of 1 and an exclusive range of 0 to 1. (0 and 1 will be included as possible solutions.)

A COptQuestProjectVariable has a set of observations that are either simulated values or sampled values. If there is only one observation, it represents a single known value for the project. Note that some statistics, such as standard deviation, require more than one observation.

The observation values sent to the OptQuest Engine can be either: Net Present Values (NPV) or cash flow by period.

If the measure used is NPV, the project’s NPV for each observation can be calculated. Other measures such as Internal Rate of Return (IRR) and Pay Back Period (PBP), require the cash flow for each period. If you are using Internal Rate of Return or Pay Back Period, you should set the cash flow observations for each period.

Portfolio analysis of Net Present Value can use either NPV observations or cash flow by period observations. If the portfolio analysis only uses Net Present Value, it is more efficient to use the NPV observation. However, if different measures are used in the portfolio analysis, the Cash Flow by period per observation can be used for all measures, including NPV.

Observations can be associated with the COptQuestProjectVariable by calling the COptQuestProjectVariable::SetObservations() method. The observations are used to calculate statistical measures and in searching for possible solutions.

The COptQuestProjectVariable::SetObservations::SetNumberOfPeriods() method sets the number of periods in the project. Project variables in an optimiation do not need to have the same numbers of periods, however, periods between project variables must correspond to the same period number.

The COptQuestProjectVariable::SetPeriodObservations() method sets the observations for a particular period. It is not necessary to set observations for every period. If there are no observations for a particular period of a project, the OptQuest Engine assumes the cash flow for that period was zero. This is useful for projects that start after the first period or end before the last period.


Constructor Summary
COptQuestProjectVariable()
          Default constructor
COptQuestProjectVariable(double lowerBound, double upperBound)
          Constructor that assigns the lower bound and the upper bound for the project.
COptQuestProjectVariable(java.lang.String name, double lowerBound, double upperBound)
          Constructor that assigns a project name, the lower bound and the upper bound for the project.
 
Method Summary
 java.lang.String GetType()
           
 
Methods inherited from class com.opttek.optquest.COptQuestVariable
GetBestValue, GetCurrentValue, GetCurrentValue, GetExclusiveLowerBoundAt, GetExclusiveUpperBoundAt, GetLowerBound, GetName, GetNthBestValue, GetNumberOfExclusiveRanges, GetNumberOfObservations, GetNumberOfPeriods, GetObservationAt, GetObservations, GetPeriodObservationAt, GetPeriodObservations, GetStepSize, GetSuggestedValue, GetUpperBound, SetCurrentValue, SetCurrentValue, SetExclusiveRange, SetLowerBound, SetName, SetNumberOfPeriods, SetObservations, SetPeriodObservations, SetStepSize, SetSuggestedValue, SetUpperBound
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestProjectVariable

public COptQuestProjectVariable(java.lang.String name,
                                double lowerBound,
                                double upperBound)
Constructor that assigns a project name, the lower bound and the upper bound for the project.

Parameters:
name - alphanumeric name. Note: the name can contain blanks or special characters. If the project name is used in a COptQuestConstraintString equation and it contains non-alphnumeric characters, the name should be enclosed in square brackets []
lowerBound - typically 0 representing 0%
upperBound - typically 1 representing 100%

COptQuestProjectVariable

public COptQuestProjectVariable(double lowerBound,
                                double upperBound)
Constructor that assigns the lower bound and the upper bound for the project.

Parameters:
lowerBound - typically 0 representing 0%
upperBound - typically 1 representing 100%

COptQuestProjectVariable

public COptQuestProjectVariable()
Default constructor

Method Detail

GetType

public java.lang.String GetType()
Overrides:
GetType in class COptQuestContinuousVariable