I need to write a mathematical programming model composed of several constraints. Constraints are represented as two-columns rows: the first column is the equation and the second is its domain, e.g.
x_i > l_i & \forall i \in S
But both columns can be quite long so if on one hand it would be preferrable to have all of them aligned horizontally in some way, on the other one the colum ns may end up being splitted vertically or printed overruning other elements of the page.
I thought then that a decent solution would be to use one align-like environment so that each first column is aligned to the others and each second column is aligned to the others as well. However if no space for the eq. number is left on the line then I would like the second column, i.e. the domain, to be right-aligned so to fill the space after the first column to avoid the eq. number to be printed on the new line.
Consider the following
\documentclass[a4,13pt,reqno,twoside, openright]{article}
\usepackage[utf8x]{inputenc}
\usepackage{float}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\allowdisplaybreaks
\textwidth = 14cm
\hoffset = -1.5cm
\voffset = -2.0cm
\begin{document}
\begin{subequations}
\begin{align}
& y^D_{tzgm} \le y_{tzgm} & \forall t \in T, z \in Z, g \in G_z, m \in \overline{M}_{zg}
\\
& x_{tzg} \leq \sum_{m \in M_{zg}} P_{zgm} \cdot y_{tzgm} + \sum_{m \in \bar M_{zg}} (P^D_{zgm} - P_{zgm}) \cdot y^D_{tzgm} & \forall t \in T, z \in Z, g \in G_z\\
&x_{tzg} \geq \sum_{m \in M_{zg}} p_{zgm} \cdot y_{tzgm} + \sum_{m \in \bar M_{zg}} (p^D_{zgm} - p_{zgm}) \cdot y^D_{tzgm} & \forall t \in T, z \in Z, g \in G_z\\
& o_{1zh} = v_{0h} &\forall z \in Z, h \in H_z\\
& o_{(|T|+1)zh} = v_{(|T|+1)h} & \forall z \in Z, h \in H_z\\
& o_{tzh} + n_{th} + \eta_{h} \cdot m_{tzh} = o_{(t+1)zh} + s_{tzh} + l_{tzh} & \forall t \in T, z \in Z, h \in H_z
\end{align}
\end{subequations}
\end{document}
As you can see I get every eq. number on a new line because the first inequality has a too long domain. An approximation of the result I would like, obtained by adding space by hand, is
\documentclass[a4,13pt,reqno,twoside, openright]{article}
\usepackage[utf8x]{inputenc}
\usepackage{float}
\usepackage{subfig}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\allowdisplaybreaks
\textwidth = 14cm
\hoffset = -1.5cm
\voffset = -2.0cm
\begin{document}
\begin{subequations}
\begin{align}
& y^D_{tzgm} \le y_{tzgm} \qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad \mathrlap{\forall t \in T, z \in Z, g \in G_z, m \in \overline{M}_{zg}}
\\
& x_{tzg} \leq \sum_{m \in M_{zg}} P_{zgm} \cdot y_{tzgm} + \sum_{m \in \bar M_{zg}} (P^D_{zgm} - P_{zgm}) \cdot y^D_{tzgm} & \forall t \in T, z \in Z, g \in G_z\\
&x_{tzg} \geq \sum_{m \in M_{zg}} p_{zgm} \cdot y_{tzgm} + \sum_{m \in \bar M_{zg}} (p^D_{zgm} - p_{zgm}) \cdot y^D_{tzgm} & \forall t \in T, z \in Z, g \in G_z\\
& o_{1zh} = v_{0h} &\forall z \in Z, h \in H_z\\
& o_{(|T|+1)zh} = v_{(|T|+1)h} & \forall z \in Z, h \in H_z\\
& o_{tzh} + n_{th} + \eta_{h} \cdot m_{tzh} = o_{(t+1)zh} + s_{tzh} + l_{tzh} & \forall t \in T, z \in Z, h \in H_z
\end{align}
\end{subequations}
\end{document}
On a second note, do you think there are better ways to typeset these models?
TIA