## 2 The Relaxed Flexible Flow Shop Problem Model with Sequence-Dependent Setup Times (RFFSP) Methods
### Crossover operator  
The crossover operator exchanges the chromosomes of two parents to create two new offspring [26]. This crossover operator uses a roulette procedure and a crossover rate \(\in\) (0, 1], and, by taking two parents (_parent\({}_{i}\)_, _parent\({}_{i+1}\)_) with \(i\) = 1, 2,..., _idmax_, produces two offspring (_child\({}_{i}\)_, _child\({}_{i+1}\)_). An example is shown in Figure 6, where _parent\({}_{1}\)_ = {1, 2, 3, 4, 5, 6, 7, 8} and _parent\({}_{2}\)_ = {A, B, C, D, E, F, G, H} with length 8, and the crossing point and crossing length of the _parent\({}_{1}\)_ are _p_(7) and _l_(4), respectively, resulting in two children, _child\({}_{1}\)_ = {1, 2, C, D, E, F, 7, 8} and _child\({}_{2}\)_ = {A, B, 3, 4, 5, 6, G, H}. This procedure is applied in line 11 of Algorithm 1. For example, if the solution shown in Figure 5 is used as one parent:  
**Parent 1:**\(O_{111}\to O_{131}\to O_{221}\to O_{122}\to O_{212}\to O_{232}\to O_{123} \to O_{213}\) and, in conjunction with other parent solution:  
**Parent 2:**\(O_{121}\to O_{211}\to O_{231}\to O_{122}\to O_{132}\to O_{212}\to O_{113} \to O_{133}\to O_{223}\) are used with the crossover operator, the next offspring are created:  
**Offspring 1:**\(O_{111}\to O_{131}\to O_{221}\to O_{122}\to O_{132}\to O_{212}\to O_{123} \to O_{133}\to O_{213}\)  
**Offspring 2:**\(O_{121}\to O_{211}\to O_{231}\to O_{122}\to O_{212}\to O_{232}\to O_{113} \to O_{133}\to O_{223}\)  
The main characteristic of this crossover operator is that it preserves the sequence order from stages 1 to \(n\) so that a circular crossover at a single point only exchanges the order of the jobs between stages, not the order of the stages, to avoid infeasible solutions. HGAG works with distributed processing. The distribution, communication, synchronization, and cooperation of the processes generated to execute the algorithm are explained below. HGAG uses MPI to execute processes on the Grid integrated by the Cuexcomate and the Texcal clusters (Figure 4). Each process is assigned to a single core through a uniform distribution when executing 5, 10, 15, 30, and 60 processes in a single cluster. If 120 processes are running, two clusters are used. Furthermore, it is possible to allocate more than one process per core, known as overhead [27], when 240 processes are executed, which can double the grid capacity. The architecture used is master/slave, where the master process collects and distributes the GA population, and the slave processes send and receive new solutions. As shown in Figure 4, the selection and crossover operators are conducted by the master process, and the mutation operations are running on the slave processes through the ACO and SA algorithms described in Sections 3.2 and 3.3, respectively. Figure 6: Roulette-based crossover operator. The distribution of both HGAG and the instances is performed using the Grid Morelos distributed file system. Before executing the algorithm, copies of code and instances are first sent to the master nodes of both clusters (Cuexcomate and Texcal). Then, the distributed file system sends the input data to all the slave nodes in the Grid. Communication between the master and slave processes is implemented using MPI functions and the TCP/IP protocol. Additionally, communication between geographically distant clusters is implemented using a VPN network, which groups them under the same network segment, allowing transparent communication. As shown in Figure 7, the processes generated by HGAG communicate between the master process and the slave processes at specific times. The algorithm begins by reading the benchmark file of the Distributed File System (DFS), then the slave processes generate the first solutions applying ACS and refining with SA. The solutions found are sent to the master process in a many-to-one relationship to build the initial population of the GA. Selection and crossover are applied below to explore the solutions space.