[Cbc] Multiplying two binary variables in the objective function
Bjørn Sigurd Johansen (Spider Solutions AS)
bjorn.sigurd.johansen at spidersolutions.no
Mon Oct 2 02:10:36 EDT 2017
Dear CBC list,
Is it possible to multiply two binary variables in the objective function scaled with the same factor?
E.g.
MINIMIZE Obj:
+12.3 B1 * 12.3 B2
or
+12.3 B1 * + 12.3 B2
If binary variables are set through some sort of branching algorithm, perhaps it is possible? But if the binary variables are set/estimated through some other mechanism, it might not be possible?
If possible, what is the exact syntax for doing this?
If not possible, I guess the option is to introduce a third binary B3, and set up the following constraints:
B3 <= B1
B3 <= B2
B3 >= B1 + B2 - 1
And then in the objective function use:
+12.3 B3
Correct / best option?
Best regards,
Bjorn
More information about the Cbc
mailing list