## 2 Mathematical Model
### Generalized Model Description
#### 2.2.1. Scheduling Constraints: Job On-Off Formulation  
This set of constraints is defined as job on-off implementation formulation, as we use one binary variable implying that the job is implemented inside some period or not. This definition of binaries in project scheduling problems is denoted as pulse or on-off in literature. So we use a variable \(U_{jt}\in\{0,1\}\), \(U_{jt}=1\) if job \(j\) is implemented in period \(t\), \(U_{jt}=0\) otherwise. Constraints (1) imply that no preemptions are allowed. \[(t_{2}-t_{1}-1)\leq\sum_{l=t_{1}+1}^{t_{2}-1}U_{il}+m(U_{j,t_{1}}+U_{j,t_{2}}- 2),\ \forall t_{1}\in T,\ t_{2}\in T,\ t_{1}<t_{2},\ \forall j\in J. \tag{1}\]  
If the job is implemented in some period \(t_{1}\in T\) and in some period \(t_{2}\in T\), \(t_{1}<t_{2}\), then it must be also implemented in any period \(t_{3}\in T\), \(t_{1}<t_{3}<t_{2}\). In other words, if for some job \(j\) there exists \(t_{1}\in T\), \(t_{2}\in T\), \(t_{1}<t_{2}\), such that \(U_{jt_{1}}=1\) and \(U_{jt_{2}}=1\), then \(\sum\limits_{t_{1}=t_{1}+1}^{t_{2}-1}U_{jt_{3}}=t_{2}-t_{1}-1\). Constraints (2) and (3) set the minimal and maximal limit of periods when a job may be implemented:  
\[\sum_{t\in T}U_{jt}\geq\lfloor\frac{d_{min,j}}{d}\rfloor,\ \forall j\in J; \tag{2}\]  
\[\sum_{t\in T}U_{jt}\leq\lceil\frac{d_{max,j}}{d}\rceil,\ \forall j\in J; \tag{3}\] \begin{table}
\begin{tabular}{l l} \hline \hline \multicolumn{2}{c}{**Scheduling decision variables**} \\ \hline \(U_{jt}\in\{0,1\}\) & on/off function : Equals 1 of job \(j\in J\) is implemented in period \(t\in T\), 0 otherwise \\ \(S_{jt}\in\{0,1\}\) & pulse start function : Equals 1 if job \(j\in J\) starts in period \(t\in T\), 0 otherwise \\ \(E_{jt}\in\{0,1\}\) & pulse end function : Equals 1 if job \(j\in J\) ends in period \(t\in T\), 0 otherwise \\ \(S_{jt}^{*}\in\{0,1\}\) & step start function : Equals 1 if job \(j\in J\) starts in \(\forall t_{1}\in T\), \(t_{1}\leq t\), 0 otherwise \\ \(E_{jt}^{*}\in\{0,1\}\) & step end function : Equals 1 if job \(j\in J\) ends in \(\forall t_{1}\in T\), \(t_{1}<t\), 0 otherwise \\ \(d_{jt}\in[0,d]\) & duration of job \(j\in J\) in period \(t\in T\) \\ \hline \multicolumn{2}{c}{**Resource allocation decision variables**} \\ \hline \(c_{jt}\in[0,dp_{max,jt}]\) & work volume of job \(j\in J\) with resource \(r\in R\) in period \(t\in T\) \\ \(o_{rt}\in[0,\infty)\) & extra cost of resource \(r\in R\) in period \(t\in T\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Model nomenclature: Decision variables notations. Figure 1: Three different ways to utilize binary scheduling variables. where \(d_{min,j}\) and \(d_{max,j}\) are minimal and maximal allowed job duration variables, respectively. This variables will be described in Section 2.3. Next two constraints make the correspondence between binary scheduling variable \(U_{jt}\) and job duration \(d_{jt}\). Firstly, if job \(j\in J\) is performed in three or more periods, then for all periods between start period and end period job duration is the same as period length, i.e., preemptions inside periods are not allowed. This constraints involve continuous duration and binaries variables \(d_{jt}=d\) if \(U_{j,t-1}=1\), \(U_{j,t}=1\), \(U_{j,t+1}=1\):  
\[(2-U_{j,t+1}-U_{j,t-1})d+d_{jt}\geq dU_{jt},\ \forall t\in T,\ \forall j\in J. \tag{4}\]  
Secondly, if job \(j\in J\) is not implemented in period \(t\in T\), it must have zero duration inside this period. So \(d_{jt}=0\) is required if \(U_{j,t}=0\):  
\[d_{jt}\leq dU_{jt},\ \forall t\in T,\ \forall j\in J. \tag{5}\]  
Precedence constraints are represented on two levels, on periods and inside each period. Firstly, we state that if there is a precedence \(\{j_{p},j_{s}\}\in P\) relation between two jobs, then it is impossible to implement the successor before the last period when predecessor is implemented (it is possible to start the successor at the last period of predecessor implementation).