Simulation Modeling & Simulation 33.  Simulation: It is a numerical technique for conducting experiments with certain types of mathematical models.

Slides:



Advertisements
Similar presentations
Modeling and Simulation By Lecturer: Nada Ahmed. Introduction to simulation and Modeling.
Advertisements

Introduction into Simulation Basic Simulation Modeling.
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
Parallel and Distributed Simulation
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Experimental Design, Response Surface Analysis, and Optimization
CS433 Modeling and Simulation Lecture 11 Monté Carlo Simulation Dr. Anis Koubâa 05 Jan 2009 Al-Imam Mohammad Ibn.
FIN 685: Risk Management Topic 5: Simulation Larry Schrenk, Instructor.
Intro to Simulation and Virtual Reality CE Animation v Simulation Week 3.
Discrete-Event Simulation: A First Course Steve Park and Larry Leemis College of William and Mary.
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 15-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 15.
Simulation.
Discrete Event Simulation Event-Oriented Simulations By Syed S. Rizvi.
© 2004 by Prentice Hall, Inc., Upper Saddle River, N.J F-1 Operations Management Simulation Module F.
Parallel and Distributed Simulation Object-Oriented Simulation.
1 Validation and Verification of Simulation Models.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 1-1 © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 1 Introduction.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Monté Carlo Simulation MGS 3100 – Chapter 9. Simulation Defined A computer-based model used to run experiments on a real system.  Typically done on a.
Machine Shop Model. Lecture Two by: Lecturer/ Nada Ahmed.
Modeling and Simulation
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
Simulation Examples ~ By Hand ~ Using Excel
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
Modeling & Simulation: An Introduction Some slides in this presentation have been copyrighted to Dr. Amr Elmougy.
Simulation Prepared by Amani Salah AL-Saigaly Supervised by Dr. Sana’a Wafa Al-Sayegh University of Palestine.
F - 1© 2011 Pearson Education, Inc. publishing as Prentice Hall F F Simulation PowerPoint presentation to accompany Heizer and Render Operations Management,
ENM 503 Lesson 1 – Methods and Models The why’s, how’s, and what’s of mathematical modeling A model is a representation in mathematical terms of some real.
Ch 6-1 © 2004 Pearson Education, Inc. Pearson Prentice Hall, Pearson Education, Upper Saddle River, NJ Ostwald and McLaren / Cost Analysis and Estimating.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Transparency Masters to accompany Heizer/Render – Principles of Operations Management, 5e, and Operations Management, 7e © 2004 by Prentice Hall, Inc.,
Modeling and Simulation Discrete-Event Simulation
Parallel and Distributed Simulation Process Oriented Simulation.
Monté Carlo Simulation  Understand the concept of Monté Carlo Simulation  Learn how to use Monté Carlo Simulation to make good decisions  Learn how.
Simulation Examples and General Principles
Discrete Event (time) Simulation. What is a simulation? “Simulation is the process of designing a model of a real system and conducting experiments with.
PowerPoint presentation to accompany Operations Management, 6E (Heizer & Render) © 2001 by Prentice Hall, Inc., Upper Saddle River, N.J F-1 Operations.
Object Oriented Discrete-Event Simulation CS4730 Fall 2010 Jose M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
12/7/2015© 2008 Raymond P. Jefferis III1 Simulation of Computer Systems.
1 1 Slide Simulation Professor Ahmadi. 2 2 Slide Simulation Chapter Outline n Computer Simulation n Simulation Modeling n Random Variables and Pseudo-Random.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Dr. Anis Koubâa CS433 Modeling and Simulation
(C) J. M. Garrido1 Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that.
CS433 Modeling and Simulation Lecture 09 – Part 02 Discrete Events Simulation Dr. Anis Koubâa 27 Dec 2008 Al-Imam.
Parallel and Distributed Simulation Process Oriented Simulation.
Csci 418/618 Simulation Models Dr. Ken Nygard, IACC 262B
 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,
Clock Synchronization (Time Management) Deadlock Avoidance Using Null Messages.
Simulation. Types of simulation Discrete-event simulation – Used for modeling of a system as it evolves over time by a representation in which the state.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 15-1 © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ Prepared by.
Building Valid, Credible & Appropriately Detailed Simulation Models
Introduction To Modeling and Simulation 1. A simulation: A simulation is the imitation of the operation of real-world process or system over time. A Representation.
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
Simulation Modeling.
Computer Simulation Henry C. Co Technology and Operations Management,
OPERATING SYSTEMS CS 3502 Fall 2017
Software Testing.
Prepared by Lloyd R. Jaisingh
Parallel and Distributed Simulation
Modeling and Simulation (An Introduction)
ADVANTAGES OF SIMULATION
Chapter 10 Verification and Validation of Simulation Models
Prepared by Lee Revere and John Large
Professor S K Dubey,VSM Amity School of Business
Parallel and Distributed Simulation
Simulation Modeling.
Presentation transcript:

Simulation Modeling & Simulation 33

 Simulation: It is a numerical technique for conducting experiments with certain types of mathematical models describing the behavior of complex systems on a digital computer over extended periods of time  In a Simulation, a computer is used to evaluate a model numerically, and then gather data in order to estimate the desired characteristics of the model. Basic Concepts

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

Application Areas of Simulation

Advantages/Drawbacks of Simulation Advantages  Advantages  Adequate for assessing models too complicated for analytical or numerical study;  New policies, decision rules, etc., can be explored without disrupting ongoing operations of the real system;  “What if” scenarios can be analyzed which are useful in the design of new systems.

Advantages/Drawbacks of Simulation  Drawbacks  Sometimes very time consuming/costly;  To analyze a certain problem, better methods than simulation may exist;  Simulations provide “random output” (lots of misinterpretation possible).

Discrete-Event Simulation

Discrete Event Simulation Discrete Event Simulation: computer model for a system where changes in the state of the system occur at discrete points in simulation time. Fundamental concepts: System state (state variables) State transitions (events) Each event has a timestamp indicating when it occurs. A DES computation can be viewed as a sequence of event computations, with each event computation is assigned a (simulation time) time stamp Each event computation can Modify state variables Schedule new events

Discrete Event Simulation Computation  Events that have been scheduled, but have not been simulated (processed) yet are stored in a pending event list  Events are processed in time stamp order; why?  Example: air traffic at an airport  Events: aircraft arrival, landing, departure arrival 8:00 departure 9:15 landed 8:05 arrival 9:30 schedules simulation time processed event current event unprocessed event schedules

Example: Air traffic at an Airport  Model aircraft arrivals and departures, arrival queuing  Single runway for incoming aircraft, ignore departure queuing  L = mean time runway used for each landing aircraft (exponential distrib.)  G = mean time on the ground before departing (exponential distribution)  A = mean inter-arrival time of incoming aircraft (exponential distribution)  States  Now: current simulation time  InTheAir : number of aircraft landing or waiting to land  OnTheGround : number of landed aircraft  RunwayFree : Boolean, true if runway available  Events  Arrival : denotes aircraft arriving in air space of airport  Landed : denotes aircraft landing  Departure : denotes aircraft leaving

Events  An event must be associated with any change in the state of the system  Airport example:  Event 1: Aircraft Arrival ( InTheAir, RunwayFree )  Event 2: Aircraft Landing ( InTheAir, OnTheGround, RunwayFree )  Event 3: Aircraft Departure ( OnTheGround )

Event-Oriented World View state variables Integer: InTheAir; Integer: OnTheGround; Boolean: RunwayFree; Event handler procedures Simulation Application Arrival Event { … } Landed Event { … } Departure Event { … } Pending Event List (PEL) 9:00 9:16 10:10 Now = 8:45 Simulation Engine Event processing loop While (simulation not finished) E = smallest time stamp event in PEL Remove E from PEL Now := time stamp of E call event handler procedure

Arrival Events Arrival Event: InTheAir := InTheAir+1; Schedule Arrival Now + RandExp(A); If (RunwayFree) { RunwayFree:=FALSE; Schedule Landed Now + RandExp(L); } A: mean interarrival time of incoming aircraft Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available  Arrival Process: New aircraft arrives at airport.  If the runway is free, it will begin to land.  Otherwise, the aircraft must circle, and wait to land.

Landed Event Landed Event: InTheAir:=InTheAir-1; OnTheGround:=OnTheGround+1; Schedule Departure Now + RandExp(G); If (InTheAir>0) Schedule Landed Now + RandExp(L); Else RunwayFree := TRUE; L = mean time runway is used for each landing aircraft G = mean time required on the ground before departing Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available Landing Process: An aircraft has completed its landing.

Departure Event Departure Event: OnTheGround := OnTheGround - 1; Departure Process: An aircraft now on the ground departs for a new destination. Now: current simulation time InTheAir: number of aircraft landing or waiting to land OnTheGround: number of landed aircraft RunwayFree: Boolean, true if runway available

Execution Example OnTheGround Simulation Time State Variables RunwayFree InTheAir true 0 0 L=3 G=4 TimeEvent 1 Arrival F1 3 Arrival F2 Now=0 Processing: false 1 TimeEvent 4 Landed F1 3 Arrival F2 Arrival F1 Now=1 2 TimeEvent 4 Landed F1 Arrival F2 Now=3 1 1 Landed F1 Now=4 TimeEvent 8 Depart F1 7 Landed F2 0 2 true TimeEvent 8 Depart F1 11 Depart F2 Landed F2 Now=7 1 TimeEvent 11 Depart F2 Depart F1 Now=8 0 TimeEvent Depart F2 Now=11

State Variables State:  InTheAir : number of aircraft either landing or waiting to land  OnTheGround : number of landed aircraft  RunwayFree : Boolean, true if runway available customer queue server

Output Statistics Compute  The maximum number of aircraft that will be on the ground at one time  Average time an aircraft must wait before they are allowed to land Solution  Maximum on ground  Variable for airport indicating number currently on ground  Maximum “on the ground” so far  Wait time  Variables for airport indicating total wait time, number of aircraft arrivals  State variable for each aircraft indicating the arrival time

Problems With Time Step Approach  State changes may occur between time steps  Use small time steps to minimize error  Multiple state changes within the same time step may be processed in the wrong order  Solvable by ordering state changes within time step (this imposes more work)  Inefficient  Many time steps no state changes occur, especially if small time steps

DES Model Development Algorithm 1.1 — How to develop a model: 1) Determine the goals and objectives 2) Build a conceptual model 3) Convert into a specification model 4) Convert into a computational model 5) Verify 6) Validate Typically an iterative process

Three Model Levels  Conceptual  Very high level  How comprehensive should the model be?  What are the state variables, which are dynamic, and which are important?  Specification  On paper  May involve equations, pseudocode, etc.  How will the model receive input?  Computational  A computer program  General-purpose PL or simulation language?

Verification vs. Validation  Verification  Computational model should be consistent with specification model  Did we build the model right?  Validation  Computational model should be consistent with the system being analyzed  Did we build the right model?  Can an expert distinguish simulation output from system output?  Interactive graphics can prove valuable

A Machine Shop Model  150 identical machines:  Operate continuously, 8 hr/day, 250 days/yr  Operate independently  Repaired in the order of failure  Income: 20 Pound/hr of operation  Service technician(s):  2-year contract at Pound 52,000/yr  Each works hr days/yr  How many service technicians should be hired?

System Diagram

Algorithm ==== Applied 1) Goals and Objectives: — Find number of technicians for max profit — Extremes: one techie, one techie per machine

Algorithm ==== Applied 1) Conceptual Model: — State of each machine (failed, operational) — State of each techie (busy, idle) — Provides a high-level description of the system at any time

Algorithm ==== Applied 1) Specification Model: — What is known about time between failures? — What is the distribution of the repair times? — How will time evolution be simulated?

Algorithm == Applied 4) Computational Model: — Simulation clock data structure — Queue of failed machines — Queue of available techies

Algorithm == Applied 4) Verify: — Software engineering activity — Usually done via extensive testing 5) Validate: — Is the computational model a good approximation of the actual machine shop? — If operational, compare against the real thing — Otherwise, use consistency checks

What is Monte Carlo Simulation ?  Monte Carlo methods are a widely used class of computational algorithms for simulating the behavior of various physical and mathematical systems, and for other computations.  Monte Carlo algorithm is often a numerical Monte Carlo method used to find solutions to mathematical problems (which may have many variables) that cannot easily be solved, (e.g. integral calculus, or other numerical methods)

What is Monte Carlo Simulation ?  A Monte Carlo simulation is a simulation technique that provides approximate solutions to problems expressed mathematically. It utilizes a sequence of random numbers to perform the simulation.  This technique can be used in different domains:  complex integral computations,  economics,  making decisions in specific complex problems, …

Example. Hassan Cake Shop

 The cake seller Hassan shop sells a random number of cakes each day. Hassan manager wants to determine a policy for managing his inventory of cakes (e.g. how many cakes should he prepare in 10 days).  We can use Monte Carlo simulation to analyze Hassan inventory… Demand Frequency Probability for cakes =10/200 Example inspired from: To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna © 2006 by Prentice Hall, Inc. Upper Saddle River, NJ 07458

Example. Hassan Cake Shop Step 1: Set up the probability distribution for cake sales. Using historical data HERFY Shop determined that 5% of the time 0 cakes were demanded, 10% of the time 1 cake was demanded, etc… P(1) = 10%

Example. Hassan Cake Shop Step 2: Build a Cumulative Probability Distribution 15% of the time the demand was 0 or 1 cake P(0) = 5% + P(1) = 10%

Example. Hassan Cake Shop Demand Frequency Probability Cumulative Probability Random Number Interval Step 3: Establish an interval of random numbers. Must be in correct proportion Note: 5% of the time 0 cakes are demanded, so the random number interval contains 5% of the numbers between 1 and 100

Example. Hassan Cake Shop Step 4: Generate random numbers

Example. Hassan Cake Shop Step 5: Simulate a series of trials. Using random number table on previous slide, simulated demand for 10 days is: Random number: Simulated demand: Tires Interval of DemandedRandom Numbers

Simulation Fidelity  © 2006 by Prentice Hall, Inc.  Upper Saddle River, NJ the accuracy of the representation when compared to the real world. a measure of the realism of a model or simulation Fidelity of the representations; quality and precision of the input data; how closely the results correspond to the intended view of reality (i.e., the referent)

 © 2006 by Prentice Hall, Inc.  Upper Saddle River, NJ 07458

Fidelity Conceptual Framework  Accuracy – The degree to which a parameter or variable within a model or simulation conform exactly to reality or to some chosen standard or referent.  Capacity – The number of instances of an object or detail that are simultaneously represented by simulation.  Error – The difference between an observed, measured, or calculated value and a correct value.  Fitness – Providing the capabilities needed or being suitable for some purpose, function, situation or application.  © 2006 by Prentice Hall, Inc.  Upper Saddle River, NJ 07458

Fidelity Conceptual Framework  Precision – 1. The quality or state of being clearly depicted, definite, measured or calculated. 2. A quality associated with the spread of data obtained in repetitions of an experiment as measured by variance; the lower the variance, the higher the precision. 3. A measure of how meticulously or rigorously computational processes are described or performed by a model or simulation.  simulation to respond to a low level stimulus.  42

Fidelity Conceptual Framework  Resolution – 1. The degree of detail used to represent aspects of the real world or a specified standard or referent by a model or simulation. 2. Separation or reduction of something into its constituent parts.  Sensitivity – The ability of a simulation to respond to a low level stimulus.  Tolerance – 1. The maximum permissible error or the difference between the maximum and minimum allowable values in the properties of any component, device, model, simulation or system relative to a standard or referent  43