## 1 Introduction  
Urban areas around the world are facing major traffic jams, which lead to longer travel times, higher fuel use, and more pollution [1]. During rush hours, severe traffic bottlenecks cause delays and economic losses. Traditional traffic lights, which run on fixed timers without considering real-time traffic, can exacerbate these issues; moreover, they have a limited capacity to adapt to changing traffic conditions and may actually increase traffic [2]. Cars often sit at red lights even when no other cars are crossing, and poor light synchronization causes stop-start driving patterns [3]. These systems also slow down emergency responses and often do not provide safe crossing conditions for pedestrians, thereby causing more accidents. Inefficient traffic management also results in greater emissions from idling cars, wasted fuel, and air pollution. A major drawback of traditional traffic lights is that they cannot adapt to real-time conditions. They cannot handle sudden changes in traffic, such as accidents or road closures, because they follow pre-set timers. They are difficult to update as cities grow because they require manual adjustments that take time and may be ineffectual [4]. These operations have high maintenance costs, do not integrate well with other traffic operations, and are not suited to smart city initiatives. Traditional timed lighting systems operate on a fixed cycle, making them static. Their lack of flexibility has several negative consequences, an example of which is increased congestion during peak hours when the set green light is not sufficient for the volume of traffic, resulting in long queues of vehicles [5]. However, effective traffic management techniques are essential for the modern urban environment, in which traffic conditions are constantly changing throughout the day. Traditional systems with fixed deadlines fail to accommodate these differences, leading to congestion and delays. To address this, traffic light control systems must be capable of autonomously adjusting signal timings in real time based on current traffic conditions. By responding dynamically to variations in traffic flow, these systems can optimize the durations of green lights, reduce vehicle waiting times, improve the efficiency of traffic flow, and minimize congestion. Traffic signal control can be understood as a discrete-event system wherein changes in traffic signals are triggered by specific events, such as the presence or absence of vehicles at an intersection. Unlike traditional fixed-cycle systems, intelligent event systems can adjust signaling times based on real-time traffic conditions. This approach enables traffic signals to respond to fluctuating volumes of vehicles and flow patterns, thereby allowing for more efficient control of intersections. By continuously monitoring traffic and adapting the durations of green lights accordingly, discrete-event systems can reduce congestion, minimize wait times, and improve overall traffic flow. This real-time, event-driven approach is essential for managing the complex and ever-changing traffic conditions of urban areas. As cities grow within smart framework technologies, IoT technologies like Arduino and IR (infrared) sensors represent a promising solution. These technologies provide real-time traffic data, allowing traffic lights to adjust dynamically. This improves traffic movement, reduces congestion, and enhances overall urban mobility. The purpose of this paper is to evaluate and compare the effectiveness of PSO, grey wolf optimization (GWO), and the PSO-GWO hybrid method in managing traffic signals. The proposed method utilizes IoT-enabled sensor data to improve traffic flow, reduce delays, improve overall traffic management, and ultimately identify the most effective traffic management system. An IoT-enhanced traffic light system implemented on Iraq's streets may significantly improve the movement of traffic, anticipate congestion, and enhance overall safety.