Toll Booths Traffic Simulation

Cancelado Publicado Nov 23, 2015 Pagado a la entrega
Cancelado Pagado a la entrega

Your job here is to write a Java program to simulate the traffic flowing through a toll plaza based on different

traffic flows and different numbers of booths. Based on the results of your simulation, you will suggest at

least how many toll booths are needed if we don’t want to keep the drivers waiting for longer than 15 minutes

(900 seconds). We will control the factors of the simulation as follows:

1. First, fix the mean of the time needed for passing the booth and its variance as follows:

mtime = 3, and vtime = 6.

2. Then, simulate the traffic with each of the different flows as follows:

flow = 0.1, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, and 4.0 (cars/per second).

Note that, a highway with 4.0 (cars/per second) flow is a very busy highway. Your program should

simulate each situation for three simulated hours (note: not 3 hours of running your program) with a

different number of toll booths starting from 1 booth, and calculate the average waiting time of cars

that arrive the toll plaza during the hours. Find out the minimum number of toll booths needed to

keep the average waiting time less than 15 minutes (900 seconds).

3. Repeat the simulation above with different mean and variance as follows:

mtime = 2.5, and vtime = 4.

The meaning of this modification is that, we can train the toll takers to shorten the time for each

car to pass a booth. Suppose we can do so by setting mtime = 2.5 and vtime = 4, what will be the

simulation results based on the same traffic flows as above?

Note that, your simulation may have to simulate longer than three hours (the simulated hours) to allow

all cars arrived in the simulated three hours to pass the booths. After three hours, your program may stop

generating arriving cars but keep running until all care waiting in the tracks (and on the road, if any) pass

the booths.

In your final report

1. You should provide the following values of each simulation:

(a) Simulation parameters, i.e., mtime, vtime, traffic flow, and number of booths.

(b) The total number of cars with an Easy-pass.

(c) The average time for a car to pay tool at the booth window without Easy-pass (i.e, the average

service time without Easy-pass).

(d) The average time to get through the toll plaza, including waiting on the line (in the track or

on the road) and time needed to pay the toll.

(e) The maximum number of cars waiting on the road (not in the track).

You should organize the information above in a table, so I can clearly read your results.

2. You should comment your program in details. Since I will read your programs, I need your comments

to follow your logic.

Note: it is a capital X above. Let your main program be sim.java. I will compile your program as

javac [url removed, login to view], and after compile, I will run your program with parameters with 4 arguments as

follows:

java Sim meanSerive varService trafficFlow boothNo

For example,

java Sim 3.0 6.0 0.5 2

where the first two arguments set mtime=3.0 and vtime=6.0 for the normal distribution; the third

one, flow=0.5, is the traffic flow; the fourth one, 2, is the number of booths in the plaza. You can

design your own output format as long as I can see the required information. For example, with the

parameters as above, I expect to see:

Simulation -- 3 hours, Booth No:2, Without EZ-Pass modification: m=3.0, v= 6.0

** Flow: 0.5 cars/Sec

** Total cars: 5341

** EZ-Pass: 2659

** Pass window without EZ-Pass: 7.686 Secs

** Max number of cars waiting on the road: 385

** Average waiting time: 0:07:21

Java

Nº del proyecto: #8959585

Sobre el proyecto

5 propuestas Proyecto remoto Activo Nov 25, 2015

5 freelancers están ofertando un promedio de $64 por este trabajo

dobreiiita

Hello I am Java expert and interested in this project. I have reviewed your requirements and confident to handle this project perfectly. I also have a lot of experience inhelping students with assignments. Please c Más

$64 USD en 1 día
(322 comentarios)
7.2
eperfections

A proposal has not yet been provided

$66 USD en 2 días
(385 comentarios)
7.2
akshayatm

Hey , I am an experienced java developer have delivered many quality products.. Contact for further discussion.

$30 USD en 3 días
(1 comentario)
1.4
wenguo214

thank you for your posting. your task is very happy for me. i have much experiences in this field. if you hire me, i will complete project ASAP with higher quality. please send more details. best regards.

$88 USD en 1 día
(0 comentarios)
0.0