I am having some problems with simulating POisson arrivals and departures in Java. I want to simulate 400 cars/hour as arrival rate and 20 cars/hour as departure rate. I have a parking capacity of 500 cars where these cars enter/exit. When I am checking occupancy values, even after a couple of hours I still see that at most there were about 30-35 cars at any single point. Shouldnt this have been 380 cars(considering the arrival and departure rates). I am using multithreading in Java and am simulating arrivals and departures using the sleep feature of threads where I sleep the thread for ((-ln(u)/arrival rate)*60*60*1000). this is the time between the arrivals of cars and it is same for departures except arrival rate is now departure rate in the previous equation. the 60*60 is used for time conversion since the arrival rate is in hours and the 1000 is for the milliseconds. Any help is highly appreciated.

as an addendum, for exponential interarrival time, I am generating a uniform random number between 0 and 1 and then plugging it in as the value of 'u' in the above equation. is this correct? do i need to keep adding previous arrival times to get the new arrival time i.e. does Ti need to have Ti-1 in its equation?

and what have you done yourself? We're not a homework service.

jwenting...no reason to be obnoxious...u clearly did not read the post...or did not care to..

Its hard to recommend coding changes without any code to look at.

Peter check your calendar, its May. 40 days

Peter check your calendar, its May. 40 days

Then it is even worst, coursework failed, module failed...

@theinvincible if you have something you want us to help you and you already have proof you started to work on it then by no means created new thread. In the meantime this thread is closed to avoid any flaming.