Presentation is loading. Please wait.

Presentation is loading. Please wait.

Simulation Basic Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas -- forecasting,

Similar presentations


Presentation on theme: "Simulation Basic Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas -- forecasting,"— Presentation transcript:

1 Simulation Basic Concepts

2 NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas -- forecasting, inventory, queuing –Obtained by algorithms -- linear programming, PERT/CPM However, each of these models had to satisfy a restrictive set of assumptions –Many “real-life” situations do not meet these conditions or are too complex. SIMULATIONSIMULATION can be used to get “good” results

3 BACKGROUND Simulation is, in fact, the most used management science technique Simulation is not an optimization procedure like the one used to solve linear programs However, if you are considering one of a set of options, simulation can indicate which of these options appears to be the best in the set.

4 BASIC IDEA Recognize the components of the system under study Develop a random number mapping that will “map” random numbers from a (computer generated) random number table into events

5 PSEUDO RANDOM NUMBERS Random numbers should be uniformly distributed: –each digit in a random number should have a probability of 1/10 of occurring after any other digit –no pattern should exist in the random numbers Random numbers generated by a computer program are done so by an algorithm and the above conditions may be slightly violated The result is that the random numbers are not truly random - they are PSEUDO RANDOM NUMBERS

6 BENEFIT OF USING PSEUDO RANDOM NUMBERS The string of pseudo random numbers can be regenerated This allows us to compare policies under exactly the same conditions

7 PROBABILITIES AND RANDOM NUMBERS Typically computer generated random numbers are numbers between 0 and 1 –We can “lop off” the decimal for convenience The probabilities of possible events will be expressed as 1-digit, 2-digit, 3-digit, or …. probabilities -- the random numbers we use/assign should be of the same length

8 RANDOM NUMBER MAPPINGS Suppose that the number of students that miss a statistics class have been observed to be 0, 1, 2, 3, or 4 with the following probabilities: NUMBER 0 1 2 3 4 PROB..21.35.19.15.10 RN Map 00-20 21-55 56-74 75-89 90-99

9 APPROACH Generate a set of random numbers and map them into events We will choose the first two digits from column 1 of the random number table in the book

10 Simulation of 10 Classes 1 652 2773 3612 4883 5421 6742 7110 8401 9030 10622 ClassRandom # # Absences

11 ANALYSIS BETTER RESULTS We can now analyze “simulated results” Average # absences = (2+3+2+3+1+2+0+1+0+2)/10 = 1.6 For better results we can: –Repeat this 10-class simulation many times –Run the simulation for many more than 10 classes

12 USING EXCEL TO GENERATE RANDOM EVENTS 1.Create a 3-column LOOKUP table Column 1 – Lower Limit of the RN Interval Column 2 – Probability in the RN interval Column 3 – The corresponding X value for the interval =RAND() 2.Create a series of random numbers by =RAND() and drag down. EDIT/PASTE SPECIAL/VALUESCopy the random numbers then go to: EDIT/PASTE SPECIAL/VALUES and paste the same set of numbers on top of themselves (otherwise they will change anytime is pressed.) VLOOKUP(A,B,C) 3.To get the corresponding simulated results enter VLOOKUP(A,B,C) and drag, where: A = cell with the random number in it B = location of the table (i.e. $A$2:$C$7) input $ signs C = the column that has the simulated result in the table (3)

13 Create Probability Table

14 Create Lower Limits For Intervals 0 =A3+B3 Drag down

15 Generate Random Numbers =RAND() Drag down You will get different numbers Highlight cells B11:B25 – copy Leave cursor in cell B11.

16 Get Simulated Results =VLOOKUP(B11,$A$3:$C$7,3) Drag down Where the random number is Where the table is Put in $ signs Column of Lookup table that has Simulated results

17 Review Simulation can be used to approximate complex systems Use of pseudorandom numbers Random Number Mapping into Events Calculations How to Gain More Confidence Use of Lookup Tables and Excel’s RAND() and VLOOKUP functions


Download ppt "Simulation Basic Concepts. NEED FOR SIMULATION Mathematical models we have studied thus far have “closed form” solutions –Obtained from formulas -- forecasting,"

Similar presentations


Ads by Google