Presentation is loading. Please wait.

Presentation is loading. Please wait.

 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,

Similar presentations


Presentation on theme: " Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,"— Presentation transcript:

1  Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational, organizational, and environmental changes can be simulated.  The knowledge gained in designing a simulation model may be of great value toward suggesting improvement in the system under investigation.  Simulation can be used to experiment with new designs or policies prior to implementation (what if scenarios).  Experiments can be very expensive, dangerous …  The modern system is so complex that the interactions can be treated only through simulation. When and Why to use Simulations?

2  when the problem can be solved using common sense  when the problem can be solved analytically  when it is easier to perform direct experiments  when the costs exceed the savings  when the resources or time are not available  when the ability to verify and validate the model is very limited  when the system behavior is too complex or cannot be defined When Simulation Cannot be Used?

3 Role of Computers in Simulation Computers are critical in simulating complex tasks Three types of computer programming languages are available to help the simulation process General-purpose languages Special-purpose simulation languages 1.These require less programming 2.Are more efficient and easier to check for errors 3.Have random number generators built in Pre-written simulation programs built to handle a wide range of common problems Excel and add-ins can also be used for simulation problems

4 Using simulation, a manager should 1.Define a problem 2.Introduce the variables associated with the problem 3.Construct a numerical model 4.Set up possible courses of action for testing 5.Run the experiment 6.Consider the results 7.Decide what courses of action to take Process of Simulation

5 Define Problem Introduce Important Variables Construct Simulation Model Specify Values of Variables to Be Tested Conduct the Simulation Examine the Results Select Best Course of Action

6 Simulation Study ( detailed vision ) 1- Problem formulation: Every study should begin with a statement of the problem 2- Setting of objectives and overall project plan: The objectives indicate the questions to be answered by simulation. 3- Model conceptualization: The construction of a model of a system is probably as much art as science

7 Simulation Study ( detailed vision ) 4- Data collection: There is a constant interplay between the construction of the model and the collection of the needed input data [Shannon, 1975]. As the complexity of the model changes, the required data elements may also change.

8 5- Model translation: the model must be entered into a computer- recognizable format. 6- Verification: Is the computer program performing properly? 7- Validation: Does the simulation model replicate this system measure? Simulation Study ( detailed vision )

9 8- Experimental design: The alternatives that are to be simulated must be determined 9- Production runs and analysis: Production runs, and their subsequent analysis, are used to estimate measures of performance for the system designs that are being simulated. Simulation Study ( detailed vision )

10 10- More runs? determines if additional runs are needed and what design those additional experiments should follow. 11- Documentation and Reporting. 12- Implementation. Simulation Study ( detailed vision )

11 11 Discrete Event Simulation Definition Time-Advance Mechanisms Components and Organization of a Discrete -Event Simulation Model – Components – Logic Organization

12 12 Definitions Discrete-event simulation concerns the modeling of a system as it evolves over time by a representation in which the state variables change instantaneously at separate points in time. Or the system can change at only a countable number of points in time. Event is defined as an instantaneous occurrence that may change the state of the system.

13 13 Example 1.1 Single-server queuing system: a barbershop, to estimate the (expected) average delay in queue (line) of arriving customers – State variables: the status of the server (busy or idle), the number of customers waiting in queue to be served, the time of arrival of each person waiting in queue. – Events: the arrival of a customer and the completion of service for a customer, which results in the customer ’ s departure.

14 14 Time-Advance Mechanisms Simulation clock: the variable in a simulation model that gives the current value of simulated time. – to keep track of the current value of simulated time as the simulation proceeds – to advance simulated time from one value to another Advancing the simulation clock – next-event time advance (mostly used) – fixed-increment time advance (a special case of the first) Next-event time-advance approach – simulation clock is initialized to zero – the times of occurrence of future events are determined.

15 15 Time-Advance Mechanisms More on next-event time advance –Initialize simulation clock to 0 –Determine times of occurrence of future events – event list –Clock advances to next (most imminent) event, which is executed Event execution may involve updating event list –Continue until stopping rule is satisfied (must be explicitly stated) –Clock “jumps” from one event time to the next, and doesn’t “exist” for times between successive events … periods of inactivity are ignored

16 16 Example 1.2 Notations: – t i : time of arrival of the ith customer (t 0 =0) – A i : interarrival time between (i-1)st and ith arrivals of customers – S i : time that server actually spends serving ith customer (exclusive of customer ’ s delay in queue) – D i : delay in queue of ith customer – C i : time that ith customer completes service and departs – e i : time of occurrence of ith event of any type (ith value the simulation clock takes on, excluding the value )

17 17 e0e0 e1e1 e2e2 e3e3 e4e4 e5e5 0 t1t1 t2t2 c1c1 t3t3 c2c2 A1A1 A2A2 A3A3 S1S1 S2S2 Time

18 18 Components and Organization of a Discrete-Event Simulation Model Components (10)  Systems state: The collection of state variables necessary to describe the system at a particular time  Simulation clock: A variable giving the current value of simulated time  Event list: A list containing the next time when each type of event will occur  Statistical counters: Variables used for storing statistical information about system performance

19 19 Continue...  Initialization routine: A subprogram to initialize the simulation model at time 0  Timing routine: A subprogram that determines the next event from the event list and then advances the simulation clock to the time when that event is to occur  Event routine: A subprogram that updates the system state when a particular type of event occurs (there is one event routine for each event type)

20 20 Continue...  Library routines: A set of subprograms used to generate random observations from probability distributions that were determined as part of the simulation model  Report generator: A subprogram that computes estimates (from the statistical counters) of the desired measures of performance and produces a report when the simulation ends

21 21 Continue...  Main program: A subprogram that invokes the timing routine to determine the next event and then transfers control to the corresponding event routine to update the system state appropriately. The main program may also check for termination and invoke the report generator when the simulation is over.

22 22 Start 1. Set simulation clock=0 2. Initialize system state and statistical counters 3. Initialize event list 0. Invoke the initialization routine 1. Invoke the timing routine 2. Invoke event routine 1. Determine the next event type, say, i 2. Advance the simulation clock 1.Update system state 2.Update statistical counters 3.Generate future events and add to event list Repeatedly Initialization routine Main programTime routine Event routine i Generate random variates Library routines Is simulation over? 1. Compute estimates of interest 2. Write report Stop Report generator 10 2 i No Yes


Download ppt " Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,"

Similar presentations


Ads by Google