XPRBsetctrtype


Purpose
Set the constraint type.
Synopsis
int XPRBsetctrtype(XPRBctr ctr, int qrtype);
Arguments
ctr 
Reference to a previously created constraint.
qrtype 
The constraint type, which must be one of:
XPRB_L 
'less than or equal to' constraint;
XPRB_G 
'greater than or equal to' constraint;
XPRB_E 
an equality;
XPRB_N 
a non-binding row (objective function).
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
XPRBgetctrtype, XPRBnewctr, XPRBsetrange, XPRBsetterm.


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.