# A Genetic Crow Search Algorithm for Optimization of Operation Sequencing in Process Planning
## 4 A Genetic Crow Search Algorithm (GCSA) for Optimization of Operation Sequencing
### Genetic Components of the GCSA Approach  
When producing a new generation of individuals, selection, crossover and mutation represent the crucial components of genetic algorithms. By mimicking the process of natural selection, they enable a population of solutions to evolve during a certain number of generations. The first step in this process is a selection. A tournament selection operator has been adopted in this study. A few crow individuals from the flock are randomly selected to participate in the \"tournament\" and the crow individual with the highest fitness value wins the \"tournament\" and becomes a part of a new flock that consists of the best crow individuals that had previously won the competition. The selection step is followed by the crossover operator whose purpose is to provide information exchange between two crow individuals from a flock. In this case, the three-string crossover (3 SX) proposed by [PERSON] and [PERSON] [5] was adopted. The 3 SX operator affects only resource vectors, e.g., machine, tool and TAD vector respectively, leaving the operation sequence vector untouched and thereby assuring the feasibility of a process plan. The following steps characterize the 3 SX crossover operator:  
1. Two rows from a new flock are randomly selected as parent crows;
2. From random cutting point, two parent crows are divided into sections to produce two child crows;
3. Resources (machines, tools and TADs) from the right section of child crow 1 are replaced by resources of the same operations from parent crow 2;
4. Following the same pattern, resources in the right section of child crow 2 are replaced by resources of the same operations from parent crow 1. Figure 4 illustrates the 3 SX crossover operator applied on the 7-gene length crow individual, with a random cutting point between the 4 th and 5 th operation index. Mutation strategies bring a finishing touch to the genetic process of producing new and fitter individuals. They aim to make further improvements in diversification and avoid premature convergence of the algorithm. The first mutation operator used within the GCSA approach is the shift mutation illustrated in Figure 5. A single crow individual is randomly selected from a newly formed flock of crows and two genes (operations with its resources) are randomly selected for exchange. After exchanging the two, some of the precedence constraints may be violated, which affects the operation sequence and therefore the feasibility of a process plan. In that case, the repair mechanism has to be employed to ensure all the crows represent feasible individuals. The same mechanism is applied after the initialization stage of the GCSA. We adopted an approach similar to the constraint handling heuristic proposed by [PERSON] et al. [11]. The second mutation operator is the resource mutation which, similarly to the 3 SX crossover operator, operates on resource vectors, machine, tool and TAD vector respectively. The feasibility of operation sequence is therefore not questioned. The following are the steps of the resource mutation operator illustrated in Figure 6:  
1. Randomly select a crow individual;
2. Randomly select the mutation point, i.e., operation with its index;
3. Check available machines in the _Machines[]_ for selected operation;
4. Randomly select a machine from the _Machines[]_ as the current machine;
5. Identify other operations that have the same machine alternative in the _Machines[]_. 6. Assign the same machine alternative as the current machine for other operations. Figure 4: 3 SX crossover operator. (7) Repeat the same steps for tool and TAD vectors using the _Tool[]_ and the _TADs[]_ sets. As reported by [PERSON] et al. [4], fixed operators have shown to be less effective comparing to the adaptable operators, whose values vary in response to the fitness of individuals. To  
Figure 5: Shift mutation operator. Figure 6: Resource mutation operator.