You can see the attached paper for better understanding. You can also go through the following link: https://www.researchgate.net/post/Is_it_possible_to_simulate_congestion_control_protocol_in_a_wireless_sensor_network_using_NS2
check the website https://www.nsnam.org/docs/contributed/tcp-variants-workshop-2016/5-Session.pdf
https://www.youtube.com/watch?v=8Vm2J1g8faU
https://github.com/topics/ns3?o=desc&s=forks
The congestion control algorithm based on the weighted directed graph is designed for the network congestion over the wireless sensor network. The congestion problem is modeled as a distributed dynamic system with time-varying delay, and it can be proven that the sent rate for all nodes converges to the available bandwidth of the sink by the proposed congestion control algorithm. Via Lyapunov function, the validity of the proposed algorithm is shown under the varying network topologies. Ns simulation results indicate that the proposed algorithm restrains the congestion over the wireless sensor network, maintains a high throughput and a low delay time, and also improves the quality of service for the whole network.
Simulation
This section studies the performance of the proposed CC-CA under a general wireless sensor network configuration. The simulation environment models a sensor network with 200 nodes deployed randomly over an area of 300 × 300 m. The coordinate of the sink is (144, 168). Simulations are conduced using ns-3 network simulator, and the simulation time is 300 sec.
Test 1. In order to verify the validity of the proposed algorithm in variable condition, the number of the data source is set to 2, 5, 8, and 10, respectively. The throughput and the drop ratio are shown in Table 1 for the different connection numbers. The suitable rate for the sink is assigned to all the other sensors, reducing the packet cumulate in the sensor buffer. As discussed in Section 1, the energy usage is the key factor in WSN. The lost parameter η is used to measure the energy efficiency of the whole network. The lost parameter η at distinct rate.
In real applications where a couple of center points in a Wireless Sensor System (WSN) send data to a singular sink center point meanwhile period, there are chances of blockage in the framework. Exactly when a sensor center point recognizes data packages at higher rate than its capacity to transmit, extra data ought to be secured in support. Because of limited openness of room, bolster ends up being full and data bundles (new or old) must be dropped on account of obstruct.
In that limit, noteworthy data bundles may be dropped, which can fundamentally nullify the explanation behind sensor frameworks. In the event that there ought to be an event of multi-bounce remote Ad-hoc composes, a lone coordinating estimation isn't persistently the best available course of action. This is in light of the fact that using the equal single course for different correspondence sessions may result in execution defilement in a framework as extraordinary information disaster in light of blockage. On account of the use of different ways, the issues, for instance, course coupling, crash, and the channel get the opportunity to rate may occur, which may reduce the presentation of the framework. Obstruct in Wireless Sensor Networks has following negative effect on execution, for instance, decrease in throughput and transport extent, and extended deferral and per-package imperativeness use. In this manner, it ends up critical to offer thought with respect to the issue of blockage in the sensor framework to give the required movement extent for WSN applications, and to haul out the framework lifetime.
In order to manage those repressions, we propose another stop up control figuring reliant on the multi-target headway estimation named PSOGSA for rate improvement and coordinating section rate of data from every tyke center to the parent center. Mutt computations can avoid adjacent wanted states with faster association than other heuristic approaches. Meta-heuristic count uses structure lattices to give subjective courses of action.