How to choose from a set of constraints? Generalization of either or constrains?

305 Views Asked by At

In an either or constraint, we have two constraints and we have to choose only one. For example if we have

constraint_1 <= value_1

or

constraint_2 <= value_2

We can introduce a binary variable y = 0 or 1 and write

constraint_1 <= value_1 + M * y

and

constraint_2 <= value_2 + M * (1 - y)

for a sufficiently large M.

How about if we have a set of constraints and we have to choose one of them?

constraint_t <= value_t for t = 1,...,T

and only one of the T constraints must be true. Can we model this using integer linear programming?

1

There are 1 best solutions below

0
On BEST ANSWER

I think this can be done as follows. Introduce T binary variables z_t and write:

constraint_t <= value_t + M * z_t
z_1 + z_2 + ... + z_T = T - 1