Logo
0

绝对值等式约束

一般情况

z=x\begin{gather*} z=|x| \end{gather*} x+=max(0,x)x+0x=max(0,x)x0ifx>0x+=xx=0elifx<0x+=0x=xthereforex=x+xx=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*}

目标函数为最小化绝对值变量

minxs.tx0\begin{gather*} min |x| \\ s.t \quad x \geq 0 \end{gather*}

引入辅助变量yy

minys.tyxyx\begin{gather*} min y \\ s.t \quad y \geq x \\ y \geq -x \end{gather*}

© 2025 All rights reservedBuilt with DataHub Cloud

Built with LogoDataHub Cloud