Class COptQuestOrRequirement

java.lang.Object
com.opttek.optquest.COptQuestOrRequirement

public class COptQuestOrRequirement extends Object
The COptQuestOrRequirement class allows you to define a logical "or" relationship among COptQuestRequirement objects. Any number of COptQuestRequirement objects can be added to the COptQuestOrRequirement object.

The COptQuestRequirement objects are added to the COptQuestOrRequirement object, and the COptQuestOrRequirement object is added to the COptQuestOptimization object using the AddRequirement(COptQuestOrRequirement) method.
  • Constructor Details

    • COptQuestOrRequirement

      public COptQuestOrRequirement(String name)
      Constructor that assigns a name to the COptQuestOrRequirement
    • COptQuestOrRequirement

      public COptQuestOrRequirement()
      Default constructor
  • Method Details

    • SetName

      public void SetName(String value)
      Assigns a name to the COptQuestOrRequirement
      Parameters:
      value - alphanumeric name
    • GetName

      public String GetName()
      Returns the name assigned to the COptQuestOrRequirement.
      Returns:
      alphanumeric name
    • AddRequirement

      public void AddRequirement(COptQuestRequirement requirement)
      Adds a COptQuestRequirement object to the COptQuestOrRequirement. COptQuestRequirement objects are added to the COptQuestOrRequirement and then the COptQuestOrRequirement object is added to the COptQuestOptimization object. The COptQuestOrRequirement is true (feasible)if Requirement1 or Requirement2 ... or RequirementN is true.
      Parameters:
      requirement - COptQuestRequirement object.
    • GetNumberOfRequirements

      public int GetNumberOfRequirements()
      Returns the number of COptQuestRequirement objects that were added by calls to AddRequirement(OptQuestRequirement).
      Returns:
      the number of COptQuestRequirement objects in the COptQuestOrRequirement.
    • GetRequirementAt

      public COptQuestRequirement GetRequirementAt(int index)
      Returns the COptQuestRequirement object at the specified index.
      Parameters:
      index - 0 based index
      Returns:
      - COptQuestRequirement object at the specified index
    • hasUserVariables

      public boolean hasUserVariables()