# 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
### GCSA Methodology  
The traditional CSA has been implemented mostly on continuous optimization problems with a small number of research studies done on their application in combinatorial optimization. [PERSON] et al. [22] proposed a hybrid HCSA approach to solve the NP hard permutation flow shop scheduling problem (PFSP). They used several techniques to minimize the makespan of the PFSP, such as the smallest position value (SVP) rules to convert continuous to discrete values or job numbers, Nawaz-Enscore-Ham technique to generate a population of quality individuals and simulated annealing and variable neighborhood search algorithms to maintain the diversity of solution throughout the search process. [PERSON] et al. [23] used the binary CSA to solve the two-dimensional bin packaging problem, which is also an NP-hard combinatorial problem. This approach utilizes a sigmoid function for mapping real-valued solution into binary ones and specific knowledge repair operator to improve diversity and restore feasibility of infeasible solutions.  
The issues of the CSA are mostly expressed by low convergence rate and entrapment in the local optima, as reported in [PERSON] and [PERSON] [24]. Fine tuning of the algorithm and modifications performed by various authors significantly boosted the performances of the CSA. In our study, we attempt to improve the traditional CSA in order to solve the NP hard process planning optimization problem. Therefore, we introduce a hybridized approach based on the CSA and the main components of the GA. Moreover, adaptive probability coefficients for scaling crossover and mutation operators are included to achieve the trade-off between exploration and exploitation, [PERSON] et al. [4]. The steps of the GCSA approach are depicted on the flowchart in Figure 3.  
After initializing the starting parameters of both CSA and GA, the next step is to generate population of feasible individuals using vector-based representation that presents operation sequence, machine, tool and TAD vectors as components of a single process plan. Vectors representing positions of crows in a search space are then evaluated using fitness function described in Section 4.3. They are memorized as the best local solutions found so far by each crow, after which the best solution in the flock is stored. The main loop of the GCSA starts with the standard CSA steps described by Equations (1) and (2). After these steps, the nearest resource mechanism is employed to round the resulting vector elements to the nearest integers, according to the available machine, tool and TAD candidates. The process continues with the genetic strategies which are utilized to improve diversification of search process. Here, we adopted tournament selection, 3 SX crossover operator and two mutation operators, shift and resource mutation. Repair mechanism is required after the initialization stage and shift mutation to ensure feasibility of crow individuals. Then, the GCSA steps continue with the evaluation of objective function and the update of crow's memory and the best solution (global). The search finishes after a predefined number of iterations. In the following sections, some steps are expressed in a more detailed manner.