My Apologize, I am new here.
I am noticing my latex is not displaying in a processed format.
How do I do this?
\begin{document}
\begin{flalign}
\text{max} & \sum_{k\in K} \sum_{j\in S^k} \pi_{j}x{{j}^k} &\label{slnl-1} \
\text{such that: } & \pi{j} \geq 0,
& \qquad \forall {j \in J} \label{slnl-2} \
\begin{split} \label{slnl-3}
\left( w s{{j}^k} + \left(1- w \right) \left(r{{j}^k}- \pi_{j} \right) \right) x{{j}^k} \geq {}
&\left( w s{{i}^k} + (1- w ) r{{i}^k} \right) x{{j}^k} \
& – \left( 1- w \right) \pi_{i} – M q{_{i}^k}, \qquad \forall {k \in K, i,j \in S^k : i \neq j}
\end{split} \
% \end{align}
\end{document}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{gather}
a = b + c\
d = e + f \qquad g = h + i
\end{gather}
\end{document}
Best Answer
You can split the long constraint with
aligned
and also the conditions.Note that
\left(
and\right)
do no good in this context. Alsois wrong syntax and should be, more simply
(or for being consistent,
s_{j}^{k}
).There is no need of braces after
\forall
, which is not a command with argument.Finally, “s.t.” used in optimization reads “subject to”, not “such that”.