fork download
  1. * Monte Carlo Simulation in GPSS with Counters
  2.  
  3. SIMULATE
  4. GENERATE 1 * Generate one entity at a time with no delay
  5.  
  6. TRANSFER .5, SUCCEED, FAIL * 50% chance of success, else fail
  7.  
  8. SUCCEED ADVANCE 1 * Delay for successful trials
  9. COUNT SUCCESS * Increment SUCCESS counter
  10. TERMINATE 1 * End successful entity
  11.  
  12. FAIL ADVANCE 1 * Delay for failed trials
  13. COUNT FAILURE * Increment FAILURE counter
  14. TERMINATE 1 * End failed entity
  15.  
  16. START 10 * Start the simulation with 10 entities
  17. END
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error: near line 1: near "*": syntax error