'' 
'' COPYRIGHT (C) 1988, CACI Products Company, LA JOLLA
''
'' Model: goldmine    A goldmine with 1 lift and 2 shafts.
''
''-----------------------------------------------------------------------

Preamble

  '' Goldmine Simulation                                       August 2, 1988
  '' CACI Products Company


  Normally, mode is undefined

  Processes include FINAL.REPORT, MENUPROC, OUTPUT
    Every LOAD.GENERATOR
     has a LOAD.FLOOR
    Define LOAD.FLOOR as an integer variable

    Every LIFT
      has a LIFT.STATUS
      and owns a LIFT.LOAD
    Define LIFT.STATUS as a text variable

  Permanent entities
    Every LEVEL 
      has a QUEUE.ICON
      and a MEAN.RATE
      and owns a LOAD.QUEUE
    Define QUEUE.ICON as a text variable
    Define MEAN.RATE as a real variable

  Temporary entities
    Every LOAD
      has a FLOOR
      and may belong to the LOAD.QUEUE
      and may belong to the LIFT.LOAD
    Define FLOOR as an integer variable
    Every DSPLY.E
      has a DCOLOR.A(3/4) in word 7
    Define DCOLOR.A as an integer variable

  Tally AVG.CONTENTS as the average and NO.OF.LOADS as the number of CONTENTS
  Accumulate AVG.QUEUE as the average
   and MAX.QUEUE as the maximum of N.LOAD.QUEUE
  Define LOAD.QUEUE as a LIFO set

  Define CLOCKTIME as a double variable
  Define CONTENTS as a real variable
  Define GROUND as a pointer variable
  Define LIFT.CAPACITY as an integer variable   
  Define LIFT.WAIT as an integer variable
  Define LOADSHAPE as a pointer variable
  Define SCALER as a real variable '' time scaling factor
  Define STOP.TIME as a real variable

  Define .STOPPED.COLOR to mean 2 '' red
  Define .MOVING.COLOR to mean 3 '' green
  Define MINUTES to mean units  
  Define HOURS to mean * 60.0 units

  Graphic entities include LOAD                        '' these are visible
  Dynamic graphic entities include LIFT                ''..and this moves!
  Graphic entities include SHAPE
  Display variables include N.LOAD.QUEUE, CLOCKTIME, LIFT.STATUS

  define ACCEPT.F as a text function
  define DFIELD.F as a pointer function

End  ''Preamble
