com.opttek.optquest
Class COptQuestResourceConstraint

java.lang.Object
  extended bycom.opttek.optquest.COptQuestCompoundConstraint
      extended bycom.opttek.optquest.COptQuestResourceConstraint

public class COptQuestResourceConstraint
extends COptQuestCompoundConstraint

The COptQuestResourceConstraint class is used in portfolio optimizations to define a budget or resource constraint for each period of the portfolio.


Constructor Summary
COptQuestResourceConstraint()
          Default constructor
COptQuestResourceConstraint(java.lang.String name)
          Constructor that assigns a name to the COptQuestResourceConstraint
 
Method Summary
 void SetAvailableAmount(int periodNum, double amt)
          Sets the resource limit for each period.
 void SetNumberOfPeriods(int numPeriods)
          Defines the number of periods associated with the resource
 void SetUsageAmount(int periodNum, COptQuestVariable var, double amt)
          Sets a usage amount for a variable in a given period.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestResourceConstraint

public COptQuestResourceConstraint(java.lang.String name)
Constructor that assigns a name to the COptQuestResourceConstraint

Parameters:
name - alphanumeric name

COptQuestResourceConstraint

public COptQuestResourceConstraint()
Default constructor

Method Detail

SetNumberOfPeriods

public void SetNumberOfPeriods(int numPeriods)
                        throws COptQuestException
Defines the number of periods associated with the resource

Parameters:
numPeriods - number of periods associated with the resource
Throws:
COptQuestException

SetAvailableAmount

public void SetAvailableAmount(int periodNum,
                               double amt)
                        throws COptQuestException
Sets the resource limit for each period.

Parameters:
periodNum - period number which is a value between 1 and the number of periods defined by the SetNumberOfPeriods() method.
amt - the resource limit for the period
Throws:
COptQuestException

SetUsageAmount

public void SetUsageAmount(int periodNum,
                           COptQuestVariable var,
                           double amt)
                    throws COptQuestException
Sets a usage amount for a variable in a given period.

Parameters:
periodNum - period number which is a value between 1 and the number of periods defined by the SetNumberOfPeriods() method.
var - a COptQuestProjectVariable object
amt - a value representing the usage amount for the period
Throws:
COptQuestException