## Mathematical-Model Formulation
### Mathematical Formulation  
On the basis of the characteristics of minimizing energy consumption with job priority and makespan control for a parallel-machine-scheduling problem, the mathematical model is formulated. The details of index, parameters, decision variables, objective function, and constraints are as follows: \begin{tabular}{l l} Index & \\ \(i,j\) & Job indices; \(j\), \(i=1\), \(2\),..., \(I\) when \(i\) or \(j=0\), \(0\) represents the dummy node, \\  & which is always produced first in each machine \\ \(m\), \(n\) & Machine indices; \(m\), \(n=1\), \(2\),..., \(M\) \\ Parameters & \\ \(I\) & Total number of jobs \\ \(M\) & Total number of machines \\ \(P_{jm}\) & Processing time of job \(j\) on machine m \\ \(E_{jm}\) & Energy consumption for producing job \(j\) on machine m \\ \(D_{j}\) & Due date of job \(j\) \\ \(a_{j}\) & Penalty cost of job \(j\) (priority of job) \\ \(B\) & Cost per time units of processing with all machines. \\ \(A_{jm}\) & Job-machine restriction; \(A_{jm}=1\) when job \(j\) can produce on machine \(m\). \\ \(L^{MAX}\) & Maximal lateness that is allowed \\ \(T^{MAX}\) & Maximal number of tardy jobs that are allowed \\ \(KKK\) & Cost conversion for used energy \\ Decision Variable & \\ \(X_{ijm}\) & \(\left\{\begin{array}{ll}1&\textit{when job }i\textit{ immediately produces before job }j\textit{ in machine }m\\ 0&\textit{Otherwise}\\ 1&\textit{when job }j\textit{ is assigned to machine }m\\ 0&\textit{Otherwise}\\ \end{array}\right.\) \\ \(S_{jm}\) & Start time of job \(j\) on machine \(m\) \\ \(C_{jm}\) & Completion time of job \(j\) on machine m \\ \(L_{i}\) & Lateness of job \(i\) \\ \(T_{i}\) & \(\left\{\begin{array}{ll}1&\textit{when job }i\textit{ delivers late}\\ 0&\textit{otherwise}\\ \end{array}\right.\) \\ \end{tabular}   
Objective function  
\[min\ Z=\sum_{m=1}^{M}\sum_{j=1}^{I}E_{jm}Y_{jm}+\sum_{j=1}^{I}a_{j}T_{j}+\sum_ {m=1}^{M}B\times Max_{j=1}^{I}C_{jm} \tag{1}\]  
Subject to  
\[\sum_{j=1}^{1}X_{0 jm}\leq 1\ \forall\ m \tag{2}\]\[\sum_{m=1}^{M}\sum_{i=1,\ i\
eq j}^{I}X_{ijm}=1\ \forall\ j \tag{3}\] \[\sum_{j=1,\ i\
eq j}^{I}X_{ijm}\leq Y_{im}\ \forall\ i,\ m\] (4) \[\sum_{i=1,\ i\
eq j}^{I}X_{ijm}=Y_{jm}\ \forall\ j,\ m\] (5) \[\sum_{m=1}^{M}Y_{im}=1\ \forall\ i\] (6) \[S_{jm}=\sum_{i=1,\ i\
eq j}^{I}C_{im}X_{ijm}\ \forall\ j,\ m\] (7) \[C_{jm}\geq S_{jm}+P_{jm}\ \forall\ j,\ m\] (8) \[S_{0m}=0\ \forall\ m\] (9) \[C_{0m}=0\ \forall\ m\] (10) \[L_{i}=\ \left\{ \begin{array}{ll}Max_{m=1}^{M}C_{im}-D_{i}&if\ \ Max_{m=1}^{M}C_{im}\geq D_{i}&\forall\ i\\ 0&otherwise\end{array} \right.\] (11) \[L_{i}\leq L^{MAX}\ \forall\ i\] (12) \[T_{i}=\ \left\{ \begin{array}{ll}1&if\ L_{i}>0\\ 0&otherwise\end{array} \right.\ \forall\ i,\ j;\ i\
eq j\] (13) \[\sum_{i=1}^{I}T_{i}\leq T^{MAX}\ \forall\ j,\ m \tag{14}\]  
The objective function in Equation (1) attempts to minimize energy used to produce all jobs, the priority cost for jobs that deliver late, and the production-overhead cost per working hour. Equations (2) and (3) show that all jobs must be assigned to at most one machine, and the start of all assigned jobs must be Job 0 (dummy job). Equation (4) is the relationship constraint of \(X_{ijm}\) and \(Y_{im}\). Equation (5) confirms that job \(i\) is processed before job \(j\) in machine \(m\) only when job \(j\) is assigned to machine \(m\). Equation (6) ensures that a job can be assigned to at most one machine. Equation (7) calculates the starting time of job \(j\) in machine \(m\), and Equation (8) is the calculation of the completion time of job \(j\). Equations (9) and (10) define the starting and completion time of the dummy job. Equation (11) calculates the lateness of job \(i\), while Equation (12) is used to ensure that the lateness of job \(i\) does not exceed the predefined value (\(L^{MAX}\)). Equation (13) decides whether job \(i\) is late, and Equation (14) ensures that the number of tard jobs does not exceed the predefined number (\(T^{MAX}\)). The mathematical model was formulated and tested on Lingo software.