For the equation: $$5X + Y + Z = 600$$
With constraints: $$92 \le X \le 95$$ $$46 \le Y \le 55$$
I want to find a method that will choose values for $X$ and $Y$ such that $\lvert Z\rvert$ is minimized.
Any help would be appreciated!
For the equation: $$5X + Y + Z = 600$$
With constraints: $$92 \le X \le 95$$ $$46 \le Y \le 55$$
I want to find a method that will choose values for $X$ and $Y$ such that $\lvert Z\rvert$ is minimized.
Any help would be appreciated!
Solving for $Z$ we get $$Z = 600 - 5X - Y$$ Notice that to minimize $|Z|$ we need $X$ and $Y$ to be as large as possible (to make the $600$ decrease the most, but not pass $0$ otherwise $|Z|$ will no longer be at a minimum.). So from our constraints we obtain $$X = 95, Y = 55$$
You have $Z=600-5X-Y$
But you want $|Z|=\max(600-5X-Y,5X+Y-600)$
This gives you the two constraints:
$|Z|\ge600-5X-Y$ , which is rewritten as $|Z|+5X+Y\ge600$
$|Z|\ge5X+Y-600$ , which is rewritten as $|Z|-5X-Y\ge-600$
You need to solve the LP:
minimise absZ
st
absZ >= 600-5X-Y
absZ >= 5X+Y-600
X <= 95
X >= 92
Y <= 55
Y >= 46
end