## 3 Methodology--Mathematical Modelling and Heuristic Optimization Method
#### 3.2.1 Black Hole Optimization-Based Clustering
Algorithm-specific parameters are the following: switch parameter between local and global search, distribution function parameters for Levy flight, termination criteria, and the number of pollen grains. * _calculation of the initial solutions_: in this phase, the initial potential solutions of the optimization problem are defined. * _evaluation of pollen grains_: within the frame of this phase, pollen grains are evaluated based on the objective function of the optimization problem. * _initialization of iteration phase_: in this phase, a random number \(h\in[0,1]\) is generated to switch between global and local search option. If \(h\leq h^{*}\) then global pollination (biotic pollination) takes place otherwise local pollination (abiotic pollination) takes place. * _biotic pollination phase_: this phase represents the global search in the search space. The operator is based on Levy flight and can be defined as follows: \[\omega_{i}^{t+1}=\omega_{i}^{t}+L(\lambda)\Big{(}\omega_{i}^{best,t}-\omega_{ i}^{t}\Big{)}\] (37) where \(\omega_{i}^{t}\) is the value of variable \(i\) at iteration step \(t\), \(\omega_{i}^{best,t}\) is the value of variable \(i\) at iteration step \(t\) in the case of the global best solution and \(L(\lambda)\) is the Levy distribution. * _abiotic pollination_: this phase represents a local search, in which pollen grains are spread to a local neighbor: \[\omega_{i}^{t+1}=\omega_{i}^{t}+\psi\Big{(}\omega_{\theta}^{t}-\omega_{ \xi}^{t}\Big{)},\ \ \omega\
eq i\wedge\zeta\
eq i\] (38) where \(\omega_{\theta}^{t}\) and \(\omega_{i\xi}^{t}\) are random selected pollen grains about the neighborhood of the currently processed pollen grain and \(\psi\in[0,1]\) is a random number. * _transformation of the continuous representation into permutation-based representation_: within the frame of this phase the continuous variables are transformed into discrete numbers describing a permutation-based problem. We are using the smallest position value rule and the largest order value rule [112] for this transformation (Table 4). * _checking the termination criteria_: in this phase, the following termination criteria's can be checked: computational time, iteration steps, the value of the best solution, lower limit of convergence speed. Within the frame of the remaining part of this chapter, we will demonstrate the performance of the above-mentioned hybrid heuristic optimization method including clustering, assignment, and scheduling problems. In this scenario, 36 assembly stations are in around and there are 12 supply-demands to be clustered, routed, and scheduled. Table 5 shows the input parameters of the scenario, while Table 6 demonstrates the optimal clustering of the 12 supply-demands. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Pollen Grain Value** & **Index Number** & **Permutation Rule SPV** \\ \hline
12.31 & 1 & 6 \\
8.24 & 2 & 4 \\ \(-\)24.51 & 3 & 1 \\
9.25 & 4 & 5 \\
0.15 & 5 & 3 \\ \(-\)1.35 & 6 & 2 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Example of the transformation of a continuous representation of pollen grains to permutation representation [112]. The upper limit of loading capacity of the AGVs is 38 and the clustering algorithm has found the best clusters for extended scheduling and routing with a maximum capacity of 34 and 35 LUs. Figure 12 demonstrates the solution of extended clustering and routing problems including two routes. The value of the objective function is 137 min, while the total length of the unloaded sections is 3468 m.  
Increasing the available loading capacity of AGVs the extended clustering and routing gives a better solution (Figure 13), because the time frame devianc