1 / 22

When and Why to use Simulations?

When and Why to use Simulations?. 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.

edj
Download Presentation

When and Why to use Simulations?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. When and Why to use Simulations? • 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.

  2. When Simulation Cannot be Used? • 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

  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 • These require less programming • Are more efficient and easier to check for errors • 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. Process of Simulation • Using simulation, a manager should • Define a problem • Introduce the variables associated with the problem • Construct a numerical model • Set up possible courses of action for testing • Run the experiment • Consider the results • Decide what courses of action to take

  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 Process of Simulation

  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. Simulation Study (detailed vision) 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?

  9. Simulation Study (detailed vision) 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.

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

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

  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. 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. 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. 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. Example 1.2 • Notations: • ti: time of arrival of the ith customer (t0=0) • Ai: interarrival time between (i-1)st and ith arrivals of customers • Si : time that server actually spends serving ith customer (exclusive of customer’s delay in queue) • Di : delay in queue of ith customer • Ci : time that ith customer completes service and departs • ei : time of occurrence of ith event of any type (ith value the simulation clock takes on, excluding the value )

  17. e1 e2 e3 e4 e5 e0 Time 0 t1 t2 c1 t3 c2 A1 A2 A3 S1 S2

  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. 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. 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. 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. Start Initialization routine Main program Time routine 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 0 1 Repeatedly i 2 Event routine i Library routines 1.Update system state 2.Update statistical counters 3.Generate future events and add to event list Generate random variates Is simulation over? No Report generator Yes 1. Compute estimates of interest 2. Write report Stop

More Related