Originally posted by: Tulkas
So it seems to be luck :( I indeed call BranchCallbackI::getLB() and BranchCallbackI::getUB() before any operation. What I retrieve from these methods is corrupted, i.e lb > ub. My deduction algorithms even work ONLY with these bounds.
For instance if x_1 == 1 && x_2 == 0 => x_3 <- 1 (it's naturally much more complicated in reality). I write something like this:
getLBs(lb, variables);
getUBs(ub, variables);
if(lb[x_1] > 1 - EPSILON && ub[x_2] < EPSILON) // if lb > ub, I perform bad deductions ;S
{
newVars.add(x_3);
newBounds.add(1.0);
newDirections.add(BranchUp);
}
To sum up:
1) I use LBs and UBs of current node,
2) I use the branching variables chosen by CPLEX,
=> I update LBs and UBs as if branching was already done with respect to branch 0 and branch 1 independently (I only consider getBranchType() == BranchOnVariable) and try to fix more variables on these branches...
3) I never perform branching up and branching down on the same variables
4) I've checked that I do not perform bad deductions. I compare any deductions to known optimal solutions. If LBs and UBs of this node are compatible with one of these solutions S (this node could lead to S), I compare my deductions to S. I'm therefore sure I'm not implicitely pruning a branch leading to S !
5) I prune nodes when my deductions are conflicting with current fixed variables because it means there is not feasible solutions beyond. Once again, I checked I never prune a node leading to an optimal solution.
What could it be so ?
Thanks !
#CPLEXOptimizers#DecisionOptimization