Align Equations with keeping Equation Numbering

alignamsmathequationsnumbering

I am trying to write more than one equation with numbering, but when using the \begin{align} instead of \begin{equation} the numbering disappears. Here are my equations with some split in two lines.
I have searched for similar questions to my question but I couldn't solve the issue.

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{siunitx} %
\usepackage{textcomp}
\usepackage{hyperref}
\begin{document}
%-------------------this is part from chapter 3 ------ 
    %objective eq1
    \begin{equation}
    \label{eq:3.1}
    Min \quad \sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{isrk}^{t} 
    \end{equation}
    Subjected to:
    %eq2
    \begin{equation}
    \label{eq:3.2}
    \vert{p_i}-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{isrk}^{t}\vert{} \leq \delta,\qquad\forall{i}\in\{{1,\ldots,N}\} \end{equation}
    %eq3
    \begin{equation} \label{eq:3.3} \sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G}  v_{isrk}^{t} \leq{L},\qquad 
    \forall {t} \in {\{{1,\ldots,T}\}} \end{equation}
    %eq4
    \begin{equation}\label{eq:3.4} \sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H}v_{isrk}^{t} +\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H}x_{isrk}^{t} \leq{1},\qquad \forall {t} \in {\{{1,\ldots,T}\}} \end{equation}
    %eq5
    \begin{equation} \label{eq:3.5}
        \begin{multlined}
        \sum_{i=1}^{N} x_{isrk}^{t} \leq \sum_{i=1}^{N}(u_{isrk}^{t}-u_{is(r+1)k}^{t}),\\ \qquad \forall {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H-1}\}},
        {k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}    
        \end{multlined}
    \end{equation} 
    %eq6
    \begin{equation}\label{eq:3.6}
        \begin{multlined}
        {\sum_{s^{'}=1 {,{s^{'}\neq s}}}^{N} \sum_{r=1}^{H} y_{i{s^{'}rk}}^{t}} \geq {\sum_{r=1}^{H}x_{isrk}^{t}},\\ \qquad \forall {i} \in {\{{1,\ldots,N}\}},{s} \in {\{{1,\ldots,C}\}},
        {k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}    
        \end{multlined}
    \end{equation} 
    %eq7
    \begin{equation}\label{eq:3.7}
        \begin{multlined}
        \sum_{i=1}^{N} v_{isrk}^{t} + \sum_{i=1}^{N} y_{isrk}^{t} +\sum_{i=1}^{N} x_{isrk}^{t} \leq {1}, \\ \qquad \forall {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H}\}},{k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}    
        \end{multlined}
    \end{equation}
\end{document}

enter image description here

Thank you all for your comments, I have tried the following and It worked. Now the equations are aligned to the left side of the page.

    \documentclass[12pt,twoside]{report}
    \usepackage[utf8]{inputenc}
    \usepackage{amssymb}
    \usepackage{amsmath}
    \usepackage{mathtools}
    \usepackage{siunitx} %
    \usepackage{textcomp}
    \usepackage{hyperref}
    \begin{document}
        %-------------------this is part from chapter 3 ------ 
    \begin{align}
    %objective eq1
    &\text{Objective:} \nonumber \\
    & Min \quad \sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{isrk}^{t}\label{eq:3.1} \\ 
    &\text{Subjected to} \nonumber \\
    %eq2
    &\vert{p_i}-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{isrk}^{t}\vert{} \leq \delta,\qquad\forall{i}\in\{{1,\ldots,N}\}\label{eq:3.2}\\
    &\begin{multlined}
    \sum_{i=1}^{N} x_{isrk}^{t} \leq \sum_{i=1}^{N}(u_{isrk}^{t}-u_{is(r+1)k}^{t}),\\ \qquad \forall {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H-1}\}},
    {k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}   
    \end{multlined}\label{eq:3.3}\\%eq3
    &\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H}v_{isrk}^{t} +\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H}x_{isrk}^{t} \leq{1},\qquad \forall {t} \in {\{{1,\ldots,T}\}}\label{eq:3.4}\\%eq4 
    &\begin{multlined} 
    \sum_{i=1}^{N} x_{isrk}^{t} \leq \sum_{i=1}^{N}(u_{isrk}^{t}-u_{is(r+1)k}^{t}),\\ \qquad \forall {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H-1}\}},{k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}\end{multlined}\label{eq:3.5}\\%eq5
    &\begin{multlined}
    {\sum_{s^{'}=1 {,{s^{'}\neq s}}}^{N} \sum_{r=1}^{H} y_{i{s^{'}rk}}^{t}} \geq {\sum_{r=1}^{H}x_{isrk}^{t}},\\ \qquad \forall {i} \in {\{{1,\ldots,N}\}},{s} \in {\{{1,\ldots,C}\}},{k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}\end{multlined}\label{eq:3.6} \\ %eq6 
    &\begin{multlined}
    \sum_{i=1}^{N} v_{isrk}^{t} + \sum_{i=1}^{N} y_{isrk}^{t} +\sum_{i=1}^{N} x_{isrk}^{t} \leq {1},\\ \qquad \forall {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H}\}},{k} \in {\{{1,\ldots,G}\}},{t} \in {\{{1,\ldots,T}\}}\end{multlined}\label{eq:3.7}\\%eq7
    & u_{isr1}^{1}=I_{isr},\qquad \forall {i} \in {\{{1,\ldots,N}\}}, {s} \in {\{{1,\ldots,C}\}},{r} \in {\{{1,\ldots,H}\}}\label{eq:3.8}\\
\end{align}
\end{document}

enter image description here

Best Answer

My answer use the specific package optidef: a LaTeX library for optimization problems with the [short] option (with the short code) and without it.

I have cleaned a bit your preamble deleting the \usepackage{amsmath} and leaving \usepackage{mathtools} that is a supremum package. I have used:

\usepackage{geometry}
\usepackage{parskip}

just to have an equilibrium for the a4paper and to have not the indent space to begin of a paragraph. Using the option mini! you create the subequations and without ! you have a only numbered equation. In addition I have used other specific commands like \lvert and \rvert, typical to create \abs command.


\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{amssymb}

\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage[short]{optidef}
\usepackage{parskip}

\begin{document}
Objective:
\begin{mini!}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{\textup{isrk}}^{t} \protect \label{eq:3.1}}{}{}
\addConstraint {\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{\textup{isrk}}^{t}\rvert}{\leq \delta,}{\quad\forall{i}\in\{{1,\ldots, N}\}}
\addConstraint { \text{left side} }{=\text{right side},}{\quad \forall{i}\in\{{1,\ldots,N}\}}
\end{mini!}    

\begin{mini}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{\textup{isrk}}^{t} \protect \label{eq:3.2}}{}{}
\addConstraint {\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{\textup{isrk}}^{t}\rvert}{\leq \delta,}{\quad\forall{i}\in\{{1,\ldots, N}\}}
\addConstraint { \text{left side} }{=\text{right side},}{\quad \forall{i}\in\{{1,\ldots,N}\}}
\end{mini}    

\end{document}

enter image description here

Deleting the option [short], you will have the full words (minimize and subject to):

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{optidef}
\usepackage{parskip}

\begin{document}
Objective:
\begin{mini!}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{\textup{isrk}}^{t} \protect \label{eq:3.1}}{}{}
\addConstraint {\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{\textup{isrk}}^{t}\rvert}{\leq \delta,}{\quad\forall{i}\in\{{1,\ldots, N}\}}
\addConstraint { \text{left side} }{=\text{right side},}{\quad \forall{i}\in\{{1,\ldots,N}\}}
\end{mini!}    

\begin{mini}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{\textup{isrk}}^{t} \protect \label{eq:3.2}}{}{}
\addConstraint {\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{\textup{isrk}}^{t}\rvert}{\leq \delta,}{\quad\forall{i}\in\{{1,\ldots, N}\}}
\addConstraint { \text{left side} }{=\text{right side},}{\quad \forall{i}\in\{{1,\ldots,N}\}}
\end{mini}    

\end{document}

enter image description here

Addendum 1: Just after the comment of nice user @Zarko I have put another row to write long condition which OP put in separate lines in equations.

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{optidef}
\usepackage{parskip}

\begin{document}
Objective:
\begin{mini!}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{isrk}^{t} \protect \label{eq:3.1}}{}{}
\addConstraint{\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{isrk}^{t}\rvert}{\leq \delta,}{\qquad\forall{i}\in\{1,\ldots, N\}}
\addConstraint{\sum_{i=1}^{N} x_{isrk}^{t}\leq \sum_{i=1}^{N}(u_{isrk}^{t}-u_{is(r+1)k}^{t}),\protect \label{eq:3.3}}{\quad}{\quad\begin{matrix}
     \forall s \in \{1,\ldots,C\},\\
      r \in \{1,\ldots, H-1\}, \\
      k \in \{1,\ldots,G\}, \\
      t \in \{1,\ldots,T\} 
\end{matrix}}
\end{mini!}    
\end{document}

enter image description here

The other equations can be added using a mechanism of the same design.

Addendum 2: Given the request of @A Azab as by comment the \addConstraint have almost 3 arguments. I have done several tests and in the first argument you can't split the equations like in your code. But in the third argument you can achieve your request with some unrefined and rough tricks.

\addConstraint{first argument}{second argument}{third argument}

See the part:

\addConstraint{
        \sum_{i=1}^{N} v_{isrk}^{t} + \sum_{i=1}^{N} y_{isrk}^{t} +\sum_{i=1}^{N} x_{isrk}^{t}}{\leq 1}{\begin{matrix}
        & \\[3.5em]
       \hspace{-5cm} \forall i\in \{1,\ldots,N\}, s \in \{1,\ldots,C\},r \in\{1,\ldots,H\}\protect\label{eq:3.8}
        \end{matrix}}

\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{geometry}
\usepackage{optidef}
\usepackage{parskip}

\begin{document}
Objective:
\begin{mini!}
{}{\sum_{i=1}^{N} \sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} y_{isrk}^{t} \protect \label{eq:3.1}}{}{}
\addConstraint{\lvert p_i-\sum_{s=1}^{C} \sum_{r=1}^{H} \sum_{k=1}^{G} \sum_{t=1}^{T} v_{isrk}^{t}\rvert}{\leq \delta,}{\qquad\forall{i}\in\{1,\ldots, N\}}
\addConstraint{
    \sum_{i=1}^{N} v_{isrk}^{t} + \sum_{i=1}^{N} y_{isrk}^{t} +\sum_{i=1}^{N} x_{isrk}^{t}}{\leq 1}{\begin{matrix}
    & \\[3.5em]
   \hspace{-5cm} \forall i\in \{1,\ldots,N\}, s \in \{1,\ldots,C\},r \in\{1,\ldots,H\}\protect\label{eq:3.8}
    \end{matrix}}
\end{mini!}    
\end{document}

enter image description here

Related Question