process BROIL.BURGER
''
'' AUTHOR: Steve Bailey
'' CREATED: 7-25-90
'' DESCRIPTION:
''     This is the process for putting a meat pattie on the broiler.  
''     Meat is filed in the steamer set after it is cooked.
''

define CHOICE as an integer variable
define STATION as an integer variable
define NEW.BURGER as a pointer variable

'' get a knave over to the station
let STATION = CHOICE.WORKSTATION(.RBROILER, .LBROILER, 0)
request 1 WORKSTATION(STATION)
let CHOICE = CHOICE.KNAVE(STATION)
request 1 KNAVE(CHOICE)
let OCCUPIER(STATION) = CHOICE

work .SEND.TIME .SECONDS

'' the knave is done sending
relinquish 1 KNAVE(CHOICE)
relinquish 1 WORKSTATION(STATION)

work .BROIL.TIME .SECONDS
create a BURGER called NEW.BURGER

'' get a knave over to the free steamer station
let STATION = CHOICE.WORKSTATION(.RSTEAMER, .LSTEAMER, 0)
request 1 WORKSTATION(STATION)
let CHOICE = CHOICE.KNAVE(STATION)
request 1 KNAVE(CHOICE)
let OCCUPIER(STATION) = CHOICE

work .CATCH.TIME .SECONDS
file NEW.BURGER in STEAMER
display NEW.BURGER with "burger1.icn" at (.STEAMERX+N.STEAMER*.30, .STEAMERY)

relinquish 1 KNAVE(CHOICE)
relinquish 1 WORKSTATION(STATION)

return
end
