0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
39 Ansichten1 Seite
The document describes a simulation of bus arrival times at a university transfer station between two bus lines. It generates random inter-arrival times based on exponential distributions to simulate when buses from each line arrive. It then calculates the average wait time for a student transferring between the lines and compares the results to theoretical expectations.
The document describes a simulation of bus arrival times at a university transfer station between two bus lines. It generates random inter-arrival times based on exponential distributions to simulate when buses from each line arrive. It then calculates the average wait time for a student transferring between the lines and compares the results to theoretical expectations.
The document describes a simulation of bus arrival times at a university transfer station between two bus lines. It generates random inter-arrival times based on exponential distributions to simulate when buses from each line arrive. It then calculates the average wait time for a student transferring between the lines and compares the results to theoretical expectations.
Problem 3 The university runs two bus lines on campus: red and green.
The red line
serves north campus, and the green line serves south campus with a transfer station linking two lines. Green buses arrive randomly (exponential inter-arrival time) at the transfer station with the average inter-arrival time of 10 minutes. Red buses also arrive randomly, but with the average inter-arrival time of 7 minutes. 1. Generate 1,000,000 inter-arrival time values for the red bus arriving at the transfer station according to the exponential distribution. With these inter-arrival time values, one is able to find at which time points the red bus arrive on the transfer station. For example, let the clock start at 1:00pm. If the first inter-arrival time value to be generated is 2 minutes, then the red bus will arrive at 1:02pm for the first time. If the second inter-arrival time is 6 minutes, then the red bus will arrive at 1:08pm for the second time, and so on. 2. Repeat the previous step again for the green bus. 3. Assume that every time a green bus arrives, a student takes off and wait for the next red bus to get on. Please find how long this student has to wait on average. How is it close to 7 minutes? 4. If we assume that the running of the red bus is strictly scheduled so that the red bus arrives at the transfer station once every 7 minutes (i.e., the inter-arrival time is always 7 minutes), then how long does this student have to wait on average? In this scenario, we still assume that the green bus arrives randomly. 5. Considering the 1,000,000 time points generated in Step 1 on which green buses arrive, we count the number of green bus arrivals in every one hour. Plot the histogram of these numbers and then compare it with the Poisson density function (setting = 6).