Presentation is loading. Please wait.

Presentation is loading. Please wait.

(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.

Similar presentations


Presentation on theme: "(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."— Presentation transcript:

1 (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 inherit the library class, Process The passive objects are instances of any other class, including some of the library classes (e.g., queue classes)

2 (C) J. M. Garrido2 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

3 (C) J. M. Garrido3 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 order of customers is FIFO.

4 (C) J. M. Garrido4 A Simple Queue

5 (C) J. M. Garrido5 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

6 (C) J. M. Garrido6 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

7 (C) J. M. Garrido7 Single Server System Model

8 (C) J. M. Garrido8 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.

9 (C) J. M. Garrido9 Modeling Diagrams Extended Demos simulation diagrams show the interactions among processes The UML static modeling diagrams show the basic structure of the classes and their relationships The UML dynamic modeling diagrams show all the process interactions and the use of resources for every model.

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

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

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

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

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

15 (C) J. M. Garrido15

16 (C) J. M. Garrido16

17 (C) J. M. Garrido17

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

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

20 (C) J. M. Garrido20 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.

21 (C) J. M. Garrido21 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 –The queue size –The resource capacity of the system.

22 (C) J. M. Garrido22 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 parameters changes the behavior of the model.

23 (C) J. M. Garrido23 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

24 (C) J. M. Garrido24 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.

25 (C) J. M. Garrido25 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.

26 (C) J. M. Garrido26 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

27 (C) J. M. Garrido27 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.

28 (C) J. M. Garrido28 Generation of Random Variables To facilitate the simulation of random events, PsimJ2, Psim3, and OOSimL provide random number generators using several probability distributions Some of the distributions return an integer (long) value, others return a real (double) value

29 (C) J. M. Garrido29 Probability Distributions in Psim Uniform Exponential Poisson Normal Erlang Geometric Hyper-exponential

30 (C) J. M. Garrido30 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.

31 (C) J. M. Garrido31 Queuing Models Simulation Models that include at least one queue From the software point of view, the queue is a data structure that stores waiting customers The server removes from the queue the next customer to service

32 (C) J. M. Garrido32 Basic Categories of Queuing Models Single-server models Multi-server models Queuing networks

33 (C) J. M. Garrido33 Examples of Queuing Models Computer systems Communication systems, networks Teller facilities in a bank Production systems Transport and materials handling Repair and maintenance systems

34 (C) J. M. Garrido34 Service Stations A queuing model consists of a number of facilities and interconnecting queues. Each facility (or service station) consists of one or more servers. It is very common in practice to use exponentially distributed inter-arrival and service periods.

35 (C) J. M. Garrido35 Types of Queuing Models Single-server, single-queue Multi-server, single-queue Multi-server, multi-queue Multi-server, multi-queue with priorities Multi-server, multi-queue with priorities and preemption.

36 (C) J. M. Garrido36 Single Server Single Queue An arriving customer joins the input queue and checks if the queue is idle to activate it The server gets a customer from the queue, if it is empty it becomes idle The service time for a customer is a random variable generated at the time of its arrival.

37 (C) J. M. Garrido37 Multiple Servers Single Queue Any of the servers available can provide service demanded by customers A server removes the next customer from the head of the queue One or more servers can be idle, just waiting for other customers to arrive

38 (C) J. M. Garrido38 Carwash Model With Multiple Machines

39 (C) J. M. Garrido39 General Description of the Model This model has K machines A customer can receive service from any machine (server) A customer waits in the queue until it is at the head of the queue and a machine becomes available The machine removes the customer from the head of the queue and starts service

40 (C) J. M. Garrido40 Idle Servers Idle servers are organized in a server queue An available (idle) server joins a queue of idle servers if there are no customers An arriving customer enters the input queue and reactivates the server at the head of the server queue

41 (C) J. M. Garrido41 Models With Multiple Servers and Multiple Queues

42 (C) J. M. Garrido42 Multi-Server Multi-Queue Model Every server has its own queue of customers An arriving customer selects the server with the smallest queue Alternatively, an arriving customer randomly selects a server.

43 (C) J. M. Garrido43 Multi-Server Multi-Queue Model with Preemption Every customer has a priority An arriving customer can interrupt the service of another customer with a lower priority The interrupted customer is returned to the head of his queue, this customer is the one with the lowest priority and that started most recently.

44 (C) J. M. Garrido44 Performance Measures The average number of customers 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) Each server utilization.

45 (C) J. M. Garrido45 Queuing Networks Consists of two or more interconnected stations The output from a station are connected to input of another station Each station has one or more servers and its queues Each station provides a different service

46 (C) J. M. Garrido46 Service in a Queuing Network Customers enter the network at any of several entry stations Customers are routed through the network demanding service from different stations Customers can exit from any of several exit stations

47 (C) J. M. Garrido47 A Queuing Network


Download ppt "(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."

Similar presentations


Ads by Google