1

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$.

jvdhooft
  • 7,589
  • 9
  • 25
  • 47

1 Answers1

1

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

RobPratt
  • 45,619