process GENERATOR
''
'' AUTHOR: Steve Bailey
'' CREATED: 7-25-90
'' DESCRIPTION:
''      Generates customers based on an expomentially distributed arrival
''	time.   
''
define MEAN.INTERARRIVAL as a real variable
define .CONSUMPTION.POWER to mean 3.0

'' compute the mean int. time based on current pricing and past history
let MEAN.INTERARRIVAL = ((BURGER.PRICE+SHAKE.PRICE) / 
  (.BURGER.PRICE+.SHAKE.PRICE)) ** .CONSUMPTION.POWER * .MEAN.INTERARRIVAL.TIME

'' keep generating customers
until .END.SIMULATION do
    activate a CUSTOMER now
    wait EXPONENTIAL.F(MEAN.INTERARRIVAL, 1) .SECONDS
loop

return
end
process DUMM
until .END.SIMULATION do
    wait 0.01 units
loop
return
end
