HI I got this coursework question to solve.
This is the question:
Design a program to simulate vehicles at an intersection.
Assume that there is one lane going in each of four directions, with stoplights facing each direction. Vary the arrival time of vehicles randomly in each direction and set up a regular frequency of the light changes. Run your direction and set up a regular frequency of the light changes. Run your simulation for a set period of time to view the "behaviour" of the intersection.
Coursework Requirement:
If any one has any clue of how to do it, please help; I have no idea.
Some useful behaviors to monitor will include mean, max, and std. dev. of the number of cars waiting at each light.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With