How would you enforce the constraint that $x$, a decision variable, can only take values -3, 7, or 19?
I think I probably need to introduce a binary variable here but not sure where to start. Thanks.
How would you enforce the constraint that $x$, a decision variable, can only take values -3, 7, or 19?
I think I probably need to introduce a binary variable here but not sure where to start. Thanks.
Copyright © 2021 JogjaFile Inc.
Let $w,x,y,z \in \mathbb{Z}$ such that:
$x,y,z \in \{0,1\}$
$x+y+z=1$
$w=-3x+7y+19z$
Then $w$ will be exactly one out of $-3,7,19$.