## 3 Mathematical Model  
The mathematical model of the problem we intend to solve, described in this section, was inspired by a model proposed by [22], although there are some significant differences between them. In the original model both earliness and tardiness were to be minimized. In our case study company, earliness is not considered as an issue, thus only tardiness is considered leading to a difference in the objective function. Furthermore, in the original model changeover occur whenever two jobs from different families are sequenced one after the other but this time is constant. In our case, when a setup time occur, this time depends of the sequence of jobs \(i\) and \(j\), considering the time required to dismount the mold to produce \(i\) plus the time necessary to mount the mold to process \(j\). Thus, unlike the original model we consider a sequence dependent setup time, which lead to a difference in the way the setups are considered in the model, specifically in the equations used to determine the completion time of a given job. Finally and this is probably the main difference between the models, in [22] the model is developed for identical parallel machines, which means that any job can be processed in any machine. In our case study company, a job can only be processed in a subset of the available machines. This has led to the introduction of a new constraint (3) to ensure that a job is always allocated to a compatible machine. Below, we provide the inputs of our model:  
* \(m:\) Number of molds
* \(n:\) Number of jobs
* \(r:\) Number of machines
* \(f_{j}:\) Mold for job \(j\)
* \(d_{j}:\) Due date of job \(j\)
* \(p_{j}:\) Processing time of job \(j\)
* \(A_{j}:\) Time to mount the mold of job \(j\) on the machine
* \(D_{j}:\) Time to dismount the mold of job \(j\)\(M_{jk}\): The setup time when job \(k\) follows job \(j\) on a machine. This setup time is equal to the time to dismount the mold used by \(j\) (\(D_{j}\)) plus the time to mount the mold used by \(k\) (\(A_{k}\)), if \(j\) and \(k\) require different molds. Thus: \(M_{jk}=\ A_{k}+D_{j}\) if \(f_{j}\
eq f_{k}\) 0 otherwise
* \(CF_{jb}\): Binary variable denoting if job \(j\) is compatible with machine \(b\):
* \(CF_{jb}=\ \left\{ \begin{array}{c}1\text{ if job }j\text{ is compatible with machine }b\\ 0\text{ otherwise}\end{array} \right.\)
* \(G\): \"Big M,\" sufficiently large number to make the problem solvable by linear programming. In our case, \(G\) should be much higher than the ending time of any job. The decision variables of our model are the following:
* \(C_{j}:\) Completion time of job \(j\)
* \(T_{j}:\) Tardiness of job \(j\)
* \(\alpha_{jb}\): Binary variable denoting if \(j\) is the first job to be processed on machine \(b\): \(\alpha_{jb}=\left\{ \begin{array}{c}1\text{ if job }j\text{ is the first to be processed on machine }b\\ 0\text{ otherwise}\end{array} \right.\)
* \(\theta_{jk}\): Binary variable denoting if job \(k\) is scheduled right after job \(j\): \(\theta_{jk}=\left\{ \begin{array}{c}1\text{ if job }k\text{ is immediately processed after job }j\\ 0\text{ otherwise}\end{array} \right.\)
* \(\beta_{jb}\): Binary variable denoting if job \(j\) is processed on machine \(b\) but not in the first place: \(\beta_{jb}=\left\{ \begin{array}{c}1\text{ if job }j\text{ is processed on machine }b\text{ but not on the first place}\\ 0\text{ otherwise}\end{array}