Modelling "If-Then" with equality constraints in an Integer Linear Program

80 Views Asked by At

Can anyone suggest how to model the following as part of an Integer Linear Program?

$x$ is binary and y is integer such that $0 \leq y \leq U$ where $U$ is a known upper bound.

$y$ is chosen elsewhere in the ILP but in addition:

if $y = 0$, then $x = 0$.

if $y \gt 0$, then $x = 1$.

1

There are 1 best solutions below

1
On

The following inequalities do the job: $$x\le y\le U x.$$