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.

are violated. The user can do this either by setting CPX_PARAM_MIPCBREDLP to CPX_OFF towork with the original problem in the cut callback, or by using the Advanced PresolveInterface to translate the cuts on the original problem to cuts on the presolved problem, andthen use the presolved cuts in the cut callback.Another, perhaps simpler alternative is to add the cuts or constraints to cut pools beforeoptimization begins. Pools are discussed in User-Cut and Lazy-Constraint Pools onpage 419.Branch Selection CallbackThe next callback to consider is the branch variable selection callback.After CPXsetbranchcallbackfunc is called with a pointer to a user callback routine, theuser routine is called whenever <strong>CPLEX</strong> makes a branching decision. <strong>CPLEX</strong> indicateswhich variable has been chosen for branching and allows the user to modify that decision.The user may specify the number of children for the current node (between 0 and 2), and theset of bounds or constraints that are modified for each child through one of the routinesCPXbranchcallbackbranchbds, CPXbranchcallbackbranchconstraints, orCPXbranchcallbackbranchgeneral. The children are explored in the order that they arereturned. The branch callback routine is called for all viable nodes. In particular, it will becalled for nodes that have zero integer infeasibilities; in this case, <strong>CPLEX</strong> will not havechosen a branch variable, and the default action will be to discard the node. The user canchoose to branch from this node and in this way impose additional restrictions on integersolutions.For example, a user branch routine may call CPXgetcallbacknodeintfeas to identifybranching candidates, call CPXgetcallbackpseudocosts to obtain pseudo-costinformation on these variables, call CPXgetcallbackorder to get priority orderinformation, make a decision based on this and perhaps other information, and then respondthat the current node will have two children, where one has a new lower bound on the branchvariable and the other has a new upper bound on that variable.Alternatively, the branch callback routine can be used to sculpt the search tree by pruningnodes or adjusting variable bounds. Choosing zero children for a node prunes that node,while choosing one node with a set of new variable bounds adjusts bounds on those variablesfor the entire subtree rooted at this node. Note that the user must be careful when using thisroutine for anything other than choosing a different variable to branch on. Pruning a validnode or placing an invalid bound on a variable can prune the optimal solution.We should point out one important detail associated with the use of theCPX_PARAM_MIPCBREDLP parameter in a branch callback. If this parameter is set toCPX_OFF (0), the user can choose branch variables (and add bounds) for the originalproblem. However, not every fractional variable is actually available for branching. Recallthat some variables are replaced by linear combinations of other variables in the presolved488 <strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL

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

Saved successfully!

Ooh no, something went wrong!