12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Cut CallbackThe next example we consider is the user cut callback routine. The user callsCPXsetcutcallbackfunc to set a cut callback, and the user's callback routine is called atevery viable node of the branch & cut tree. We refer the reader to admipex5.c for a detailedexample.A likely sequence of events once the user callback function is called is as follows. First, theroutine calls CPXgetcallbacknodex to get the relaxation solution for the current node. Itpossibly also gathers other information about the problem (through CPXgetcallbacklp,CPXgetcallbackgloballb, etc.) It then calls a user separation routine to identify violateduser cuts. These cuts are then added to the problem by calling CPXcutcallbackadd, andthe callback returns. Local cuts, that is, cuts that apply to the subtree of which the currentnode is the root, can be added by the routine CPXcutcallbackaddlocal.At this point, it is important to draw a distinction between the two different types ofconstraints that can be added through the cut callback interface. The first type is thetraditional MIP cutting plane, which is a constraint that can be derived from other constraintsin the problem and does not cut off any integer feasible solutions. The second is a “lazyconstraint”, which is a constraint that can not be derived from other constraints andpotentially cuts off integer feasible solutions. Either type of constraint can be added throughthe cut callback interface.As with the heuristic callback, the user can choose whether to work with presolved values ororiginal values. If the user chooses to work with original values, a few parameters must bemodified. If the user adds only cutting planes to the original problem, the user must setadvanced presolve parameter CPX_PARAM_PRELINEAR to CPX_OFF (0). This parameterforbids certain presolve reductions that make translation from original values to presolvedvalues impossible.If the user adds any lazy constraints, the user must turn off dual presolve reductions (usingthe CPX_PARAM_REDUCE parameter). The user must think carefully about whetherconstraints added through the cut interface are implied by existing constraints, in which casedual presolve reductions may be left on, or whether they are not, in which case dualreductions are forbidden.<strong>ILOG</strong> Concert Technology users should use the classIloCplex::LazyConstraintCallbackI when adding lazy constraints, and the classIloCplex::UserCutCallbackI when adding cutting planes. Dual reductions and/or nonlinearreductions then will be turned off automatically.One scenario that merits special attention is when the user knows a large set of cuts a priori.Rather than adding them to the original problem, the user may instead wish to add them onlywhen violated. The <strong>CPLEX</strong> advanced MIP control interface provides more than onemechanism for accomplishing this. The first and probably most obvious at this point is toinstall a user callback that checks each cut from the user set at each node, adding those that<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 487

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!