SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian...

16

Transcript of SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian...

Page 1: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology
Page 2: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

SYSTEM SIMULATION[For B.E./B.Tech. and M. Tech. students of various

branches of Engineering as well as B.B.A. andM.B.A. students of all Indian Universities]

D.S. HIRADirector Shaheed Udham Singh

College of Engineering and TechnologyTangori (Mohali)

Punjab

S. CHAND & COMPANY LTD.(AN ISO 9001 : 2000 COMPANY)RAM NAGAR, NEW DELHI - 110 055

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 3: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

S . C H A N D & C O M P A N Y L T D .( A n IS O 9 0 0 1 : 2 0 0 0 C o m p a n y )H e a d O ffic e : 7 3 6 1 , R A M N A G A R , N E W D E L H I - 1 1 0 0 5 5P h o n e s : 2 3 6 7 2 0 8 0 -8 1 -8 2 , 9 8 9 9 1 0 7 4 4 6 , 9 9 1 1 3 1 0 8 8 8 ;F a x : 9 1 -1 1 -2 3 6 7 7 4 4 6S h o p a t: s c h a n d g ro u p .c o m ; E -m a il: s c h a n d @ v s n l.c o m

B ra n c h e s :

• 1 s t F lo o r, H e rita g e , N e a r G u ja ra t V id h y a p e e th , A s h ra m R o a d ,A h m e d a b a d -3 8 0 0 1 4 . P h . 2 7 5 4 1 9 6 5 , 2 7 5 4 2 3 6 9 , a h m e d a b a d @ s c h a n d g ro u p .c o m

• N o . 6 , A h u ja C h a m b e rs , 1 s t C ro s s , K u m a ra K ru p a R o a d ,B a n g a lo re -5 6 0 0 0 1 . P h : 2 2 2 6 8 0 4 8 , 2 2 3 5 4 0 0 8 , b a n g a lo re @ s c h a n d g ro u p .c o m

• 2 3 8 -A M .P . N a g a r, Z o n e 1 , B h o p a l - 4 6 2 0 1 1 . P h : 4 2 7 4 7 2 3 . b h o p a l@ s c h a n d g ro u p .c o m• 1 5 2 , A n n a S a la i, C h e n n a i-6 0 0 0 0 2 . P h : 2 8 4 6 0 0 2 6 , c h e n n a i@ s c h a n d g ro u p .c o m• S .C .O . 2 4 1 9 -2 0 , F irs t F lo o r, S e c to r- 2 2 - C ( N e a r A ro m a H o te l), C h a n d ig a rh -1 6 0 0 2 2 ,

P h -2 7 2 5 4 4 3 , 2 7 2 5 4 4 6 , c h a n d ig a rh @ s c h a n d g ro u p .c o m• 1 s t F lo o r, B h a rtia T o w e r, B a d a m b a d i, C u tta c k -7 5 3 0 0 9 , P h -2 3 3 2 5 8 0 ; 2 3 3 2 5 8 1 ,

c u t ta c k @ s c h a n d g ro u p .c o m• 1 s t F lo o r, 5 2 - A , R a jp u r R o a d , D e h ra d u n -2 4 8 0 0 1 . P h : 2 7 4 0 8 8 9 , 2 7 4 0 8 6 1 ,

d e h ra d u n @ s c h a n d g ro u p .c o m• P a n B a z a r, G u w a h a ti-7 8 1 0 0 1 . P h : 2 7 3 8 8 1 1 , g u w a h a t i@ s c h a n d g ro u p .c o m• S u lta n B a z a r, H y d e ra b a d -5 0 0 1 9 5 . P h : 2 4 6 5 1 1 3 5 , 2 4 7 4 4 8 1 5 , h y d e ra b a d @ s c h a n d g ro u p .c o m• M a i H ira n G a te , J a la n d h a r - 1 4 4 0 0 8 . P h . 2 4 0 1 6 3 0 , 5 0 0 0 6 3 0 , ja la n d h a r@ s c h a n d g ro u p .c o m• A - 1 4 J a n ta S to re S h o p p in g C o m p le x , U n iv e rs ity M a rg , B a p u N a g a r, J a ip u r - 3 0 2 0 1 5 ,

Phone : 2719126, ja ip u r@ s c h a n d g ro u p .c o m• K a c h a p illy S q u a re , M u lla s s e ry C a n a l R o a d , E rn a k u la m , K o c h i-6 8 2 0 1 1 . P h : 2 3 7 8 2 0 7 ,

c o c h in @ s c h a n d g ro u p .c o m• 2 8 5 / J , B ip in B ih a ri G a n g u li S tre e t, K o lk a ta -7 0 0 0 1 2 . P h : 2 2 3 6 7 4 5 9 , 2 2 3 7 3 9 1 4 ,

k o lk a t a @ s c h a n d g ro u p .c o m• M a h a b e e r M a rk e t, 2 5 G w y n n e R o a d , A m in a b a d , L u c k n o w -2 2 6 0 1 8 . P h : 2 6 2 6 8 0 1 , 2 2 8 4 8 1 5 ,

lu c k n o w @ s c h a n d g ro u p .c o m• B la c k ie H o u s e , 1 0 3 / 5 , W a lc h a n d H ira c h a n d M a rg , O p p . G .P .O ., M u m b a i-4 0 0 0 0 1 .

P h : 2 2 6 9 0 8 8 1 , 2 2 6 1 0 8 8 5 , m u m b a i@ s c h a n d g ro u p .c o m• K a rn a l B a g , M o d e l M ill C h o w k , U m re r R o a d , N a g p u r-4 4 0 0 3 2 P h : 2 7 2 3 9 0 1 , 2 7 7 7 6 6 6

n a g p u r@ s c h a n d g ro u p .c o m• 1 0 4 , C it ic e n tre A s h o k , G o v in d M itra R o a d , P a tn a -8 0 0 0 0 4 . P h : 2 3 0 0 4 8 9 , 2 3 0 2 1 0 0 ,

p a t n a @ s c h a n d g ro u p .c o m• 2 9 1 / 1 , G a n e s h G a y a tri C o m p le x , 1 s t F lo o r, S o m w a rp e th , N e a r J a in M a n d ir, P u n e -4 1 1 0 1 1 .

P h : 6 4 0 1 7 2 9 8 , p u n e @ s c h a n d g ro u p .c o m• F la t N o . 1 0 4 , S ri D ra u p a d i S m riti A p a rt m e n t, E a s t o f J a ip a l S in g h S ta d iu m , N e e l R a ta n S tre e t, U p p e r

B a z a r, R a n c h i-8 3 4 0 0 1 . P h : 2 2 0 8 7 6 1 , ra n c h i@ s c h a n d g ro u p .c o m• K a ila s h R e s id e n c y , P lo t N o . 4 B , B o ttle H o u s e R o a d , S h a n k a r N a g a r, R a ip u r. P h . 0 9 9 8 1 2 0 0 8 3 4

ra ip u r@ s c h a n d g ro u p .c o m

© D.S. Hira, 2001

All rights reserved. No part of this publication may be reproduced, stored in a retrievalsystem or transmitted, in any form or by any means, electronic, mechanical, photocopying,recording or otherwise, without the prior permission of the Publishers.

F irs t E d itio n 2 0 0 1

S e c o n d E d itio n 2 0 0 8

IS B N : 8 1 - 2 1 9 - 2 0 5 9 - 0C o d e : 1 0 A 2 2 9P R IN T E D IN IN D IA

B y R a je n d ra R a v in d ra P rin t e rs ( P v t.) L td ., 7 3 6 1 , R a m N a g a r, N e w D e lh i-1 1 0 0 5 5a n d p u b lis h e d b y S . C h a n d & C o m p a n y L td ., 7 3 6 1 , R a m N a g a r, N e w D e lh i-1 1 0 0 5 5 .

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 4: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

PREFACE TO THE SECOND EDITION

The objective of the book, in second addition also, remains the same, of giving a soundknowledge to the readers of the fundamental aspects of this important technique of system simulation,which is used in the analysis of complex systems. The emphasis continues to be on the discrete eventsimulation, which finds applications in a wide range of real life situations and is a part of thecurriculum of engineering and management disciplines of many universities. In the revised addition,a number of important topics have been added, especially on the input and output data analysis andGeneral Purpose Simulation System (GPSS) language.

The text now comprises of eleven chapters.

Chapter 1, which covers the basic concepts of system, system modeling and simulation, hasbeen expanded to include the details of types of models, the components of the system and applicationof simulation in design, training, education, healthcare and computer science.

Chapter 2 on Monte Carlo Method, chapter 3 on simulation of continuous systems and Chapter4 on generation of random numbers, remain almost the same, with a few additional examples andexercises in each.

Chapter 5 has been renamed as ‘Statistical Considerations’ and very useful material on centrallimit theorem, has been incorporated in this chapter.

Chapter 6 on simulation of queuing systems and chapter 7 on simulation of inventory systemshave been provided with more solved examples, while Chapter 8 on simulation of PERT has beenretained as it is.

Chapter 9 has been totally remodeled and named ‘Design of Simulation Experiments andOutput Analysis’. In addition to covering the verification and validation of models, design ofsimulation experiment and variance reduction techniques, a thorough treatment has been given toMetamodelling, regression analysis and ANOVA.

Chapter 10, in this edition, has been devoted to the simulation languages. Effort has been madeto provide sufficient inputs on various types of simulation tools. A detailed treatment has been givento GPSS, a very important discrete event simulation tool.

Chapter 11, which was Chapter 10 in the first edition, remains the same. A number of practicalapplications of the simulation technique has been discussed in this chapter. The solved problems andexercises given in this chapter can be taken up as the project work by the students.

It is expected that this revised edition of the book will be a very useful learning material for thestudents of engineering and management of various universities. A good practice of the givenexercises will prepare the readers to handle the real life situations with increased confidence.

Author is thankful to Prof. Mandeep Kaur Hundal of GNDU Regional Campus Jalandhar forproviding valuable help in translating the conceptual models into computer simulations and to Prof.Preetinder Kaur of SUSCET Tangori for providing valuable inputs on GPSS. Thanks are also due toMr. Sandeep Jain of SUSCET Tangori for assistance in data and text entry of the additional topicsof manuscript. Last but not the least; author is thankful to Mrs. Manjit Kaur Hira for her constantencouragement, motivation and moral support.

D.S. Hira

(iii)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 5: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

CONTENTS1. CONCEPTS OF SIMULATION ................................................................................. 1–16

1.1 Introduction .............................................................................................................. 11.2 The System ............................................................................................................... 11.3 Continuous and Discrete Systems .............................................................................. 41.4 Types of Models ....................................................................................................... 4

1.4.1 Physical and Mathematical Models ............................................................... 51.4.2 Static and Dynamic Models ........................................................................... 51.4.3 Analytical and Numerical Models ................................................................. 61.4.4 Deterministic and Stochastic Modells ............................................................ 6

1.5 System Simulation .................................................................................................... 61.6 Computer Simulation ................................................................................................ 71.7 Physical and Interactive Simulation ........................................................................... 71.8 Real time Simulation ................................................................................................. 71.9 Comparison of Simulation and Analytical Methods ................................................... 81.10 When to Use Simulation ............................................................................................ 81.11 Steps in Simulation Study .......................................................................................... 9

1.11.1 Problem Formulation .................................................................................... 91.11.2 Model Construction ...................................................................................... 91.11.3 Data Collection ............................................................................................. 91.11.4 Model Programming ..................................................................................... 91.11.5 Validation ................................................................................................... 101.11.6 Design of Experiment .................................................................................. 101.11.7 Simulation Run and Analysis ....................................................................... 101.11.8 Documentation ............................................................................................ 101.11.9 Implementation ........................................................................................... 10

1.12 Phases of Simulation Study ..................................................................................... 111.13 Advantages of Simulation ....................................................................................... 111.14 Limitations of Simulation Technique ....................................................................... 111.15 Areas of Applications .............................................................................................. 121.16 Simulation– A Management Laboratory .................................................................. 131.17 Simulation in Design ............................................................................................... 131.18 Simulation in Computer Science .............................................................................. 131 .19 Simulation in Training ............................................................................................ 141.20 Classification of Training Simulations ..................................................................... 141.21 Simulation in Education .......................................................................................... 151.22 Medical Simulators ................................................................................................. 161.23 Exercises ................................................................................................................ 16

2. MONTE CARLO METHOD .................................................................................... 17 -352.1 Monte Carlo Method ............................................................................................... 17

Example 2.1 Area of an Irregular Figure .................................................................. 17Example 2.2 A Gambling Game .............................................................................. 18Example 2.3 Numerical Integration by Monte Carlo Method ................................... 21Example 2.4 Determination of Value of by Monte Carlo Method ......................... 24Example 2.5 Random Walk Problem ....................................................................... 25Example 2.6 Reliability Problem ............................................................................. 26

2.2 Normally Distributed Random Numbers .................................................................. 30Example 2.7 Application of Random Normal Numbers ........................................... 30

(v)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 6: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

2.3 Monte Carlo Method V/S Stochastic Simulation ...................................................... 31Example 2.8 Example of stochastic model – A Hinge Assembly .............................. 32Example 2.9 ............................................................................................................ 33

2.4 Exercises ................................................................................................................ 343. SIMULATION OF CONTINUOUS SYSTEMS ........................................................ 36-55

3.1 Introduction ............................................................................................................ 363.2 A Pure Pursuit Problem ........................................................................................... 363.3 Simulation of Chemical Reaction ............................................................................ 393.4 The Runge-Kutta Method ........................................................................................ 423.5 Simulation of an Amplifier Circuit ........................................................................... 433.6 A Serial Chase Problem ........................................................................................... 453.7 Simulation of Exterior Ballistics .............................................................................. 493.8 Analog Simulation .................................................................................................. 523.9 Disadvantages of Analog Simulation ....................................................................... 533.10 Exercises ................................................................................................................ 53

4. RANDOM NUMBERS ............................................................................................... 56-754.1 Random Numbers ................................................................................................... 564.2 Random Number Tables .......................................................................................... 564.3. Pseudo Random Numbers ....................................................................................... 574.4 Generation of Random Numbers ............................................................................. 574.5 Mid Square Random Number Generator .................................................................. 584.6 Congruence Method or Residue Method .................................................................. 594.7 Arithmetic Cogruential Generator ........................................................................... 624.8 Combined Cogruential Generator ............................................................................ 644.9 Qualities of an Efficient Random Number Generator ............................................... 644.10 Testing Numbers for Randomness ........................................................................... 644.11 Uniformity Test ....................................................................................................... 654.12 Chi-square Test ....................................................................................................... 654.13 Testing for Autocorrelation ...................................................................................... 67

4.13.1 Uniformity Test ........................................................................................... 684.13.2 Chi-squared Test for Autocorrelation ........................................................... 68

4.14 Poker Test ............................................................................................................... 694.15 Exercises ................................................................................................................ 74

5. STATISTICAL CONSIDERATIONS ...................................................................... 76-1185.1 Stochastic Activities ................................................................................................ 765.2 Discrete Probability Function .................................................................................. 765.3 Cumulative Distribution Function ............................................................................ 775.4 Continuous Probability Function ............................................................................. 795.5 Measure of Probability Function ............................................................................. 80

5.5.1 Central Tendency ........................................................................................ 805.5.2 Dispersion ................................................................................................... 86

5.6 Generation of Random Variates ............................................................................... 875.7 Bernoulli Trial ........................................................................................................ 875.8 Binomial Distribution .............................................................................................. 885.9 Negative Binomial Distribution ............................................................................... 895.10 Geometric Distribution ............................................................................................ 905.11 Hyper Geometric Distribution ................................................................................. 905.12 Poisson Distribution ................................................................................................ 915.13 Empirical Distribution ............................................................................................. 92

(v)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 7: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

5.14 Continuous Distribution .......................................................................................... 935.15 Normal Distribution ................................................................................................ 935.16 Exponential Distribution ......................................................................................... 965.17 Erlang Distribution .................................................................................................. 975.18 Uniform Distribution ............................................................................................... 995.19 Beta Distribution ..................................................................................................... 995.20 Central Limit Theorem .......................................................................................... 1145.21 Exercises .............................................................................................................. 116

6. SIMULATION OF QUEUING SYSTEMS ............................................................ 119-1526.1 Introduction .......................................................................................................... 1196.2 The Components of a Waiting Line System ........................................................... 1196.3 Stationary and Time Dependent Queues ................................................................ 1216.4 Transient and Steady States of the System ............................................................. 1226.5 Measure of System Performance ........................................................................... 1226.6 Costs of Customer Waiting Time and idle Capacity ............................................... 1236.7 Kendall’s Notation ................................................................................................ 1236.8 Time flow Mechanics ............................................................................................ 124

6.8.1 Fixed Time Increment Method .................................................................. 1246.8.2 Next Event Increment Method ................................................................... 1246.8.3 Comparison of the Two Methods ............................................................... 125

6.9 Example —Time Oriented Simulation ................................................................... 1256.10 Example -Event Oriented Simulation ..................................................................... 1336.11 Two Servers in Parallel Queuing System ............................................................... 1426.12 Exercises .............................................................................................................. 149

7. SIMULATION OF INVENTORY SYSTEMS ...................................................... 153-1727.1 Introduction .......................................................................................................... 1537.2 Classification of Inventory Systems ....................................................................... 1537.3 Inventory Costs ..................................................................................................... 1547.4 Single Item Constant Demand Inventory Model ..................................................... 1547.5 E O Q with Constant Lead Time ............................................................................ 1557.6 E O Q with Shortage ............................................................................................. 1567.7 Why Simulation of Inventory Systems ................................................................... 157

7.7.1 Gradual Replenishment ............................................................................. 1577.7.2 Multi-Item Production ............................................................................... 1577.7.3 Capital Restriction .................................................................................... 1577.7.4 Quantity Discount ..................................................................................... 1587.7.5 Varying Demand ....................................................................................... 1587.7.6 Varying Lead Time ................................................................................... 1587.7.7 Multiple Order Outstanding ....................................................................... 158

7.8 Example - Simulation of an Inventory Problem ..................................................... 1587.9 Example -Single Order Outstanding ...................................................................... 1647.10 Exercises ............................................................................................................. 171

8. SIMULATION OF PERT ...................................................................................... 173-1938.1 Introduction .......................................................................................................... 1738.2 Terms used in Networks ........................................................................................ 1738.3 Numbering the Events (Fulkerson’s Rule) .............................................................. 1748.4 Measure of Activity ............................................................................................... 1748.5 Frequency Distribution Curve for PERT ................................................................ 175

(vi)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 8: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

8.6 Critical Path .......................................................................................................... 1758.7 Why Simulation? .................................................................................................. 1778.8 Simulation Example .............................................................................................. 1778.9 Computer Programming of CPM Computations ..................................................... 179

8.9.1 Forward Pass Computations ...................................................................... 1818.9.2 Backward Pass Computations .................................................................... 182

8.10 Computations of Slack and Floats ......................................................................... 1858.11 Probabilistic Activities of PERT ........................................................................... 1868.12 Computer Program for Simulation ......................................................................... 1868.13 Exercises .............................................................................................................. 193

9. DESIGN OF SIMULATION EXPERIMENT AND OUTPUT ANALYSIS ......... 194-2289.1 Verification and Validation of Simulation Models ................................................. 1949.2 Interactive Process of Verification and Validation ................................................. 1949.3 Calibration and Validation of Models .................................................................... 195

9.3.1 Face Validity ............................................................................................ 1969.3.2 Validation of Assumptions ........................................................................ 1969.3.3 Output Data Validation ............................................................................. 197

9.4 Input Validation - Using a Turning Test ................................................................ 1979.5 Terminating and Non-Terminating Systems ........................................................... 1989.6 Design of Simulation Experiment .......................................................................... 1989.7 Length of Simulation Run ..................................................................................... 1999.8 Replications of Runs ............................................................................................. 2009.9 Batch Means ......................................................................................................... 2019.10 Elimination of initial Bias in Simulation Experiments ............................................ 2019.11 Statistical Independence of Observations ............................................................... 2039.12 Variance Reduction Techniques (VRT) ................................................................. 203

9.12.1 Common Random Numbers / Correlated Sampling .................................... 2049.12.2 Antithetic Sampling / Method of Complementary Random numbers .......... 2059.12.3 Stratified Sampling ................................................................................... 2059.12.4 Importance Sampling ................................................................................ 206

9.13 Distributed Simulation .......................................................................................... 2089.14 Metamodelling ...................................................................................................... 2089.15 Regression Analysis .............................................................................................. 2099.16 Scatter Diagram .................................................................................................... 2099.17 Simple Linear Regression ...................................................................................... 2109.18 Method of Least Squares ....................................................................................... 2119.19 Validating the Regression Equation ....................................................................... 2129.20 The Standard Error of Estimate ............................................................................. 2139.21 Caution in Using Regression Analysis ................................................................... 2169.22 Multiple Regression .............................................................................................. 2169.23 Multiple Linear Regression ................................................................................... 2169.24 Statistical Significance of Regression .................................................................... 2179.25 Coefficient of Correlation ..................................................................................... 2179.26 Analysis of Variance (ANOVA) ............................................................................. 2189.27 Assumptions of ANOVA ....................................................................................... 2189.28 Types of ANOVA .................................................................................................. 2199.29 Partitioning of the Sum of Squares ........................................................................ 2199.30 Exercises .............................................................................................................. 225

(vii)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 9: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

10. SIMULATION LANGUAGES .............................................................................. 229–24710.1 Introduction .......................................................................................................... 22910.2 Merits of Simulation Languages ............................................................................ 22910.3 Merits of General Purpose Languages ................................................................... 23010.4 Simulation Languages and Simulations .................................................................. 23010.5 Desirable feature of Simulation Software .............................................................. 23010.6 Discrete Event Simulation Tools ............................................................................ 23110.7 Classification of Simulation Tools ......................................................................... 231

10.7.1 Libraries ................................................................................................... 23210.7.2 Discrete Event Simulation Languages ........................................................ 23210.7.3 World View ............................................................................................... 23210.7.4 GUI Bases System .................................................................................... 23410.7.5 Wizards..................................................................................................... 234

10.8 SIM SCRIPT ........................................................................................................ 23410.9 SLAM II ............................................................................................................... 23510.10 SIMAN ................................................................................................................. 23510.11 General Purpose Simulation System (GPSS) – Introduction ................................... 23610.12 GPSS– Output Information ................................................................................... 2361.13 GPSS–Block Diagram ........................................................................................... 23710.14 Characteristics of the Blocks ................................................................................. 237

10.14.1Block Time ............................................................................................... 23710.14.2Alternative Actions ................................................................................... 23710.14.3Selection Factor ........................................................................................ 23710.14.4Transactions .............................................................................................. 23710.14.5 Items of Equipment ................................................................................... 23810.14.6Stores and Facilities .................................................................................. 238

10.15 Block Types .......................................................................................................... 23810.16 SIMULATE, START and END Statements ............................................................ 24510.17 Merits of GPSS ..................................................................................................... 24510.18 Exercises .............................................................................................................. 247

11. SIMULATION EXAMPLES................................................................................. 248–28711.1 Introduction .......................................................................................................... 24811.2 Simulation of a Counter Service ............................................................................ 24811.3 Simulation of Maintenance and Replacement Problem .......................................... 25311.4 Simulation of a Profit Analysis Problem ................................................................ 25711.5 Simulation of a profit Analysis Problem ................................................................ 26411.6 Simulation of an Inventory Problem ...................................................................... 26811.7 Simulation of Manufacturing System ..................................................................... 27011.8 Example: Car Wash Station ................................................................................... 27611.9 Exercises .............................................................................................................. 279

APPENDIXA-1 Random Numbers Table ........................................................................................ 288A-2 Chi-Square Distribution ........................................................................................ 289A-3 Normally Distributed Random Numbers ................................................................ 289A-4 Cumulative Poisson Probabilities .......................................................................... 290A-5 Students t-Distribution .......................................................................................... 293A-6 Kolmogorov -Smirnov Critical Values ................................................................... 294A-7 Area under Normal Distribution ............................................................................ 295A-8 Percentage Points of the F-Distribution with = 0.05 ........................................... 296

(viii)

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 10: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

Chapter 1

CONCEPTS OF SIMULATION

1.1 IntroductionSimulation is the representation of a real life system by another system, which depicts the

important characteristics of the real system and allows experimentation on it. In other words, simulationis an imitation of the reality. Though the formal use of the simulation technique is not very old,simulation has long been used by the researchers, analysts, designers and other professionals in thephysical and non-physical experimentations and investigations. In our day-to-day life, we usesimulation, even without realizing it. Globe imitates some important geographical characteristics ofthe earth. Scale models of various machines and plants are used in laboratories to study theirperformance characteristics. Simple models of machines are used to simulate the plant layouts. Amodel aeroplane suspended in a wind tunnel simulates a real sized plane moving through theatmosphere, and is used to study the aerodynamic characteristics. A children cycling park, withvarious crossings and signals is a simulated model of the city traffic system. A planetarium representsa beautiful simulation of the planetary system. Environments in a geological park and in a museumof natural history are other examples of simulation.

In each of these examples, the real system has been substituted by physical model, which is notpossible in case of complex and intricate problems of managerial decision making. The inventorymanagement system, complicated waiting lines, manufacturing system etc., cannot be imitatedphysically. In such cases, a series of mathematical and logical statements are used to represent thesystem. Simulation of this type involves a huge amount of computations, which are possible only withthe help of a powerful computing system, and hence the name computer simulation or system simulation.

It can be said that system simulation is mimicking of the operation of a real system, such as theday-to-day operation of a bank, or the running of an assembly or production line in a factory, orassignment of salesman to different sales areas. A simulation is the execution of a computer model ofthe system that is a computer program, to get information about the system. It is like conducting anexperiment on the system, and as compared to purely theoretical analysis, simulation is much flexibleand convenient. The readily available simulation softwares has made it possible for managers who arenot computer programmers or expert analysts, to model and analyze the operation of real systems.Before going into further details, it will be appropriate to discuss the concept of system.

1.2 The SystemThe term ‘System’ is a word of everyday use. It is used in a large variety of situations and in

such a variety of ways, that it has become very difficult to give a definition sufficiently broad to coverthe variety of uses, and concise enough to serve the purpose. There are many definitions found inliterature, but none can universally be applied. Klir* gives a collection of 24 definitions and one suchdefinition is, “A system is a collection of components wherein individual components are constrainedby connecting interrelationships such that the system as a whole fulfills some specific functions inresponse to varying demands”.

1* Klir, George J., An Approach to General Systems Theory, New York : Van Nostrand Reinhold Co., 1969

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 11: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

2 System Simulation

In simple, the system has also been defined as “an aggregation or assemblage of objectsjoined in some regular interaction or interdependency.”

(Gorden Geoffrey, System Simulation, Prentice Hall of India, New Delhi, 1980)These definitions seem to be more relevant to the physical and static systems comprising of

components or objects, connected by some physical laws. A more comprehensive definition mustinclude the dynamic effects, where the interactions cause changes over time.

A simple example of system can be taken of an engine governor, which is required to keepthe speed constant within limits, at varying loads on the engine (Fig. 1.1). As the load is changed,speed changes, governor balls lift or lower the sleeve, which controls the fuel supply, and in turnthe speed. It is an automatic control system.

A manufacturing system comprises of a number of departments such as production controldepartment, purchase department, fabrication, assembly, finishing, packaging, inspection and qualitycontrol, shipping and personnel department etc. All of these departments are interlinked to maintain

the proper flow of the materials and information. These components of the manufacturing systemare individually very complicated and the system as a whole becomes very complex.

In case of a governor system, the components of the system, the engine, governor, fuel pumpetc., are all physical. Their interrelationships are based on well-known physical laws. Such systemsare called physical systems.

The manufacturing system, on the other hand comprises of a large number of departments,with man made interrelationships, which cannot be represented by physical objects. Such systemsare classified as non-physical systems. Management systems, social system, education system,political system etc. are all non-physical systems.

The behavior of one component of a system affects the performance of other components dueto interconnections and hence, when a system is identified it has to be described and studied asa whole. This methodology of tackling the system is called systems approach. We may also callit the scientific approach. The term system engineering has been used for engineering employingsystems approach.

The performance of a system is often affected by the activities occurring outside the system.The availability of raw materials, power supply, demand of goods etc., are activities, which willaffect the performance of the manufacturing system. Similarly some activities may also producechanges that may not affect the system at all. All these changes, which occur outside the system,constitute the system environment. Thus, while describing a system, it is an important step to drawa boundary between the system and its environment. How and where the boundary is to be drawndepends upon the purpose of modeling the system. For example, if in a manufacturing system theeffect of a particular work place lay out is to be studied, then activities like inspection, purchasing,packaging, inprocess inventory level etc., are all external to the system. On the other hand if theidle time of bank teller is to be studied, the arrival of customers is an activity internal to thesystem. Activities, which occur within the system, are called endogenous activities, while thoseoccurring in environment are called exogenous activities. A system for which there is no exogenous

Load Engine(Speed)

Governor(Lift of Sleeve)

Fuel Pump(Control Fuel Supply)

Fig. 1.1

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 12: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

Concepts of Simulation 3

activities, that is the system that is not affected by its environment, is said to be closed system,while a system, which is affected by the activities occurring outside its boundary, is called an opensystem.

In each system, there are some distinct components, which are of interest in a particularinvestigation. While the term entity is used to denote the component of interest, the property ofinterest of the entity is called its attribute. There can be many attributes to an entity. In a trafficsystem vehicles say buses, trucks and cars may be the entities while speed, distance moved, noiseproduced, exhaust emission, number of accidents etc., may be the attributes of each entity. Whichof these are of interest will depend upon the purpose of investigation.

The process, which causes change in any attribute of an entity of a system, is called anactivity. In case of traffic system, driving may be an activity. The term, state of the system at apossible time, is the description of all entities, attributes and activities, as they exist at thatparticular point in time.

Some other terms, which are frequently encountered while dealing with a system, are givenbelow.

Queue: It is a situation, where entities wait for some thing to happen. It may be physicalqueue of people, or of objects, or a list of tasks to be performed.

Creating: Creating is causing an arrival of a new entity to the system at some point in time.Scheduling: Scheduling is the process of assigning events to the existing entities, like the

service begin and service and times.Random variable: It is a variable with uncertain magnitude, i.e., whose quantitative value

changes at random. The inter arrival times of vehicles arriving at a petrol pump, or the life ofelectric bulbs are random variables.

Random variate: Random variate is a variable generated by using random numbers alongwith its probability density function.

Distribution: It is a mathematical law which governs and defines probabilistic features of therandom variables. It is also called probability density function.

Let us take the example of a petrol pump, where vehicles arrive at random for getting petrolor diesel. In this case,

Entities are vehicles which will comprise of various types of four, three and two wheelers.Events are arrival of vehicles, service beginning, service ending, departure of vehicles.States: or state variables are the number of vehicles in the system at a particular time, number

of vehicles waiting, number of workers busy, etc.Attributes: Type of vehicle–four wheeler, two wheeler, petrol or diesel, size of fuel tank,

filling rate of machine, etc.Queue: Vehicles waiting in front of the pump.Random variables: Inter arrival times of vehicles, service times and billing times, etc.Distribution: The distribution may be one of the many statistical probability density functions.

It is generally assumed to be exponential in case of queuing systems.Table 1.1 lists the examples of entities, attributes, activities, events and state variables for a

few systems. This table does not show a complete list of all entities, attributes, activities, eventsor states of the system, as the complete list can be made only when the system is properly defined.

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 13: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

4 System Simulation

Table 1.1

System Entities Attributes Activities Events State variablesBanking Customers Balance, Making Arrivals, Number of customers

Credit deposits, departures waiting, number ofstatus withdrawls busy tellers

Traffic Vehicles Distance, Driving Stopping, Status of trafficcontrol speed, type starting signals, numberlights of vehicle waiting, time to greenProduction Machines, Processing Machining, Work arrives Machine busy,

Work rates, welding, at machine, Work piecepieces breakdown sampling, processing waiting, machine

times moving of starts, ends downwork pieces

Super market Customers, Shopping Collecting Arrival in Availability of stock,trolleys, list items, store, collect variety, number ofbaskets checking basket, end shoppers waiting

out shopping for check outCommunication Messages Length, Transmitting Sending Massages waiting

priority, time, arrival to be transmitteddestination at destination

1.3 Continuous and Discrete SystemsFrom the viewpoint of simulation, the systems are usually classified into two categories, Continuous systems Discrete systemsSystem in which the state of the system changes continuously with time are called continuous

systems while the systems in which the state changes abruptly at discrete points in time are calleddiscrete systems. The pure pursuit problem represents a continuous system since the state variables,the locations of target and pursuer, varies continuously with time. The inventory systems discussedin Chapter 7 and the queuing systems discussed in Chapter 6 are examples of discrete systems. Incase of inventory system, the demand of items as well as the replenishment of the stock occur atdiscrete points in time and also in discrete numbers. Similarly in case of queuing systems thecustomers arrive and leave the system at discrete points in time. Generally the systems in which therelationships can be expressed by mathematical expressions as in engineering and physical sciences,turn out to be continuous systems, while the systems encountered in operations research andmanagement sciences are generally discrete systems. In continuous systems, the variables are by andlarge deterministic while discrete systems generally deal with stochastic situations. Few systems arewholly continuous or discrete. In reservoir problem sudden heavy rains or sudden heavy release mayresult into sudden changes in the state of the system and may call for discrete treatment. In a factorysystem though the start and finish of a machine are discrete points but the machining process iscontinuous. Thus, no specific rules can be laid for the development of simulation models. However,effort should be made to reach a judicious balance between the simplicity of the model and thedesired level of detail and accuracy of results.

1.4 Types of ModelsThe models used for the analysis of various types of systems have been classified in a number

of ways, as shown in Fig. 1.2.

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 14: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

Concepts of Simulation 5

Fig. 1.2 Types of models

1.4.1Physical and Mathematical ModelsThe first major classification of models is into physical models and mathematical models.Physical models: In physical models, physical objects are substituted for real things. Physical

models are based on some analogy between the model and simulated system. These models maycomprise of only physical objects without any dynamic interaction between them, or physical objectswhere there is dynamic interaction between the components or the attributes of the system.Representation of mechanical systems by electrical systems, of hydraulic system by electricalsystems, and vice-versa are examples of physical models. Here, the mechanical attributes likepressure, speed and load etc. are represented by properties like voltage, current and resistance etc.It can be said that in physical models, a physical representation is prepared for studying the system.

Mathematical models: The mathematical models comprise of symbolic notations andmathematical equations to represent the system. The system attributes are represented by the variableslike the controlled and dependent variables, while the activities or the interaction between thevariables are represented by mathematical functions. The mathematical models can be static as wellas dynamic and further analytical, numerical or simulation models, depending upon the techniquesemployed to find its solution.

1.4.2Static and Dynamic ModelsStatic models: A static model represents a system, which does not change with time or

represents the system at a particular point in time. Static models describe a system mathematically,in terms of equations, where the potential effect of each alternative is ascertained by a singlecomputation of the equation. The variables used in the computations are averages. The performanceof the system is determined by summing the individual effects.

Since the static models ignore the time dependent variables, these cannot be used to determinethe influence of changes which occur due to the variations in the parameters of the system. The staticmodels, do not take into consideration the synergy of the components of the system, where the actionof separate elements can have a different effect on the modeled system then the sum of theirindividual effect could indicate.

Models

Physical Models

Static Models Dynamic Models Static Models Dynamic Models

MathematicalModels

NumericalModels

NumericalModels

SystemSimulation

Analytical Models

Analytical Models

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 15: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

6 System Simulation

Dynamic models: The dynamic simulation models represent systems as they change over time.Dynamic modeling is a software representation of the dynamic or time-based behavior of a system.While a static model is a mathematical model and involves a single set of computations of theequations, the dynamic model involves an interactive procedure of solution. Dynamic model constantlyre-computes its equations as the variation in parameters occur with time.

Dynamic models can predict the performance of the system for a number of alternative coursesof action and can take into consideration the variance or randomness. Most of the activities occurringin nature are random, their occurrence cannot be controlled, but dynamic models help to predict theoutcome of their behavior.

1.4.3Analytical and Numerical ModelsThe classification of models into analytical and numerical models is based only on the

methodology employed to solve the mathematical model. The mathematical models which can besolved by employing analytical techniques of mathematics are called analytical models, while themodels which require the application of numerical methods are called numerical models. Thenumerical techniques involve the application of computational procedures to solve the mathematicalequations which can be handled only by computers. The numerical computations in the interactiveform are akin to simulation. Simulation is though used in regard to physical models also, but mostof the applications have been found in mathematical modeling and further for modeling the dynamicand stochastic behavior of the systems.

1.4.4Deterministic and Stochastic ModelsDeterministic models: The deterministic models have a known set of inputs, which result into

a unique set of outputs. In case of pure pursuit problem discussed in section 3-2, the initial positionof the target and pursuer, their speeds and the path of flight are known and can be expressed bymathematical equations. For a given set of inputs there can be only one output. This model isdeterministic. Occurrence of events is certain and not dependent on chance.

Stochastic models: In stochastic simulation models, there are one or more random inputvariables, which lead to random outputs. The outputs in such a case are only estimates of truecharacteristics of the system. The waiting line system, where the arrival of customers is random isa stochastic system. The working of a production line, where the operation times at different workstation are random is a stochastic process. The random variables in a stochastic system may berepresented by a continuous probability function or these may be totally discrete. Depending uponthe distribution of random variables, stochastic models can be further divided into continuous modelsand discrete models. Because of the randomness of the variables, the results of stochastic simulationsare always approximate. To obtain reliable results, a stochastic simulation model has to be run fora sufficiently long duration.

1.5 System SimulationIn the introduction to the subject, a variety of examples have been given to explain the concept

of simulation. In that context, forming of a physical model and experimenting on it is simulation.Developing a mathematical model and deriving information by analytical means is simulation. Whereanalytical methods are not applicable numerical methods or specific algorithms are applied to analyzethe mathematical models, which again is simulation. These models, physical as well as mathematicalcan be of a variety of types. Thus the term simulation described as a procedure of establishing amodel and deriving solution from it covers the whole gamut of physical, analogue, analytical andnumerical investigations. To distinguish this interpretation of simulation from more general use ofthe technique the term system simulation is used. Geoffrey Gorden has defined system simulation as“the technique of solving problems by observation of the performance, over time, of a dynamic model

Created with Print2PDF. To remove this line, buy a license at: http://www.software602.com/

Page 16: SYSTEM SIMULATION...branches of Engineering as well as B.B.A. and M.B.A. students of all Indian Universities] D.S. HIRA Director Shaheed Udham Singh College of Engineering and Technology

System Simulation

Publisher : SChand Publications ISBN : 9788121920599 Author : D. S. Hira

Type the URL : http://www.kopykitab.com/product/11689

Get this eBook

20%OFF