|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.opttek.optquest.COptQuestConstraint
public abstract class COptQuestConstraint
COptQuestConstraint is a pure virtual class that defines a linear constraint.
| Constructor Summary | |
|---|---|
COptQuestConstraint()
Default constructor |
|
COptQuestConstraint(double rhs)
Constructor that assigns a value for the right hand side. |
|
COptQuestConstraint(java.lang.String name,
double rhs)
Constructor that assigns a name and value for the right hand side. |
|
| Method Summary | |
|---|---|
void |
AddVariable(COptQuestVariable variable,
double coefficient)
Adds a variable and its coefficient to the linear expression. |
void |
ChangeVariableCoefficient(COptQuestVariable var,
double coefficient)
Changes the coefficient of the variable to the value specified by the input parameter. |
java.lang.Object |
clone()
|
double |
GetCoefficientAt(int index)
Returns the coefficient at the specified 0 based index. |
double |
GetLHSValue(COptQuestSolution sol)
For internal use only Evaluate the left side of the constraint and return the value |
java.lang.String |
GetName()
Returns the name assigned to the constraint. |
int |
GetNumberOfVariables()
Returns the number of varaibles that were added to the constraint by calls to the AddVariable() method. |
double |
GetRHS()
Returns the right hand side value. |
int |
GetType()
|
COptQuestVariable |
GetVariableAt(int index)
Returns the COptQuestVariable at the specified 0 based index. |
void |
RemoveVariable(COptQuestVariable variable)
Modifies the constraint by removing the variable. |
void |
SetName(java.lang.String value)
Assigns a name to the constraint. |
void |
SetRHS(double val)
Sets the right hand side value of a linear constraint. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public COptQuestConstraint(java.lang.String name,
double rhs)
name - - Alpha numeric constraint name.rhs - - right hand side value for the constraint.public COptQuestConstraint(double rhs)
rhs - - right hand side value for the constraint.public COptQuestConstraint()
| Method Detail |
|---|
public java.lang.Object clone()
clone in class java.lang.Object
public void AddVariable(COptQuestVariable variable,
double coefficient)
throws COptQuestException
variable - - COptQuestVariable object that is in the linear expressioncoefficient - - coefficient of the variable
COptQuestExceptionpublic void RemoveVariable(COptQuestVariable variable)
variable - public int GetNumberOfVariables()
public COptQuestVariable GetVariableAt(int index)
index - 0 based index
public void ChangeVariableCoefficient(COptQuestVariable var,
double coefficient)
var - coefficient - public double GetCoefficientAt(int index)
index - 0 based index
public int GetType()
public void SetRHS(double val)
val - - right hand side valuepublic double GetRHS()
public java.lang.String GetName()
public double GetLHSValue(COptQuestSolution sol)
throws COptQuestException
sol - - solution to be used for evaluation
COptQuestExceptionpublic void SetName(java.lang.String value)
value - = name of the variable.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||