## 2 Mathematical Model
### Generalized Model Description  
For any kind of RLP, it is possible to separate the set of variables into two subsets, related to job scheduling and resource allocation. The subset of scheduling variables for discrete-time period models is well studied in project scheduling (starting from pioneer introduction of a 1-0 variable approach by [PERSON] et al. [17]). Usually, it is a set of binaries that configure staring and ending periods. If we consider precedence relations and allow the successor to start we also use continuous duration variables responsible for the duration inside the period. We define binary variables responsible for the job starts and ends as \(S_{jt}\) and \(E_{jt}\), respectively. They may be used in several ways.  
* As a step pointer, i.e., if job \(j\) starts at period \(t\), then \(\forall t_{1}<t\;S_{jt_{1}}=0\) and \(\forall t_{2}\geq t\;S_{jt_{2}}=1\). In this case the same logic is implemented for \(E_{jt}\), if a job ends at period \(t\), than for \(\forall t_{1}\leq t\;E_{jt}=0\) and \(\forall t_{2}>t\;E_{jt}=1\). To the best of our knowledge, in similar resource leveling models step pointer to job start and end periods is more common (for example, it was used by [PERSON] et al. [10], [PERSON] et al. [16]).
* As an on-off (also referred as pulse) pointer, i.e., if job \(j\) starts at period \(t\), then \(\forall t_{1}\
eq t\;S_{jt_{1}}=0\) and \(S_{jt}=1\) (the same logic for \(E_{jt}\)). This approach was considered by [PERSON] and [PERSON], [18]. There is an alternative way, with an on-off function \(U_{jt}\), where \(U_{jt}=1\) if job \(j\) is implemented at period \(t\), and \(U_{jt}=0\) otherwise.  
These approaches were also presented and compared in literature related to project scheduling, for example, see [19; 20].  
The second subset defines resource-allocation decision variables. We propose to generalize it and introduce separate fraction decision variables for each resource type instead of aggregated job fraction decision variables. In our case, these decision variables were defined as \(c_{jrt}\). This approach makes an independent allocation of each resource type for every job. It leads to more flexible utilization of resources. However, it increases the size of the model and negatively affects performance, so it may require more computational resources to achieve a proofed optimal solution. We present a list of decision variable notations used in this paper in Table 2.  
In the next subsections we describe three different approaches to represent scheduling constraints with binary variables. A general description of each type is presented in Figure 1.  
\begin{table}
\begin{tabular}{l l} \hline \hline \multicolumn{3}{c}{**Parameters**} \\ \hline \(T\) & planning horizon, \(T=\{1,\ldots,m\}\) \\ \(d\) & period length \\ \(R\) & resources set \\ \(L_{rt}\) & availability of resource \(r\in R\) in period \(t\in T\) \\ \(e_{r}\) & extra resource cost \\ \(J\) & jobs set \\ \(W_{jr}\) & job \(j\in J\) work volume with resource \(r\in R\) \\ \(p_{min,jr}\) & job \(j\in J\) minimal requirement per period in resource \(r\in R\) \\ \(p_{max,jr}\) & job \(j\in J\) maximal requirement per period in resource \(r\in R\) \\ \(P\) & set of arcs in the given precedence graph \\ \hline \hline \end{tabular}
\end{table}
Table 1: Model nomenclature: Parameters notation.