Package com.opttek.optquest
Class COptQuestOrRequirement
java.lang.Object
com.opttek.optquest.COptQuestOrRequirement
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
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 Summary
ConstructorDescriptionDefault constructorCOptQuestOrRequirement
(String name) Constructor that assigns a name to the COptQuestOrRequirement -
Method Summary
Modifier and TypeMethodDescriptionvoid
AddRequirement
(COptQuestRequirement requirement) Adds a COptQuestRequirement object to the COptQuestOrRequirement.GetName()
Returns the name assigned to the COptQuestOrRequirement.int
Returns the number of COptQuestRequirement objects that were added by calls toAddRequirement(OptQuestRequirement)
.GetRequirementAt
(int index) Returns the COptQuestRequirement object at the specified index.boolean
void
Assigns a name to the COptQuestOrRequirement
-
Constructor Details
-
COptQuestOrRequirement
Constructor that assigns a name to the COptQuestOrRequirement -
COptQuestOrRequirement
public COptQuestOrRequirement()Default constructor
-
-
Method Details
-
SetName
Assigns a name to the COptQuestOrRequirement- Parameters:
value
- alphanumeric name
-
GetName
Returns the name assigned to the COptQuestOrRequirement.- Returns:
- alphanumeric name
-
AddRequirement
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 toAddRequirement(OptQuestRequirement)
.- Returns:
- the number of COptQuestRequirement objects in the COptQuestOrRequirement.
-
GetRequirementAt
Returns the COptQuestRequirement object at the specified index.- Parameters:
index
- 0 based index- Returns:
- - COptQuestRequirement object at the specified index
-
hasUserVariables
public boolean hasUserVariables()
-