Originally posted by: revolt
Ok, thanks. Now I am considering to use LazyCallbacks and I would like to use the lower bounds of the binary variables computed by CPLEX. The documantation says:
protected double[] getLBs(IloNumVar[] var) throws IloException
Returns the current lower bounds for an array of variables. The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them. The corresponding solution values from getValues may violate these bounds at a node where a new incumbent has been found because the bounds are tightened when an incumbent is found.
What exactly does it mean, if LazyCallback.getLBs returns at the root node, that for example the binary variables b0, b1, and b2 have a lower bound equal to 1? Intuitively I would think, that any following feasible solution must satisfy this tightened bounds. But, as far as I can see it, this is not true, because in the following example, the second solution violates the tightened bounds of the first call of the lazy constraint callback.
IBM ILOG License Manager:
"IBM ILOG Optimization Suite for Academic Initiative" is accessing CPLEX 12 with option(s):
"e m b q ". Lazy constraint(s) or lazy constraint callback is present. Disabling dual reductions (CPX_PARAM_REDUCE) in presolve. Disabling non-linear reductions (CPX_PARAM_PRELINEAR) in presolve. Tried aggregator 1 time. Probing time = 0.00 sec. Tried aggregator 1 time. Warning: Control callbacks may disable some MIP features. Presolve time = 0.00 sec. Probing time = 0.00 sec. Clique table members: 3. MIP emphasis: balance optimality and feasibility. MIP search method: traditional branch-and-cut. Parallel mode: none, using 1 thread. Root relaxation solution time = 0.00 sec. Nodes Cuts/ Node Left Objective IInf Best Integer Best Bound ItCnt Gap Variable B NodeID Parent Depth 0 0 131.5000 1 131.5000 5 LazyCallback .getValues = ( 1 1 1 0 0 3980 5155 0 0 3111 0 2006 0 2096 0 5030 ) .getLBs = ( 1 1 1 0 0 3980 0 0 0 0 0 0 0 0 0 0 ) * 0+ 0 38.5000 131.5000 5 241.56% LazyCallback .getValues = ( 1 0 0 0 1 3980 5155 0 0 3111 0 2006 0 2096 0 5030 ) .getLBs = ( 1 0 0 0 1 3980 0 0 0 0 0 0 0 0 0 0 ) * 0+ 0 125.5000 131.5000 5 4.78% 0 0 cutoff 125.5000 131.5000 5 4.78% 0 0 Elapsed real time = 0.00 sec. (tree size = 0.00 MB, solutions = 2) Root node processing (before b&c): Real time = 0.00 Sequential b&c: Real time = 0.00 ------- Total (root+branch&cut) = 0.00 sec.
In this example CPLEX even relaxes the tightened bounds between two calls of the LazyCallback and both times the Callback is called at the root node. If the tightened bounds are relaxed during the runtime and even at one and the same node, then I dont know how I can use the information of getLBs.
By the way I noticed, that the following Paramfile is not readable in java-Debug-Mode. CPLEX only accepts it, if I run the java program without debugging:
CPLEX Parameter File Version 12.4.0.0 CPX_PARAM_EPOPT 1.00000000000000e-09 CPX_PARAM_EPINT 1.00000000000000e-06
#CPLEXOptimizers#DecisionOptimization