Advanced Modelling Features

WaitQueue

Model Description

   
 

As an example to demonstrate the use of the WaitQueue<M,S> construct we will model a harbour where coal is loaded onto ships. The coal is carted by trains, which arrive every 30 minutes (exponentially distributed), unload and leave empty. Unloading a train and loading its coal onto a ship takes uniformly between 60 and 180 minutes. We assume that ships can carry exactly two train loads and will not leave the harbour until they are fully loaded. Empty ships arrive every hour (exponentially distributed).

This simplified system will be modelled in a process-oriented style with trains and ships as simulation processes, using a WaitQueue<Ship,Train> object to synchronise the passing of coal loads between them. Ships will be treated as masters and trains as slaves.



   
  http://desmoj.sourceforge.net/tutorial/advanced/waitqueue1.html