## 4 Simulation and Results  
To test the performance of the proposed congestion control strategy in WSNs, a synthetic dataset was created to represent typical WSN communication patterns. The dataset included 10,000 packets generated over a simulation duration of 1000 s, simulating traffic loads that ranged from low to high levels to test adaptability under varying network conditions. Each packet had an average size of 512 bytes. The network was deployed in a 500 m \(\times\) 500 m area, with N = 100 sensor nodes and 1 BS located centrally within the grid. Each node was initialized with a fixed initial energy of E = 2 Joules to model the limited energy resources characteristic of WSNs. Nodes communicated directly or in multi-hop paths to the BS, with each node's transmission range set to 100 m. This configuration allowed for both short-range and long-range communication, testing the effectiveness of the congestion control strategy in maintaining energy efficiency and reducing delays. For the ACO algorithm, various parameters were tuned to ensure effective path optimization and congestion management. The pheromone evaporation rate (\(\rho\)) was set to 0.1 to prevent excessive pheromone buildup on suboptimal paths. The pheromone deposit factor (Q) was set to 0.5 to enhance the pheromone trail on reliable routes. Weight parameters were defined as \(\alpha\) = 1.5, \(\beta\) = 1.2, \(\gamma\) = 0.8, s = 1.0, and k = 1.0 to prioritize energy, bandwidth, latency, and pheromone influence in the route selection process. For GAN, the generator and discriminator each contained two hidden layers with 128 and 64 neurons per layer. The GAN was trained using a learning rate of 0.001 and a batch size of 64, with Gaussian noise as input to the generator. The GAN's objective was to produce realistic cluster formations,assisting in node clustering and load balancing by distinguishing real clusters from synthetic ones. This configuration ensured efficient clustering to reduce intra-network traffic and minimize congestion. Tables 2-4 shows the configuration parameters of simulation in Network Simulator 3 (NS3) [39]. To further assess the impact of the proposed congestion control strategy on network performance, two additional metrics _CF_ Across Different Links (ADL) and Network Lifetime Under Different Load Conditions (NLUDLC) were analyzed and presented in table format. These metrics offer valuable insights into network traffic distribution and energy efficiency, which are critical for ensuring reliable and long-lasting WSNs. ADL is the load on individual network links, calculated as the ratio of data flow to link capacity. Examining _CF_ values across different links under various traffic loads (low, moderate, and high) reveals which links are most prone to congestion and assesses how well the congestion control strategy distributes network load. High _CF_ values signify links that are close to or exceeding their capacity, indicating potential congestion points that may require rerouting or load balancing. Monitoring _CF_ values across different links is essential for understanding traffic patterns and ensuring that the network can manage peak traffic loads without significant performance degradation. Table 5 provides a detailed overview of _CF_ values for 20 links under different traffic conditions. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Description** \\ \hline Generator Layers & 128 neurons, 64 neurons & Number of neurons in hidden layers of generator \\ \hline Discriminator Layers & 128 neurons, 64 neurons & Number of neurons in hidden layers of discriminator \\ \hline Learning Rate & 0.001 & Learning rate for both generator and discriminator \\ \hline Batch Size & 64 & Batch size for training \\ \hline Input Noise & Gaussian noise & Type of noise input for generating synthetic clusters \\ \hline \hline \end{tabular}
\end{table} 
Table 4: GAN algorithm configuration parameters.