XPRBsetctrtype
XPRBsetctrtype |
Purpose
Synopsis
int XPRBsetctrtype(XPRBctr ctr, int qrtype);
Arguments
ctr
|
Reference to a previously created constraint.
|
||||||||
qrtype
|
The constraint type, which must be one of:
|
Return value
0 if function executed successfully, 1 otherwise.
Example
XPRBprob prob; XPRBctr ctr1; ... ctr1 = XPRBnewctr(prob, "r1", XPRB_E); XPRBsetctrtype(ctr1, XPRB_L);
This changes
ctr1 to a `less than or equal to' constraint.
Further information
This function changes the type of a previously defined constraint to inequality, equation or non-binding. Function
XPRBsetrange has to be used for changing the constraint to a ranged constraint. If a ranged constraint is changed back to some other type with this function, its upper bound becomes the right hand side value.
Related topics