## Branching on sums of binary variables FAQ

Moderator: aileen

Forum rules
abhosekar
Moderator
Posts: 175
Joined: 8 months ago

### Branching on sums of binary variables  FAQ

For example, to branch on the sum of some variables as in the following constraints:

Code: Select all

sum(s, delta(s)) =l= k; or \sum(s, delta(s)) =g= k+1;
Another integer variable can be introduced

Code: Select all

sum_delta =e= sum(s, delta(s));
Branching priorities can then be set to instruct the MIP solver to first branch on the sum_delta variable and then on the delta(s):

Code: Select all

delta.prior(s) = 100;
sum_delta.prior = 1;
mymodel.prioropt=1;
solve mymodel min obj using mip;
If the multiple close to optimal solutions come from symmetry, you might also want to try a more aggressive level for symmetry braking cuts (see e.g. cplex option symmetry). Preprocessing at the node or aggressive probing might also help (see e.g. Cplex options preslvnd and probe).