welcome: please sign in

Revision 5 as of 2018-03-17 16:47:58

Clear message
location: Computer / Latex / OptimizationX

Formatting Optimization Problems

Put the following lines in the head of your document, i.e. between \documentclass{xxx} and \begin{document}

\newcommand*{\optMinMax}[2]{\underset{\vphantom{A}\displaystyle\mathclap{#1}}%
                           {\text{#2}}\quad}
\newcommand{\optmin}[1]{\optMinMax{#1}{minimize}}
\newcommand{\optmax}[1]{\optMinMax{#1}{maximize}}
\newcommand*{\subject}{\text{subject to}\quad}
\newcommand*{\tagthis}{\stepcounter{equation}\tag{\theequation}}

text describing image

\begin{align*}\label{eq:QP}
  \optmin{x}  &\dfrac{1}{2}x^THx + f^Tx \tagthis \\
  \subject    & Ax  \leq b \\
              &A_{\text{eq}}x  = b_{\text{eq}}
\end{align*}

optim2.png

\begin{align*}\label{Eq:Ign_Opt}
\optmin{\begin{matrix}\Delta\bm{\theta}_{\mathrm{SOI}},\Delta \theta_{\mathrm{HP}},\\
               \Delta \theta_{\mathrm{LP}},\Delta\theta_{\mathrm{Hot}}\end{matrix}}
         &\sum_{k=1}^{H_p}\biggl(\omega_1||r_{\theta_{50}}(k)-\bm{\theta}_{50}(k)||^2_2 
           + \omega_2 ||r_{\tau}(k)-\bm{\tau}(k)||^2_2  \\[-7mm]
          & \hphantom{\sum} \quad + \omega_3 \theta_{\mathrm{HP}}(k)^2 
            + \omega_4  \theta_{\mathrm{LP}}(k)^2\biggl)  + \cdots \tagthis\\
\subject  & l_b \leq \begin{pmatrix} \bm{\theta}_{\mathrm{SOI}} \\
                \theta_{\mathrm{Hot}} \\ \theta_{\mathrm{HP}} \\ \theta_{\mathrm{LP}} 
                \end{pmatrix} \leq u_b  \\
          & \text{other conditions} 
\end{align*}