1 / 41

Queueing Theory Chapter 1

Learn the basics of Operations Research (OR) modeling approach, including problem formulation, model construction, validation, and simulation techniques. Explore deterministic and stochastic models through simulation examples.

marlenet
Download Presentation

Queueing Theory Chapter 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Queueing Theory Chapter 1 Ghadi Rahme John Mitri

  2. The OR approach Stands for Operations Research Is characterized by the following steps: Problem Formulation Construction of the model Model Validation Using the model and evaluating various different alternatives or solutions Implementation and maintenance of the solution These steps are repeated multiple times during the OR exercise The basic feature of the OR approach is model building. Models can be generally classified into three categories.

  3. The OR approach Iconic: Exact replica of the real life system but on a smaller scale Examples: model airplanes , model houses, maps… Analogue: Representing a system with a more simpler understandable system by using a set of properties of the real life system.

  4. The OR approach Symbolic: Representing a real life model using symbols like mathematical equations and computer programs Simulation models are Symbolic models! OR models are generally symbolic models and can be classified into two groups: Deterministic models They do not contain elements of probability such as linear and non linear programing Stochastic models Which contain elements of probability such as queueing theory, stochastic processes, reliability, and simulation techniques. Simulation techniques rely heavily on randomness. However some are deterministic.

  5. Building a simulation model In a system the following feature are of interest: Environment: Each system can be seen as a subsystem of a broader system. Interdependency: No activity takes place in total isolation. Sub-systems: Each system can be broken down to sub-systems. Organization: Virtually all systems consist of highly organized elements or components, which interact in order to carry out the function of the system. Change: The present condition or state of the system usually varies over a long period of time. When building a simulation only the sub-systems which are related to the problem are simulated.

  6. Building a simulation model

  7. In a simulation variables can be exogenous • Its value is not affected by the simulation • Or endogenous • Its value is affected by the simulation • For example in the simulation of a single server queue we can have the time interval between two successive arrivals and the number of servers as exogenous variables while the mean waiting time in the queue and the mean number of customers in the queue are endogenous. • Status variables are some of the paramount importance variables in a system • They allow the user to know how things stand in the simulation at any given time. • We now proceed to identify the basic simulation methodology through the means of a few simulation examples Building a simulation model

  8. The machine interference problem Used to model the behavior of machines. Used extensively in computer modelling. Consists of a repairman and a finite number of broken down machines. The broken down machines are stored in a queue and served in a FIFO manner

  9. The machine interference problem The operational time is the time during which the machine is functioning normally. The total downtime consists of the time the machine is in the queue as well as the repair time. A machine becomes immediately operational after its been fixed.

  10. The machine interference problem How to simulate such a problem? First off we need to divide it into smaller scenarios called events which alter the status of the system. In this case we have two events which are the arrival event and the departure event. The arrival event represents the arrival of a broken down machine to the queue or to the repairman. The departure event occurs when a machine is repaired and functional again.

  11. The machine interference problem Secondly we need to define the status variables which will depend on the type of performance measures we want to obtain about the system. In this case the most important variable is n which tracks the number of broken down machines. If n=0 no machines are broken. If n=1 the repairman is busy and the queue is empty. If n>1 the repair man is busy and the queue has n-1 broken machines. n is directly affected by the departure and arrival events.

  12. The machine interference problem In order to implement these events we need variables to keep track of the time instants at which an arrival and a departure event will occur. These variables are known as clocks. Each machine has its own clock showing the time instant at which it will break down. Signifying an arrival event. A separate clock is used to show the time instant at which a machine being currently repaired will be operational again. Signifying a departure event. So if we have m machines, we need m+1 clocks or m clocks to keep track of the arrival events and 1 clock to keep track of the departure events. In addition to these clocks a master clock is used to keep track of the total simulated time.

  13. The machine interference problem

  14. The machine interference problem In our scenario we will consider 3 machines with CL1, CL2, and CL3 being the clocks associated with machine 1, 2, and 3 respectively (arrival event clocks). A fourth clock CL4 will be associated with the departure events. MC is the master clock. R is a variable associated with the repairman indicating if he is busy or idle. We assume that at time zero all machines are fully operational and that: CL1=1 CL2=4 CL3=9 R=n=0 These are our initial conditions! New arrival events are scheduled at MC+10 and new departure events are scheduled at MC+5 We only check the system at time instants at which an event takes place.

  15. The machine interference problem R

  16. The machine interference problem We can notice that the maser clock only shows us time instants at which an event occurred (arrival or departure). In between these instances no event occurs and the system’s status is unchanged. It is only necessary to check the system at instances where an event occurs. We simply advance the Master clock to the next event which has the smallest clock time.

  17. The machine interference problem

  18. We consider a computer network consisting of a number of nodes interconnected via a shared wired or wireless transport medium. • Access to the shared medium is controlled by a token. • Only nodes that have the token are allowed to transmit on the shared access medium at any given time. • There is only ever one token in the system. • The nodes pass on the token to one another in a certain order such that they form a kind of loop. Token based access scheme

  19. Any node in the system may keep the token for a certain time T, during which it can transmit packets. • Packets are made of data and a header, and the header contains the address of the sender, the address of the destination, and various control fields. • The node passes on the token if it either runs out of packets to send or if time T is exceeded. • If the node is in the process of transmitting a packet when time T expires, then it completes the transfer and then passes on the token. Token based access scheme

  20. An example of such a system would be a network. • Each node would be a queue, and these could only transmit packets when they have the token. • The token can be seen as a server that periodically switches between the queues. • The time it takes for the token to switch from one queue to the next is known as the switch-over time. • Such queueing systems are known as polling systems. Token based access scheme

  21. For each queue, there is an arrival event and service completion event. • For the token, there is a time of arrival at the next queue event and the time when the token has to be surrendered to the next node, known as the time-out. • For each queue, we keep track of the time of arrival of the next packet, the number of packets in the queue, and the time a packet is scheduled to depart, if it is being transmitted. • For the token, we keep track of the time of arrival at the next queue, the queue that may hold the token, and the time-out. Token based access scheme

  22. We assume that the token-based network consists of three nodes. • The inter-arrival times to queues 1, 2, and 3 are constant and they are equal to 10, 15, and 20 unit times respectively. • The time a queue is allowed to keep the token is assumed to be equal to 15 unit times. • The time it takes to transmit a packet is assumed to be constant equal to 6 unit times. • The switch over time is equal to 1 unit time. Token based access scheme

  23. For initial conditions, we assume that the system is empty at time zero, and the first arrival to queues 1, 2, and 3 will occur at times 2, 4 and 6 respectively. • At time zero, the token is in queue 1. • We assume that arrivals occur before departures if they were to occur simultaneously. • We assume that a packet arrives before the token if they were to arrive at a queue at the same time. • We need 5 clocks to simulate this system, labelled as master clock (MC), arrival time clock at queue i (ATi), departure time clock from queue i (DTi), time-out clock (TOUT), and arrival time clock of token to next queue (ANH). Token based access scheme

  24. A new packet arrives at a queue when MC becomes equal to ATi. • The size of the queue qi is then incremented by 1 because of the arrival of a new packet. • ATi is then set to be equal to the current MC plus the inter-arrival time for the queue, and this represents the next time a new packet will arrive at the queue. Token based access scheme

  25. A service is completed when MC becomes equal to DTi. • The size of the queue qi is then decremented by 1 because a packet has been transmitted. • The token is then passed on if the queue becomes empty or if the MC becomes equal to or greater than T, or when the token times out. • If the token is passed, then the variable representing the queue that may hold the token gets changed to point to the next queue (H=(H+1)mod3) and ANH gets set to the MC plus the switch over time. • If the token isn’t passed, then DTi gets set to the MC plus the time it takes to transmit a packet. Token based access scheme

  26. The token arrives at the next queue when the MC becomes equal to ANH. • If the queue is empty, then the token is passed on in the same way as in the previous slide. • If the queue isn’t empty, TOUT is set to MC plus T, and DTi is set to MC plus the time it takes to transmit one packet. Token based access scheme

  27. Token based access scheme

  28. We consider a two-stage manufacturing system. • The first stage consists of an infinite capacity queue referred to as queue 1 served by a single server referred to as server 1. • The second stage consists of a finite queue referred to as queue 2 served by a single server referred to as server 2. Two-stage manufacturing system

  29. If queue 2 becomes full, server 1 stops working, and it will only resume working when queue 2 becomes no longer full. • Each server may also break down, and this can happen whether it’s idle or busy. • A broken down server cannot work unless it is fixed. • If a server was servicing a customer when it broke down, the customer will resume its service after the server is repaired without any loss in time. Two-stage manufacturing system

  30. We assume that the buffer capacity of queue 2 is 4 (this includes the customer in service). • All service times, interarrival times, operational and repair times are constant. • Interarrival time = 40 time units. • Service time at node 1 = 20 time units. • Service time at node 2 = 30 time units. • Operational time for server 1 = 200 time units. • Operational time for server 2 = 300 time units. • Repair time for server 1 = 50 time units. • Repair time for server 2 = 150 time units. • Initially the system is assumed to be empty. The first arrival occurs at time 10, server 1 will break down for the first time at time 80, and server 2 at time 90. Two-stage manufacturing system

  31. There are a total of 7 events, linked to 7 clocks. • The events and the clocks they are linked to are as follows: arrival of a customer to queue 1 (AT), service completion at server 1 (DT1), service completion at server 2 (DT2), server 1 breaks down (BR1), server 1 becomes operational (OP1), server 2 breaks down (BR2), and server 2 becomes operational (OP2). • The following slides will briefly describe the events that may be triggered when each of the above events occurs. Two-stage manufacturing system

  32. These are the events that can get triggered when the arrival to queue 1 event gets triggered. • Arrival to queue 1 (new value for AT): This event is always scheduled each time an arrival occurs. • Service completion at server 1 (new value for DT1): This event will be triggered if the new arrival finds the server idle. Two-stage manufacturing system

  33. These are the events that can get triggered when the service completion at server 1 event gets triggered. • Service completion at server 1(new value for DT1): This event will occur if there is one or more customers in queue 1. • Service completion at server 2 (new value for DT2): This event will occur if the customer who just completed its service at server 1 finds server 2 idle. • The occurrence of a service completion event at server 1 may cause server 1 to get blocked, if queue 2 becomes full. Two-stage manufacturing system

  34. These are the events that can get triggered when the service completion at server 2 event gets triggered. • Service completion at server 2 (new value for DT2): This event will occur if there is one or more customers in queue 2. • Service completion at server 1 (new value for DT1): This event will occur if server 1 was blocked. Two-stage manufacturing system

  35. These are the events that can get triggered when the server 1 breaks down event gets triggered. • Server 1 becomes operational (new value for OP1): This event gives the time in the future when the server will be repaired and will become operational. • Service completion at server 1 (new value for DT1): This event will occur if server 1 was busy when it broke down, and it reflects the delay due to the repair. Two-stage manufacturing system

  36. These are the events that can get triggered when the server 1 becomes operational event gets triggered. • Server 1 breaks down (new value for BR1): This event gives the time in the future when the server will break down. During this time the server is operational. • Service completion time (new value for DT1): If the server was idle when it broke down, and queue 1 is not empty at the moment it becomes operational, then a new service will begin. Two-stage manufacturing system

  37. These are the events that can get triggered when the server 2 breaks down event gets triggered. • Server 2 becomes operational (new value for OP2): This event gives the time in the future when server 2 will be repaired, and therefore it will become operational. During that time the server is broken down. • Service completion at server 2 (new value for DT2): This event will occur if server 2 was busy when it broke down, and it reflects the delay due to the repair. Two-stage manufacturing system

  38. These are the events that can get triggered when the server 2 becomes operational event gets triggered. • Server 2 breaks down (new value for BR2): This event gives the time in the future when server 2 will break down. During this time the server is operational. • Service completion time (new value for DT2): If the server was idle when it broke down, and queue 2 is not empty at the moment it becomes operational, then a new service will begin. Two-stage manufacturing system

  39. Two-stage manufacturing system

  40. Thank you

More Related