Minimize: $\mid{x-y}\mid + 2z$
Subject to:
- $0 \leq x \leq 3$,
- $0\leq y \leq 4$,
- $0 \leq z$,
- $-x+y \geq 4$,
- $x+y+z \leq 2$.
The following is what I did, I am looking to see if this is correct, or if there is an easier way to go about it the conversion of the LP above to standard form.
So, I know that I have to get rid of the absolute value signs. Thus, I will split this LP into two LPs, one with the constraints being that $x \leq y$ and one being that $y \leq x$.
Then I have to switch the minimization objective function to a maximization objective function, so I multiply the objective function by $(-1)$, which does this. I also have to get the $-x+y \geq 4$, sign switched to a "$\leq$" sign, so I multiply that equation by $(-1)$, Leaving me with the following:
If $x-y$ is positive:
Maximize $y-x-2z$
Subject to:
- $x-y \leq -4$
- $x+y+z \leq 2$
- $0 \leq x \leq 3$
- $0 \leq y \leq 3$
- $0 \leq z$
- $x \geq y$
And if $x-y$ is negative:
Maximize $y-x-2z$
Subject to:
- $x-y \leq -4$
- $x+y+z \leq 2$
- $0 \leq x \leq 3$
- $0 \leq y \leq 4$
- $0 \leq z$
- $x \leq y$