1

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!

Slinky
  • 291
  • What have you tried yourself? If you share your thoughts on the problem, other users will be able to give you a more suitable answer. – Servaes Aug 28 '15 at 22:11
  • I haven't come across something like this before, so I was hoping to get some key words to search to find solutions to such problems, thanks! – FishandChips Aug 28 '15 at 23:23

2 Answers2

0

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

Rick
  • 2,926
0

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
tomi
  • 9,594
  • Thank you very much for the answer. For an additional constraint, Z>=0, do you just add this to the list of constaints? – FishandChips Aug 28 '15 at 23:21
  • You can do, although most solvers use the simplex algorithm that assumes all variables are positive unless explicitly declared otherwise. – tomi Aug 28 '15 at 23:22