CIS 410 Code Examples

* Timed Example
       SIMULATE
*
* GPSS/H Block Section
*
       GENERATE     10,2       A bundle arrives every 10 +/- 2 time units
       SEIZE        SERVER     Capture the line server
       ADVANCE      4,2        Server spends 4 +/- 2 time units
       RELEASE      SERVER     Release the line server
       TERMINATE 0 
* Timer Block
       GENERATE     480        Terminate simulation after 480 time units
       TERMINATE    1
       START 1 
       END


* Count Example
        SIMULATE
*
* GPSS/H Block Section
*
       GENERATE    10,2        A bundle arrives every 10 +/- 2 time units
       SEIZE       SERVER      Capture the line server
       ADVANCE     4,2         Server spends 4 +/- 2 time units
       RELEASE     SERVER      Release the line server
       TERMINATE   1 

       START       100         Start 100 
       END