Branching on sums of binary variables  FAQ

Frequently asked questions about GAMS

Moderator: aileen

Forum rules
Please ask questions in the other sub-forums
Locked
abhosekar
Moderator
Moderator
Posts: 190
Joined: 9 months ago

Branching on sums of binary variables  FAQ

Post by abhosekar » 5 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;
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).

Locked