This program will provide an opportunity to solve a problem related to queues.
Write a computer simulation to measure the best configuration for a stoplight at a traffic intersection.
•Nortqueh/South traffic: cars arrive at the end of each queue randomly every 10 seconds
•East/West traffic: cars arrive at the end of each queue randomly every 30 seconds
Consider that the east/west and north/south queues will work together depending on the state of the stoplight. Try various durations for the respective red/green light cycles (in seconds; preferably defined using const values) to find the minimal wait time for all drivers.
Remember that during a red light there are no cars leaving the respective queues. However, also design your solution so that cars will continue to enter the rear of each respective queue randomly both duriComputer Sing a green light and red light.
Given the constraints defined above, run your simulation a variety of times. Be sure your program includes meaningful output statements that describe the outcome of a test for the given inputs. Demonstrate the various times as part of your deliverables. Finally, derive a conclusion that describes your recommendation to traffic engineers for the best settings for that stoplight.
Deliver the following as your final product:
•All final source code files (.cpp and/or .h files)
•Printed output of several simulation runs to demonstrating various configurations for the simulation
•A statement defining your recommendation for the optimal stoplight configuration that minimizes wait time for all drivers