## 3 Related Work  
Flow shop problems have been studied since the early 1950s [14]. Several authors have employed mixed-integer programming, heuristics, and discrete-event simulation to deal with hybrid flow shops in different application areas [13; 15; 16]. The flow shop problem is NP-hard even for a problem with two-states, two identical parallel machines on one of both stages, and one machine on the other stage [17]. Hence, the problem we analyzed in this study is classified as NP-hard. In contrast to exact optimization methods, heuristics cannot verify the optimality of a solution. However, they can provide high-quality (or even near-optimal) solutions in short computational times, something that cannot be generally achieved with exact methods [18; 19].  
Several reviews on assembly flow shops can be found in the literature [11; 12]. A review of hybrid flow shops with the integration of batching components is provided in [13]. As stated by some authors, the makespan and time-based objectives dominate the literature in flow shop environments [11; 15]. Hence, the makespan is one of the most relevant objectives both in theoretical as well as in applied works.  
In the hybrid flow shop literature, two possible expressions of priority sets can be observed. First, there is a fixed defined ranking of priority groups such as \(P_{1}=\{j_{1}\}\), \(P_{2}=\{j_{2},j_{3}\}\), \(P_{3}=\{j_{4}\}\). Secondly, for each job \(j\), a set of preceding jobs \(P_{j}\) is defined [20].  
Some studies consider hybrid flow shop problems with batching machines, priority rules, and makespan objectives [20]. In the aforementioned work, a complex and realistic flow shop problem with changeover times, machine qualifications, and priority rules was analyzed. To deal with this problem, the authors have extended the NEH [21] considering machine qualification, skipping stages, and rule priorities. The authors concluded that the NEH heuristic provides good results for this type of flow shop problem.  
Additionally, for the hybrid flow shop problem with setup times, machine qualifications, delayed machine availability, lag times between the stages, and the makespan objective, other authors compared the priority rules of the \"shortest processing time,\" the NEH, and the \"longest processing time\", concluding that the NEH offers the best results [22]. A genetic algorithm for a hybrid flow shop with batching machines was introduced in [23]. In addition, the latter work allows jobs to skip stages. The initial solution for the genetic algorithm was generated by a \"longest processing time\" dispatching rule, followed by the \"earliest completion time\" heuristic for the following stages. A tabu search has also been proposed for a hybrid flow shop in [24]. This algorithm swaps two jobs in each iteration. The tabu list tracks pairs of jobs that were swapped in previous iterations to avoid loops. Three dispatching rules were compared for generating the initial solution: two variations of the \"longest processing time,\" with the sum of the processing times over all stages per order, and an alphanumeric ordering. As a result, the authors showed that none of these strategies performs significantly better than the other.  
A \"shortest processing time\" heuristic for a two-stage hybrid flow shop problem with polynomial runtime was introduced in [25]. Here, jobs can only be processed by one dedicated machine on stage one. In the following stages, all jobs are processed on one machine in the batch processing mode. The \"shortest processing time\" heuristic was employed for allocating the jobs on the first stage, and a combination of the \"earliest completion time\" and a minimization of the processing times for all batches was employed on the second stage. Due to the high complexity of the problem considered in our study, a large number of possible permutations need to be explored. As mentioned before, simulation can be useful for modeling, but it needs to be combined with optimization components in order to generate high-quality or even near-optimal solutions.