1 Simulation Software. 2 Introduction The features that should be programmed in simulation are: Generating random numbers from the uniform distribution.

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Introduction into Simulation Basic Simulation Modeling.
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.
 1  Outline  Model  problem statement  detailed ARENA model  model technique  Output Analysis.
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.
Designing simulation experiments The final stage in analyzing a system with simulation is to optimize over the system parameters in such a way as to optimize.
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.
ARENA General-purpose simulation package Process-oriented High-level Hierarchic Animation Model building –Drag-and-drop modules into model window –connect.
Chapter 3 Simulation Software
Chapter 22 Simulation with Process Model to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004.
Performance Analysis and Monitoring Facilities in CPN Tools Tutorial CPN’05 October 25, 2005 Lisa Wells.
Components and Organization of Discrete-event Simulation Model
Simulation.
Simscript II.5 Building simulation model with SIMSCRIPT II.5.
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.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
SIMULATION. Simulation Definition of Simulation Simulation Methodology Proposing a New Experiment Considerations When Using Computer Models Types of Simulations.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Ch. 3 Simulation Software. Programming of discrete-event simulation models Generating random numbers, that is, observations from a U(0,1) probability.
 1  Outline  simulating GI/G/1 queues  M/M/1 queues  theoretical results of queueing systems  an inventory system  simulation program with an event.
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:
Modeling and Simulation
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
 1  Outline  world view of simulation  overview of ARENA  simple ARENA model: Model  basic operations: Model
Verification & Validation
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
Steps in simulation study 1. - Clearly understand problem - Reformulation of the problem 2. - Which questions should be answered? - Is simulation appropriate?
Slide 1 of 68 Modeling Detailed Operations. Slide 2 of 68 What We’ll Do... Explore lower-level modeling constructs Model 5-1: Automotive maintenance/repair.
ETM 607 – Discrete Event Simulation Fundamentals Define Discrete Event Simulation. Define concepts (entities, attributes, event list, etc…) Define “world-view”,
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
Modeling and simulation of systems Simulation languages Slovak University of Technology Faculty of Material Science and Technology in Trnava.
SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved. 1.
Arena Simulation Language. Simulation with ArenaChapter 3 – A Guided Tour Through ArenaSlide 2 of 58 The Create Flowchart Module “Birth” node for entities.
Chapter 10 Verification and Validation of Simulation Models
Chapter 2 Fundamental Simulation Concepts
Reid & Sanders, Operations Management © Wiley 2002 Simulation Analysis D SUPPLEMENT.
Modeling and simulation of systems Methodology for simulation software selection Slovak University of Technology Faculty of Material Science and Technology.
—————————— CACI Products Company - ——————————————————— COMNET III —————————————— 1-1 Day 1 - COMNET Program Operation, Network Topology.
Computer Simulation of Networks ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
Discrete Event Simulation
Network Performance modelling 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.
CDA6530: Performance Models of Computers and Networks Chapter 8: Statistical Simulation ---- Discrete Event Simulation (DES) TexPoint fonts used in EMF.
CHAPTER 3 Simulation Software 1. World Views of Simulation Model Event-Scheduling View  Focus on processing each event Process-interaction View  View.
Advantages of simulation 1. New policies, operating procedures, information flows and son on can be explored without disrupting ongoing operation of the.
Collection types CS Chakrabarti Motivation  Thus far the only collection types we have used are vector and matrix  Problem #1: given an input.
 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
WS1-1 ADM , Workshop 1, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 1 INTRODUCTION.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
Introduction to Modeling & Simulation Dr. A. K. Dey Third Lecture
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
Building Valid, Credible & Appropriately Detailed Simulation Models
Chapter 1 What is Simulation?. Fall 2001 IMSE643 Industrial Simulation What’s Simulation? Simulation – A broad collection of methods and applications.
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.
WORKSHOP 1 introduction
Getting Started .Cont The Basic Process Panel
Modeling and Simulation (An Introduction)
ADVANTAGES OF SIMULATION
Introduction to Extend
Chapter 10 Verification and Validation of Simulation Models
ميرعماد سليمانيان محمدرضا صمدي ميلاد ظفرنژاد.
Simulation Software.
MECH 3550 : Simulation & Visualization
Chapter 4: Simulation Designs
Presentation transcript:

1 Simulation Software

2 Introduction The features that should be programmed in simulation are: Generating random numbers from the uniform distribution Generating random variates from any distribution Advancing simulation time Determining the next event and passing control to the appropriate block of code Adding records to, or deleting records from, a list Collecting output statistics and reporting them Detecting error conditions These common features are programmed using general-purpose languages like FORTRAN, C or C++ to develop simulation packages.

How to simulate a system with a computer code? Planning the study –Description of the system –Definitions of the performance measures Algorithm –Flowchart: Process in the system, collection of statistics to estimate the performance measures, reporting –Algorithm that corresponds to the flowchart Computer code (Matlab, Java, …) –Data structures (sequential vs linked allocation: in book) –Random number generation –Coding the algorithm

Simulating a Multi-Teller Bank The bank opens its doors at 9 A.M. and closes its doors at 5 P.M., but operates until all customers still in the bank are served. Customer interarrival times are IID and exponential with mean 1 minute and services are IID and exponential with mean 4.5 minutes. Each teller has a separate queue. An arriving customer joins the shortest queue, choosing the leftmost shortest queue if there is a tie. Let n i be the number of customers in front of teller i. If the completion of service at teller i causes n j > n i + 1 for some other teller j, then the customer from the tail of queue j jockeys to the tail of queue i. If there are two or more such customers, the one from the closest leftmost queue joins.

5 Multiteller Bank with Jockeying

Events and state transitions 6

Events and state transitions: arrival to a non-empty system 7

Events and state transitions: arrival to an empty system 8

Events and state transitions: departure from a non-empty system, followed by jockeying 9

Performance measures Expected number in each queue Expected waiting time of a customer Expected utilization of each server 10

Flowchart Events?  a separate flowchart for each event –Customer arrival –Customer departure –Jockeying How to combine them?  main flowchart 11

Arrival Flowchart Function arrive Schedule the next arrival event Is a teller idle? Set a delay of 0 for this customer Make the teller busy Schedule the departure of this customer Find the number of the leftmost shortest queue (shortest_q) Place the customer at the end of queue number shortest_q i.e., increase the # in the queue by 1 Place the customer at the end of queue number shortest_q i.e., increase the # in the queue by 1 Return Record the arrival time of this customer YesNo

Departure Flowchart Function depart Is the queue for this teller empty? Make this teller idle Remove the first customer from this queue Compute this customer’s delay and gather statistics Return Schedule the departure event for this customer YesNo Call function Jockey

Jockeying Flowchart Function jockey Is there a customer to jockey? Remove this customer from the tail of his or her current queue Return Yes No Is the teller who just completed service now busy? Compute this customer’s delay and gather statistics Make this teller busy Schedule the departure event for the jockeying customer Place the jockeying customer at the tail of the queue of the teller who just completed service YesNo

Flowchart Combining Departure and Jockeying Function depart Is the queue for this teller empty? Remove the first customer from this queue Compute this customer’s delay and gather statistics Return Schedule the departure event for this customer YesNo Is there a customer to jockey? Remove this customer from the tail of his or her current queue Compute this customer’s delay and gather statistics Make this teller busy Schedule the departure event for the jockeying customer Place the jockeying customer at the tail of this queue Is there a customer to jockey? Make this teller idle YesNo Yes No

Main flowchart Start Initialization Stop No Is current_time < finish_time Report Find the next event Update current_time: current_time+time_till_next Find the next event Update current_time: current_time+time_till_next Yes Call the function corresponding to the event

Common mistakes in the flowcharts Schedule next departure only if you make the server busy with the next customer. Collect the statistics: –How many customers were waiting between the previous event and the departure now? –The waiting time of the customer who just started service? –… 17

How to think to draw a flowchart: Process Departure function is called, when the minimum of the event times (in this case, time-to-departure and time-to- arrival) corresponds to a departure. So we know that a customer is leaving the system, which means that the server serving that customer is now idle and has to look for a customer if there is any in the system. Is there any customer to serve for this server? Check: –The server’s queue –Other queues Once the server’s state is determined, check for jockeying 18

How to think to draw a flowchart: Process Which event will happen next? Events: –Arrival –Potentially departure from queue i, i=1,2,…,5 –End of simulation 19

How to think to draw a flowchart: Information gathering What do you need to know about the queues? The number of customers in each queue: –State variable : (n 1 (t),n 2 (t),..n 5 (t)), where n i (t) denotes the total number of customers in queue i (including the customer in service). –Server state? What do we need to know about customers? For each customer: –The queue that he/she is waiting for (denote by cust_queue) –His/her position in the cust_queue –His/her arrival time 20

How to modify the states? Let (n 1 (t),n 2 (t),..n 5 (t)) be our state variable where n i (t) denotes the total number of customers in queue i (including the customer in service). Arrival event: If there is at least one n i (t - ) =0. –Let j be the smallest index of the queue that is empty, then n j (t)=n j (t - )+1 Else –Find argmin j ( (n 1 (t),n 2 (t),..n 5 (t)) –Let j be the smallest index of the queue has the smallest number of customers, then n j (t)=n j (t - )+1 21

How to gather statistics Define the variables: –Cum_delay –Cum_queue –Cum_busy At each event epoch, update these variables 22

How to think to draw a flowchart: Information gathering For example: Cum_queue At each event epoch, update these variables 23 tEventsNext Event N 1 (t)Cum_queue 1 0{I 1 }I 1 (0.4)00 0.4{I 2, C 1 }I 2 (1.6)1 0+0  0.4=0 1.6{I 3, C 1, C 2 }I 3 (2.1)20+0*( )=0 2.1{I 4, C 1, C 2 }C2 (2.3)30+0*( )=0 2.3{I 4, C 1, C 3 }C1(2.4)20+1*( )=0.2 … Inter-arrival times: A 1 = 0.4, A 2 = 1.2, A 3 = 0.5, A 4 = 1.7, A 5 = 0.2, A 6 = 1.6, A 7 = 0.2, A 8 = 1.4, A 9 = 1.9 Processing times: S 1 = 2.0, S 2 = 0.7, S 3 = 0.4, S 4 = 1.1, S 5 = 3.7, S 6 = 0.6

24 Output Report for Multite ller Bank

25 Output Report for Multiteller Bank

26 Comparison of Simulation Packages with Programming Languages Advantages of simulation packages They automatically provide most of the features, requiring less programming time and cost. They provide a natural framework for simulation modeling. Models are easier to modify and maintain. They provide better error detection because potential errors are checked for automatically.

27 Advantages of general purpose languages Most modelers already know a language, but this is often not the case with a simulation package. A simulation model efficiently written in a language may require less execution time. Programming languages may allow greater programming flexibility. Software cost is generally lower, but total project cost may not be. Comparison of Simulation Packages with Programming Languages

28 Classification of Simulation Software Earlier times: A combination of general purpose language and simulation concepts such as Simscript, Siman, or SLAM Recently: Simulation software packages –Easy-to-use –User friendly graphical model building approach involving use of modules and icons selected by the user on screen –Entities represented by icons with a wide range of animation capabilities.

29 General-purpose versus application-oriented simulation packages A general-purpose simulation package can be used for any application, but might have special features for certain ones (like manufacturing, communications, or business process reengineering). An application-oriented simulation package is designed to be used for a certain class of application (like manufacturing, health- care, or call centers). Classification of Simulation Software

30 Modeling approach Event-scheduling approach is based on simulating over time by executing the events selected from the event list in increasing order of their time. Process approach is based on simulating the time-ordered sequence of processes experienced by a single entity as it flows through the system. Classification of Simulation Software

31 Process Approach

32 Prototype customer- process routine for a single- server queueing system

33 Common Modeling Elements Simulation packages typically include entities, attributes, resources and queues as part of their modeling framework.

34 Desirable Software Features 1.General capabilities –Modeling flexibility, Ease of use, Hierarchical modeling, Debugging aids, Fast model execution speed, etc. 2.Hardware and software requirement –Computer platforms (PC’s, UNIX workstations, Apple’s), RAM requirement, Operating system requirement (Windows, UNIX, Mac OS) 3.Animation and dynamic graphics –Concurrent and post-processed animation, Vector based and pixel based graphics, Two and three dimensional animation, Dynamic graphics and statistics

35 Desirable Software Features 4.Statistical capabilities –Good random number generation, Theoretical discrete and continuous distributions, Empirical distributions, Independent replications or runs, Performance estimation, Confidence interval determination, Warmup period, Optimization via simulation 5.Customer support and documentation –Public and customized training –Technical support –Good documentation 6.Output reports and graphics –Standart and customized reports –Descriptive statistics (histograms, time plots, bar chart, pie chart, etc.)

36 General-Purpose Simulation Packages Arena This is the package we will be using in this course. Modeling is done using modules arranged into a number of templates: Basic Process template has modules used in many models for modeling arrivals (create), services (process) and departures (dispose). Advanced Process template contains modules to perform very specific logical functions such as choosing a queue when several are available or coordinating the advancement of multiple entities in different areas Advanced Transfer template contains modules (like conveyors and transporters) that are used to describe the transfer of entities from one part of the system to another.

37 A model is constructed by dragging and dropping modules into the model window, connecting them to indicate the flow of entities through the simulated system, and then detailing the modules using dialog boxes of Arena’s built-in spreadsheet. Arena

38 Arena

39 Arena

40 Arena

41 Arena

42 Arena

43 Other General-Purpose Simulation Packages  Extend  AweSim  GPSS/H  Micro Saint  MODSIM III  SES/workbench  SIMPLE++  SIMUL8  SLX  Taylor Enterprise Dynamics

44 Application-Oriented Simulation Packages Manufacturing: AutoMod, AutoSched AP, Extend + Manufacturing, Arena Packaging Edition, ProModel, QUEST, Taylor Enterprise Dynamics, WITNESS Communication Networks: COMNET, IT DecisionGuru, OPNET Modeler Process Reengineering and Services: Arena Business Edition, Extend + BPR, ProcessModel, ServiceModel, SIMPROCESS Heath Care: MedModel Call Centers: Arena Call Center Edition Animation: Proof Animation