Figure 41 illustrates a block diagram and the associated code for a simple General Purpose Simulation System (GPSS) simulation model (similar to the example given in Monte Carlo Simulation: An Example Simulation Problem):
There is one line of code in GPSS for each individual block.
The GENERATE block will generate random transactions (cars) according to a uniform distribution. The 100 and 20 on code line 100, specifies that the time between cars arriving will be on average 100 time units plus or minus 20 time units. Thus 20 is the half-width of the distribution.
The QUEUE block instructs GPSS to start gathering statistics on a queue named ‘Garage’.
The SEIZE block allows the first car to seize a facility named ‘Pump’.
The DEPART block informs GPSS that a car is leaving the queue named ‘Garage’. Whilst a car is being serviced in the ADVANCE block, any other arriving transaction (car) will remain in the QUEUE block.
The ADVANCE block represents the car being filled with petrol. The values 100 and 5 specify that the time taken to fill a car with petrol is on average 100 time units plus or minus 5 time units. When a car leaves the ADVANCE block it moves into the RELEASE block which releases the ‘Pump’ and allows the next car at the QUEUE block to SEIZE the ‘Pump.’ The SEIZE and RELEASE blocks also instruct GPSS to gather statistics on a facility named ‘Pump.’
Finally, the TERMINATE block destroys the transaction as it leaves the RELEASE block and decrements a counter by 1.
This simulation is run by entering the command ‘START 500’. The counter is set to this value, so that when 500 transactions have entered the TERMINATE block, the simulation will stop. It is then possible to obtain operating statistics about the queue and the petrol pump facility from GPSS.
The statistics obtained from this simulation model along with those from alternative designs will aid the decision-maker in deciding what is the best system to employ for the garage.
Reference(s) | |||
Book | Anderson, D. R., Sweeney, D. & Williams, T. (2002) An Introduction to Management Science: A Quantitative Approach to Decision Making. 10th Edition. South-Western College Publishing: United States of America (USA), California (CA), San Diego. [ISBN: 9780324145632]. [Available on: Amazon: https://amzn.to/3DrQjUY]. | ||
Book | Campbell, D. J. & Craig, T. (2005) Organisations and the Business Environment. 2nd Edition. Elsevier: Netherlands, North Holland, Amsterdam. [ISBN: 9780750658294]. [Available on: Amazon: https://amzn.to/3VHJupz]. | ||
Book | Pfaffenberger, B. (2002) Computers in Your Future 2003. 5th Edition. Prentice Hall: United States of America (USA), New Jersey (NJ), Bergen, Upper Saddle River. [ISBN: 9780139227820]. [Available on: Amazon: https://amzn.to/3gv8n7D]. | ||
Book | Thesen, A. & Travis, L. (1992) Simulation for Decision Making. Thomson Reuters - West: United States of America (USA), Minnesota (MN), Dakota, Eagan. [ISBN: 9780314835499]. [Available on: Amazon: https://amzn.to/3Sqcv6g]. |
Reference (or cite) Article | ||
Kahlon, R. S. (2013) Monte Carlo Simulation: An Example GPSS Simulation Problem [Online]. dkode: United Kingdom, England, London. [Published on: 2013-02-07]. [Article ID: RSK666-0000101]. [Available on: dkode | Ravi - https://ravi.dkode.co/2013/02/monte-carlo-simulation-example-gpss.html]. |
No comments:
Post a Comment
Comments on this blog are not moderated.
But, offensive ones will be deleted.