# Smart Agent System for Cyber Nano-Manufacturing in Industry 4.0
## 3 Result and Discussion
### Cyber Interface Simulator Using IoT  
After implementing the ANN expert system for evaluating appropriate nano/micro-manufacturing processes for each part's design, it is important to next seek the availability of machines on the cyber network. The Node-Red IoT simulator was implemented to accomplish this task. As per the framework for Cyber Interface Simulator using Node-Red discussed in Figure 5, the Node-Red program was developed to execute the machine availability function [66]. Different nodes, as shown in Figure 11, were used to simulate the cyber interface flow. First, the inject node was added as an input by dragging it onto the workspace from the palette. The input node initiates the flow for a given interval of time depending on the application intent. The timestamp was triggered every 3 s to simulate each period of machine availability. In practice, this would relate to pinging different machines that are configured on a central hub for an interval of time (e.g., every 2 or 3 h). Second, the function node was used and fed by the correct code to find the available number of machines and their classifications. The function node activated messages through a JavaScript function. It is called a machine availability generator and was coded to generate a random number between 30 and 50. The output debugs node, the total number of M/C available, shows the machine's available number during a specific time on the debug tab. In addition, the M/C availability status node, output debug, was used to provide an array of the available machines related to the total number of M/C available nodes. However, dashboard nodes were used to provide the needed output. Thus, the gauge node, which controls the number of machines available, was modified so that the range was from 30 to 50. Therefore, a file of any period can be usefully used since it has arrays of machines' availability. So, a file node, machine file, has been added to provide a file of 24 times (time ranges? time intervals?) of the available machines, and this can be modified. This was formed as 24 arrays, where each array included the machine's number every 3 s. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Second Stage**} \\ \cline{2-9}  & \multicolumn{6}{c}{**Training**} & \multicolumn{6}{c}{**Testing**} \\ \cline{2-9}
**Run** & **MSE** & **Gradient** & **Validation** & **Performance** & **R-Value** & **GRNN** & **PNN** & **BPNN** \\ \hline
1 & \(4.12\times 10^{-7}\) & 0.00015 & 0.01455 & 0.9800 & 98\% & 96\% & 96\% \\ \hline
2 & \(3.84\times 10^{-7}\) & 0.00012 & 0.01421 & 0.9820 & 98\% & 96\% & 98\% \\ \hline
3 & \(3.51\times 10^{-7}\) & 0.00014 & 0.01475 & 0.9817 & 96\% & 98\% & 96\% \\ \hline
4 & \(3.63\times 10^{-7}\) & 0.00012 & 0.01460 & 0.9811 & 96\% & 98\% & 96\% \\ \hline
5 & \(3.86\times 10^{-7}\) & 0.00022 & 0.01399 & 0.9700 & 96\% & 98\% & 90\% \\ \hline
6 & \(3.75\times 10^{-7}\) & 0.00018 & 0.01400 & 0.9788 & 94\% & 96\% & 96\% \\ \hline
7 & \(3.72\times 10^{-7}\) & 0.00020 & 0.01414 & 0.9786 & 96\% & 94\% & 96\% \\ \hline
8 & \(3.88\times 10^{-7}\) & 0.00019 & 0.01512 & 0.9814 & 94\% & 96\% & 94\% \\ \hline
9 & \(3.98\times 10^{-7}\) & 0.000276 & 0.01537 & 0.9686 & 90\% & 94\% & 90\% \\ \hline
10 & \(3.87\times 10^{-7}\) & 0.000250 & 0.01477 & 0.9733 & 92\% & 94\% & 90\% \\ \hline  & \multicolumn{6}{c}{Average} & \multicolumn{6}{c}{95.00\%} & 96.00\% & 94.20\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Second Stage Result. The machine availability array, text node, has been used to classify the machines. Then, the nodes were wired together by dragging between them. The debug console outputted the total number of machines available and the machine available status. The number of machines available (gauge) provides the last available number on the dashboard. In addition, the chart shows the time history of machine available status where the \(y\)-axis represents the number of machines, and the \(x\)-axis is the time. Finally, the dashboard shows up with the gauge and the chart (Figure 12).