    GPSS/H MS-DOS STUDENT/DEMO RELEASE 2.0 (OV079)     29 Mar 2000   12:22:54     FILE: g7.gps

    LINE# STMT#  IF DO  BLOCK#  *LOC	OPERATION	A,B,C,D,E,F,G	COMMENTS  
 
        1     1                  
        2     2                 *Origin: System simulation, Figure 12-7/10-5
        3     3                 *Author: G. Gordon
        4     4                 *Description: Simulation of a telephone system
        5     5                  
        6     6                        SIMULATE
        7     7                  
        8     8                 *
        9     9                 *      GPSS/H Block Section
       10    10                 *
       11    11                  
       12    12                 *
       13    13                 *      SIMULATION OF A TELEPHONE SYSTEM - MODEL 1
       14    14                 *
       15    15                 POISS  FUNCTION  RN1,C24            Function for i/a interval (Poisson)
       16    16                 0.0,0.0/0.1,0.104/0.2,0.222/0.3,0.355/0.4,0.509/0.5,0.69/
       17    17                 0.6,0.915/0.7,1.2/0.75,1.38/0.8,1.6/0.84,1.83/0.88,7.12/
       18    18                 0.9,2.3/0.92,2.52/0.94,2.81/0.95,2.99/0.96,3.2/0.97,3.5/
       19    19                 0.98,3.9/0.99,4.6/0.995,5.3/0.998,6.2/0.999,7/0.9997,8
       20    20                  
       21    21                  
       22    22                 *      The phone process
       23    23                  
       24    24              1         GENERATE  12,FN$POISS,,,,2PH Create calls
       25    25              2         TEST G    V$FREELN,2,ABND Test if system is full
       26    26              3  ASN1   ASSIGN    1,V$LINE,PH   Pick origin line
       27    27              4         GATE LR   PH1,ASN1      Test for busy
       28    28              5  ASN2   ASSIGN    2,V$LINE,PH   Pick destination line
       29    29              6         TEST NE   PH1,PH2,ASN2  Retry if destination = origin
       30    30              7         LOGIC S   PH1           Make origin busy
       31    31              8         TRANSFER  BOTH,,BLKD    Try for link
       32    32              9  GETL   ENTER     LNKS          Get link
       33    33             10         GATE LR   PH2,BUSY      Test for busy
       34    34             11         LOGIC S   PH2           Make destination busy
       35    35             12         ADVANCE   120,FN$POISS  Talk
       36    36             13         LOGIC R   PH1           Origin hangs up
       37    37             14         LOGIC R   PH2           Dest. hangs up
       38    38             15         LEAVE     LNKS          Free link
       39    39             16  TERM   TERMINATE  
       40    40                  
       41    41             17  ABND   TERMINATE               Abandon call
       42    42                  
       43    43             18  BLKD   LOGIC R   PH1           Origin hangs up 
       44    44             19         TERMINATE               Blocked calls
       45    45                  
       46    46             20  BUSY   LEAVE     LNKS          Free link
       47    47             21         LOGIC R   PH1           Origin hangs up
       48    48             22         TERMINATE               Busy calls
       49    49                  
       50    50                 LNKS   STORAGE   10            No. of links
       51    51                  
       52    52                 LINE   VARIABLE  XH$NOLINES*RN1/1000+1 Pick a line
       53    53                 FREELN VARIABLE  XH$NOLINES-2*S$LNKS   Count no. of free lines
       54    54                  
       55    55                  
       56    56                 *      The clock process

    GPSS/H MS-DOS STUDENT/DEMO RELEASE 2.0 (OV079)     29 Mar 2000   12:22:54     FILE: g7.gps

    LINE# STMT#  IF DO  BLOCK#  *LOC	OPERATION	A,B,C,D,E,F,G	COMMENTS  
 
       57    57                  
       58    58             23         GENERATE  60            1 clock tick every minute 
       59    59             24         TERMINATE 1
       60    60                  
       61    61                 *
       62    62                 *      GPSS/H Control Statements
       63    63                 *
       64    64                        INITIAL   XH$NOLINES,50 Set no. of lines
       65    65                        START     10,NP         Initialise (10 minutes)
       66    66                        RESET                   Wipe out statistics
       67    67                        START     600           Main run (10 hours)
       68    68                  
       69    69                        END 

ENTITY DICTIONARY (IN ASCENDING ORDER BY ENTITY NUMBER; "*" => VALUE CONFLICT.)

         Storages: 1=LNKS

        Functions: 1=POISS

     (F)variables: 1=FREELN        2=LINE

 Halfword Savexes: 1=NOLINES

   Halfword Parms: 1               2

   Random Numbers: 1


*** WARNING: THE FOLLOWING ENTITIES HAVE BEEN DEFINED BUT NOT EXPLICITLY REFERENCED:

           Blocks:  GETL      TERM    

SYMBOL   VALUE   EQU DEFNS  CONTEXT      REFERENCES BY STATEMENT NUMBER
 
ABND        17          41  Block           25
ASN1         3          26  Block           27
ASN2         5          28  Block           29
BLKD        18          43  Block           31
BUSY        20          46  Block           33
GETL         9          32  Block       
TERM        16          39  Block       
 
LNKS         1          50  Storage         32    38    46    53
 
POISS        1          15  Function        24    35
 
FREELN       1          53  (F)variable     25
LINE         2          52  (F)variable     26    28
 
NOLINES      1              Halfword Svx    52    53    64
 
1            1              Halfword Par    26    27    29    30    36    43    47
2            2              Halfword Par    28    29    33    34    37
 
1            1              Random Nmbr     15    52



STORAGE REQUIREMENTS (BYTES)

COMPILED CODE:     1430
COMPILED DATA:      680
MISCELLANEOUS:        0
ENTITIES:          1132
COMMON:           10000
-----------------------
TOTAL:            13242



Simulation begins.

RELATIVE CLOCK: 36000.0000   ABSOLUTE CLOCK: 36600.0000



BLOCK CURRENT     TOTAL  BLOCK CURRENT     TOTAL  BLOCK CURRENT     TOTAL  
1                  2571  11                 1733  21                  602 
2                  2571  12          4      1733  22                  602 
ASN1               3561  13                 1734  23                  600 
4                  3561  14                 1734  24                  600 
ASN2               2625  15                 1734 
6                  2625  TERM               1734 
7                  2571  ABND                  0 
8                  2571  BLKD                236 
GETL               2335  19                  236 
10                 2335  BUSY                602 



          --AVG-UTIL-DURING--                                                                                          
 STORAGE  TOTAL  AVAIL  UNAVL     ENTRIES    AVERAGE   CURRENT  PERCENT    CAPACITY     AVERAGE     CURRENT     MAXIMUM
           TIME   TIME   TIME               TIME/UNIT   STATUS   AVAIL                 CONTENTS    CONTENTS    CONTENTS
    LNKS  0.672                      2340     103.319    AVAIL   100.0           10       6.716           4          10



THE FOLLOWING LOGIC SWITCHES ARE SET (ON):
 
        2        10        11        15        16        18        37        42



NON-ZERO HALFWORD SAVEVALUES:  (NAME : VALUE)

 NOLINES:          50



  RANDOM    ANTITHETIC     INITIAL     CURRENT      SAMPLE   CHI-SQUARE
  STREAM      VARIATES    POSITION    POSITION       COUNT   UNIFORMITY
       1           OFF      100147      110637       10490      0.98



STATUS OF COMMON STORAGE

    9200 BYTES AVAILABLE
     800 IN USE
    1488 USED (MAX)

Simulation terminated.  Absolute Clock: 36600.0000



Total Block Executions: 41774

Blocks / second:        126588

Microseconds / Block:   7.90



Elapsed Time Used (SEC)
 
PASS1:           0.05
SYM/XREF         0.06
PASS2:           0.05
LOAD/CTRL:       0.17
EXECUTION:       0.33
---------------------
TOTAL:           0.66
