com.opttek.optquest
Class COptQuestOrConstraint

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

public class COptQuestOrConstraint
extends COptQuestCompoundConstraint

The COptQuestOrConstraint class allows you to define a logical "or" relationship among COptQuestConstraint objects. Any number of COptQuestConstraint objects can be added to the COptQuestOrConstraint object.

The COptQuestConstraint objects are added to the the COptQuestOrConstraint object, and the COptQuestOrConstraint object is added to the COptQuestOptimization object using the COptQuestOptimization::AddConstraint() method.


Constructor Summary
COptQuestOrConstraint()
          Default constructor
COptQuestOrConstraint(java.lang.String name)
          Constructor that assigns a name to the COptQuestOrConstraint
 
Method Summary
 void AddConstraint(COptQuestConstraint constraint)
          Adds a COptQuestConstraint object to the COptQuestOrConstraint.
 COptQuestConstraint GetConstraintAt(int index)
          Returns the COptQuestConstraint object at the specified index.
 java.lang.String GetName()
          Returns the name assigned to the COptQuestOrConstraint.
 int GetNumberOfConstraints()
          Returns the number of COptQuestConstraint objects that were added by calls to COptQuestOrConstraint::AddConstraint().
 void SetName(java.lang.String value)
          Assigns a name to the COptQuestOrConstraint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

COptQuestOrConstraint

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

Parameters:
name - alphanumeric name

COptQuestOrConstraint

public COptQuestOrConstraint()
Default constructor

Method Detail

SetName

public void SetName(java.lang.String value)
Assigns a name to the COptQuestOrConstraint

Parameters:
value - alphanumeric name

GetName

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

Returns:
alphanumeric name

AddConstraint

public void AddConstraint(COptQuestConstraint constraint)
Adds a COptQuestConstraint object to the COptQuestOrConstraint. COptQuestConstraint objects are added to the COptQuestOrConstraint and then the COptQuestOrConstraint object is added to the COptQuestOptimization object. The COptQuestOrConstraint is true The COptQuestOrConstraint is true (feasible)if Constraint1 or Constraint2 … or ConstraintN is true.

Parameters:
constraint - a COptQuestConstraint object

GetNumberOfConstraints

public int GetNumberOfConstraints()
Returns the number of COptQuestConstraint objects that were added by calls to COptQuestOrConstraint::AddConstraint().

Returns:
the number of COptQuestConstraint objects in the COptQuestOrConstraint.

GetConstraintAt

public COptQuestConstraint GetConstraintAt(int index)
Returns the COptQuestConstraint object at the specified index.

Parameters:
index - 0 based index
Returns:
- COptQuestConstraint object at the specified index