# Multiple custom alignment in multiple line equation

I'm writing an optimization MILP model and I would like that for each constraint, the constraint itself be centered while the domain of the constraint e. g.\forall i \in I be aligned to the right side of the text in a different line. I've read a lot but I haven't obtained the results that I want. The most aproximated answer that I had was usingmultline environment. But as you'd probably know the first part of the equation is aligned to the left, not in the center as I want. Additionally I'd like the number of the equation in the middle of the two lines. The desired results would be something like this:

What I'm getting right know is:wich is the result of this code:

\begin{multline}
Z_{jjtmo}\geq Y_{jtm(o-1)}+Y_{jtmo}\\
\end{multline}


Thank you very much for your colaboration and God bless you!

Twos ways: either you consider the main expression is on the first line, and the equation number will be on the first line, usin the flalign environment. You can have several equations with alignment.

Or you want the equation number to be between the first and second line. You can achieve this with the gather/gathered environments, but all equations (except the domains) will be centred. Here are examples of both solutions:

\documentclass{article}
\usepackage[showframe]{geometry} %
\usepackage{mathtools}
\newcommand\domain[1]{\ensuremath{\makebox[0.9 \displaywidth][r]{\displaystyle$#1$}}}

\begin{document}

\begin{flalign}
& & & \sum_{l,m,o} x_{itlmo} - I_{i(t-1)} + H_i <80000 \\[-1ex]
& & & & & \mathllap{\forall t \in T, I \in I}\notag
\end{flalign}
\bigskip

\begin{gather}
\begin{gathered}
\sum_{l,m,o} x_{itlmo} - I_{i(t-1)} + H_i <80000 \\[-1ex]
\makebox[0.9\displaywidth][r]{$\forall t \in T, I \in I$}
\end{gathered}\\
\begin{gathered}a + b + c = u + v + w\\
\makebox[0.9 \displaywidth][r]{$\forall a, b, c \in \mathbf R, u, v, w \in \mathbf C$}
\end{gathered}
\end{gather}

\end{document}


• The equation number isn't in the midle of the expression and when the constraint occupies more than one line, It will look not pretty good. Do you know how to improve the result? Thanks... – Víctor Mario Noble Ramos Oct 26 '16 at 23:36
• Please take a look at my updated answer. That said, I personally find nicer the number on the first line, as it is, so to say, tha main part of the equation. – Bernard Oct 27 '16 at 0:22