## 3 Methodology--Mathematical Modelling and Heuristic Optimization Method
#### 3.2.1 Black Hole Optimization-Based Clustering
There are 12 tasks which must be clustered within a predefined time frame so that the objective function is the minimization of time deviance of average supply time (1), while time and capacity related constraints (5)-(8) must be taken into consideration. As Table 2 shows, the loadings to be supplied are given in loading units. The algorithm clustered the dataset given in Table 2 and resulted a time deviance of 104 min, while the constrained loading capacity of AGVs was not exceeded. Within the frame of the extended optimization of logistics resources of matrix production, we are using the above-mentioned black hole optimization-based clustering algorithm to find the best sets of supply-demands to be assigned to supply routes in order to minimize the time deviance from the time frames. As Table 3 shows, in this simple scenario, two supply routes must be performed to minimize the objective function while the upper limit of available AGVs is not exceeded. 2.2 Discretized Flower Pollination-Based Routing and Scheduling for Extended and Real-Time Optimization  
Flower pollination algorithm is used in many fields of science: maximizing area coverage in wireless sensor networks [106], sizing optimization of truss structures [107], economic dispatch problems in modern power systems [108], optimizing wire electrical discharge machining [109], or calculation of maximum permitted capacity of photovoltaic in distribution network [110]. The flower pollination algorithm takes its metaphor from nature, from the pollination process of plants. Pollination is the act of transferring pollen grains from the male anther of a flower to the female stigma. External agents are responsible for the transportation of pollen grains. Typical agents are the following: insects, wind, birds, mammals, or water. Floral pollination algorithms are based on this natural phenomenon and their most important rules are the followings: [111]: the potential solutions of the optimization problem are represented by pollen grains; the global search in the search space is modelled through the biotic pollination; the local search in the search space is modelled by abiotic pollination and self-pollination; the global and local search is controlled through a switching probability between biotic, abiotic, and self-pollution. The algorithm has the following phases: \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Tasks**} & \multicolumn{2}{c}{**Relation**} & \multicolumn{2}{c}{**Time Frame Limit**} & \multirow{2}{*}{**Loading 2**} \\ \cline{2-2} \cline{5-6}  & **From** & **To** & **Lower** & **Upper** & \\ \hline
1 & 7 & 14 & 10:10 & 10:50 & 2 \\
2 & 8 & 12 & 10:00 & 11:00 & 4 \\
3 & 9 & 11 & 10:15 & 11:10 & 6 \\
4 & 16 & 20 & 10:35 & 11:20 & 8 \\
5 & 32 & 36 & 11:15 & 11:35 & 1 \\
6 & 2 & 5 & 10:05 & 10:35 & 3 \\
7 & 8 & 1 & 10:32 & 11:00 & 5 \\
8 & 22 & 33 & 10:40 & 11:25 & 7 \\
9 & 5 & 9 & 10:45 & 11:30 & 8 \\
10 & 14 & 22 & 10:20 & 10:55 & 5 \\
11 & 8 & 13 & 10:55 & 11:30 & 3 \\
12 & 3 & 11 & 10:12 & 10:45 & 9 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Input parameters of the clustering problem 1. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Tasks**} & \multicolumn{2}{c}{**Relation**} & \multirow{2}{*}{**Loading**} & \multirow{2}{*}{**Tasks**} & \multicolumn{2}{c}{**Relation**} & \multirow{2}{*}{**Loading**} \\ \cline{2-2} \cline{5-6}  & **From** & **To** & & & **From** & **To** & \\ \hline
**7** & 8 & 1 & 5 & **12** & 3 & 11 & 9 \\
**10** & 14 & 22 & 5 & **4** & 16 & 20 & 8 \\
**2** & 8 & 12 & 4 & **9** & 5 & 9 & 8 \\
**3** & 9 & 11 & 6 & **11** & 8 & 13 & 3 \\
**6** & 2 & 5 & 3 & **8** & 22 & 33 & 7 \\
**1** & 7 & 14 & 2 & **5** & 32 & 36 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Results of clustering. * _initialization of parameters_: in this phase both problem-specific and algorithm-specific parameters are initialized. Problem-specific parameters are the parameters of search space (dimensions and size) and the constraints-defined parameters.