Simulation modelling real processes to make predictions.

Slides:



Advertisements
Similar presentations
Introduction into Simulation Basic Simulation Modeling.
Advertisements

Operational Research (O.R.) Techniques Simulation.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Event-drive SimulationCS-2303, C-Term Project #3 – Event-driven Simulation CS-2303 System Programming Concepts (Slides include materials from The.
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.
CS Data Structures I Chapter 7 Queues II. 2 Topics Queue Application Simulation Comparison of List, Stack and Queue.
COSC2006 Chapter 8 Queues III
Simulation of multiple server queuing systems
HW # Due Day: Nov 23.
Queuing Systems Chapter 17.
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Cmpt-225 Queues. A queue is a data structure that only allows items to be inserted at the end and removed from the front Queues are FIFO (First In First.
Introduction to Arena A Simple Simulation. Model1 We examine a simple model: parts arrive at a server, are served, and depart the system. There will be.
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
HW # Due Day: Nov 23.
Lecture 4 Mathematical and Statistical Models in Simulation.
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
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:
___________________________________________________________________________ Operations Research  Jan Fábry Waiting Line Models.
DC Cafeteria Simulation Exit Entrance Mr. SubChopsticks Manager of DC caf would like a simulation of the customer activity in a day. You are given the.
Introduction to Management Science
Simulation Examples ~ By Hand ~ Using Excel
Waiting Line Models ___________________________________________________________________________ Quantitative Methods of Management  Jan Fábry.
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
1 Queuing Analysis Overview What is queuing analysis? - to study how people behave in waiting in line so that we could provide a solution with minimizing.
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.
1 QUEUES. 2 Definition A queue is a linear list in which data can only be inserted at one end, called the rear, and deleted from the other end, called.
Example simulation execution The Able Bakers Carhops Problem There are situation where there are more than one service channel. Consider a drive-in restaurant.
Computer Science 112 Fundamentals of Programming II Modeling and Simulation.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
CSC 205 Programming II Lecture 22 Carwash Simulation.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems with Multi-programming Chapter 4.
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
1 CMPSCI 187 Computer Science 187 Introduction to Introduction to Programming with Data Structures Lecture 13: Queues Announcements.
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
8/22/01J. Hagstrom, U. of Illinois1 Simulation Jane Hagstrom.
1 Ardavan Asef-Vaziri Sep-09Operations Management: Waiting Lines3 Example: The arrival rate to a GAP store is 6 customers per hour and has Poisson distribution.
Discrete Event Simulation
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.
SIMULATION EXAMPLES. Monte-Carlo (Static) Simulation Estimating profit on a sale promotion Estimating profit on a sale promotion Estimating profit on.
Advantages of simulation 1. New policies, operating procedures, information flows and son on can be explored without disrupting ongoing operation of the.
EVOLUTION OF INDUSTRIAL ENGINEERING Prof. Dr. Orhan TORKUL Res. Asst. M. Raşit CESUR Res. Asst. Furkan YENER.
Waiting Line Theroy BY, PRAYASH NEUPANE, KARAN CHAND & SANTOSH SHERESTHA.
MODELING AND SIMULATION CS 313 Simulation Examples 1.
Simulation Examples And General Principles Part 2
Simulation of single server queuing systems
Abu Bashar Queuing Theory. What is queuing ?? Queues or waiting lines arise when the demand for a service facility exceeds the capacity of that facility,
Chapter 2 Simulation Examples. Simulation steps using Simulation Table 1.Determine the characteristics of each of the inputs to the simulation (probability.
Modeling and Simulation
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
“QUEUING THEORY”.
2.7: Simulation.
Discrete Event Simulation
Modeling and Simulation CS 313
COMPUTER 2430 Object Oriented Programming and Data Structures I
Chapter 13 Queues and Priority Queues
Demo on Queuing Concepts
More Explanation of an example in chapter4
Simulation An Application of Queue ADT
Lecture 2 Part 3 CPU Scheduling
Concepts In Discrete-Event Simulation
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
MECH 3550 : Simulation & Visualization
Presentation transcript:

Simulation modelling real processes to make predictions

D. Goforth, COSC 2006, fall Simulation topics  industrial processes  information systems  transportation systems  environments for people

D. Goforth, COSC 2006, fall Simulation topics – example Self-serve gas station

D. Goforth, COSC 2006, fall Simulation topics – example Self-serve gas station service queue

D. Goforth, COSC 2006, fall Simulation topics – example Self-serve gas station  5 services, 3 queues  data gathered: length of queues waiting time (customers) idle time (servers)

D. Goforth, COSC 2006, fall Simulation topics – example Self-serve gas station how good is service:  average waiting time  longest waiting time  time pumps idle  time cashier idle  average queue length  maximum queue length

D. Goforth, COSC 2006, fall Simulation topics – example Self-serve gas station plans:  add pumps?  add another cash?  change layout?

D. Goforth, COSC 2006, fall Typical simulation scenario  proposal to build new service station: how many pumps? cashiers? what layout?  from market study: expected customer numbers  input to simulation  simulation: try different layouts, number of pumps, cashiers service levels and costs  output from simulation  decide station design

D. Goforth, COSC 2006, fall Typical simulation data ScenarioAvg service Max service pumps idle cashiers idle 2 pumps 1 cash 14 min21 min8%19% 2 pumps 2 cash 13 min19 min8%57% 4 pumps 1 cash 8 min20 min52%14% 4 pumps 2 cash 6 min12 min50%47%

D. Goforth, COSC 2006, fall Designing simulations  processing objects (cashiers, pumps)  objects to be processed (customers/cars)  queues for objects awaiting processing (lines of cars, line of people) what properties do objects need to have?

D. Goforth, COSC 2006, fall Designing simulations  properties of objects processed related to timing in simulation:  colour of car? NO amount of gas pumped? YES  data to keep about objects processed arrival time (join a queue) begin service time (leave queue, start service) end service time

D. Goforth, COSC 2006, fall Designing simulations  input required: data about service (how long to pump n litres, how long to process payment at cash) rate of arrival of objects to process (how many cars per hour) litres of gas per car

D. Goforth, COSC 2006, fall Designing simulations  Running simulation of a time period randomize activity based on input data:  arrival rate of cars  size of gas purchase  time to pump gas  time to pay at cash

D. Goforth, COSC 2006, fall Designing simulations  Gather data (simulated) times of events for each object processed and each processing object (customer arrives, customer starts pumping, cashier starts to process a sale, etc.)

D. Goforth, COSC 2006, fall Designing simulations  Analyzing data after simulation cumulative times, average times, extreme times (total time cashier working, average time customer at station, longest wait before starting to pump gas)

D. Goforth, COSC 2006, fall Designing simulations  Timing in a simulation ‘clock’ runs for a time interval to simulate a period of operation events occur at a specific time  two models of timing in simulations ‘clock driven’ – every second is simulated ‘event-driven’ – only analyze times when an event happens; skip over other times

D. Goforth, COSC 2006, fall Designing simulations  models of timing clock driven event-driven

D. Goforth, COSC 2006, fall Designing simulations  What is an event? ‘instantaneous’, not an interval events at beginning and end of interval e.g.:joining a queue is an event leaving a queue is an event waiting in a queue is NOT an event e.g.:starting to pump gas is an event finishing pumping is an event pumping gas is NOT an event

D. Goforth, COSC 2006, fall Designing simulations  example of events events for a customer arrive at station and join queue leave queue and start pumping gas finish pumping and line up to pay leave queue and start payment finish paying and return to car leave station

D. Goforth, COSC 2006, fall Another example: Bookstore checkout  one line-up of customers and many cashiers  question: how many cashiers should be working  simulate level of service with n = 2,3,4

D. Goforth, COSC 2006, fall Bookstore checkout  objects Queuew Customer CashierStation s[i] EventQueue Event w s[2] s[1] s[0]

D. Goforth, COSC 2006, fall Bookstore checkout  Events: 1.arrival: customer arrives at checkout area (joins queue) 2.beginService(k): customer leaves queue, goes to cashier k 3.endService(k): customer finishes purchase at cashier k and leaves store w s[2] s[1] s[0]

D. Goforth, COSC 2006, fall Event arrival  create c = new Customer object  insert c into Queue  schedule arrival event  if some s[k] is not busy, schedule beginService(k) w s[2] s[1] s[0] c

D. Goforth, COSC 2006, fall Event beginService(k)  getFront cNext from Queue  put cNext in s[k]  make s[k] busy  schedule endService(k) event w s[2] s[1] s[0] cNext

D. Goforth, COSC 2006, fall Event endService(k)  remove Customer from s[k]  make s[k] idle  if (w not empty) schedule beginService(k) event w s[2] s[1] s[0]

D. Goforth, COSC 2006, fall The main algorithm of simulation simulation (endTime) EventQueue q; Event f = new Event(arrival) q.insert(f) while ( q not empty and not endTime) Event e = q.getFront() process(e) // includes scheduling other events analyze statistics

D. Goforth, COSC 2006, fall Bookstore checkout  Input data frequency of customer arrival time for cashier to serve a customer w s[2] s[1] s[0]

D. Goforth, COSC 2006, fall Bookstore checkout  frequency of customer arrival simple model – uniform distribution of time between arrivals e.g. if range is [5, 15]  customer arrives between 5 and 15 seconds after previous customer if arrival time of one customer is 432, the next arrival could be scheduled for (random in 5,15) = 441

D. Goforth, COSC 2006, fall Bookstore checkout  time for cashier to serve a customer same simple model – uniform distribution of time for service e.g. if range is [10, 40]  customer remains at cashier station for a random time between 10 & 40 seconds if beginService of a customer is at 304, endService could be scheduled for (random in 10,40) = 333

D. Goforth, COSC 2006, fall EventQueue  manages the sequence of events in the simulation duration of simulation processed events current event events scheduled but not processed yet

D. Goforth, COSC 2006, fall EventQueue - example two events on event queue current event: arrival(135) current event events scheduled but not processed yet in arrival: schedule next arrival at 148 some cashier s[k] is idle so schedule beginService at

D. Goforth, COSC 2006, fall Bookstore checkout  analyzing service arrival begin Service end Service service time from input waiting?

D. Goforth, COSC 2006, fall Data in simulation objects  Customer object goal: analyze ‘experience’ of customer store times:  arrivalTime  beginServiceTime  endServiceTime

D. Goforth, COSC 2006, fall Data in simulation objects  Cashier object goal: analyze ‘busyness’ store data:  currentCustomer  totalIdleTime // accumulate time without customer  isIdle // boolean, busy or not  lastEndServiceTime // used in beginService to calculate last period of idleness

D. Goforth, COSC 2006, fall Data in simulation objects  Event object goal: activity store data:  time  eventType // arrival, beginService or endService  cashierIndex // which cashier (for service events only)

D. Goforth, COSC 2006, fall Data in simulation objects  CashierSimulation object (main program) goal: the big picture store data:  parameters(arrival constants, simulation duration, etc)  customerCount  totalWaitTime  maxWaitTime  queues (next slide)

D. Goforth, COSC 2006, fall Data in simulation objects queues:  Waiting queue: Customer objects  Event queue Event objects in time priority