Introduction to Modeling & Simulation Dr. A. K. Dey Third Lecture

Slides:



Advertisements
Similar presentations
Introduction into Simulation Basic Simulation Modeling.
Advertisements

Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Chapter 3 Simulation Software
Classification of Simulation Models
CPS 808 Introduction To Modeling and Simulation
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Components and Organization of Discrete-event Simulation Model
Simulation with ArenaChapter 2 – Fundamental Simulation Concepts Discrete Event “Hand” Simulation of a GI/GI/1 Queue.
Lecture 9 Output Analysis for a Single Model. 2  Output analysis is the examination of data generated by a simulation.  Its purpose is to predict the.
Introduction1 What Is A Model ? A Representation of an object, a system, or an idea in some form other than that of the entity itself. (Shannon)
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.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
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
CS 450 Modeling and Simulation
Introduction to Systems and Modeling and Simulation
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
Introduction to Discrete Event Simulation Customer population Service system Served customers Waiting line Priority rule Service facilities Figure C.1.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
Chapter 1 Introduction to Simulation
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.
ETM 607 – Discrete Event Simulation Fundamentals Define Discrete Event Simulation. Define concepts (entities, attributes, event list, etc…) Define “world-view”,
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.
Example simulation execution The Able Bakers Carhops Problem There are situation where there are more than one service channel. Consider a drive-in restaurant.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
SIMULATION EXAMPLES QUEUEING SYSTEMS.
SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Simulation Examples and General Principles
McGraw-Hill/Irwin © 2006 The McGraw-Hill Companies, Inc., All Rights Reserved. 1.
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
Reid & Sanders, Operations Management © Wiley 2002 Simulation Analysis D SUPPLEMENT.
Object Oriented Discrete-Event Simulation CS4730 Fall 2010 Jose M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
Introduction to Simulation Andy Wang CIS Computer Systems Performance Analysis.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Network Protocol Simulation: A look at Discrete Event Simulation Grant D. Lanterman 5/21/2004.
(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.
CS433 Modeling and Simulation Lecture 09 – Part 02 Discrete Events Simulation Dr. Anis Koubâa 27 Dec 2008 Al-Imam.
 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,
Introduction The objective of simulation – Analysis the system (Model) Analytically the model – a description of some system intended to predict the behavior.
1 CS 214 Modeling and Simulation Introduction. 2 Goals of This Course lIntroduce Modeling lIntroduce Simulation lDevelop an Appreciation for the Need.
Unit 4 Simulation software. Introduction Software used to develop simulation models can be divided into 3 categories: – General-purpose programming languages:
MODELING AND SIMULATION CS 313 Simulation Examples 1.
Simulation Examples And General Principles Part 2
K. Salah1 ICS 533 Introduction To Modeling and Simulation.
Discrete-Event System Simulation in Java. Discrete Event Systems New dynamic systems New dynamic systems Computer and communication networks Computer.
1 Simulation Software. 2 Introduction The features that should be programmed in simulation are: Generating random numbers from the uniform distribution.
Chapter 2 Simulation Examples. Simulation steps using Simulation Table 1.Determine the characteristics of each of the inputs to the simulation (probability.
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.
Introduction To Modeling and Simulation Rabie A. Ramadan odeling / Lecture 1.
OPERATING SYSTEMS CS 3502 Fall 2017
Modeling and Simulation (An Introduction)
Discrete Event Simulation
Modeling and Simulation CS 313
SIMULATION EXAMPLES QUEUEING SYSTEMS.
SIMULATION EXAMPLES QUEUEING SYSTEMS.
Simulation Software.
Concepts In Discrete-Event Simulation
Discrete Event “Hand” Simulation of a GI/GI/1 Queue
MECH 3550 : Simulation & Visualization
SIMULATION EXAMPLES QUEUEING SYSTEMS.
Presentation transcript:

Introduction to Modeling & Simulation Dr. A. K. Dey Third Lecture

AKD 32 Define An Achievable Goal “To model the…” is NOT a goal! “To model the…in order to select/determine feasibility/…is a goal. Goal selection is not cast in concrete Goals change with increasing insight

AKD 33 Choose The Appropriate Simulation Tools Assuming Simulation is the appropriate means, three alternatives exist:  Build Model in a General Purpose Language  Build Model in a General Simulation Language  Use a Special Purpose Simulation Package

AKD 34 Modeling with general purpose languages  Advantages:  Little or no additional software cost  Universally available (portable)  No additional training (Everybody knows…(language X) ! ) Disadvantages:  Every model starts from scratch  Very little reusable code  Long development cycle for each model  Difficult verification phase

AKD 35 General purpose languages used for simulation FORTRAN  Probably more models than any other language. PASCAL  Not as universal as FORTRAN MODULA  Many improvements over PASCAL ADA  Department of Defense attempt at standardization C, C++  Object-oriented programming language

AKD 36 Modeling with General simulation language  Advantages:  Standardized features often needed in modeling  Shorter development cycle for each model  Much assistance in model verification  Very readable code  Disadvantages:  Higher software cost (up-front)  Additional training required  Limited portability

AKD 37 General purpose simulation languages  GPSS  Block-structured Language  Interpretive Execution  FORTRAN-based (Help blocks)  World-view: Transactions/Facilities SIMSCRIPT II.5  English-like Problem Description Language  Compiled Programs  Complete language (no other underlying language)  World-view: Processes/ Resources/ Continuous

AKD 38 General purpose simulation languages  MODSIM III  Modern Object-Oriented Language  Modularity Compiled Programs  Based on Modula2 (but compiles into C)  World-view: Processes SIMULA  ALGOL-based Problem Description Language  Compiled Programs  World-view: Processes

AKD 39 General purpose simulation languages  SLAM  Block-structured Language  Interpretive Execution  FORTRAN-based (and extended)  World-view: Network / event / continuous CSIM  process-oriented language  C-based (C++ based)  World-view: Processes

AKD 310 Modeling with special purpose simulation language  Advantages  Very quick development of complex models  Short learning cycle  No programming--minimal errors in usage Disadvantages  High cost of software  Limited scope of applicability  Limited flexibility (may not fit your specific application)

AKD 311 Special purpose packages for simulation  NETWORK II.5  Simulator for computer systems  OPNET  Simulator for communication networks, including wireless networks  COMNET III  Simulator for communications networks  SIMFACTORY  Simulator for manufacturing operations

AKD 312 The real cost of simulation  Many people think of the cost of a simulation only in terms of the software package price.  There are actually at least three components to the cost of simulation:  Purchase price of the software  Programmer / Analyst time  “Timeliness of Results”

AKD 313 TERMINOLOGY l System  A group of objects that are joined together in some regular interaction or interdependence toward the accomplishment of some purpose.  Entity  An object of interest in the system.  E.g., customers at a bank

AKD 314 TERMINOLOGY (continued) l Attribute  a property of an entity  E.g., checking account balance l Activity  Represents a time period of specified length.  Collection of operations that transform the state of an entity  E.g., making bank deposits

AKD 315 TERMINOLOGY (continued) l Event:  change in the system state.  E.g., arrival; beginning of a new execution; departure l State Variables  Define the state of the system  Can restart simulation from state variables  E.g., length of the job queue.

AKD 316 TERMINOLOGY (continued) l Process  Sequence of events ordered on time W Note:  the three concepts(event, process,and activity) give rise to three alternative ways of building discrete simulation models

AKD 317 EXAMPLES OF SYSTEMS AND COMPONENTS Note: State Variables may change continuously (continuous sys.) over time or they may change only at a discrete set of points (discrete sys.) in time.

AKD 318 SIMULATION “WORLD-VIEWS” l Pure Continuous Simulation l Pure Discrete Simulation  Event-oriented  Activity-oriented  Process-oriented l Combined Discrete / Continuous Simulation

AKD 319 Examples Of Both Type Models l Continuous Time and Discrete Time Models: CPU scheduling model vs. number of students attending the class.

AKD 320 Examples (continued) l Continuous State and Discrete State Models: Example: Time spent by students in a weekly class vs. Number of jobs in Q.

AKD 321 Static and Dynamic Models: CPU scheduling model vs. E = mc 2 Other Type Models Input Output Input Output lDeterministic and Probabilistic Models:

AKD 322 Stochastic vs. Deterministic System Model Deterministic Stochastic

AKD 323 Management of the Simulated Clock l Fixed-time Increment l Variable-time Increment

AKD 324 Flowchart for arrival routine, queueing model Arrival event Set delay = 0 for this customer and gather statistics Is the server busy? Schedule the next arrival event Add 1 to the number of customers delayed Make the server busy Schedule a departure event for this customer Add 1to the number in queue Write error message and stop simulation Store time of arrival of this customer Is the queue Full? Return NoYes No

AKD 325 Departure event Subtract 1 from the number in queue Is the queue empty? Compute delay of customer entering service and gather statistics Add 1 to the number of customers delayed Schedule a departure event for this customer Make the server idle Move each customer in queue (if any) up one place Eliminate departure event from consideration Return NoYes Flowchart for departure routine, queueing model

AKD 326 Distribution of time between arrivals Time between Cumulative Random digit Arrivals(min.) Probability Probability Assignment

AKD 327 Service Time Distribution Service Time Cumulative Random digit (Minutes) Probability Probability Assignment

AKD 328 Time-between-arrival Determination Random Time btwn Random Time btwn Digit Arrivals Digit Arrivals Customer (Minutes) Customer (Minutes) 1 _ _

AKD 329 Service Times Generated Customer Random Digit Service Time (Minutes) Customer Random Digit Service Time (Minutes)

AKD 330 Event Type Work Sheet Clock Time Customer Number Arrival

AKD 331 Findings from the Simulation 1. Average waiting time for a customer Total time customers wait in queue(minute) Total number of customers

AKD 332 Findings from the Simulation (cont) 2. Prob. that a customer has to wait in a queue Number of customers who wait Total number of customers

AKD 333 Findings from the Simulation (cont) 3. Proportion of idle time of the server Total idle time of server(minute) Total run time of simulation(minute) Thus, the probability of the server being busy is the complement of 0.21, or 0.79

AKD 334 The Able-Baker carhop problem The purpose of this example is to indicate the simulation procedure when there is more than one channel. Consider a drive-in restaurant where carhops take orders and bring food to the car. Cars arrive in the manner shown in the following table.

AKD 335 The Able-Baker carhop problem (Inter-arrival distribution of cars) Time between Random Arrivals Cumulative Digit (Minutes) Probability Probability Assignment

AKD 336 The Able-Baker carhop problem (continued) There are two car hops -- Able and Baker. Able is better able to do the job, and works somewhat faster than Baker. The distribution of service times of Able and Baker is following.

AKD 337 The Able-Baker carhop problem (Service Distribution of Able) Service Random Time Cumulative Digit (Minutes) Probability Probability Assignment

AKD 338 The Able-Baker carhop problem (Service Distribution of Baker) Service Random Time Cumulative Digit (Minutes) Probability Probability Assignment

AKD 339 The Able-Baker carhop problem (Continued) l Over the 62-minute period Able is busy 90% of the time. 2 Baker was busy only 69% of the time. The seniority rule keeps Baker less busy. 3 Nine of 26 or about 35% of the arrivals had to wait. The average waiting time for all customers was only about 0.42 minute, or 25 seconds, which is very small.

AKD 340 The Able-Baker carhop problem (Continued) 4 Those 9 who did have to wait only waited an average of 1.22 minutes, which is quite low. 5 In summary, this system seems well balanced. One server cannot handle all the dinners, and three servers would probably be too many. Adding an additional server would surely reduce the waiting time to nearly zero. However, the cost of waiting would have to be quite high to justify an additional worker.

AKD 341 Thanks