ILOG CPLEX .NET Reference Manual

Cplex.AddUserCuts Method (IConstraint[])

This is an advanced method.

public virtual IConstraint[] AddUserCuts(
   IConstraint[] cuts
);

Parameters

cuts
An array of user cuts to be added. All cuts must be linear.

Return Value

The array of user cuts that have been added.

Remarks

Important:

Advanced methods typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other methods instead.

This method adds the constraints in cuts as user cuts to the the invoking Cplex object. The constraint cut is copied into the user cut pool; the object cut itself is not part of the pool, so changes to it after it has been copied into the user cut pool will not affect the user cut pool.

Unlike regular constraints that are added to the model, user cuts are by default left out of the optimization until they are violated. It is only after a node solution violates a user cut that the cut is added to the relaxation and will be used from then on. Unlike lazy constraints, user cuts must not reduce the feasible region of the problem; they can only strengthen the relaxation; otherwise, incorrect solutions can result.

When columns are deleted from the active model, all user cuts are deleted as well and need to be added again if they should be considered. Otherwise, use clearUserCuts to remove all user cuts from the invoking Cplex object.

If you do not know what type your cuts are, use the method addCuts rather than this method.

See Also

Cplex Class | ILOG.CPLEX Namespace | Cplex.AddUserCuts Overload List