XPRBsetmodcut
XPRBsetmodcut |
Purpose
Synopsis
int XPRBsetmodcut(XPRBctr ctr, int mcstat);
Arguments
ctr
|
Reference to a previously created constraint.
|
||||
mcstat
|
The constraint type, which must be one of:
|
Return value
0 if function executed successfully, 1 otherwise.
Example
The following turns the constraint
ctr1 into a model cut.
XPRBprob prob; XPRBctr ctr1; ... ctr1 = XPRBnewctr(prob, "r1", XPRB_E); XPRBsetmodcut(ctr1, 1);
Further information
1. This function changes the type of a previously defined constraint from ordinary constraint to model cut and vice versa.
2. Model cuts must be 'true' cuts, in the sense that they are redundant at the optimal MIP solution. The Optimizer does not guarantee to add all violated model cuts, so they must not be required to define the optimal MIP solution.
3. Constraint properties 'include vars', 'model cut', 'delayed constraint', and 'indicator constraint' are mutually exclusive. When changing from one of these types to another you must first reset the correponding type to 0.
Related topics