fork download
  1. SIMULATE
  2. UNITS MINUTES
  3.  
  4. ; Facilities
  5. INS1 FACILITY
  6. INS2 FACILITY
  7. INS3 FACILITY
  8.  
  9. ; Start of part arrival
  10. GENPART GENERATE 3 ; A part arrives every 3 minutes
  11. ADVANCE 2 ; 2 minutes to reach first inspector
  12. SEIZE INS1
  13. TEST E INS1, TRY2
  14. ADVANCE 1 ; Processing time (1 minute)
  15. RELEASE INS1
  16. TERMINATE 1
  17.  
  18. ; Try second inspector
  19. TRY2 ADVANCE 2 ; Takes 2 minutes to reach next
  20. SEIZE INS2
  21. TEST E INS2, TRY3
  22. ADVANCE 1
  23. RELEASE INS2
  24. TERMINATE 1
  25.  
  26. ; Try third inspector
  27. TRY3 ADVANCE 2
  28. SEIZE INS3
  29. TEST E INS3, LOST
  30. ADVANCE 1
  31. RELEASE INS3
  32. TERMINATE 1
  33.  
  34. ; If all inspectors are busy
  35. LOST TERMINATE 1 ; Part is lost
  36.  
  37. START 100
  38.  
Success #stdin #stdout #stderr 0.01s 5276KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: near line 1: near "SIMULATE": syntax error