Branching on sums of binary variables  FAQ

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Posts: 143
Joined: 7 months ago

Branching on sums of binary variables  FAQ

Post by abhosekar » 3 months ago

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;
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).