Typesetting math: an optimisation problem (cost & constraints)

The following may be close to what you're looking for:

enter image description here

\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\diag}{diag}
\begin{document}
\[
\text{Minimize\quad} 
\| A^{\text{ind}} w \diag(x^{\text{ind}}) \| 
\]
\[ 
\begin{array}{r @{}c@{} c @{}c@{} l}
\text{subject to:\quad}w&{}={}&\multicolumn{1}{@{}l}{b-s+w^0}\\
l^b &\le& b &{}\le{}& u^b\\
l^s &\le& s &\le& u^s\\
l^{\text{bukd}} &\le&  t(b+s) &\le& u^t\\
l^{\text{bukd}}  &\le& A^{\text{dur}} w \diag(x^{\text{buk}}) 
   &\le& u^{\text{bukd}}\\
l^{\text{curp}}  &\le& A^{\text{dur}} w \diag(x^{\text{cur}}) 
   &\le& u^{\text{curp}}\\
\end{array}
\]
\end{document}

The syntax governing the array environment may seem a bit dense at first, so here's a quick guide:

  • the two @{}c@{} constructs serve to position the equality/inequality symbols; the @{} directive suppresses the normal amount of intercolumn whitespace,
  • the r, c, and l directives serve to position the remaining material,
  • in the first row of the array, the {}={} stuff informs LaTeX that the = symbol should be treated as a relation operator (by inserting a bit of whitespace on either side); the same goes for the {}\le{} in the second row of the array. (Note that it's only necessary to specify the extra {} stuff once per column.)
  • In the first row of the array, the material on the RHS of the equality relation is forced flushleft via a \multicolumn{1}{@{}l}{...} statement. The @{} before the "l" is there to suppress LaTeX's default behavior of (re)inserting extra intercolumn whitespace in the amount of \arraycolsep.

Finally, I've placed the "minimize" and "subject to" groups into two separate displaymath environments. This inserts a bit more space and, should the need to do so arise, facilitates inserting a page break between the two groups.


Well, you can use the following for further improvements (you can remove \qquad, avoid \parallel etc.) but it will be progressively uglier;

\documentclass{article}
\usepackage{mathtools}

\DeclarePairedDelimiter{\diagpars}{(}{)}
\newcommand{\diag}{\operatorname{diag}\diagpars}
\newcommand{\norm}[1]{\displaystyle \left\| #1 \right\|}

\begin{document}
\[
\begin{matrix}
\text{minimize} &&& \norm{A^{\text{ind}} w \diag{x^{\text{ind}}}}\\
\text{subject to } &&& w=b-s+w^0\\
& l^b             &\le &b                                             &\le &u^b\\
& l^s             &\le &s                                             &\le &u^s\\
& l^{\text{bukd}} &\le &t(b+s)                                        &\le &u^t\\
& l^{\text{bukd}} &\le &A^{\text{dur}} w \text{ diag}(x^{\text{buk}}) &\le &u^{\text{bukd}}\\
& l^{\text{curp}} &\le &A^{\text{dur}} w \text{ diag}(x^{\text{cur}}) &\le &u^{\text{curp}}\\
\end{matrix}
\]
\end{document}

enter image description here

Instead reformulate what your constraint is actually meaning for example b\in[l^b,u^b] etc.


A simple solution would simply be left aligning the constraints, by using a single alignment character:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{aligned}
\text{minimize}\qquad & \| A^{\text{ind}} w \text{ diag}(x^{\text{ind}})\|\\
\text{subject to }\qquad & w=b-s+w^0\\
& l^b \le b \le u^b\\
& l^s \le s \le u^s\\
& l^{\text{bukd}} \phantom{\le}  t(b+s) \le u^t\\
& l^{\text{bukd}} \le A^{\text{dur}} w \text{ diag}(x^{\text{buk}}) \le u^{\text{bukd}}\\
& l^{\text{curp}} \le A^{\text{dur}} w \text{ diag}(x^{\text{cur}}) \le u^{\text{curp}}\\
\end{aligned}
\]
\end{document}

Would then produce the following:

Output