## 4 Congestion Control Based on the RED Algorithm
### The Cred Algorithm
Based on the comparative analysis conducted in the previous section, the enhanced CRED algorithm aligns more closely with actual traffic patterns compared to the RED algorithm. Thus, it is feasible to combine the CRED algorithm with the ACA. By leveraging the discard strategy of the CRED algorithm, even during sudden congestion events, the queuing delay can be controlled to a reasonable level, allowing the ACA to identify an optimized path with lower total delay that fulfils user requirements. In the following sections, we will present a simulation experiment involving the combination of the CRED algorithm and ACA for network congestion control. We will subsequently analyse the corresponding results to evaluate the effectiveness of this approach. #### 5.2.1 Design of the Simulation Experiments

In this experiment, the MATLAB platform is utilized. The first step involves constructing a random network topology model with N nodes using the Waxman algorithm. In this case, N is set to 19, but it is important to note that a larger number of nodes would yield more realistic data. Based on the randomly generated link lengths, a node location distance matrix T is constructed, with unconnected nodes designated as such. The resulting network topology model is illustrated in \[P=a_{1}\text{avg}^{2}+b_{1}\text{avg}+c_{1} \tag{9}\]3

In the MM/1 queuing model, the following parameters are defined: the number of data packets to be sent, which should ideally exceed 1000 to observe significant queuing delay effects at the node. For this experiment, the number of data packets is set to 1000, with each packet having a length of 1000 bytes. Additionally, the service rate \(u\) and packet arrival rate \(\lambda\) are determined for each node. By employing the M/M/1 queuing model, the queuing processing delay of each network node in the network topology is generated, resulting in the construction of the network queuing delay matrix Q. The total network

\[P=a_{1}\text{avg}^{2}+b_{1}\text{avg}+c_{1} \tag{9}\]4 Delay versus queue length. delay matrix W is then obtained by combining the network transmission delay matrix T and the network queuing delay matrix Q. In the CRED algorithm, the following parameters are set: \(\min_{\text{th}}=30\), \(\delta=20\), and an initial value of \(max_{p}=0.16\). #### 5.2.2 Simulation Results and Analysis

By analysing several sets of experimental data, it becomes evident that the integration of the CRED algorithm enables the ACA to obtain an optimized path with low delay even in the presence of congestion. Two specific datasets are selected for further analysis. In these experiments, the source node is set to 1 and the destination node to 14. By running the ACA, the optimized path from 1 to 14 and its corresponding total delay are obtained. To simulate congestion, the node parameters on the cross path, specifically the service rate \(u\), are adjusted to significantly reduce the data processing capacity. This allows us to observe the total path delay after congestion. Finally, with the aid of the CRED algorithm, the optimized total path delay after congestion alleviation is determined, resulting in the third set of data. The results of these analyses are depicted in \[P=a_{1}\text{avg}^{2}+b_{1}\text{avg}+c_{1} \tag{9}\]5

In Figure 13, the vertical axis represents the total delay in milliseconds, while the horizontal axis represents the iteration times of the ACA. After incorporating the CRED algorithm, the ACA reaches a stable state of convergence after approximately 48 iterations. At this point, there is still a noticeable difference of around 100 ms between the optimized path delay after congestion relief and the initial path delay. However, compared to the optimized path delay without any congestion control, the total delay is significantly reduced by approximately 300 ms. This demonstrates the effectiveness of the CRED algorithm in controlling congestion, enabling the ACA to obtain a path with a total delay that closely matches the original optimized path even after congestion occurs.