1

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?

drzbir
  • 496
  • 4
  • 19

1 Answers1

1

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
drzbir
  • 496
  • 4
  • 19