Size: 570
Comment:
|
Size: 734
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 14: | Line 14: |
{{attachment:imagefile.png|text describing image|height=100}} | {{attachment:optim1.png|text describing image}} |
Line 16: | Line 16: |
{{{ \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*} }}} |
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}}
\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*}