Problem
Our original problem is
@[@
\R{minimize} \; | u - 1| \; \R{w.r.t} \; u \in \B{R}
@]@
We reformulate this as the following problem
@[@
\begin{array}{rlr}
\R{minimize} & v & \R{w.r.t} \; (u,v) \in \B{R}^2 \\
\R{subject \; to} & u - 1 \leq v \\
& 1 - u \leq v
\end{array}
@]@
We know that the value of @(@
v
@)@ at the solution is greater than
or equal zero. Hence we can reformulate this problem as
@[@
\begin{array}{rlr}
\R{minimize} & v & \R{w.r.t} \; ( u_- , u_+ , v) \in \B{R}_+^3 \\
\R{subject \; to} & u_+ - u_- - 1 \leq v \\
& 1 - u_+ + u_- \leq v
\end{array}
@]@
This is equivalent to
@[@
\begin{array}{rlr}
\R{minimize}
& (0, 0, 1) \cdot ( u_+, u_- , v)^T & \R{w.r.t} \; (u,v) \in \B{R}_+^3 \\
\R{subject \; to}
&
\left( \begin{array}{ccc}
+1 & -1 & -1 \\
-1 & +1 & +1
\end{array} \right)
\left( \begin{array}{c} u_+ \\ u_- \\ v \end{array} \right)
+
\left( \begin{array}{c} -1 \\ 1 \end{array} \right)
\leq
0
\end{array}
@]@
which is in the form expected by simplex_method
.