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.

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

Discrete Event (time) Simulation Kenneth.
Introduction into Simulation Basic Simulation Modeling.
IE 429, Parisay, January 2003 Review of Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete, continuous.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Lab Assignment 1 COP 4600: Operating Systems Principles Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University of.
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
Simulation of multiple server queuing systems
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
Classification of Simulation Models
RAIDs Performance Prediction based on Fuzzy Queue Theory Carlos Campos Bracho ECE 510 Project Prof. Dr. Duncan Elliot.
Discrete Event Simulation How to generate RV according to a specified distribution? geometric Poisson etc. Example of a DEVS: repair problem.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University
Performance Evaluation
Queueing Network Model. Single Class Model Open - Infinite stream of arriving customers Closed - Finite population eg Intranet users Indistinguishable.
Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: 1.Customer arrives 2.Customer waits.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/28/20151.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
Lecture 4 Mathematical and Statistical Models in Simulation.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Graduate Program in Engineering and Technology Management
___________________________________________________________________________ Operations Research  Jan Fábry Waiting Line Models.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
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.
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.
Introduction to Queuing Theory
Introduction to Operations Research
Chapter 3 System Performance and Models. 2 Systems and Models The concept of modeling in the study of the dynamic behavior of simple system is be able.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
IE 429, Parisay, January 2010 What you need to know from Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete,
1 Elements of Queuing Theory The queuing model –Core components; –Notation; –Parameters and performance measures –Characteristics; Markov Process –Discrete-time.
Lecture 19 Nov10, 2010 Discrete event simulation (Ross) discrete and continuous distributions computationally generating random variable following various.
Dept. Computer Science, Tianjin Uni. 系统仿真 System Simulation 2008.
Simulation Examples and General Principles
OPERATING SYSTEMS CS 3530 Summer 2014 Systems with Multi-programming Chapter 4.
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 2 Fundamental Simulation Concepts
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.
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Object Oriented Discrete-Event Simulation with OOSimL Fall 2015 Dr. José M. Garrido Department of Computer Science College of Computing and Software Engineering.
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 enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
© 2015 McGraw-Hill Education. All rights reserved. Chapter 17 Queueing Theory.
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,
Modeling and Simulation
OPERATING SYSTEMS CS 3502 Fall 2017
OPERATING SYSTEMS CS 3502 Fall 2017
Prepared by Lloyd R. Jaisingh
Modeling and Simulation (An Introduction)
ETM 607 – Spreadsheet Simulations
Demo on Queuing Concepts
Queuing Theory By: Brian Murphy.
MECH 3550 : Simulation & Visualization
VIRTUE MARYLEE MUGURACHANI QUEING THEORY BIRTH and DEATH.
Presentation transcript:

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 own, and are called processes The passive entities are resources and queues (C) J. M. Garrido

Objects in a Simulation Model There are several objects in a simulation model The activate objects are instances of the classes that inherit the library class Process The passive objects are instances of any other class, including some of the library classes (e.g., queue classes) (C) J. M. Garrido

Single-Server Models There is only one server object that provides service to customer objects Arriving customer objects join a queue to wait for service The random events are customer arrivals and service completions (C) J. M. Garrido

Simple Queue A waiting line for arriving customers (or other objects). It is a passive entity in the model, used as ‘global’ shared resource. An arriving customer can only enter the queue at the tail A customer can only leave if it is at the head of the queue The usual order of customers is FCFS. (C) J. M. Garrido

A Simple Queue (C) J. M. Garrido

The Car-Wash Model Cars arrive for complete wash (service) Arriving cars join a line (queue) to wait for service There is only one car-wash machine that can service one car at a time After the service is complete for a car, it leaves the system (C) J. M. Garrido

The Carwash Model Components A set of customer processes, the cars One server process, the wash-machine One conceptual process that models arrivals (this represents the environment) One global shared resource, the queue. Events: customer arrival start of service end of service and departure of a customer (C) J. M. Garrido

Single Server System Model (C) J. M. Garrido

The Conceptual Model The model of the simple carwash system consists of the following processes: The Car process, which define the customer objects The Arrivals process, which represent the environment The Wash-machine process, which represents the server. (C) J. M. Garrido

Modeling Diagrams The UML diagram shows the main entities in the model The UML static modeling diagrams show the basic structure of the classes and their relationships The dynamic modeling diagrams show all the process interactions and the use of resources for every model. (C) J. M. Garrido

UML class diagrams for Car and Wash-machine (C) J. M. Garrido

UML Class Diagram for the Carwash Model (C) J. M. Garrido

UML Collaboration Diagram for the Carwash Model (C) J. M. Garrido

UML Sequence Diagram for the Carwash Model (C) J. M. Garrido

UML State Diagram for a Car Object (C) J. M. Garrido

Results of a Simulation Run The trace, which is a sequence of all relevant events with time of occurrence The summary results (statistics), with the values of the performance metrics of the model for the current run (C) J. M. Garrido

Performance Measures in the Carwash System The average number of customer in the system The average number of customers in the queue(s) (i.e., that are waiting) The average time that a customer spends in the system The average time that a customer spends in the queue(s) The server (wash-machine) utilization. (C) J. M. Garrido

Performance and Workload Characterization The usual objective for determining the performance measures in a queuing system is to achieve the following criteria: Reduce the customer waiting periods Improve the server utilization Maximize throughput (the number of customers served) for a given workload. (C) J. M. Garrido

Workload Parameters The performance of the system depends on the workload submitted, and for this queuing model it consists of the following parameters: The average customer arrival rate,  The average customer service rate,  The resource demand for the customers (C) J. M. Garrido

System Parameters The queue size The resource capacity of the system. (C) J. M. Garrido

Performance Measures Depend on Workload The performance metrics computed in the single-server model, depend on the workload submitted, and on the system parameters. Modifying the workload on a model and/or the system parameters changes the behavior of the model. (C) J. M. Garrido

Examples of Performance and Workload To compare two models with different servers, is equivalent to changing the workload by providing two different values for the average service time demands of the customers. If the system workload increases, the server utilization will also increase (C) J. M. Garrido

Bottleneck The bottleneck of the system at capacity will be localized in the server or resource with a utilization of 1, while the other servers or resources each have utilization significantly below 1. The bottleneck can be localized at the server, the queue, or at the resources. (C) J. M. Garrido

Studying System Behavior All the changes that occur in the system are analyzed In the model of the simple car-wash system, the system changes state when a customer arrives, when a customer starts service, when a customer completes service, etc. These changes are instantaneous occurrences and are called events. (C) J. M. Garrido

The Car-wash Stochastic Model These models include entities with attributes that change value in a non-deterministic manner The occurrence of the random events follow a probabilistic distribution (C) J. M. Garrido

Random Variables in the Model In the Car-wash model, the following random variables are defined: The inter-arrival period for the car objects The service period for each car object. (C) J. M. Garrido

Generation of Random Variables To facilitate the simulation of random events, PsimJ provides random number generators using several probability distributions Some of the distributions return an integer (long) value, others return a real (double) value (C) J. M. Garrido

Probability Distributions in PsimJ Uniform Exponential Poisson Normal Erlang Geometric Hyper-exponential (C) J. M. Garrido

Random Events in the Carwash Model Two random events: customer arrivals end of a customer service Two random variables are modeled: inter-arrival periods service periods Both random variables follow an exponential distribution. (C) J. M. Garrido

Documentation on PsimJ2 The sample models included in the PsimJ2 Web page http://science.kennesaw.edu/~jgarrido/psim.html (C) J. M. Garrido

Using PsimJ2 with Java All processes (active objects) are created from a user-defined class that inherits the library class Process. All non-process objects (passive objects) are created directly from the corresponding library class (e.g., class Squeue), or other classes. (C) J. M. Garrido

The Structure of a Model in Java Define all classes for the model’s processes, and inherit from the library class Process. Define one class (main class) that includes method main. In method Main_body of the main class, start the simulation by invoking method start_sim, then calculate summary statistics. (C) J. M. Garrido

Method main In method main: Define a simulation object of the library class Simulation; give a name to the model. Create all the objects used in the model. Start the active objects. See Listing 5.2 (C) J. M. Garrido

Using GUI with Models Java facilitates the implementation of graphical interfaces for simulation models A general GUI framework is included with PsimJ2. The package name is gui. To run the carwash model with GUI, run the CarwashGUI class, instead of the Carwash class. (C) J. M. Garrido

Carwash Simulation Run (C) J. M. Garrido

Carwash Simulation Run (2) (C) J. M. Garrido