MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state,

Slides:



Advertisements
Similar presentations
Network II.5 simulator ..
Advertisements

Introduction into Simulation Basic Simulation Modeling.
Data Models There are 3 parts to a GIS: GUI Tools
Chapter 3 General Principles
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
Fundamentals of Python: From First Programs Through Data Structures
 1  Outline  performance measures for a single-server station  discrete-event simulation  hand simulation  process-oriented simulation approach.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Agenda Main concepts in discrete-event simulation
Lecture 3 Concepts of Discrete-Event Simulation. 2 Discrete Event Model  In the discrete approach to system simulation, state changes in the physical.
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.
Simulation of multiple server queuing systems
Classification of Simulation Models
DISCRETE-EVENT SIMULATION CONCEPTS and EVENT SCHEDULING ALGORITHM
Components and Organization of Discrete-event Simulation Model
Simulation.
Simscript II.5 Building simulation model with SIMSCRIPT II.5.
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
Queueing Models: Data Collection and Hand Simulation from Prof. Goldsman’s lecture notes.
CPSC 531: DES Overview1 CPSC 531:Discrete-Event Simulation Instructor: Anirban Mahanti Office: ICT Class Location:
Lecture 4 Mathematical and Statistical Models in Simulation.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
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:
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.
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
Designing a Discrete Event Simulation Tool Peter L. Jackson School of Operations Research and Industrial Engineering March 15, 2003 Cornell University.
General Simulation Principles
ETM 607 – Discrete Event Simulation Fundamentals Define Discrete Event Simulation. Define concepts (entities, attributes, event list, etc…) Define “world-view”,
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.
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.
+ Simulation Design. + Types event-advance and unit-time advance. Both these designs are event-based but utilize different ways of advancing the time.
Chapter 2 – Fundamental Simulation ConceptsSlide 1 of 46 Chapter 2 Fundamental Simulation Concepts.
Modeling and Simulation Discrete-Event Simulation
SIMULATION OF A SINGLE-SERVER QUEUEING SYSTEM
Simulation Examples and General Principles
Chapter 10 Verification and Validation of Simulation Models
NETW 707 Modeling and Simulation Amr El Mougy Maggie Mashaly.
Chapter 2 Fundamental Simulation Concepts
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.
Chapter 2 Simulation Examples
Simulation of Operations The Discrete Event Approach to Computer Modelling.
INFORMATION TECHNOLOGY
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.
Advantages of simulation 1. New policies, operating procedures, information flows and son on can be explored without disrupting ongoing operation of the.
Chapter 2 Basic Simulation Modeling
 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,
Chapter 3 General Principles Banks, Carson, Nelson & Nicol Discrete-Event System Simulation.
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
Simulation of single server queuing systems
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.
OPERATING SYSTEMS CS 3502 Fall 2017
Clocks A clock is a free-running signal with a cycle time.
Modeling and Simulation (An Introduction)
Discrete Event Simulation
Modeling and Simulation CS 313
Chapter 10 Verification and Validation of Simulation Models
More Explanation of an example in chapter4
Concepts In Discrete-Event Simulation
MECH 3550 : Simulation & Visualization
Chapter 4: Simulation Designs
Presentation transcript:

MODELING EXAMPLES Types of model Conceptual Containing components that have not been clearly Identified in terms of theoretic categories such as state, event and function it only emphasizes objects and their relationship to one another

MODELING EXAMPLES Declarative Declaration models deemphasize the actual functions that causes state change. Contains two components states and events. We can take any action and break it into sub actions. Refer to past notes.

MODELING EXAMPLES Functional Focuses on functions that transform input into output while keeping track of state vector along the way. The two approaches of functional modeling are identified by function-based or variable- based.

Functional continue… When to used: 1. If problem is given in term of distinct physical objects which are connected in a direct order, use a functional model. (i) if objects are primarily functional in nature use functional-based approach (ii) if objects represent capacitance or storage use variable-based approach 2. If the problem involves material flow throughout the system. MODELING EXAMPLES

3.Y 2.Y 1.Y Examples Lines Customer Server Conceptual model MODELING EXAMPLES Time Customer Server transfer function Customer Time 3.Y 2.Y 1.Y Functional model

MECHANISMS FOR TIME ADVANCE One of the central functions of a simulation system described earlier is the simulation executive. The executive manages the passage of time and ‘steps’ the model into the future, executing the relevant logical relationships along the way. There are two basic approaches for controlling the time advance: Time slicing Next event

MECHANISMS FOR TIME ADVANCE Time Slicing With the time slicing approach advances the model forward in time at fixed intervals, e.g. every 5 seconds. The executive moves the model between the time intervals regardless of whether anything will happen.

MECHANISMS FOR TIME ADVANCE Next Event With next event the model is advanced to the time of the next significant event. Hence if nothing is going to happen for the next 3 minutes the executive will move the model forward 3 minutes in one go. The nature of the jumping between significant points in time means that in most cases the next event mechanism is more efficient and allows models to be evaluated more quickly.

Simulation software have graphical displays to show the user the changing status of machines (running, idle, etc.) and the movement of parts. Because the software jumps between significant points in time the jumps may be uneven with many jumps separated only by 5 seconds of simulated time followed by one or two jumps of 4 minutes say. The series of snap shots shown by the graphical displays can be misleading and machines may appear broken down for long periods of time when in fact this is not the case. Next Event disadvantages

Concepts in Discrete-Event Simulation Terms and explanation System : A collection of entities (e.g. people and machines) that interact together overtime to accomplish one or more goals.

Model : An Abstract representation of a system, usually containing Structural, logical, or mathematical relationships which describe a system in terms of state, entities and their attributes, sets, processes, events, activities, and delays. Concepts in Discrete-Event Simulation Terms and explanation

Concepts in Discrete-Event Simulation Terms and explanation System state: A collection of variables that contain all the information Necessary to describe the system at any time. Entity : Any object or component in the system which requires explicit representation in the model (e.e. a server, a customer, a machine ).

Concepts in Discrete-Event Simulation Terms and explanation Attributes : The properties of a given entity (e.g. the priority of waiting customer, the routing of a job through a job shop). List : A collection of (permanently or temporarily) associated entities, ordered in some logical fashion (such as all customers currently in waiting line, ordered by first come first serve or by priority)

Concepts in Discrete-Event Simulation Terms and explanation Events : An instantaneous occurrence that changes the state of a system (such as an arrival of a new customer). Event notice : A record of an event to occur at the current or some future time, along with any associated data necessary to execute the event; at a minimum, the record includes event type and time.

Concepts in Discrete-Event Simulation Terms and explanation Event list : A list of event notices for future events, ordered by time of occurrences; also known as the future event list (FEL) Activity : A duration of time specified length (e.g. a service time or inter-arrival time), which is known when it begins(although it may be defined in terms of a statistical distribution.

Concepts in Discrete-Event Simulation Terms and explanation Delay : A duration of time of unspecified indefinite length, which is not known until it ends ( e.g. a customer’s delay in a last-in, first-out waiting line which, when it begins, depends on future arrivals). Clock: A variable representing simulated time called CLOCK in the examples to follow.

MECHANISMS FOR DESCRIBING LOGIC There are a number of different ways of representing the logic within a discrete event simulation model. These approaches can be used for modeling the same systems and will (should!) result in the same results, the differences lie in the ease by which they can be understood and implemented and the efficiency of their computation. Three mechanisms will be briefly described followed by detailed explanation of one of them

MECHANISMS FOR DESCRIBING LOGIC The approaches are illustrated in Figure 3 are : Event Activity Process Figure 3. Ways of describing model logic

The event approach describes an event as an instantaneous change and such events are usually paired, e.g. start of machine loading, end of machine loading, etc. Activities describe a duration, e.g. machine loading, and are therefore very similar to pairs of events. The process approach joins collections of events or activities together to describe the life cycle of an entity, in this case a machine. MECHANISMS FOR DESCRIBING LOGIC

The event approach is easy to understand and computationally efficient but is more difficult to implement than the activity approach. On the other hand whilst activity approach is relatively easy to understand it suffers from poor execution efficiency. The process is less common and requires more planning to implement properly though is generally thought to be efficient. MECHANISMS FOR DESCRIBING LOGIC

Detail of the event execution structure The event approach is described in Figure 4. The diagram shows two essential elements: the clock and simulation executive. Here the simulation executive will use an ‘event list’ (a string of chronologically ordered events).

Figure 4. Detail of the event approach structure (from Kreutzer, 1986)Kreutzer, 1986

The executive is responsible for ordering the events. The executive removes the first event from the list and executes the relevant model logic. Any new events that occur as a result are inserted on the list at the appropriate point (e.g. a machine start load event would generate a machine end load event scheduled for several seconds time). The cycle is then repeated. Detail of the event execution structure

Each event on the event list has two key data items. The first item is the time of the event which allows it to be ordered on the event list. The second item is the reference to the model logic that needs to be executed. This allows the executive to execute the correct logic at the correct time. Note that more than one event may reference the same model logic, this means that the same logic is used many times during the life of the simulation run. Detail of the event execution structure

Example of the mechanism working. Figure 5 illustrates the next event mechanism. The rows show the advance of time for a simple model involving one machine (cycle time 5) feeding a buffer followed by another machine (cycle time 12) that removes parts from the buffer to process them. Parts arrive every 6. The units of time could be seconds, minutes, hours, etc. depending on the model

Figure 5. Passage of time in next event simulation

The model starts from the common starting point know as ‘empty and idle’; the all entities are idle and there are no parts in the system. The next most significant time is 6 when the first part arrives. The executive jumps straight to this time. When the first part arrives the first machine starts processing it. Example of the mechanism working.

At time 11 (5 later) the executive will cause the first machine to place its processed part in the buffer. Immediately the second machine takes the part and starts processing it. Note that events may occur at the same time, as well as there being significant times between events. The model unfolds over time with parts arriving, being processed on machine1 and placed in the buffer. As would be expected parts accumulate in the buffer since machine2 is slower. Detail of the event execution structure

For a graphical display the machines would be shown as icons changing color when running. According to a graphical display it would appear that machine2 is busier than machine one. If the figures for the busy time are added up for each machine (machine1 : 16 -vs.- machine2 : 13) it is apparent that machine1 was busier. This is one of problems noted before that can occur when the graphical displays of next event simulation are taken too literally. Example of the mechanism working.

The Grocery Shop Problem A simple intro to execution of simulation. A small grocery store has only one checkout counter. Customer arrive at this checkout counter at random from 1-8 minutes apart. Each possible value of inter-arrival time has the same probability of occurrence, as shown in Table 2.1 The service time vary from 1 to 6 minutes with probabilities shown in Table 2.0. The problem is to analyze the arrival and service of 20 customer.

The Grocery Shop Problem Arrival queue server Service node Departure Figure 6.0 Grocery shop service node diagram

The Grocery Shop Problem Event of single-channel queue consist of two events (i) unit-arrival event (ii) unit-complete event Arrival Event Server Busy ? Unit enters service Unit enters Queue for service

The Grocery Shop Problem Departure Event Another Unit waiting ? Begin server idle time Remove the waiting unit from the queue Begin servicing the unit YesNo

The Grocery Shop Problem Service Time (minutes) Probability Cumulative Probability Random- Digit Assignment Table 2.0 Service Time Distribution

The Grocery Shop Problem Time between Arrivals (minutes) Probability Cumulative Probability Random- Digit Assignment Table 2.1 Distribution of time between Arrival

The Grocery Shop Problem Customer Random digits Time between arrivals (minutes) Customer Random digits Time between arrivals (minutes) Table 2.3 Time-Between-Arrivals Determination

The Grocery Shop Problem Customer Random digits Service time (minutes) Customer Random digits Service Time (minutes) Table 2.4 Services time generated

Findings from Grocery Shop Simulation Table 1. Average waiting time ( minutes ) = total time customer wait in queue (minutes) total numbers of customers = = Probability (wait) = Number of customers who wait total numbers of customers = =0.65

Findings from Grocery Shop Simulation Table 3. Probability of idle server = total idle time of server (minutes) total run time of simulation = = Average service time (minutes) = Total service time (minutes) total numbers of customers = =3.4 minutes

Findings from Grocery Shop Simulation Table 5. Expected Service time ( minutes ) E(s) = ∞ Σ sp(s) S=0 = 1(0.10)+2(0.20)+3(0.30)+4(0.25)+5(0.10)+ 6(0.05) =3.2 minutes 6. Average time between arrivals (minutes) = Sum of all times between arrival (minutes) Number of arrivals - 1 = =4.3 minutes

Findings from Grocery Shop Simulation Table 7. Average waiting time of those who wait ( minutes ) = total time customer wait in queue (minutes) total numbers of customers who wait = = Average time customer spends in the system = total time customer spend in system (minutes) total numbers of customers = =6.2