ILOG CPLEX .NET Reference Manual

Cplex.AddUserCuts Method (IConstraint[], Int32, Int32)

This is an advanced method.

public virtual IConstraint[] AddUserCuts(
   IConstraint[] cuts,
   int start,
   int num
);

Parameters

cuts
An array of user cuts to be added. All cuts must be linear.
start
The first element in cuts to be added as a user cut.
num
The number of consecutive elements in cuts to be added as a user cut.

Return Value

The array cuts containing the 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 constraints in the array cuts are copied into the user cut pool; the objects in the array cut themselves are not part of the pool, so changes to them after they have 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.

See Also

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