next up previous contents
Next: Description of the process Up: INTRODUCTION Previous: Nodes with indexes

Example 1: Simple Serving System

The problem is to compute the queues and waiting times of people that are to be served one by one in a window. They enter the system at random and the serving times are also random. After being served they left the system. The GLIDER program may be as follows:

   Simulation of a simple serving system. 

   Patrons enter the system to be served at a window.
   The times between arrivals are taken at random from an exponential
   distribution with mean Tba. The patrons are served or form a queue
   in front of the window. The serving time is taken from a gaussian
   distribution with mean: MeanWait and standard deviation: StaDev.
   Once they are served they go to Exit to leave the system.
   The simulation is to go until time 1000. Statistics of nodes are
   required. For clarity reserved words are written in uppercase letters.

   NETWORK
     Entry (I) Window :: IT := EXPO(Tba);
     Window (R) Exit  :: STAY := GAUSS(MeanWait, StaDev);
     Exit ::

   INIT TSIM := 1000; ACT(Entry, 0); Tba := 4; MeanWait := 3.8;
            StaDev := 0.8;
   DECL VAR Tba, MeanWait, StaDev: REAL;
              STATISTICS Entry, Window, Exit;
   END.
The program has four sections divided by three separators:

NETWORK, INIT and DECL.

Lexicographic remark:




next up previous contents
Next: Description of the process Up: INTRODUCTION Previous: Nodes with indexes

Marta Sananes-Domingo
Fri Mar 17 10:05:26 PST 2000