## 5 Mathematical Models
### Mathematical Model before the Disruption  
The proposed model is based on the sequence position formulation [73; 74], it consists in assigning each job to a position. A _bigM_ constraint is included, proposed by [PERSON] and [PERSON], for making the model in a linear form [75]. The model parameters are given below:  
_N:_ The set of jobs \(\{1,2,\ldots,n\}\). _K:_ The set of positions \(\{1,2,\ldots,n\}\). _j:_ The index of job \(j\) =1, 2, \(\ldots,n\). _k:_ The index of the position \(k\) =1, 2, \(\ldots,n\). _p:_ The processing time of job \(j\). _r:_ The release date of job \(j\). _w:_ The weight of job \(j\). _M:_ big value, \(M\ =\ \sum\limits_{j\ =\ 1}^{n}p_{j}+\max r_{j}\)  
The decision variables are defined as follows:  
\(x_{jk}\ =\ \left\{ \begin{array}{ll}1&if\ job\ j\ is\ assigned\ to\ k^{th}\ position\\ 0&otherwise\end{array} \right.\)  
_W:_ The waiting time of job \(j\). _C:_ The completion time of job \(j\). _S:_ The starting time of job in \(k\)th position. _Cp:_ The completion time of job in \(k\)th position. The objective function: \(Min\sum\limits_{j\ =\ 1}^{n}w_{j}W_{j}\ s.t\):  
\[\sum\limits_{j\ =\ 1}^{n}x_{jk}\ =\ 1\forall k\in K \tag{1}\]  
Figure 3: The flowchart of the proposed strategy. \[\sum_{k\ =\ 1}^{n}\ x_{jk}\ =\ 1\forall j\in N \tag{2}\] \[S_{k}\geq\sum_{j=1}^{n}\ r_{j}x_{jk}\forall k\in K\] (3) \[S_{k+1}\geq S_{k}+\sum_{j=1}^{n}p_{j}x_{jk}\forall k\in 1\ldots n-1\] (4) \[Cp_{k}\ =\ S_{k}+\sum_{j=1}^{n}p_{j}x_{jk}\forall k\in K\] (5) \[C_{j}\geq Cp_{k}-M(1-x_{jk})\forall j\in N,\forall k\in K\] (6) \[C_{j}\leq Cp_{k}+M(1-x_{jk})\forall j\in N,\forall k\in K\] (7) \[W_{j}\ =\ C_{j}-p_{j}-r_{j}\forall j\in N\] (8) \[S_{k},\ Cp_{k},\ W_{j},\ and\ C_{j}\geq 0\forall j\in N,\forall k\in K\] (9) Figure 3:0  
Constraint (1) consists in having only one job per position. Constraint (2) consists in having only one position per job. Constraint (3) consists in making the starting time of \(k^{th}\) position greater than or equal to assigned release date. Constraint (4) consists in making the starting time of \((k+1)\)th position greater than or equal to the previous position completion time. Constraint (5) specifies that the completion time of \(k\)th position is equal to the starting time of \(k\)th position plus the assigned processing time. Constraint (6) defines the completion time of job \(j\), which is greater than or equal to the completion time of assigned position, where \(M\) must be sufficiently large. Accordingly, it is assumed that the value of \(M\) is a function of the total completion times and maximum value of the release dates, for considering the jobs availability. Thus, \(M\ =\ \sum_{j=1}^{n}p_{j}+\max r_{j}\). Constraint (7) is a cut that allows reducing the computing time. Constraint (8) defines the waiting time of the job \(j\), according to its completion time, release date and processing time, Constraint (9) consists in making all variables greater than or equal to zero. Constraint (10) consists in having a binary decision variable. **Example 1**. : _In this example, the processing times \(p_{j}\), the release dates \(r_{j}\) and the weights \(w_{j}\) for 5 jobs are given in Figure 3:1 The weight values are between 1 and 5, they represent 5-emergency levels or 5 priority levels of customers. The processing times can represent the durations of operations or a product manufacturing time and follow a uniform distribution between 1 and 4, obtaining operations of 1 ut (10 min) to 4 ut (40 min). The release dates represent the availability of the jobs. In the initial problem, we assumed that \(r_{j}\)follow a uniform distribution between 1 and 2, in order to have an initial solution on which we generated the disruptions. More details about the instances' generation are presented in Section 6.1._  
The solution is given with the objective of minimizing the total weighted waiting times. Thus, the obtained optimal sequence is CAEDB and the obtained value is \(\sum_{j=1}^{5}w_{j}W_{j}\ =\ 31\). The optimal solution and its relative calculations are given in Figure 3:2