home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 349_01 / sss.arc / EX_0301.FOR < prev    next >
Text File  |  1991-04-09  |  1KB  |  53 lines

  1. C     Program EX_0301.FOR
  2. C     Listing 4F - see documntation in TUTOR.SSS
  3.  
  4. $include:'SSSF1.H'
  5.  
  6.       real*8 function rnx(m, s)
  7. $include:'SSSF2.H'
  8.       real*8 m, s, x
  9.   99  x = RN(m, s)
  10.       if (x.lt.0.0) goto 99
  11.       rnx = x
  12.       return
  13.       end
  14.  
  15.       subroutine prime
  16. $include:'SSSF2.H'
  17.       real*8 x, pt, pv, rnx, mean, sd, free, busy
  18.       common x, pt, pv, mean, sd, free, busy
  19.  
  20.       mean = 7.0
  21.       sd   = 4.0
  22.       free = 0.0
  23.       busy = 1.0
  24.       call INIQUE(0, 0, 1)
  25.       call inista(1,'Busy fraction        ',1, 0, 0, 0)
  26.       call TALLY(1, free)
  27.       call SETT(rnx(mean, sd))
  28.       call TALLY(1, busy)
  29.       return
  30.       end
  31.  
  32.       Program EX_0301
  33. $include:'SSSF2.H'
  34.       real*8 x, pt, pv, rnx, mean, sd, free, busy
  35.       common x, pt, pv, mean, sd, free, busy
  36.       real*8 erm, min, mode, max
  37.       data erm /2.0/, min /1.0/, mode /3.0/, max /4.0/
  38.  
  39.       call prime
  40.  
  41.   99    if (RA().lt.0.25) then
  42.           call SETT(T() + ER(2, erm))
  43.         else
  44.           call SETT(T() + TR(min, mode, max))
  45.         endif
  46.         call TALLY(1, free)
  47.         call SETT(T() + rnx(mean, sd))
  48.         call TALLY(1, busy)
  49.       if (T().lt.120.0) goto 99
  50.  
  51.       call SUMRY(' ')
  52.       end
  53.