绝对值等式约束 一般情况 z=∣x∣\begin{gather*} z=|x| \end{gather*}z=∣x∣ x+=max(0,x)x+≥0x−=max(0,−x)x−≥0ifx>0x+=xx−=0elifx<0x+=0x−=−xthereforex=x+−x−∣x∣=x++x−\begin{gather*} x^{+}=max(0,x) \quad x^{+}\geq0\\ x^{-}=max(0,-x)\quad x^{-}\geq0 \\ if \quad x > 0 \\ x^+=x \\ x^-=0 \\ elif \quad x<0 \\ x^+=0 \\ x^-=-x \\ therefore \\ x=x^+-x^- \\ |x|=x^++x^- \end{gather*}x+=max(0,x)x+≥0x−=max(0,−x)x−≥0ifx>0x+=xx−=0elifx<0x+=0x−=−xthereforex=x+−x−∣x∣=x++x− 目标函数为最小化绝对值变量 min∣x∣s.tx≥0\begin{gather*} min |x| \\ s.t \quad x \geq 0 \end{gather*}min∣x∣s.tx≥0 引入辅助变量yyy minys.ty≥xy≥−x\begin{gather*} min y \\ s.t \quad y \geq x \\ y \geq -x \end{gather*}minys.ty≥xy≥−x