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.

value strictly greater than one. It is then the responsability of the user to implement thatcontrol callback in such a way that the callback is thread-safe. In particular, the controlcallback must be written in such a way that it does not depend on the order in whichcallbacks are called, as no fixed order of calling the callbacks can be guaranteed by parallel<strong>ILOG</strong> <strong>CPLEX</strong>.With respect to determinism, if the user sets the parallel mode parameter (ParallelMode,CPX_PARAM_PARALLELMODE) to 1 (one) thus invoking deterministic parallel MIPoptimization, it is up to the user to make sure that the control callback does not interfere withthe search in any way that would make the search opportunistic. To make sure of thatcondition, the control callback must use only information queried from <strong>ILOG</strong> <strong>CPLEX</strong> itselfwithin the callback as the basis for algorithmic decisions. In other words, no information thataccumulated in an external data structure over several invokations of the control callback canbe used.Presolve and MIP Control CallbacksTis section addresses an important issue related to presolve that the user of MIP controlcallbacks should be aware of.Most of the decisions made within MIP relate to the variables of the problem. The heuristic,for example, finds values for all the variables in the problem that produce a feasible solution.Similarly, branching chooses a variable on which to branch. When considering usercallbacks, the difficulty that arises is that the user is familiar with the variables in the originalproblem, while the branch & cut process is performed on the presolved problem. Many ofthe variables in the original problem may have been modified or removed by presolve.<strong>CPLEX</strong> provides two options for handling the problem of mapping from the originalproblem to the presolved problem. First, the user may work directly with the presolvedproblem and presolved solution vectors. This is the default. While this option may at firstappear unwieldy, note that the Advanced Presolve Interface allows the user to map betweenoriginal variables and presolved variables. The downside to this option is that the user has tomanually invoke these advanced presolve routines. The second option is to setCPX_PARAM_MIPCBREDLP to CPX_OFF (0), thus requesting that the callback routines workexclusively with original variables. <strong>CPLEX</strong> automatically translates the data betweenoriginal and presolved data. While the second option is simpler, the first provides morecontrol. These two options will be revisited at several points in this chapter.Heuristic CallbackThe first user callback we consider is the heuristic callback. The first step in using thiscallback is to call CPXsetheuristiccallbackfunc, with a pointer to a callback functionand optionally a pointer to user private data as arguments. We refer the reader to advancedexample admipex2.c for further details of how this callback is used. Once this routine has<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 485

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

Saved successfully!

Ooh no, something went wrong!