Modeling and Simulation CS 313

Slides:



Advertisements
Similar presentations
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. A PowerPoint Presentation Package to Accompany Applied Statistics.
Advertisements

Modeling and Simulation By Lecturer: Nada Ahmed. Introduction to simulation and Modeling.
Structural Reliability Analysis – Basics
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Decision Making: An Introduction 1. 2 Decision Making Decision Making is a process of choosing among two or more alternative courses of action for the.
Introduction To System Analysis and Design
Discrete-Event Simulation: A First Course Steve Park and Larry Leemis College of William and Mary.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
Simulation.
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
Cmpt-225 Simulation. Application: Simulation Simulation  A technique for modeling the behavior of both natural and human-made systems  Goal Generate.
Machine Shop Model. Lecture Two by: Lecturer/ Nada Ahmed.
Modeling and Simulation
Introduction to Management Science
Modeling and Simulation simulation and modeling methodology 1 Arwa Ibrahim Ahmed Princess Nora University.
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.
Verification & Validation
ECES 741: Stochastic Decision & Control Processes – Chapter 1: The DP Algorithm 31 Alternative System Description If all w k are given initially as Then,
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.
Modeling and Simulation Discrete-Event Simulation
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
MODES-650 Advanced System Simulation Presented by Olgun Karademirci VERIFICATION AND VALIDATION OF SIMULATION MODELS.
ECE 466/658: Performance Evaluation and Simulation Introduction Instructor: Christos Panayiotou.
Reid & Sanders, Operations Management © Wiley 2002 Simulation Analysis D SUPPLEMENT.
Introduction.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Written by Changhyun, SON Chapter 5. Introduction to Design Optimization - 1 PART II Design Optimization.
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.
Advantages of simulation 1. New policies, operating procedures, information flows and son on can be explored without disrupting ongoing operation of the.
DEPARTMENT/SEMESTER ME VII Sem COURSE NAME Operation Research Manav Rachna College of Engg.
MODELING AND SIMULATION CS 313 Simulation Examples 1.
Simulation Examples And General Principles Part 2
Traffic Simulation L2 – Introduction to simulation Ing. Ondřej Přibyl, Ph.D.
1 Decision Making ADMI 6510 Simulation Key Sources: Data Analysis and Decision Making (Albrigth, Winston and Zappe) An Introduction to Management Science:
Modeling and Simulation CS 313
OPERATING SYSTEMS CS 3502 Fall 2017
Non-Preemptive Scheduling
Prepared by Lloyd R. Jaisingh
Modeling and Simulation CS 313
Modeling and Simulation (An Introduction)
CHAPTER 8 Operations Scheduling
Dynamic Graph Partitioning Algorithm
Chapter 1.
Statistical Data Analysis
Simulation Department of Industrial Engineering Anadolu University
Single-Server Queue Model
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer.
Modeling and Simulation CS 313
DSS & Warehousing Systems
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 10 Verification and Validation of Simulation Models
Object-Oriented Analysis
Chapter 6: CPU Scheduling
Process Scheduling B.Ramamurthy 12/5/2018.
Single-Server Queue Model
Process Scheduling B.Ramamurthy 2/23/2019.
Statistical Data Analysis
Introduction to Requirements Modeling
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
1.3 Classifying Engineering Tasks
Modeling and Simulation CS 313
MECH 3550 : Simulation & Visualization
ECE 352 Digital System Fundamentals
U3L2 The Need For Algorithms
Embedded System Development Lecture 12 4/4/2007
Presentation transcript:

Modeling and Simulation CS 313 Introduction Modeling and Simulation CS 313

What is a model? A model means something which represents a system in a form which allows us to make predictions about the behavior of the system. In all cases, a model should be an abstraction of the system: an attempt to distill, from the mass of details that is the system itself, exactly those aspects that are essential to the system’s behavior. Once a model has been defined through this abstraction process, it can be parameterised to reflect any of the alternatives under study, and then evaluated to determine its behavior under this alternative.

Problem with direct experimentation There are many reasons why investigations into the behavior of a system cannot be carried out by direct experimentation on the system. Why? (Reasons for using modelling instead of direct experimentation): At best, experimentation will probably be disruptive, at worst, dangerous. For example, a system manager of a heavily loaded file server is unlikely to allow experimentation. May be that the internal behavior which we wish to investigate may not be accessible in a working system. For example, in most operating systems it is difficult to obtain the exact timing of instruction level events. Direct Experimentation, since it involves monitoring, is expensive (in terms of system resources) and time consuming. It is also difficult to use the results of direct experimentation to extrapolate to other scenarios of operation. For example, experimenting with one configuration of a communication network is unlikely to give us much insight into the expected performance if another configuration is used.

Discrete event systems Discrete event systems: mean that the view of the system is characterized by variables that take distinct values and which change at distinct times or events in the system. For example, we might be interested in the number of nodes in a communication network which are currently waiting to send a message (N say). This number will change when one of two events occur: either a node, which was not previously waiting, generates a message and is now waiting to send (N  N + 1), or a node, which was previously waiting, successfully transmits its message (N  N − 1). One of our major tasks as modellers will be to choose the parameters which characterize the system under study. Discrete time discrete event models only consider the system at predetermined moments in time, which are typically evenly spaced, e.g. at each clock “tick”. State changes are observed only at these moments, which are not necessarily the moment at which the events themselves occur. Continuous time discrete event models, consider the system at the time of each event. Hence the time parameter in such models is conceptually continuous. These models are generally appropriate for computer and communication systems.

Model characterization A system model is deterministic or stochastic: a deterministic system model has no stochastic (random) components. For example, provided the conveyor belt and machine never fail. At some level of detail, however, all systems have some stochastic components; machines fail. A system model is static or dynamic: a static system model is one in which time is not a significant variable. The passage of time always plays a significant role in dynamic models. For example, if three million people play the state lottery this week, what is the probability that there will be at least one winner? If, however, we are interested in the probability of no winners in the next four weeks, then this model needs to be dynamic. A dynamic system model is continuous or discrete.

Model characterization The characterization of a system model can be summarized by a tree diagram that starts at the system model root and steps left or right at each of the three levels.

Model characterization Definition 1.1.1 A discrete-event simulation model is defined by three attributes: stochastic | at least some of the system state variables are random; dynamic | the time evolution of the system state variables is important; discrete-event | significant changes in the system state variables are associated with events that occur at discrete time instances only.

Model development A typical discrete-event simulation model will be developed consistent with the following six steps. Steps (2) through (6) are typically iterated, perhaps many times, until a (hopefully) valid computational model, a computer program, has been developed. Determine the goals and objectives of the analysis once a system of interest has been identified. These goals and objectives are often phrased as simple Boolean decisions. Build a conceptual model of the system based on: what are the state variables, how are they interrelated and to what extent are they dynamic?,…etc. Convert the conceptual model into a specification model. If this step is done well, the remaining steps are made much easier. Turn the specification model into a computational model, a computer program. At this point, a fundamental choice must be made, to use a general-purpose programming language or a special-purpose simulation language. Verify. As with all computer programs, the computational model should be consistent with the specification model, did we implement the computational model correctly? Validate. Is the computational model consistent with the system being analyzed, did we build the right model?

Model development Example 1.1.1: The following machine shop model helps illustrate the six steps in Algorithm 1.1.1. A new machine shop has 150 identical machines; each operates continuously, 8 hours per day, 250 days per year until failure. Each machine operates independently of all the others. As machines fail they are repaired, in the order in which they fail, by a service technician. As soon as a failed machine is repaired, it is put back into operation. Each machine produces a net income of $20 per hour of operation. All service technicians are hired at once, for 2 years, at the beginning of the 2-year period with an annual salary expense of $52,000. Because of vacations, each service technician only works 230 8-hour days per year. By agreement, vacations are coordinated to maximize the number of service technicians on duty each day. How many service technicians should be hired?

Model development The objective seems clear to find the number of service technicians for which the profit is maximized. One extreme solution is to hire one technician for each machine; this produces a huge service technician overhead but maximizes income by minimizing the amount of machine down-time. A reasonable conceptual model for this system can be expressed in terms of the state of each machine (failed or operational) and each service technician (busy or idle). These state variables provide a high-level description of the system at any time. To develop a specification model, more information is needed. Machine failures are random events; what is known (or can be assumed) about the time between failures for these machines? The time to repair a machine is also random. The computational model will likely include a simulation clock data structure to keep track of the current simulation time, a queue of failed machines and a queue of available service technicians. The computational model must be verified, usually by extensive testing. Verification is a software engineering activity made easier if the model is developed in a contemporary programming environment. The validation step is used to see if the verified computational model is a reasonable approximation of the machine shop.

System Diagrams Particularly at the conceptual level, the process of model development can be facilitated by drawing system diagrams.

Programming languages General-Purpose Languages Because discrete-event simulation is a specific instance of scientific computing, any general-purpose programming language suitable for scientific computing is similarly suitable for discrete-event simulation. ( C, C++, Java,..etc) Simulation Languages Simulation languages have built-in features that provide many of the tools needed to write a discrete-event simulation program. Because of this, simulation languages support rapid prototyping and have the potential to decrease programming time significantly. (GPSS, SIMAN, SLAM II, and SIMSCRIPT II.5.)

Conceptual model (A Single-Server Queue) Example 1.2.1 If there is just one service technician, the machine shop model presented in Examples 1.1.1 and 1.1.2 is a single-server service node model. That is, the “jobs” are the machines to be repaired and the “server” is the service technician.

Conceptual model (A Single-Server Queue) Definition 1.2.2 Control of the queue is determined by the queue discipline | the algorithm used when a job is selected from the queue to enter service. The standard algorithms are: FIFO | first in, first out (the traditional computer science queue data structure); LIFO | last in, first out (the traditional computer science stack data structure); SIRO | service in random order; Priority | typically, shortest job first, (SJF) or equivalently, in job-shop terminology, shortest processing time (SPT).

Conceptual model (A Single-Server Queue) The maximum possible number of jobs in the service node is the capacity. It can be either finite or infinite. If the capacity is finite then jobs that arrive and find the service node full will be rejected (unable to enter the service node). There are two important additional default assumptions implicit in Definition 1.2.1: First, service is non-preemptive | once initiated, service on a job will be continued until completion. That is, a job in service cannot be preempted by another job arriving later. Preemption is commonly used with priority queue disciplines to prevent a job with a large service time requirement from producing excessive delays for small jobs arriving soon after service on the large job has begun. Second, service is conservative | the server will never remain idle if there is one or more jobs in the service node.

Specification model The following variables, illustrated in Figure 1.2.2, provide the basis for moving from a conceptual model to a specification model. At their arrival to the service node, jobs are indexed by i = 1, 2, 3, … For each job there are six associated time variables.

Specification model (Arrivals) Rather than specifying the arrival times a1, a2, … explicitly, in some discrete-event simulation applications it is preferable to specify the arrival times r1, r2, …, thereby defining the arrival times implicitly, as shown: