# A Dynamic Route-Planning System Based on Industry 4.0 Technology
## 6 Dynamic Route-Planning System and Computational Results with Managerial Insights
### Computational Results and Managerial Insight
#### 6.2.1 Computational Results from a Layout with Four Storage Racks and 15 Segments  
The layout of an internal DC environment described in Section 5 was used as a transportation area for the implementation of the ANN model. Initially, a sample layout consisting of four storage racks with 15 segments was used to test the performance of the proposed approach. The definition of all path segments is shown in Figure 9. Note that the path segments at each corner were combined. The test data were encoded and solved by the A-star algorithm and the shortest-path model. The results from both approaches were the same in all cases, which shows that the performance of the A-star algorithm is acceptable. There were 13 types of paths generated in the solutions, as shown in Figure 10. Each type was assigned an ID; note that \"no way\" represents a case where a path between the origin and the destination could not be found. Table 2 reports the number of cases for each path type. Figure 8: The logic for generating a dynamic route. Figure 9: Layout of an internal distribution center (DC) with 15 path segments. From Table 2, it can be seen that only seven types of paths were significant; the remainder could be considered as outliers and were removed from consideration. The 375 samples were separated into 80% training and 20% testing datasets. An example of encoded input data is shown in Figure 11, where \(x_{1}\) to \(x_{15}\) represent the path segments that have obstacles, and \(y\) represents the selected path ID. The structure of the ANN, which is defined by the number of nodes in hidden layers, also affects the accuracy of the ANN model. There are three rules of thumb for determining the number of nodes. The number of hidden nodes should be between the number of input features and the number of target classes, should be equal to the sum of two-thirds of the input features and the size of the output layer, or should be less than double the number of input features. The number of hidden nodes in each experiment should be varied by two or three units. The number of samples for training should be more than 10 times the number of ANN weights [25], which are defined by the equation, \(numweights=(i+o)\times h\)[26], where \(i\) represents the number of input nodes, \(o\) is the number of output nodes, and \(h\) is the number of nodes in hidden layers. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**ID** & **0** & **1** & **2** & **3** & **4** & **5** & **6** & **Others** \\ \hline Count & 91 & 32 & 61 & 28 & 67 & 40 & 49 & 7 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Number of cases for each path type. ID, identifier. Figure 10: Types of generated paths. In this research, the training stage was limited to 1000 iterations. The performance was measured using the mean squared error (MSE), where the target was set to 0. The training function for an ANN's input layer was based on a \"logsig\" function, while, for an output layer, it was based on a \"purelin\" function. A network training function based on a \"trainbr\" function was used for other layers. The training time was limited to 2 h. The remaining parameters were set on the basis of the \"default setting\" from the Neural Networks MATLAB toolbox. The accuracy percentages from the training and testing phases, using different datasets (with 200 or 300 samples), are summarized in Table 3. The results were achieved after the training stage reached 1000 epochs. In Table 3, the training accuracy percentage varies with the ANN structural configuration (number of nodes and layers) and the number of training samples. When increasing the number of samples beyond 300 samples, the ANN model required a longer training time; however, the model accuracy was not significantly improved. Hence, 300 samples were used to build the ANN. Increasing the number of nodes can help improve the accuracy; however, using too many nodes can cause an overfitting issue. This can be seen when comparing configurations (15-8-7) and (15-10-7).