2 Simulation involves using a computer to imitate (simulate) the operation of an entire process or system.For example, simulation is frequently used to perform risk analysis on financial processes.Simulation also is widely used to analyze stochastic systems that will continue operating indefinitely.
3 Simulation modelTo prepare for simulating a complex system, a detailed simulation model needs to be formulated to describe the operation of the system and how it is to be simulated.A simulation model has several basic building blocks:1. A definition of the state of the system (e.g., the number of customers in a queueing system).2. Identify the possible states of the system that can occur.
4 3. Identify the possible events (e. g 3. Identify the possible events (e.g., arrivals and service completions in a queueing system) that would change the state of the system.4. A provision for a simulation clock, located at some address in the simulation program, that will record the passage of (simulated) time.5. A method for randomly generating the events of the various kinds.6. A formula for identifying state transitions that are generated by the various kinds of events.
5 Discrete – Event versus Continuous Simulation A discrete-event simulation is one where changes in the state of the system occur instantaneously at random points in time as a result of the occurrence of discrete events.A continuous simulation is one where changes in the state of the system occur continuously over time.
6 Generation of Random Numbers Implementing simulation sometimes requires random numbers to obtain random observations from probability distributions.The procedure used by a computer to obtain random numbers is called a random number generator.A random number generator is an algorithm that produces of numbers that follow a specified probability distribution and possess the appearance of randomness.
7 Random numbers can be divided into two main categories. (1) random integer number:A random observation from a discretized uniform distribution over some rangeThe probabilities for this distribution areUsually,
8 (2) uniform random number: A random observation from a (continuous) uniform distribution over some interval [a, b].The probability density function of this uniform distribution isWhen a and b are not specified, they are assumed to be a = 0 and b = 1.
9 For a given random integer number in the range 0 to , dividing this number by yields (approximately) a uniform random number.(If is small, this approximation should be improved by adding to the random integer number and then dividing by instead.)
10 Strictly speaking, the numbers generated by the computer should not be called random numbers because they are predictable and reproducible, given the random number generator being used.Therefore, they are sometimes given the name pseudo - random numbers.However, the important point is that they satisfactory play the role of random numbers in the simulation if the method used to generate them is valid.
11 Congruential Method for Random Number Generation Mixed congruential method:The mixed congruential method generates a sequence of random integer numbers over the range from 0 to m-1.The method always calculates the next random number from the last one obtained, given an initial random numberwhere a, c, and m are positive integers
12 Illustration of the mixed congruential method 12345674365721272237327421712324513657214The cycle length is 8.
13 Outline of a Major Simulation Study Step 1: Formulate the Problem and Plan the StudyStep 2: Collect the Data andFormulate the Simulation ModelStep 3: Check the Accuracy of the Simulation ModelStep 4: Select the Software andConstruct a Computer Program
14 Step 5: Test the Validity of the Simulation Model Step 6: Plan the Simulations to Be PerformedStep 7: Conduct the Simulation Runs andAnalyze the ResultsStep 8: Present Recommendations to Management
15 Step 1: Formulate the Problem & Plan the Study 1. What is the problem that management wantsstudied?2. What are the overall objectives for the study?3. What specific issues should be addressed?4. What kinds of alternative system configurationsshould be considered?5. What measures of performance of the system areof interest to management?6. What are the time constraints for performingthe study?
16 Step 2: Collect the Data and Formulate the Simulation ModelThe types of data needed depend on the nature of the system to be simulated.In each cases, the probability distributions of the relevant quantities are needed.In order to generate representative scenarios of how a system would perform, it is essential that a simulation generate random observations from these distributions rather than simply using averages.
17 Step 3: Check the Accuracy of the Simulation Model Before constructing a computer program, the OR team should engage the people most intimately familiar with how the system will operate in checking the accuracy of the simulation model.Then several erroneous model assumptions will be discovered and corrected, a few new assumptions will be added.
18 Step 4: Select the Software and Construct a Computer ProgramThere are four major classes of software used for computer simulations.(1) spreadsheet software, e.g., Excelfor more extensive applications(2) general-purpose programming languages,e.g. C, FORTRAN, PASCAL, BASIC(3) general-purpose simulation languages(4) applications-oriented simulators
19 Another key development in recent years the development of animation capabilities for displaying computer simulations in action, including three-dimensional capabilities.Key elements of a system are represented in a computer display by icons that change shape, color, or position when there is a change in the state of the simulation capabilities.
20 Step 5: Test the Validity of the Simulation Model The next step is to test whether the simulation model incorporated into the program is providing valid results for the system it is representing.Typically, the purpose of simulation is to investigate and compare various proposed system configurations to help choose the best one.
21 Step 6: Plan the Simulations to Be Performed At this point, you need to begin making decisions on which system configurations to simulate.This often is an evolutionary process, where the initial results for a range of configurations help you to hone in on which specific configurations warrant detailed investigation.
22 Step 7: Conduct the Simulation Runs and Analyze the ResultsThe output from the simulation runs now provides statistical estimates of the desired measures of performance for each system configuration of interest.In addition to a point estimate of each measure, a confidence interval normally should be obtained to indicate the range of likely values of the measure.
23 Step 8: Present Recommendations to ManagementAfter completing its analysis, the OR team needs to present its recommendations to management.This usually would be done through both a written report and a formal oral presentation to the managers responsible for making the decisions regarding the system under study.