# Artificial Intelligence Control Logic in Next-Generation Programmable Networks
## 4 Experiments and Results  
The AI algorithms were tested with the network topology shown in Figure 2. The test network consists of thirteen NAPES hosts on which a simple client server application is deployed. All network's links have the capacity of 50 Mbps and the access links (between hosts and network switches) have the capacity of 1 Gbps. The hosts at the top of Figure 2 represent sensor nodes (e.g., equipped with cameras) and the host at the bottom represents a cloud server. The network topology was setup in such a way that it becomes easily congested around the cloud server node, when shortest path routing is used, while the network has still enough capacity to handle the traffic generated by the active sensors. The application emulates the case when a space (e.g., the streets of a smart city) is instrumented with multiple sensor nodes. A sensor node may be in the standby or alert mode. When in the standby mode, no traffic is generated; when in the alert mode, a node generates a simple User Datagram Protocol (UDP) flow with the specific bit rate of 20 Mbps. Note that the bit rates have been chosen to allow convenient experimentation with the AI algorithm; they need not be realistic from the application domain point of view. Imagine that some stimulus (e.g., noise from a street sweeper vehicle at night time) triggers a change from the usual standby mode to the alert mode. As the sweeper moves down the streets, different sensor nodes are exposed to the noise and enter the alert mode (starting generating traffic). We assumed that two sensor nodes enter the alert mode at a time (imagine two cameras deployed at each intersection). Moreover, pairs of sensors are alerted according to a regular pattern. Specifically, NAPES components running on the nodes Host-01 and Host-02 start generating traffic at the time 0 s (one flow per node), components on the nodes Host-03 and Host-04 start at the time 20 s, components on the nodes Host-05 and Host-06 start at the time 40 s, etc. Each component remains in the alert mode for 40 s and, afterwards, returns to the standby mode (with no traffic generated), which lasts for 100 s. After that, a component enters the alert mode again. To conduct the experiments with the AI algorithm, we emulated the above test network using the MiniNet tool [35]. The network nodes represent the Open Virtual Switch (OVS). The test flows were generated using the NAPES traffic generator. In all cases the test instances were run on the hardware platform with the following parameters:  
* 16 GB RAM
* 8 VCPU
* 64 GB of disk space
* Ubuntu system version 20.04. In the following experiments, we compared 2 network parameters i.e., total throughput obtained by the node representing cloud server and temporary network loss rate (averaged over all flows) to show the advantage of the proposed AI algorithm. Figure 3 shows total throughput without AI and Figure 4 shows total throughput with the AI algorithm. It is noticeable that the AI algorithm allows for better network resource utilization by rerouting traffic to alternative paths and as a result increases the overall network throughput. The hosts Host-01... Host-12 are arranged in pairs that periodically switch between active and inactive states. When four hosts become active at the same the network becomes congested if all flows are routed over the same link (this may happen with shortest path routing). With the AI algorithm, the flows can be routed over link  
Figure 2: Analyzed network topology. disjoint paths, thus, network congestion can be avoided. This can be observed, for example, in the time period between 20 and 40 s. Without AI, the server throughput is only 50 Mbps, as all active flows are routed over a single link with a capacity of 50 Mbps. When the AI algorithm is enabled, two flows can be rerouted to alternative disjoint paths and the throughput increases to 80 Mbps (which is equal to the offered traffic). Figure 4: Total throughput with AI. Figure 3: Total throughput without AI.