Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:

Slides:



Advertisements
Similar presentations
Introduction into Simulation Basic Simulation Modeling.
Advertisements

Decision Maths Lesson 14 – Simulation. Wiltshire Simulation There are many times in real life where we need to make mathematical predictions. How long.
CS433: Modeling and Simulation
CSE 522 Real-Time Scheduling (4)
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
 1  Outline  performance measures for a single-server station  discrete-event simulation  hand simulation  process-oriented simulation approach.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Simulation. Example: A Bank Simulator We are given: –The number of tellers –The arrival time of each customer –The amount of time each customer requires.
1 6.3 Binary Heap - Other Heap Operations There is no way to find any particular key without a linear scan through the entire heap. However, if we know.
Simulation Where real stuff starts. ToC 1.What, transience, stationarity 2.How, discrete event, recurrence 3.Accuracy of output 4.Monte Carlo 5.Random.
Classification of Simulation Models
#11 QUEUEING THEORY Systems Fall 2000 Instructor: Peter M. Hahn
Components and Organization of Discrete-event Simulation Model
Simscript II.5 Building simulation model with SIMSCRIPT II.5.
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Queueing and Hand Simulation (Project 03). Queueing Models Probabilistic and stochastic models Important aspects: –Interarrival time –Service time –Waiting.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
BCOR 1020 Business Statistics Lecture 11 – February 21, 2008.
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.
 1  Outline  simulating GI/G/1 queues  M/M/1 queues  theoretical results of queueing systems  an inventory system  simulation program with an event.
Graduate Program in Engineering and Technology Management
Modeling and Simulation
Simulation II IE 2030 Lecture 18. Outline: Simulation II Advanced simulation demo Review of concepts from Simulation I How to perform a simulation –concepts:
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
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.
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
Introduction to Operations Research
Structure of a Waiting Line System Queuing theory is the study of waiting lines Four characteristics of a queuing system: –The manner in which customers.
Minimizing Peak Wait time at the Union Taco Bell IE 475 – Simulation Term Project Vijayendra Viswanathan Industrial and Manufacturing Engineering UW-Milwaukee.
Entities and Objects The major components in a model are entities, entity types are implemented as Java classes The active entities have a life of their.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
+ Simulation Design. + Types event-advance and unit-time advance. Both these designs are event-based but utilize different ways of advancing the time.
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
Discrete Event (time) Simulation. What is a simulation? “Simulation is the process of designing a model of a real system and conducting experiments with.
Chapter 10 Verification and Validation of Simulation Models
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
1 Simulation Implementation Using high-level languages.
Chapter 2 Fundamental Simulation Concepts
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
Network Protocol Simulation: A look at Discrete Event Simulation Grant D. Lanterman 5/21/2004.
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.
COMP155 Computer Simulation September 10, Discrete Event Simulation  discrete event simulation: state variable change only at a discrete set of.
Advantages of simulation 1. New policies, operating procedures, information flows and son on can be explored without disrupting ongoing operation of the.
Chapter 2 Basic Simulation Modeling
 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,
Unit 4 Simulation software. Introduction Software used to develop simulation models can be divided into 3 categories: – General-purpose programming languages:
Simulation Examples And General Principles Part 2
Simulation modelling real processes to make predictions.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
Modeling and Simulation
Managerial Decision Making Chapter 13 Queuing Models.
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
OPERATING SYSTEMS CS 3502 Fall 2017
Models of Traffic Flow 1.
Modeling and Simulation (An Introduction)
2.7: Simulation.
Discrete Event Simulation
Chapter 13 Queues and Priority Queues
Chapter 10 Verification and Validation of Simulation Models
COMP60611 Fundamentals of Parallel and Distributed Systems
Native simulation of different scheduling policies
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
Priority Queues Chapters 10 & 26.
CSCS-200 Data Structure and Algorithms
Presentation transcript:

Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes: 1.Customer arrives 2.Customer served 3.Customer leaves Customer Arrives Customer Served Customer Leaves

Slide - 2 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Let’s describe task 1 Customer Arrives Arrival rate – rate that customers arrive at bank 1 customer every 3 minutes or so i.e. Inter-arrival rate IAT = 3 Time period customers can arrive Bank Hours: 9 to 5 Customer Arrives

Slide - 3 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Task 2 Customer Served Time to serve a customer Approx 6 minutes per customer Select sample from for example a normal distribution mean = 6 and standard deviation = 2 Choice of distribution ? Customer Served

Slide - 4 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Task 3 Customer Leaves Record the time customer leaves No further interest in customer Customer Leaves

Slide - 5 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation What else affects this flow of customers? Number of bank staff on duty Lunchtime crowd Customer Arrives Customer Served Customer Leaves

Slide - 6 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation What information would be useful to collect? –Employee utilisation –Waiting times –Length of queue Is there a way to get this information? Customer Arrives Customer Served Customer Leaves

Slide - 7 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation To performing this analysis without micro- simulation: –Only use mean times or averages rates or –Run the experiment in real life. –Using micro-simulation every individual is computed taking account of stochastic behaviour – hence more realistic analysis possible - e.g maximum delay not obtained from an average Customer Arrives Customer Served Customer Leaves

Slide - 8 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Essentials of Discrete-Event Micro-Simulation Tasks Events – start and end of tasks Entities Entity flow Resources Queues Clock Scenario events

Slide - 9 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Tasks or processes The building block of any discrete-event simulation A task represents a single step in the process that makes up the discrete event simulation A task may require a certain amount of time in order to execute Tasks & Events have three main parts: –Pre-condition or Release condition –Start condition or Beginning effect –End condition or Ending effect Events trigger subsequent actions

Slide - 10 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Conditions Release condition –The conditions that need to be satisfied so this task may begin Beginning effect –Things that take place when this task begins execution Ending effect –Things that take place this task completes execution You are responsible for writing code to achieve these logical conditions

Slide - 11 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Task Flow For every discrete-event simulation, there is a basic entity flow Here is an example of the flow of a bank: When one task completes the following can happen to the entity at same simulation time: –Nothing –Join a queue –Another activity starts –Several activities start simultaneously Customer Arrives Customer Served Customer Leaves

Slide - 12 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Resources In any process some tasks require a resource to be available in order to begin execution –Example: A task may require the availability of a trained operator in order for that task to begin Many processes are constrained by limited resources –Without resources, steps in the process may be held up until those resources are available –Without resources, the flow of the entities might change

Slide - 13 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Entities Entities flow through a simulation and are involved in the execution of any task –Examples of entities: Customers in a bank Cars going through a toll both Parts being manufactured When an entity arrives at a task the system: –Checks the release condition and if accepted –Executes the beginning effect –Waits the appropriate amount of time (simulation time or clock time) –Executes the ending effect

Slide - 14 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Queues What happens when the release condition of a task is not met (such as when all bank staff are busy)? –The entity must wait in a queue until the release condition is met Sometimes, the behavior of the queue is important –FIFO (e.g. queue for bank staff) –LIFO (e.g. stocked shelves) –Sorted based on priority (e.g. A&E Department) Queue Customer Served

Slide - 15 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design The Simulation Clock Since we are interested in time based behaviour, a clock is needed to keep the system in synchronism As events in your simulation occur, the simulation clock will advance based upon how long each task or process takes – not fixed small steps as in continuous dynamic systems

Slide - 16 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design How a Simulation is Executed As a simulation executes, all scheduled events are kept in an event queue or time line The simulation begins by taking the first event that is scheduled to occur from the event queue (e.g. start the first task) That event may place other events later in the event queue, ordered of time When that event is completed, the simulation takes the next event from the queue, updates the clock, and processes that event

Slide - 17 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Running a Simulation Let’s step through a simulation of a bank. Using the task rules we defined for customer served Here are other rules to follow –Bank is open for 8 hours (480 minutes) –Customers arrive about every 3 minutes –It takes around 6 minutes to serve a customer –We have 2 bank staff on duty

Slide - 18 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Running a Simulation Using this diagram below let’s step through this simulation TimeTaskStaff People Waiting 0 Customer Arrives 2 0 Customer Arrives Customer Leaves Queue Customer Served

Slide - 19 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Simulation What else affects this flow of customers? –Number of bank staff on duty –Lunchtime crowd Customer Arrives Customer Served Customer Leaves

Slide - 20 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design Scenario Events What happens if we want to: – Model customers arriving faster at lunchtime? –Put another bank teller on duty at lunchtime? Events that don’t necessarily fall into any one task can be defined as a scenario events Scenario events are defined by –The time when the scenario event occurs –What happens