Events Step by Step

Experimentation

Changing Parameter Values

   
 

Let us try to make the life of the truck drivers a little bit easier. We are going to add service power to our model by adding one more van carrier. Our source code changes in one single section: We only have to set the model parameter NUM_VC to 2.

public class EventsExample extends Model {

   /**
    * model parameter: the number of van carriers
    */
   protected static int NUM_VC = 2;
   ...
}

Now compile and run the model again, then have a look a the newly created report file.

 


Queues

Title
Qorder
(Re)set
Obs
QLimit
Qmax
Qnow
Qavg.
Zeros
avg.Wait
refus.
Truck QueueFIFO0.0473unlimit.600.91031612.886780
idle VC QueueFIFO0.0161unlimit.220.4316313.994360

Surprisingly enough this little adjustment turned the picture around completely. Adding another van carrier leads to a dramatic change in the service time behaviour of our queueing system. There is currently no truck waiting for service (Qnow) and the maximum number of trucks waiting in the queue at one time is reduced to 6. Compare this to the 169 waiting trucks of our first experiment!

The average waiting time dropped from an unacceptable 4 hours waste of time to a very comfortable 3 minute time span. 161 trucks were serviced immediately without any delay and both van carriers are idly waiting right now for the next truck to arrive.

At first, this seems to be a rather surprising result. But considering some facts it's not that surprising anymore:

  • We have doubled the service capacity. We raised it for 100 % by adding a second van carrier.
  • Take a look at our assumed arrival and service times. Approximately every three minutes a truck arrives, but a van carrier needs an average of 5 minutes to service one truck. That means that one van carrier alone is not able to service the arriving trucks fast enough. This is exactly what the simulation results show for our first experiment. But with two van carriers we are easily able to fulfil the requests.


   
  http://desmoj.sourceforge.net/tutorial/events/exp2.html