83
A QUEUEING MODEL OF HOSPITAL CONGESTION by Pouya Bastani B.Sc., Simon Fraser University, 2007 a Thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in the Department of Mathematics c Pouya Bastani 2009 SIMON FRASER UNIVERSITY Summer 2009 All rights reserved. However, in accordance with the Copyright Act of Canada, this work may be reproduced, without authorization, under the conditions for Fair Dealing. Therefore, limited reproduction of this work for the purposes of private study, research, criticism, review, and news reporting is likely to be in accordance with the law, particularly if cited appropriately.

Pouya Bastani MSc Thesis

Embed Size (px)

DESCRIPTION

Pouya Bastani MSc Thesis

Citation preview

AQUEUEINGMODELOFHOSPITALCONGESTIONbyPouya BastaniB.Sc., Simon Fraser University, 2007aThesissubmittedinpartialfulfillmentoftherequirementsforthedegreeofMasterofSciencein the DepartmentofMathematicsc _ Pouya Bastani 2009SIMON FRASER UNIVERSITYSummer 2009All rights reserved. However, in accordance with the Copyright Act of Canada,this work may be reproduced, without authorization, under the conditions forFair Dealing. Therefore, limited reproduction of this work for the purposes ofprivate study, research, criticism, review, and news reporting is likely to bein accordance with the law, particularly if cited appropriately.APPROVALName: Pouya BastaniDegree: Master of ScienceTitleofThesis: A queueing model of hospital congestionExaminingCommittee: Dr. Paul TupperChairDr. Ralf WittenbergSenior SupervisorDr. Sandy RutherfordCo-supervisorDr. Rachel AltmanSFU ExaminerDateApproved: June 25, 2009iiAbstractOver the years, the growing population in British Columbia has led to escalating wait timesandovercrowdinginhospital EmergencyDepartments(EDs), duetoinsucientnumberof bedsinspecicunitsof thehospitals, suchastheIntensiveCareUnit(ICU)ortheMedicalUnit(MU).Toenhancethelevelofaccesstocare,asuccessfulpredictionofbedrequirements is needed. This is achieved by having an adequate model of the patient owsto and between the dierent compartments of the hospital. Focusing only on the stream ofemergency patients, we developed a queueing network to model the interaction between theICU and the MU, which is believed to be causing a major proportion of the congestion inthe ED. Through approximate analytical methods and simulation, we determined sucientbed counts in each of these two units so as to guarantee certain access standards.iiiAcknowledgmentsIwouldliketothankmysupervisorsDr. SandyRutherfordandDr. RalfWittenbergfortheir teachings and guidance in this thesis. I would also like to thank the IRMACS Centrefor the administrative and technical support that greatly facilitated this research. Finally, Iam grateful to my parents, Bijan and Mahnaz, and my girlfriend, Helen, for their care andcontinual support throughout my graduate studies.ivContentsApproval iiAbstract iiiAcknowledgments ivContents vListofTables viiiListofFigures ix1 Introduction 11.1 Hospital Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Access to Care . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Project Goal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 FundamentalsandNewResults 72.1 Rate Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.2 Characteristics of Queueing Systems . . . . . . . . . . . . . . . . . . . . . . . 92.3 Kendalls Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112.4 The Exponential Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . 11v2.5 Littles Theorem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122.6 Relationship between Wait Time and Queue Length . . . . . . . . . . . . . . 132.7 TheM/M/c Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182.8 TandemM/M/c Queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 LiteratureReview 224 ModelOverview 284.1 Segmented Multi-Stream Model. . . . . . . . . . . . . . . . . . . . . . . . . . 284.2 The ED-ICU-MU Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.3 Modelling Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315 M/M/cQueuewithReneging 335.1 Queue Distribution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345.2 Wait Time Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365.3 The Reneging Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.4 Reneging in Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 TwoQueuesinTandem 446.1 Numerical Solution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476.2 Approximate Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507 BedEstimation 567.1 Queueing Network Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567.1.1 Parameter Specication . . . . . . . . . . . . . . . . . . . . . . . . . . 587.2 Analytical Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.3 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 647.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67vi7.5 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68AM/M/1QueuewithReneging 69viiListofTables6.1 Transition rates of tandem queue . . . . . . . . . . . . . . . . . . . . . . . . . 476.2 Error in tandem queue approximation using Methods 2 and 3 . . . . . . . . . 536.3 Error in tandem queue approximation using Method 4 . . . . . . . . . . . . . 547.1 Approximate performance measures forS2. . . . . . . . . . . . . . . . . . . . 627.2 Approximate performance measures forS1. . . . . . . . . . . . . . . . . . . . 637.3 Performance measures forS1 andS2 obtained via simulation . . . . . . . . . 66viiiListofFigures2.1 The single server queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.2 Two innite-capacity queues in tandem . . . . . . . . . . . . . . . . . . . . . 213.1 Flow of the emergency cardiac patients (from [8]). . . . . . . . . . . . . . . . 243.2 Patient ow between dierent facilities (from [20]) . . . . . . . . . . . . . . . 253.3 Queueing network model of an obstetrics hospital (from [9]) . . . . . . . . . . 264.1 The interaction of ED, ICU, and MU . . . . . . . . . . . . . . . . . . . . . . . 305.1 Reneging from queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346.1 Two queues in tandem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467.1 The tandemS1 S2 queueing network. . . . . . . . . . . . . . . . . . . . . . 577.2 The network representation of the ED-ICU-MU. . . . . . . . . . . . . . . . . 587.3 DecomposedS1 andS2 queues . . . . . . . . . . . . . . . . . . . . . . . . . . 61ixChapter1IntroductionAcutecareisthetreatmentofaseveremedicalconditionforonlyashortperiodoftimeand at a crisis level. Many hospitals are acute care facilities with the goal of discharging thepatient as soon as the patient is deemed healthy and stable. The rising population in BC hascreated a need to understand better how hospital resources relate to the quality of servicein acute care facilities in British Columbia. In this thesis, hospital resources are measuredin beds, a term we use to refer to the physical count of locations able to provide in-patientservices, accompanied by the necessary equipment and sta. To ensure an adequate level ofaccess to care, it is important to examine future bed requirements. The accurate predictionof this count requires both the knowledge of future population demographics, which aectsthe demand for acute care services, and also an understanding of how the number of avail-able beds aects access to care.Thisworkisdedicatedtothelatterissue. Morespecically, ourgoal istounderstandhow the ow of patients to,within the dierent compartments of,and out of the hospitalaectsaccesstocare. Thiswouldenableustotoestimatetherequirednumberofbedsthat would guarantee a certain access level. This is important, for a low hospital capacityleads to patients in need of care being turned away, and growing waiting lists cause stresson other hospital units. For example, when insucient medical beds are available to meetdemand, emergencymedical patientsspill overintosurgical beds; consequently, surgicalwaiting lists increase as planned admissions are postponed. Determining bed requirements1CHAPTER1. INTRODUCTION 2is also important from the hospital management perspective, for it has direct implicationson sta allocations and operation costs. For the purposes of this project, we consider onlybed requirements for patients arriving through the emergency department; inclusion of theelectivestreamofpatientsintothemodel isleft asafuturetask. Hereafter,wewillreferto inpatients simply as patients; outpatients are not considered here, for they are not hos-pitalized overnight, and thus do not aect bed requirements.Thefocusof thisprojectisonunderstandingandquantifyingtheblockingphenomenonthat occurs in the Intensive Care Unit when patients who need to be transferred out of thisunit to another cannot nd a free bed. This congestion, in turn, causes delay in providingbedstonewlyarrivedcriticallyillpatients. Inthenextsection, wedescribethehospitalunits considered in this project, followed by the denition of the access measure that we usehere. Finally, westatethegoalofthisprojectanddescribeitsrelationtothepastworkdone at the Complex Systems Modelling Group at IRMACS.1.1 HospitalUnitsAcute care hospitals are divided into multiple compartments that may dier from one facilityto another, depending on the size and location of the hospital. To keep the model general,we consider the following three units,which we believe can be applied to most acute carehospitals:Emergency Department (ED): sometimes termed Emergency Room, this unit pro-vides initial treatment to patients with a broad spectrum of illnesses and injuries, someof which may be life-threatening and requiring immediate attention.The process from patient arrival in the ED to placement in a bed can be summarizedas follows: It begins with the triage nurse, who determines the urgency of the patientscondition. Next, the patient is seen by an ED physician, who, after possible diagnostictesting, determineswhetherornot thepatient requiresadmissiontothehospital.In some cases,after the initial assessment and treatment,patients are discharged ortransferred to another hospital for various reasons. Otherwise, a bed is requested in theCHAPTER1. INTRODUCTION 3appropriate nursing unit (e.g., medical, surgical, or intensive care). The availability ofa bed is aected not only by the capacity of the relevant unit, but also by the admissionand scheduling policies of elective patients, particularly surgical patients who competefor the same beds. If a bed is not available readily, the patient is kept in the ED andis treated by a nurse. This may result in the discharge of the patient directly from theED if the treatment is completed before a bed becomes available. Otherwise, when abed is reported to be free in the required unit, the patient is transferred to the bed.IntensiveCareUnit (ICU): isaspecializeddepartmentusedforintensivecaremedicine. Most patients arriving to theICU are admitted from the ED. After theirtreatment, ICUpatientsareusuallytransferedtothemedical unitforfurthercarebeforedischarge. Thistransfer,however,ispossibleonly if abed isavailablein themedical unit.Medical Unit (MU): is a term used in this project to refer to the rest of the hospital.This unit is designated for patients from the ED whose severity of illness is not su-ciently high to be considered for the ICU. In addition, patients from the ICU spendsome time in the MU for full recovery before their complete discharge from the hos-pital. Finally, scheduled patients (not considered here) are taken to this unit. Whenpatients treatment is completed in the MU, they leave the hospital or are assigned abed in the Alternative Level of Care (ALC) unit of the MU, depending on their healthcondition. The ALC, which shares beds with the MU, is essentially a waiting unit forpatients to be transferred to a residential care unit when these institutions are fullyoccupied.1.2 AccesstoCareAccesstocarecanbemeasuredinseveral dierentmanners. Traditionally, hospital bedcapacity decisions have been made based on Target Occupancy Rate (TOR) the averagepercentageof occupiedbedsandthemostcommonlyusedoccupancytargethasbeen85%. Another metric often cited in the literature is the Target Access Rate (TAR), whichmeasures the percentage of the time that a census count will show that the hospital containsCHAPTER1. INTRODUCTION 4at least one empty bed.The measure that we use here for emergency patients, developed in collaboration with theB.C. Ministry of Health Services, is the Target Time to Access (TTA), which is the targetedpercentageof timesthatpatientsreceivebedswithinagivenmaximal timedelay. Forexample, aTTAof 80%within6hoursimpliesthatthereareenoughbedstokeepthepercentageof thepatientsthathavetowaitlonger than6hoursbelow20%. WewilluseTTA in this project for the purpose of determining bed requirements for emergency patients.1.3 ProjectGoalThis project emerged as part of my work with Complex Systems Modelling Group (CSMG)atIRMACS, anditsgoal hasbeentostudymorefundamentallysomeof theaspectsofthequeueingnetworkthathasbeendevelopedtomodel patientowsinB.C. acutecarehospitals.IntherstphaseoftheacutecaremodellingprojectatCSMG[31], mosthospitalsweredividedinto5subunits: ICU, Pediatrics, Psychiatry, Surgical, andMedical. Theseunitswereassumedtobeoperatingindependentlyof oneanother. Theprojectaddressedtheissue of access to care for emergency patients with the assumption that elective admissionshave higher priority. Although it may seem counterintuitive, it is reasonable to assume thatpatientsadmittedthroughtheEDhavelowerprioritythanelectiveadmissions, sincetheformer group, upon nding the hospital full, are placed in the ED where they receive care,while the latter group would probably face a cancellation if a bed is not available as sched-uled. Given the historical admission rates through the ED, the model related TTA to thenumber of beds in the hospital. For instance,for any one hospital,the model determinedtherequirednumberofbedsinthepediatricsunitsothataTTAof85%within6hourswas achieved. In that project, however, the process by which elective admissions could getcancelled due to hospital overcrowding was not considered; this task was undertaken in thesecond phase of the project [5]. To model the cancellation mechanism, it was assumed thateven though scheduled patients had priority over emergency patients, if they waited longerthan a certain amount, their appointments would be cancelled.CHAPTER1. INTRODUCTION 5In this project, I have attempted to study a more realistic model of the hospital, by devel-oping a queueing network that takes into account the transfer of patients from the ICU toother hospital units, which we collectively refer to as the Medical Unit (MU). The main issuethat arises in this setting is the possibility of the MU being full, which causes patients whosetreatment is completed in the ICU to be blocked from being transferred, and hence to haveto stay in the ICU until a bed becomes available in the MU. This eectively lengthens theirduration of stay in the ICU, and reduces the hospital eciency, as the impact of blocking inthe ICU propagates to the ED, where some patients may be waiting to get into the ICU. Theblockingmechanismisstudiedinthisprojectbothnumericallyandalsoviaapproximatemethods. However, asbothmethodsfailtocompletelyencompasstheoverall modeldueto its complexity, discrete-event simulation is used to understand how the number of bedsaect TTA for emergency patients.Besides blocking, another queueing principle that is investigated in this project is reneging,or the departure of units1from the system before having completed service. In most of theliterature, reneging is due to the impatience of customers who are in the queue, and so it isoften viewed as customers leaving the queue. In this project, however, reneging is proposedas a model both for deaths that occur in the hospital (mainly the ED and the ICU), and alsoforthetreatmentcompletionsthattakeplaceintheED,whichresultinpatientsleavingthe hospital before receiving a bed. Although the underlying reason for these departures isnot impatience, they can be treated similarly. However, the point that must be emphasizedis that deaths that occur in the ICU are analogous to customers leaving the service stationwhile they are being served. This is not what is commonly referred to as reneging. On theother hand, deaths in the ED or direct discharges from the ED, which is viewed as the queueto the hospital, conform with the widely known notion of reneging. In both cases, a largenumber of reneged patients indicates low quality of care, since high death rates and directdepartures from the ED often occur when the hospital is operating at or near full capacity.The study of reneging in this project is hoped to give us an understanding of how such quan-tities as the percentage of reneged patients are aected by the number of beds in the hospital.1Inqueueingtheory, thetermunitsreferstocustomersarrivingataservicestation. Inthehospitalmodeldevelopedhere,thetermisusedtorefertopatientsarrivingattheED.CHAPTER1. INTRODUCTION 6Since the ideas we use in our modelling approach lie in the domain of queueing theory, thenext chapter is devoted to the fundamentals of this subject, including notation, terminolo-gies, andimportantresultsusedinthisthesis. Inthefollowingchapter, wereviewsomeof the past work done in applying queueing models in a health care setting. We will thengiveaconcretedescriptionofthequeueingmodelthatwehavedevelopedtodescribetheinteraction between the ED, ICU, and MU. After studying reneging in chapter 5 and tandemqueues with blocking in chapter 6, we will apply the results in chapter 7 to nd an estimatefortherequirednumberofbedsintheICUandtheMU, forthepurposeofachievingaTTA of 90% within 1 hour for the ICU and 80% within 6 hours for the MU. This estimateis then improved upon using the simulation software SimEvents in MATLAB.Chapter2FundamentalsandNewResultsQueueing theory is a mathematical approach in Operations Research applied to the analysisof waitinglines. A.K. Erlangrstanalyzedqueuesin1913inthecontextof telephonefacilities. The body of knowledge that developed thereafter via further research and analysiscame to be known as Queueing Theory, and is extensively applied in industrial settings andretail sectors. The use of queueing theory and other principles of operations managementin health care is fairly recent, with applications which can often be thought of as a balancebetween(i) minimizing costs due to occupation of resources such as beds; and(ii) minimizing wait times of patients.Ineect,TargetTimetoAccessisameasurethatachievesthisbalancebyincorporatingwhat health care ocials believe is a compromise between cost and wait time minimization.In general, the analysis of queueing systems consists of evaluating a set of performance mea-sures,suchasmeancustomerwaittimeormeanserveridletime(customersandservers,respectively, represent patients and beds in the queueing model of hospitals developed later).Queueing systems are often analyzed by analytical methods or simulation. The latter is ageneral technique of wide application able to incorporate many complexities of a model, butits main drawback is the potentially high development and computational cost to obtain ac-curate results. Analytical methods, on the other hand, can often produce results in relatively7CHAPTER2. FUNDAMENTALSANDNEWRESULTS 8shorttime, butoftenrequirethatthemodelsatisfyamorerestrictivesetofassumptionsand constraints in order to make the derivation possible. When deriving analytical solutionsbecomes intractable, numerical solutions of the underlying equations (see the next section)mayalsobeconsidered, buteventhisapproachislimitedinitsapplication, becausethememoryrequiredtostorethestatespaceofqueueingnetworksgrowsexponentiallywiththe number of service stations.Although the results in this project are extensively based on simulation and numerical solu-tions, better understanding of the model developed here can be obtained through analyticalinvestigations. However, a full study of the whole model consisting of the interactions be-tween the ED, the ICU, and the MU is essentially impossible using analytical techniques.Nevertheless, imposingsimplifyingassumptionsandusingapproximatetechniques, usefulinsights can be gained. In this section, we now give a short introduction to some basics ofqueueing theory, which will be used in subsequent chapters.2.1 RateMatrixLet Xn, n 0 be a Markov chain over a nite state space o = 0, 1, 2, . . . , N. Dene pijas the probability of transition from statei tojin one step, i.e.pij = PrXn = jXn1 = i,where we assume that the chain is homogeneous so thatpijis independent ofn (usuallyndenotes discrete points in time, in which case this is equivalent to requiring that obe thesetofstatesatequilibrium, assumingtheequilibriumexists). ThematrixP=(pij)fori, j ois called the transition probability matrix of the Markov chain. This matrix has theproperty that jS pij = 1, since the probability of transitioning from state i to some statein omust be 1.Now, lettherowvectorbetheequilibriumprobabilitydistributionwithelementsi=PrXn=i. Thisvectormustremainunchangedundertheapplicationofthetransitionmatrix; in other words, it is dened as the eigenvector of the probability matrix associatedCHAPTER2. FUNDAMENTALSANDNEWRESULTS 9with the eigenvalue 1 so thatP= . (2.1)Assuming the equilibrium exists, the rate matrix1can be dened asQ = P I. (2.2)Then, equation (2.1) can be written asQ = 0 (2.3)where 0 is the zero vector. The normalization condition iS i= 1 can be incorporatedin equation (2.3) by replacing the elements in the last column ofQ with 1s (call this newmatrixQ) and replacing the last element of the zero vector on the right hand side with 1(call this new vectorb). With these denitions, the equilibrium distributionsatises thefollowing equation: Q = b. (2.4)The rate matrixQ is often quite sparse, because each state can only transition to a smallnumber of neighboring states. Various ecient numerical methods are available for solvingsuchequations. MATLABisespeciallyecientat recognizingthesparsestructureoftheratematrixandhenceapplyingspecializedtechniquestodramaticallyreducethecostofsolving equation (2.4) when the state space is large, as is the case in our queueing networkmodel of the hospital. In section 6.1 we demonstrate the use of the rate matrix in obtainingthe queue length distribution of the tandem queueing system discussed with blocking.2.2 CharacteristicsofQueueingSystemsConceptually, the simplest queueing model is the single server queue illustrated in gure 2.1(often the waiting space itself is not illustrated in the diagram, and its presence is implied,unless otherwise stated). The system models the ow of customers as they arrive, wait inthe queue if the server is busy, receive service, and eventually leave.1Inanalyzingthetransientperiod,whenstatesandtransitionprobabilitiesaretimedependent,theratematrixgivestherateatwhichthestatevector(t)changeswithtimeviathefollowingequation(t)

= (t)Q(t).CHAPTER2. FUNDAMENTALSANDNEWRESULTS 10 "#$%#$&'()(*+ ",'-# '$$(%'."/#,'$)0$#" Figure 2.1: The single server queueA queueing system consists of customers who have a certain arrival pattern, and are servedat a station consisting of a number of servers with a specic service pattern. In this respect,we can see that a basic queueing system,one that consists of a single service station,canbe described by the following characteristics:(i) arrival pattern:This is specied by the distribution of interarrival time of customers.Animportantrelatedquantityisthemeaninterarrival time. Thereciprocal ofthemean interarrival time is referred to as the arrival rate. A commonly used distributionfor the interarrival time of customers is the exponential distribution (see section 2.4),which is determined by the mean alone. Though it can be otherwise, we consider onlyarrivals that occur singly (not in batches).(ii) servicepattern: Itisspeciedbythedistributionof thetimetakentocompleteservice. The reciprocal of the mean service time is referred to as the service rate. Aswith the arrival pattern, the service pattern is commonly described by the exponentialdistribution. We assume departures occur one by one, and not in batches.(iii) number of servers: A number of servers may work in parallel, and an arriving unitcan choose randomly between any of the free servers. If all servers are busy, the unitjoins a queue common to all the servers.(iv) systemcapacity: Theremightbesituationsinwhichaqueueingsystemcanonlyaccommodate a limited number of waiting units. In this case, if the number of waitingcustomers plus those in service exceeds the system capacity, any further arrival doesnot join the system and is lost.(v) queue discipline:If a customer arrives at the system at a time when the server(s) is(are) unavailable to provide service, he/she is forced to wait in the queue temporarily.If there is more than one customer waiting in the queue at a time the server becomesavailable, one of the customers in the queue is selected to start receiving service. TheCHAPTER2. FUNDAMENTALSANDNEWRESULTS 11manner in which waiting customers are taken in for service when a new server becomesavailableisreferredtoastheservicediscipline. ThroughoutthisthesisFirst-Come,First-Served (FCFS) is assumed as the service discipline.Wenextintroduceanotationinqueueingtheorythatisusedtodescribesingle-stationqueues in a short format.2.3 KendallsNotationA basic queueing system can often be described by a notation introduced by Kendall. Refer-ring to the numbering used above in section 2.2, this notation takes the form (i)/(ii)/(iii)/(iv)so that, for example, a queueing system with exponential interarrival and service time dis-tribution, c servers,and system capacityk,is represented byM/M/c/k,whereMstandsfor Markovian. Unless otherwise mentioned, the service discipline is assumed to be FCFS.Moreover,if the waiting capacity is innite,i.e. k = ,the last symbol may be omitted,so that the notation for the above example would simply becomeM/M/c.2.4 TheExponentialDistributionThe simplest queueing models assume that the interarrival and service times are exponen-tiallydistributed,sothat,forinstance,if isthemeanarrivalrate,thentheprobabilitydensity function (pdf) for the time between successive arrivals would bef(t) = et. (2.5)Equivalently, the arrivals can be said to follow the Poisson process, a collection N(t), t 0of random variables, whereN(t) is the number of events that have occurred up to timet,starting from time 0. The Poisson distribution is given byPrN(t) = n, t 0 =(t)netn!. (2.6)We now state three important properties of the exponential and Poisson distributions thatwe use in this thesis:CHAPTER2. FUNDAMENTALSANDNEWRESULTS 12(P1) Memoryless Property: IfXis an exponentially distributed random variable, thenPrX x +y[X x = PrX y. (2.7)Thispropertyhasthefollowingimplication: if servicetimesareexponentiallydis-tributed,then theprobability that a customersservice iscompleted at some futuretime is independent of how long the customer has already been in service. It is mainlybecause of this special property that the exponential distribution has been the mostwidely used distribution in the analysis of queueing systems.(P2) AdditiveProperty: Thesumof nindependentPoissonprocesseswithparameteri,fori = 1, 2, . . . , n, is a Poisson process with parameter1 +2 + +n.(P3) Decomposition Property: Suppose that N(t) is a Poisson process with rate and thateach arrival is marked with probabilityp independent of all other arrivals. LetN1(t)andN2(t) respectively denote the number of marked and unmarked arrivals in [0, t].Then N1(t) and N2(t) are two independent Poisson processes with respective rates pand(1 p).2.5 LittlesTheoremFor a queueing system at equilibrium with arrival rate, mean queue lengthL, and meanwait timeW, Littles Theorem statesL = W. (2.8)The profoundness of this formula is due to the fact that it holds for virtually all queueingsystemsunderverygeneralconditions. Furthermore,thesamerelationholdsif LandWrepresent the mean number of units and mean wait time in the system2at any time point,respectively. Although the initial insight into the truth of this relation is due to Morse [25],it was his student Little [23] who gave the rigorous proof of the formula.2Thetermsystemisusedtorefertobothservicestationandqueueincombination.CHAPTER2. FUNDAMENTALSANDNEWRESULTS 132.6 RelationshipbetweenWaitTimeandQueueLengthWenowderiveanequationthatrelatestheequilibriumqueuelengthdistributionof anM/G/c queue to the equilibrium distribution of the wait time in the queue (G stands forthegeneral distribution); asfarasweareaware, thisresulthasnotbeenpublishedelse-where. To do so, we rst state Burkes Theorem and the PASTA property.Let us rst dene the following quantities:an = Pran arrival ndsn units in the queuedn = Pra departure leavesn units in the queueqn = Pra random observer ndsn units in the queueThen Burkes Theorem states that for any queueing system at equilibrium in which arrivalsand departures occur one by one (no batch arrivals or departures) it must be true thatan = dn. (2.9)On the other hand, the PASTA (Poisson Arrivals See Time Averages) property states thatin any queueing system in which the arrivals follow a Poisson process,an = qn. (2.10)Thus, for a queueing system at equilibrium with Poisson arrivals in which both arrivals anddepartures occur individually, we must have thatdn = qn. (2.11)Let w(t) be the probability density function (pdf) of the wait time in the queue3. Equation(2.11) can then be used to nd a formula relating the probability generating function (pgf)of the queue distributionP(z) =

nqnzn[z[ < 1 (2.12)3Throughoutthisthesis,weusewaittimetorefertothetimespentinthequeue,notinthesystem. Torefertothelatter,wewillspecicallystatewaittimeinthesystem.CHAPTER2. FUNDAMENTALSANDNEWRESULTS 14to the Laplace Transform (LT) of the wait time pdfw(s) =_0estw(t) dt (2.13)foranM/G/cqueuewithmeanarrivalrate. Todoso, rstnotethatinaqueuewithFCFSservicediscipline, theprobabilitythattherearenunitsinthequeuewhenaunitleavesthequeue(andenterstheservicestation)isequal totheprobabilitythatnunitsarrive during its wait time. This leads to the following expression:dn =_0et(t)nn!w(t) dt. (2.14)Using (2.11) the pgf of the queue length distribution can be written as:P(z) =

n=0qnzn[z[ < 1=

n=0dnzn=

n=0_0et(t)nn!znw(t) dt. (2.15)Now, as stated by Widder [36, p. 446], if the Laplace transform_0est(t) dtconverges absolutely at a points = s0, then for Res0 < Res ReR it must convergeuniformly, where R is an arbitrary complex number. Since P(z) is nite for all 0 < Rez 0. Hence, expression (2.23) implies that the degreeof the numerator must be equal to that of the denominator in the rational approximationP(z); in other words, we must choosekn = kd k.Foreveryparticularproblem, wechoose kexperimentallybystartingfromk=1, andincreasing it incrementally, comparing error estimates for dierent values ofk. It must bementionedthathighervaluesof kdonotnecessarilyyieldsmallererrorasmeasuredby(2.22), for as Godfrey [13] comments in the introduction to his code:If you overt the data,then you will usually have pole-zero cancellations and/or poles andzeros with a very large magnitude. If that happens, then reduce the values ofkn and/orkd.Hefurtheraddsthattheapproximationbecomesill-conditionedwithhighervaluesof knand/or kd. Thus, it is preferable to conne our search to small values of k. Clearly, measuringtheerrorinthes-space(z= 1 s/)asmeasuredby(2.22)alsogivesagoodindicationoftheaccuracyoftheapproximationinthet-space. Thisisbecausetheinversionofthetransform w(s) is highly sensitive to the location of its poles, and as Godfrey [13] mentions,often,ifyouhaveagoodt,youwill ndthatyourpolynomialshaverootswheretherealfunction has zeros and poles.Besides measuring the error in thes-space, we can look at the following two quantities asmeans of measuring the error in thet-space:1) free server probability, andCHAPTER2. FUNDAMENTALSANDNEWRESULTS 182) integral of wait time distribution.From what we already mentioned, the better the approximation, the smaller the dierencee1 =c1

n=0qn c0, (2.25)since c0 estimates the free server probability. Furthermore, since every probability distribu-tion must be normalized, the errore2 =1 _0 w(t) dt(2.26)needs to be small. Therefore, together withe0, these three error measures allow us to nda desirable value ofk. In section 6.1 we demonstrate the method outlined here to computewait time distribution in a tandem queueing system of nite intermediate waiting capacity.2.7 TheM/M/cQueueWe now illustrate the ideas introduced in this chapter with the use of an example. ConsidertheM/M/c queue where the arrival and service rates are and, respectively. Assumingthat steady state exists, let pn be the steady state distribution of the number of units in thesystem. We proceed to derive the equations involving pn by using the rate-equality principle,which states that the rate at which a process enters a state is equal to the rate at which itleaves that state.Consider state 0,when there are no units in the system. The process can leave this stateonly when there is an arrival, which causes the system to transition to state 1. The long-runproportion of time the process is in state 0 is p0, and since is the rate of arrival, the rate atwhich the process leaves state 0 to go to state 1 is p0. Moreover, the process can enter state0 only from state 1 through a departure or service completion. Since the proportion of timethe process is in state 1 isp1and the rate of leaving state 1 through service completion is, the rate at which the process transitions from state 1 to 0 is p1. Using the rate-equalityprinciple, we getp0 = p1. (2.27)CHAPTER2. FUNDAMENTALSANDNEWRESULTS 19Now consider state 0 < n < c. The process can leave state n in two ways, either through anarrival or through a departure. The proportion of time the process is in state n is pn and thetotal rate at which the process leaves staten through arrivals or departures ispn +npn,since there aren servers busy (additive property of the Poisson process). The process canenter staten in two ways,either through arrival from staten 1 or through a departurefrom staten + 1. Thus, the rate at which the process enters staten ispn1 + pn+1. Bythe rate-equality principlepn +npn = pn1 + (n + 1)pn+1. (2.28)Similarly, for the case ofn c, we getpn +cpn = pn1 +cpn+1. (2.29)Repeated application of (2.28) along with (2.27) at the last step yieldspn (n + 1)pn+1= pn1 npn= pn2 (n 1)pn1...= p0 p1= 0.By rearranging terms and iterating we obtain that for 0 < n cpn =/npn1 =(/)2n(n 1) pn2 ==(/)nn!p0. (2.30)In a similar fashion, we get that forn > cpn =(/)nc!cncp0. (2.31)Now for/(c) < 1, the normalization condition n=0pn = 1 givesp0 =_c1

n=0(/)nn!+(/)cc!(1 /c)_1. (2.32)We now proceed to compute some performance measures. The expected queue length L canbe computed asL =

n=c(n c)pn =pc(1 )2, (2.33)CHAPTER2. FUNDAMENTALSANDNEWRESULTS 20where =/c is referred to as the server utilization. Applying Littles formula,we alsoobtain the expected waiting time in the queueW=L=pc(1 )2. (2.34)Knowing the probability distribution, we can now directly compute the pgf of the numberin the queueP(z) =c1

n=0pn +

n=cpnznc= 1 pc1 +pc1 z, (2.35)which allows us to nd the LT of the wait time distribution asw(s) = P(1 s/) = 1 pc1 +pc1 +s/c. (2.36)Inverting the transform givesw(t) =_1 pc1 _(t) +cpcec(1)tt > 0. (2.37)Note that the coecient of (t) is the probability of zero wait, or the probability that thereis a free server upon arrival. It is important to realize that computingpcin this coecientbecomes numerically dicult when the number of servers c and the server load / are verylarge, as from (2.31) it can be seen that both (/)candc! then become extremely large,introducing numerical errors. To address this issue Adan and Resing [2] rst note thatpc1 =(c)c/c!(1 )

c1n=0(c)n/n! + (c)c/c!=B(c 1, c)1 +B(c 1, c),whereB(c, ) is ErlangsB-formula given byB(c, ) =c/c!

c1n=0n/n! +c/c!. (2.38)Then, by dividing the numerator and denominator by c1n=0n/n!, the authors obtain thefollowing recursive relation for ErlangsB-formula:B(c, ) =B(c 1, )c +B(c 1, ), (2.39)which can be used to avoid division of large numbers in equation (2.37).CHAPTER2. FUNDAMENTALSANDNEWRESULTS 21 "# "$ %# %$ Figure 2.2: Two innite-capacity queues in tandem2.8 TandemM/M/cQueuesNow consider an M/M/c1 queue placed in tandem with an M/M/c2 queue, with an innitequeueallowedinbetween(Fig. 2.2). Customersdischargedfromtherststationmustproceed to the next to have their second phase of service completed. It can easily be shownthat the equilibrium distributionpmn = Pr m units inS1 andn units inS2 has the product formpmn = p1(m)p2(n) (2.40)wherepi()isthedistributionof thenumberof unitsinanM/M/ciqueue. Thisshowsthatthetwostationsoperateindependentlyofoneanother; thisisthetypicalbehaviourof queueingnetworkswithunlimitedqueueingspaceinbetween. Animportanttheoremregardingtheoutput process of the M/M/cqueueat equilibriumstates that theinter-departuretimesareindependentlyandidenticallydistributedasanexponential randomvariable with mean 1/, where is the arrival rate. It follows that if the arrival rate intoS1is, thenthearrivalrateintoS2isalso. Thegeneralresultapplicabletonetworksof queues with innite waiting capacity between each is known as the Jackson Theorem [18] .Chapter3LiteratureReviewIn the past, queueing theory has been eectively used in such areas of health care modellingas sta scheduling, policy making (for example, determining how prioritizing certain groupsof patients aects wait times), and bed requirement analysis, which is the focus of this thesis.Itiscommonpracticeinhealthservicestoestimatetherequirednumberof bedsastheaveragenumberof dailyadmissionstimesaveragelengthof stayindaysanddividedbyaverage bed occupancy rate (average number of occupied beds during a day) [17]:bed requirement =average no. of daily admissionsaverage bed occupancy rateaverage length of stay. (3.1)However, asdeBruinetal. mentionin[8], amodel, onlybasedonaveragenumbers, isnot capable of describing the complexity and dynamics of the in-patient ow. Moreover,reportedoccupancylevelsaregenerallybasedontheaveragemidnightcensus(forbillingpurposes), which results in underestimation of the bed requirements.Morerecently, queueingmodelshaveprovidedbettermeansof estimatingthenecessarynumber of beds based on sound performance measures. In [28], Pike et al. use the M/G/queue as a model for the casualty ward of a hospital. They show that in steady state, thebed occupancy rate follows a Poisson distribution with mean W, where denotes the dailyadmission rate andWdenotes the average duration of stay. Using this model, the authorsdetermine the required number of beds in order to guarantee that a given target percentage22CHAPTER3. LITERATUREREVIEW 23of arrivals receive a bed immediately.Weiss and McClain [35] also use the M/G/ system to model the queue of patients needingalternative levels of care in acute care facilities whose treatment is completed and who arewaiting to be transferred to an extended care facility (ECF). These patients are kept in thehospital due to unavailability of beds in the ECF and reduce the hospital utilization. Theauthors model allows managers to predict the eect of certain policy changes on appropriateaccess measures. For instance, the cost-benet trade-o of opening an additional extendedcarefacilitywithinaregioniscomparedtothatofassigningahigherprioritytopatientsgoing to ECF from acute care facilities than to those coming from other sources.Instead of using an innite capacity queue, Worthington [37] uses anM/G/c queue with astate-dependent arrival rate to address the long hospital-wait list problem. He experimentswith various management actions such as increasing the number of beds or decreasing meanservice times through appropriate means.Gorunescuet al. [14] developaqueueingmodel forthemovementof patientsthroughahospital department. Performance measures, such as mean bed occupancy and the proba-bilityofrejectinganarrivingpatientduetohospitalovercrowding, arecomputed. Thesequantitiesenablehospital managerstodeterminethenumberofbedsneededinordertokeep the fraction of delays under a threshold, and also to optimize the average cost per dayby balancing the costs of empty beds against those of delayed patients.Although service times,unlike inter-arrival times,do not usually have an exponential dis-tribution,such an assumption is often made in order to simplify the analysis greatly. Forinstance, de Bruin et al. [8] use theM/M/c/c queue, referred to as the Erlang Loss model,to investigate the emergency in-patient ow of cardiac patients in a university medical cen-treinordertodeterminetheoptimalbedallocationsoastokeepthefractionofrefusedadmissions under a target limit. The authors nd the relation between the size of a hospitalunit,occupancyrate,andtargetadmissionrates. Acancellationrateof5%isoftencon-sidered acceptable. However, while the target occupancy rate of 85% has become a goldenstandardinhealthcare[15], theauthorsnotethatusingonetargetoccupancyrateforCHAPTER3. LITERATUREREVIEW 24of refused admissions at the FCA is significant andnumerous patients are turned away to other referringhospitals.This is unacceptableandputs agreat pressureontherequiredqualityofcare. Moreandmorehospitalshavetoaccount for their qualityof care. Anadmissionguaranteefor all patients entering the emergency department is one ofthe main goals of the hospital. Besides this servicerequirement, onehas toconsider themedical emergencyaspect. In case of a heart attack, the sooner someone gets totheemergencyroom, thebetter his or her chanceof notonly surviving, but also of minimizing heart damagefollowing the attack. This is often referred to as the GoldenHour [14]. This study applies a queuing model to analyzecongestionintheemergencycarechain. Withthismodelthe number of beds inthe care chainis determinedforseveral service levels.In Section 2 the structural model is constructed followedbythedataanalysisinSection3. Section4describestheimpactoffluctuationsinarrivalsandvariationinLOSoncapacity requirements. In Section 5 the phenomenon ofblocking and the mathematical model are introduced.Section6gives the results andthe paper ends withtheconclusion and discussion in Section 7.2 StructuralmodelThe first phase of the study is the construction of astructuralmodel(orflowchart)ofthepatientflow. Suchamodel describesthedifferentpatient routingsinaqualita-tive manner and defines the relations between differenthospitalunits.Afterexpertmeetingswithcardiologistswedecided to identify two different patient flows. The primarypatient flowentersthesystemat theFCAandleavesthehospital after a stayat the CCUandNC. The differentdepartments are defined as follows:& First CardiacAid: Ahospital unit intendedtoproviderapiddiagnosisandinitiationoftreatment forsubjectswithacutesymptomsprobablyduetocardiacdisease(for example chest pain, syncope, palpitations, dyspnea)& CoronaryCareUnit: Ahospital unit that is speciallyequipped to provide intensive care of patients withsevere acute or chronic heart disease (for example acutecoronary syndromes, arrhythmia, heartfailure)& Normal Care: A hospital unit equipped to provide non-intensivecaretoaparticulargroupofpatients, inthiscase patientswith cardiac disease.Asecondarypatient flow, originatingfromsurroundinghospitals, enters the CCUandreturns toother hospitalsaftertreatment, thusbypassingtheNC. Thesepatientsarehospitalizedtohaveimmediatepercutaneous (or balloon)angioplasty(PTCA)[3].Thiskindoftreatmentisreferredtoastop-clinicalcare.Onlycertifiedhospitalsareallowedto perform this type of medical procedure.The structural model with the two different patient flowsis shown in Fig. 1.Health care processes are characterized by a greatuncertainty. Alarge variety of possible patient routingscanbedistinguished. Ifweinvestigatethedifferent flowsthroughout the hospital in great detail the flowchartbecomes like the pathof a pinball. Therefore, Fig. 1isnot striving for completeness. Nevertheless, it is possible toFirstCardiac Aid (FCA) Coronary Care Unit (CCU) Normal Care clinical ward (NC) EmergencyPTCA Emergency PTCA Emergency admission Home Other nursing unit Readmission Refused Admission DischargeNot specified Primary flow Secondary flow NC CCU Fig. 1 Flowchart of the emergency cardiac in-patient flow126 Health Care Manage Sci (2007) 10:125137Figure 3.1: Flow of the emergency cardiac patients (from [8])hospital units of dierent size is not reasonable, for larger hospitals can usually operate ata higher occupancy rate than smaller ones.After analytically estimating the required number of beds in the First Cardiac Aid (FCA)unitof themedical centre, deBruinet al. [8] alsousenumerical methodstodeterminethe number of beds in the Coronary Care Unit (CCU) and the Normal Care clinical ward(NC),whicharesituateddownstreamfromtheFCA(Fig.3.1). Theauthorshadtorelyon numerical techniques at this stage, because the nite capacity of the CCU and the NCleads to blocking in the FCA, making analytical calculations extremely dicult to carry out.Infact, duetothecomplexitiesthatariseinanalyzingqueueingsystemswithmultipleinteractingservicestations, thestudyof healthcarefacilitieshasmainlybeendoneus-ingsimulation, withanalytical methodsappliedtothestudyof onehospital asawhole(represented by a single service station) or of single hospital units, assumed to operate in-dependently of the others. In recent years, however, approximate analytical methods havebeen developed and used in studying multi-facility interactions.For instance, Koizumi et al. [20] use a queueing network model with blocking to model thecongestion in mental health facilities in Philadelphia (Fig. 3.2). Their results point out thata shortage of a particular type of facilities could be the main cause of the blocking, whichCHAPTER3. LITERATUREREVIEW 25MODELING PATIENT FLOWS USING QUEUING NETWORK 51Figure1. In-ows and out-ows between Stations.[4] are both simulation studies. El-Darzi, et al. [6] analyzed thecongestion in geriatric patient ows in a U.K. hospital system.The model framework used in this study is similar to our men-tal facility system, with the exception that their system has atandem structure as opposed to our arbitrarily-linked sys-tem(i.e.,patientscanskipstations).Theothertwoarticles,Hershey et al. [8] and Weiss and McClain [30] employ mathe-matical approaches in analyzing a blocking problem. However,neither of these methods could be directly applied to analyzecongestion in the mental health system in Philadelphia. Her-shey et al. [8] dealt with blocking in the same context as thispaper, but blocking occurs only when entities enter a specicstation (Unit 1), while other stations were assumed to have in-nite waiting space in front of the stations. The methodologyintroduced by Weiss and McClain [30] may approximate thecongestion in the Philadelphia mental health system with rea-sonable accuracy. However, their methodology does not utilizeeither blockingor the single-node decomposition approachthathas advanced signicantly since Hillier and Boling [9].3. Model frameworkOur system consists of three types of psychiatric institutions:extendedacutehospitals(E), residential facilities(R), andsupportedhousing(S). Eisthemost structuredinstitutioninthesystemwiththepatientswhorequirefollow-upcareafter being discharged from acute hospitals. R accommodatesthose clients who require basic daily living support with full-time monitoring, whileSis the least structured institution inthe system and provides clients with a minimum daily livingsupport on a part-time basis. The accommodations outside thesystem are categorized into two groups:acutehospitals (A)and all other accommodations (X). Xis composed of variousaccommodations for psychiatric patients ranging fromhousingwith family or friend houses to homeless shelters, jails, or evenlivingonthestreets. Figure1 illustratesthethreeinternalstations, twoexternal stations, andtheowsbetweenthesestations. As seen in the gure, patients have an overall tendencytoowfromthemost structuredinstitutionE, totheleaststructured institution, S in the system.Inthegure,therearetwodottedbackows,(i) R Aand (ii) S A. These ows reect clients at R and S who ex-perience relapse and hence ow backwards to acute hospitals.Under the current policy, most residential (R) and supportedhousing (S) clients keep their beds while temporarily receiv-ing acute care inA, and thus effectively occupy two types ofbedsinthesystem. Clientsatresidentialfacilitiesandsup-ported housing must give up their beds only if they are awayforlongerthanaspeciedlengthoftime(i.e., 30daysforresidential facilities and 60 days for supported housing). Theactualdatashowsthat,amongthosewhorelapseandmovefromSorRtoA, only a few patients per year are forced togive up their beds at S orR. In fact, these patients constituteless than 0.01% of total patients who leave S or R. Thus, thesetwobackowswereomittedinthepresentstudy. Astothepatients who occupied two beds temporarily at (R, A) or (S,A)andcamebacktotheirprimarybedwithinthespeciedperiod, the model treated these patients as if they remained atR or S throughout the hospitalization. SinceA exists outsidethe system and is also considered to have an innite numberofbeds(i.e., noresourceconstraints), capturingthetempo-ral backows and associated occupancies of acute beds addsnothing of signicance to our analysis.2Blocking at station ioccurs when the patient outow fromstation i is hampered due to the full occupancy at the imme-diate downstream station. There are two key characteristics ofthisprocess:(i)patientsremainatstationi evenaftercom-pleting their treatment, and (ii) these patients potentially blockincoming patients to station i . Given that stationsE, RandShaveonlyanitenumberofbeds(andnootherwaitingspace), blocking can occur at the owsE RandR S.Blocking will not occur if the immediate downstream stationhas an innite capacity (either beds or other forms of waitingspace). In our model, the only station that receives incoming2There are few publications that analyze blocking with feedback ows. Thisis partly due to inappropriateness of simple of standard Poisson-arrival as-sumptionswhenfeedbackowsexist, asshownbyDisney[5]. Anotherreason could be that the model potentially faces a deadlock ow problem.Deadlockreferstothesituationinwhichentitiesattwoormorestationsblock each other, and occurs only when feedback ows are allowed in thesystem. Totheauthorsknowledge, allexistingarticlesmakethesimpli-fying assumption that deadlock is detected and resolved automatically byexchanging the entities between the stations. It should be noted, however,that deadlock could potentially violate the common assumption of a servicediscipline in a queuing model, First Come First Served [13].Figure 3.2: Patient ow between dierent facilities (from [20])results in many patients spending unnecessary extra days in intensive care facilities. Theirsystem consists of three types of psychiatric institutions:(E) extended acute hospitals: designated to patients who require follow-up care after beingdischarged from an acute hospital(R) residential facilities: accommodate those clients who require basic daily living support(S) supported housing: provides clients with a minimum daily living support(A) acute hospitals(X) all other: composed of various accommodations for psychiatric patientsDue to the fact that stations E, R, and S have only a nite number of beds and no otherwaiting space, blocking may occur at the ows E R and R S. In the absence of block-ing, thisqueueingnetworkcouldbedecomposedintoindividualindependentinstitutions,resulting in a product-form solution for the equilibrium distribution of the number of unitsin each unit. To incorporate blocking into this product-form solution as an approximation,Koizumi etal. use an eective service rate that is modied by the expected waiting timeat the upstream stations. The authors note that their approximation only holds when thetotal numberofbedsatadjacentupstreamstationsislargeenoughtoaccommodatethesteady-state number of waiting patients, a condition which is only known a posteriori.Using their approximate analytical solution, they found that the system-wide congestion isCHAPTER3. LITERATUREREVIEW 26Health Care Manage Sci (2006) 9: 3145 39Fig. 6 Results of the queuing network model for OB hospital.equations where utilization is equal to the arrival rate of pa-tients multiplied by the average length of stay then dividedby the number of beds in the unit.The results fromthe queuing network model (with 10 bedsadded to PP unit from LD unit) showed that the utilizationof the APM, APNM and LD units are still lower than thatreported by the nancial census data. This is because simplequeuing network ow models do not take into account bedblocking. Bed blocking articially increases the utilization ofthe unit. The blocking portion of the bed utilization is due toimbalance in the system, as can be seen from the utilizationof the units in Table 6. Notice that PACU has a utilization ofonly 15% where as the Post Partum unit has a utilization of89%. While a clinically chosen optimum utilization of theseunits might not be equal, this extreme type of inequity leadsto bottlenecks and inefcient use of the beds in the hospital.In order to maximize the throughput of the systemor min-imizetheblockedtimeof thepatients, it isnecessarytobalance the system. The system can be balanced by eitheradding new beds to the bottleneck or reallocating beds fromlowutilizedunitstobottleneckunits. Alivelydiscussion,includingadministratorsoftheOBhospital,ensuedabouthow to make that happen. It was agreed that beds in Triage,NICU, and PACU could not be reallocated to another unitdue to their very different stafng and supply needs. Further,it was agreed that adding new beds overall, before address-ing the balancing issue, was not a good option. On the otherhand, beds fromthe Medicine/Surgery unit could be used forPost Partum patients. Secondly, beds in APM, APNM, LDand PP units could be reallocated. Let us consider these lasttwo possibilities using QNA.The bottleneck of the systemis Post Partum(PP)with 88.84% utilization. As we add beds from theMedicine/Surgery (MS) unit, the maximum number of de-liveriespermonththatcanbehandledincreasesuntilthebottleneck shifts to a different unit. Using QNA, it is seenthatthisshiftingtakesplaceupontheadditionof13bedsto Post Partum unit, after which the Ante Partum Monitored(APM) unit becomes the bottleneck. This behavior is shownin Figure 7. Since a unit is typically 15 beds, this offers asolution that improves current ow, and is implementable.Forthesecondscenarioofbalancingsubstitutablebedswithout using Triage, PACU, MS, or NICU, we can nd theoptimum bed allocation by integer programming. Since thegoal is to balance the system, an objective function to mini-mize the Mean Absolute Deviation (MAD) of the utilizationof units (i) in the OB hospital from the overall average uti-lization of the system is used. Beds are redistributed keepingSpringerFigure 3.3: Queueing network model of an obstetrics hospital (from [9])due primarily to shortages only in the supported housing facility, which causes blocking intheotherfacilities. Thus, apossiblesolutionfromthepolicyviewpointistoconsideranincrease in the number of beds in this specic unit.Another queueing network model applied to a hospital setting is that of Cochran and Bharti[9], who study a specic obstetrics hospital consisting of 8 subunits with 4 dierent patientarrival streams (Fig. 3.3). The transfer of patients between the dierent compartments cre-ates blocking in some of the units.Asaprecursortobuildingtheirsimulationmodel, theauthorsrstuseanapproximateanalysis of the network by ignoring blocking and time dependence of the parameters. Thishelps to provide quick answers to many of the management questions, in addition to guid-ing them in validation of their simulation in special circumstances. By using discrete-eventsimulationtomodel thefull interactionofthedierentsubunitsandpatientgroups, theauthorsthencomparealternativemethodsofreducingblockingtimesandincreasingthehospital throughput. For example, after identifying the Post Partum unit as the bottleneckCHAPTER3. LITERATUREREVIEW 27of the system, they show that by adding new beds to this unit or reallocating beds from un-derutilized units, such as Medicine/Surgery, the maximum number of deliveries per monthcan be increased; however, in the latter case, reallocating beds beyond a certain thresholdcausesthebottlenecktoshifttoadierentunit. Aninterestingresultisthatincreasingthe number of beds in the bottleneck unit by 15% yields a 38% improvement in the overallhospital throughput.As can be seen, the application of queueing models to healthcare is growing more popular ashospital management teams are gaining awareness of the advantages of these operational re-search techniques in addressing such issues as determining optimal bed counts and makingpolicydecisionswithregardstoresourceallocation. Researchinapplyingqueueingnet-works with blocking is rarer in the literature due to the mathematical complexities involvedincomputingperformancemeasuresassociatedwithsuchsystems. Asaresult, hospitalswith interacting subunits are often studied through simulations, for they are able to incor-poratemuchmoredetailthanisaordablebyanalyticalmethods. Inthisthesis, weuseboth approximate analytical techniques and simulation to study a simple queueing networkcomposed of only two service stations placed in tandem. In the next section, we discuss thedetails of our model.Chapter4ModelOverviewBefore delving into the details of the model developed in this project, it is worth reviewingthe previous model [31] that was developed by the CSMG group at IRMACS to predict thehospital bed counts in B.C. Our current model is a step towards further understanding howthe interaction of the Intensive Care Unit with other compartments of the hospitals aectstheowofpatients. Thisinterdependencewasnotconsideredinthepreviousprojectsofthe Acute Care group at the CSMG, as it was assumed that all the dierent hospital unitsoperate independently of one another.4.1 SegmentedMulti-StreamModelIn summary, in the rst stage of the modelling of B.C. acute care hospitals by the CSMG,three streams of patients were considered:emergencyelective directdirect transfers from other facilitiesTheprimaryfocusof theprojectwastondarelationshipbetweenaccesstocareandhospitalbedcounts. TheaccessmeasureusedintheprojectwasaTTAof80%within6hours; in other words, the goal was to nd the least number of beds in each of the hospitalcompartments that guaranteed that 80% of the patients arriving in the ED receive a bed in28CHAPTER4. MODELOVERVIEW 29their designated unit within 6 hours.The model separated the hospitals into multiple units, which were assumed to operate in-dependentlyofeachother. Eachcompartmentwasgivenitsownqueueconsistingofthethree streams of patients. The emergency patients were given lower priority than the othertwo patient streams. In other words, if a bed became available while patients from all threeunits were waiting for that bed, then a patient from the ED was transferred to the bed onlyif there were no patients in the other two streams waiting for the bed. Amongst the electiveand transferred patients, the decision was on a rst-come rst-served basis. While waiting,theemergencypatientsreceivedtreatmentintheEDqueueandcouldpossiblyleavethehospital directly; direct discharge from the ED is explained in more detail later.In the next section, we will focus only on the stream of emergency patients, but will considertheir transfer from the ICU to one of surgical and medical units, which we have combinedinto one entity, called the Medical Unit (MU).4.2 TheED-ICU-MUModelInthisproject, welookonlyatthestreamof Emergencypatientsintothehospital. Amore complete model would include the elective admissions and transfers from other facil-ities. However,our current model by itself involves theinteraction of three hospital units(Fig. 4.1),andwefeltitnecessarytogaincompleteunderstandingofthissimplermodelbeforeaddingfurthercomplexity. Thethreehospital unitsconsideredinthisprojectarethe Emergency Department, the Intensive Care Unit, and the Medical Unit. Our aim is tounderstand how the ow of patients among these three units causes delays in obtaining beds.Upon arrival in the ED, patients require a bed either in the ICU or the MU. If there is bedavailableintherequiredunit, thearrivingpatientgoestherewithoutwaitingintheED.Otherwise, the patient is kept in the ED and waits for his/her required unit. When a bedbecomes available, the earliest of such patients is transferred to the specic unit. However,while the patient is kept in the ED, he/she is treated by nurses as necessary.CHAPTER4. MODELOVERVIEW 30 "# $% &'% ())*+(,- ./(01- 23)/. ./(01- 23)/. Figure 4.1: The interaction of ED, ICU, and MUAsaresultoftreatmentintheED, itisinfactpossibleincertaincircumstancesthatapatient is deemed healthy enough to leave the hospital directly from the ED without requir-ing further stay. This usually applies to patients going to the MU. There are also patientswho unfortunately die in the ED due to their long wait; those in this group most often arewaiting for an ICU bed and have a critical health condition.In queueing theory terminology, both groups of patients can be seen as reneging units1, suchthat when their reneging time2is exceeded, they leave the queue (the ED). The event whereapatientleavesthehospital directlyfromtheED, whetherduetotreatmentcompletionordeath, isreferredtoasDirectDischargeFromEmergency(DDFE). Arelativelylargenumber of DDFEs is indicative of the fact that the hospital does not have enough beds toprovide adequate access to care. Hence, it is desirable to keep the fraction of DDFEs verylow. Note that in our model the ED is viewed as the queue to either the ICU or the MU,but one from which units (patients) may renege due to impatience (treatment completionordeath). ItmustalsobementionedthattheEDisassumedtobeabletoprovideasmany beds as necessary to treat the waiting patients. Thus,the ED can be viewed as anan innite-capacity waiting space in which reneging is possible.1Renegingreferstocustomersbecomingimpatientandleavingthequeuewithoutreceivingservice. AdetailedtreatmentofanM/M/cqueuewithrenegingisgiveninchapter5.2Renegingtimeistheamountoftimeaunitiswillingtowaitbeforeleavingthesystem.CHAPTER4. MODELOVERVIEW 31While in the ICU, it is also possible that a patient may undergo a medical fatality. In such acase, the deceased individual is transferred out of the ICU bed (and hospital), thus allowinga patient from the ED to be transferred to the bed. We will refer to deaths in the ICU asreneging in service. In most cases of successful treatments in the ICU, however, the patientneeds to be transferred to the MU.This transfer to the MU is only possible if a bed is free there. In the event that a patientcannot be transferred, she/he is kept in the ICU. In other words, such patients are keepingthe bed occupied, even though their required intensive care is completed. Note that patientswaiting in the ICU cause the hospital eciency to lower, as they block patients in the EDfromreceivingthosebeds. Thisphenomenonnotonlydelaysaccesstocare, butitalsogenerates some nancial loss because the blocking patients in the ICU are ready to move toa less intensive and hence less expensive unit. Hence, controlling the congestion in this unitis important not only from a clinical perspective, but also from a budgetary perspective forhealth care policy makers.When a bed becomes free in the MU, the doctor decides on whether to admit a patient fromthe ED or the ICU into the MU, if there are patients in both units waiting for a bed. In thisproject we assume that blocked ICU patients are given a higher priority for two reasons:1. Keeping a patient in an ICU bed is more costly than placing her/him in an MU bed,especially since this patient no longer needs intensive care.2. By freeing ICU beds quickly, the target access of 90% within 1 hour can more easily beachieved.4.3 ModellingAssumptionsIn almost every model there are certain assumptions that are used to simplify the modellingprocess, since otherwise, in an attempt to model every detail of the real world scenario, themodel would become too complex to understand and useless for any practical purpose. Herewe list the assumptions incorporated in our model:(1) Inter-arrival times, service times, and reneging times are all exponentially distributed.CHAPTER4. MODELOVERVIEW 32Moreover, reneging times are assumed to be independent of the time spent in queue.(2) Ratesof service, arrivals, andreneging, areall assumedtobeconstantintime. Amore realistic model would include hourly variations in the arrival rate accompanied byoverall seasonal or even day-of-week changes. On the other hand, because the lengthsof staysareof theorderof days, andaveragetreatmenttimesusuallydonotvarythroughout the year, it is reasonable to assume that the service rate is constant.(3) There is no delay in between patient transfers: if a patient leaves a bed, another waitingpatient immediatelyreplaces him/her, withnointermediatedelay. Inreal hospitalsettings, some time is taken in cleaning and preparation for the next patient.(4) Onaverage, patientsbeingtransferredoutoftheICUtotheMUandthosearrivingdirectly from the ED require the same amount of treatment time in the MU.(5) Blocked ICU patients have priority over those waiting in the ED to enter the MU.(6) The amount of time spent in any one unit of the hospital (ED, ICU, or MU) is inde-pendent of the time spent in any other unit.(7) The ED always has enough beds.(8) Patients in the ED are served on the FCFS service discipline.Furthermore, as mentioned before, we have ignored the elective direct and transferred pa-tientsinourmodel inthispreliminarystage. Afuturemodel will incorporateall threestreams of patients (see section 7.5).Chapter5M/M/cQueuewithRenegingRenegingreferstothesituationinwhichcustomerswaitinginlinetobeservedbecomeimpatient and leave the queue. In our model, the ED is viewed as the queue, and there aretwo reasons for which emergency patients may leave the ED without getting a bed:1. medical fatality2. treatment completionAs mentioned in the previous section,only ICU patients are assumed to pass away in theED due to their severe condition, while treatment completions can occur for those patientswaiting for an MU bed. Also, recall that patients who are already in the ICU may die beforetheir treatment is completed. This latter situation is referred to as in-service reneging.The most common reneging mechanism, which we use here, is the one in which the unitsmaximum waiting times are exponentially distributed and independent of time in queue. Wealso assume here that the time spent in service is independent of the time spent in queue. Inmost systems, waiting in queue involves no service; however, in the hospital model consid-ered here, patients receive treatment in the ED, and so a more realistic assumption wouldbe to incorporate the queueing time in the overall service time.HereweanalyzetheM/M/cqueuewithreneging. Asweshallseeinchapter6,theICUandtheMUmaybeapproximatedbytwosuchqueues, operatingindependentlyofeach33CHAPTER5. M/M/CQUEUEWITHRENEGING 34 "#$%&'# "()(&*+ $#+#,#- .)&(&+,"#$%&'# '*/01#(&*+"Figure 5.1: Reneging from queueother. Inadditiontocomputingthewaittimedistribution, wederiveaformulaforthepercentageofpatientswhorenege, whichcanbeusedtoobtainthemeanrenegingtime.This is important because from the available data, we cannot directly obtain the renegingparameter, while the percentage of reneged units can easily be calculated.5.1 QueueDistributionConsider theM/M/c queue, where units in the queue may leave when their reneging time,assumed to be exponentially distributed with parameter , has expired. As usual, we denotethe arrival rate by and service rate of each of thec servers by.Ancker and Gafarian [3] studied theM/M/1/Nqueue with exponential reneging time andbalking. Theyconsideredabalkingmechanisminwhichanarrivalndingnunitsinthesystem leaves without joining the queue with probability n/N. They obtained an expressionfor the wait time distribution of the units that join the queue and successfully receive servicewithout reneging. Thus, by taking the limit of the distribution as N approaches innity, onecan obtain the result for theM/M/1 queue with reneging only. This approach is presentedin the Appendix, and the result is used as a check of the correctness of the formula obtainedin this chapter forc = 1.Duetoreneging, thissystemalwaysreachesequilibrium. Toseethis, considerabusierqueue of typeM/M/ with arrival rate and service rate = min(, ). This queue hasanequilibriumforallvaluesof / > 0. Itfollowsthat theM/M/cqueuewith renegingparameterandserviceratealsohasanequilibrium. Now, letpnbetheequilibriumCHAPTER5. M/M/CQUEUEWITHRENEGING 35probability distribution of the number of units in the system. As in section 2.7, by applyingthe rate-equality principle we arrive at the following set of equations:npn= pn1n c, (5.1)[c +(n c)]pn= pn1n > c. (5.2)Notethatwhenn>c, thenumberofunitsinthesystemisn csothatthetimeuntilthe next departure due to reneging is exponential with rate (n c). Combined with theservicerateofthecservers, thedeparturesfromthesystemwhenallserversarebusyisexponential with parameterc +(n c) leading to the second equation.By iterating equation (5.1) we obtainpn=npn1n c=2n(n 1)pn2...=nn!np0.Similarly, forn > c we can solve (5.2) in an iterative manner to getpn=c + (n c) pn1n > c...=nc

ncj=1(c +j) pc=nc!c

ncj=1(c +j) p0.Now, rescaling the arrival and service rate by the reneging parameter via = / (5.3) = / (5.4)CHAPTER5. M/M/CQUEUEWITHRENEGING 36we can write the distribution of the number of units in the system aspn=nn!np0n c, (5.5)pn=nc!c

ncj=1(c +j) p0n > c. (5.6)The constantp0is found by the normalization condition n=0pn= 1. The queue lengthdistributionqn is given byq0=c

n=0pn =e/c!(c + 1, /) p0(5.7)qn= pn+c =n+cc!c

nj=1(c +j) p0n > 0, (5.8)where (z, a) is the upper incomplete Gamma function(z, a) =_atz1etdt,which for integer values ofz = n satises(n + 1, a) = n!ean

j=0ajj!.5.2 WaitTimeDistributionLet us now dene the following eventsW = Waiting in queue,A = Acquiring service.An arriving unit has to wait in the queue if there are at leastc units already in the system.Upon simplication, we obtain the probability that a unit waits in the queue asP(W) =

n=cpn =ep0c1c(1)(c 1)!l(c, ) , (5.9)CHAPTER5. M/M/CQUEUEWITHRENEGING 37where l(a, z) is the lower incomplete Gamma functionl(z, a) =_a0tz1etdt.ThelowerandupperincompleteGammafunctionsarerelatedtoeachotherthroughtheGamma function:(z) = l(z, a) + (a, z) =_0tz1etdt.WenowcomputeP(A, W), theprobabilitythatbotheventsAandWoccur, orinotherwords, the probability that a unit waits in the queue and acquires service without reneging.Todoso, werstcomputen, theprobabilitythatanarrivingunit, uponndingn cunits already in the system, receives service (n = 1 for n < c). Note that after such a unit,callitX, joinsthequeue, therearen + 1unitsinthesystem. Letusdeneaneventasthe departure of any unit in front of and including X(any future arrival does not aect thewaiting time of X, and so is ignored in this explanation for simplicity). The time to the nextevent, whether it is service completion by one of the c units in service or reneging by one ofthen c +1 units in queue, is exponentially distributed with parameterc +(n c +1).Thus, the probability that the next event is not the reneging of X is equal to the probabilitythat either one of the units in service completes service, or one of then c waiting units infront ofXreneges, which is [c + (n c)]/[c + (n c + 1)]. Given that this event hasoccurred,there are nown units in the system,and so the probability that the next eventwill not be a reneging ofXisn1. By applying this processes repeatedly, and noting thateach of the events is independent of the ones before due to the memoryless property of theexponential distribution, we can obtain the probability that Xdoes not renege by iteratingand noting the cancellations from successive terms (n c):n=c + (n c) + (n c + 1)n1...=cc + (n c + 1)c1=cc +n c + 1. (5.10)Thus, byconditioningonthenumberof unitsalreadyinthesystematarrival, wecanCHAPTER5. M/M/CQUEUEWITHRENEGING 38calculate the probability that a unit waits in the queue and successfully receives service:P(A, W) =

n=cpnn=

n=0n+cc!c

nj=1(c +j) p0 cc +n + 1=cp0(c 1)!c1

n=0n

n+1j=1(c +j)= l(c + 1, )cc1e(c 1)!c1p0. (5.11)We now consider those units that join the queue and have a positive waiting time. DeneTa= time spent in queue by a unit acquiring service (5.12)Tq= time spent in queue by any unit that joins the queue. (5.13)NotethatTqincludesboththoseunitsthatrenegeandthosethatacquireservice. Fromthese denitions it can be seen thatPt Ta t +dt = Pt Tq t +dt [ (A, W)= Pt Tq t +dt , (A, W)/P(A, W). (5.14)Now, to compute the numerator on the right hand side of the above identity, consider a unitX that upon arrival nds j units already in the queue, an event that occurs with probabilitypc+j. In thiscase,theprobability thatXsurvivestobeserved isc+jand thepdf of itstotal wait time in the queue is (fj+1 fj f1)(t), wherefk(t) is the pdf of the time untilthe next departure of any of the units in front of and includingX, assumingXis thekthunit in the queue. Every one of these departures reduces the queue size by one, so that thepdf of the time to reach the server is the convolution offk(t), fork = j + 1, . . . , 1. Withkunits in the queue,fk(t) is exponential with parameterc +k:fk(t) = (c +k)e(c+k)t= (c +k)e(c+k)t. (5.15)Toobtainthepdf ga(t)oftherandomvariableTa, thatis, thewaittimedistributionofany unit in the queue that acquires service,we need to consider all the possibilities forj,CHAPTER5. M/M/CQUEUEWITHRENEGING 39conditioning on the number of units in the queue upon arrival:ga(t) =1P(A, W)

j=0pc+jc+j(fj+1 fj f1)(t). (5.16)To compute the convolutions, we rst transform the above expression. Letga(s) andfj (s)be the Laplace Transform (LT) ofga(t) andfj(t), respectively. We can easily nd thatfk(s) =c +kc +k +s=c +kc +k +s/. (5.17)Then, using the fact that the LT of the convolution of two functions, fi(t) and fj(t), is givenby the product of the LTs of the individual functions,fi (s) andfj (s), we obtainga(s) =1P(A, W)

j=0pc+jc+jj+1

k=1fk(s)=1P(A, W)

j=0c+jc!c

jk=1(c +k)p0 cc +j + 1 j+1

k=1c +kc +k +s/=1P(A, W)c(c 1)!c1p0

j=0jj+1

k=11c +k +s/.Transforming the product into summation using partial fractions yieldsga(s) =1P(A, W)c(c 1)!c1p0

j=0jj+1

k=1(1)k1(k 1)!(j + 1 k)! 1c +k +s/. (5.18)Using the linearity of LT, we can easily invert the last expression to getga(s) =1P(A, W)c(c 1)!c1p0

j=0jj+1

k=1(1)k1(k 1)!(j + 1 k)! e(c+k)t=1P(A, W)c(c 1)!c1p0e(c+1)t

j=0jj

k=0(1)kk!(j k)!_et_k,CHAPTER5. M/M/CQUEUEWITHRENEGING 40which upon using the binomial theorem yieldsga(s) =1P(A, W)c(c 1)!c1p0e(c+1)t

j=0jj!j

k=0_jk__et_k=1P(A, W)c(c 1)!c1p0e(c+1)t

j=0jj!_1 et_j=1P(A, W)c(c 1)!c1p0e(c+1)te(1et). (5.19)Using equations (5.6) and (5.11) to substitute forp0 andP(A, W), respectively, we obtainga(t) =c+1l(c + 1, ) exp(c + 1)t et. (5.20)By dening the rescaled parameter = c = c/, expression (5.20) can be written asga(t) = +1l( + 1, ) exp( + 1)t et. (5.21)It can be veried that ga(t) is normalized. For the special case of c = 1, that is, an M/M/1queue with reneging, we have [30]ga(t) =+1l( + 1, ) exp( + 1)t et, (5.22)which is also a special case (see the Appendix) of the result of Ancker and Gafarian [3] fortheM/M/1 queue with balking and reneging. Note that the distribution for the wait timeof any unit acquiring service is given byha(t) = c0(t) + (1 c0)ga(t), (5.23)wherec0 = p0 + +pc1 is the free-server probability.Themeanwait timeinthequeuefor thoseunits acquiringservicecanbeobtainedbycomputing the rst moment via ddsga(s)s=0:EWa =1P(A, W)c(c 1)!c1p0

j=0jj

k=0(1)kk!(j k)! 1(c +k + 1)2,CHAPTER5. M/M/CQUEUEWITHRENEGING 41which upon interchanging the order of summations yieldsEWa =1P(A, W)c(c 1)!c1p0

k=0(1)kk!(c +k + 1)2

j=kj(j k)!=1P(A, W)c(c 1)!c1p0

k=0()kk!(c +k + 1)2

j=0jj!=1P(A, W)ce(c 1)!c1p0

k=0()kk!(c +k + 1)2= +11l( + 1, )

k=0()kk!( +k + 1)2. (5.24)So far we have assumed that the reneging parameter is known in advance. However, sincethe database of B.C. acute care hospitals can only provide us with the percentage of renegedpatients, we cannot directly obtain the reneging parameter. We next derive a relationshipbetweentherenegingparameterandthepercentageofrenegedpatientswhichallowsus to resolve this issue.5.3 TheRenegingParameterLet be the probability that an arrival reneges. From the denition of n, given that thereare n units in the system upon arrival, the probability that a unit reneges is given by 1n.Hence, by conditioning on the number of units in the system at arrival and using equation(5.10) we obtain =

n=c(1 n) pn=

n=cn c + 1c +n c + 1 pn.Using equation (5.2) to replacepn bypn+1, we can write the previous expression as =

n=c(n c + 1) pn+1,CHAPTER5. M/M/CQUEUEWITHRENEGING 42which can be written in terms of the mean queue lengthL: =

n=0nqn=L. (5.25)This is a nonlinear equation in, due to the dependence ofL on. To computeL we mayuse equations (5.7) and (5.8) to computeqn. However, this approach poses a challenge forlarge values for c and , since in such cases the term1c!(c+1, /) in q0 involves dividing twovery large numbers (using numerical software, such as MATLAB, this can result in Inf/Inf,which returnsNaN Not a Number). To overcome this obstacle, we use an approximationmotivated by Stirlings formula, which gives the asymptotic behaviour of n! for large valuesofn:(n + 1) = n! 2n_ne_n. (5.26)Starting from (5.7), using the series representation of the incomplete Gamma function andmaking use of Stirlings formula, we obtain the following approximation toq0:q0=e/c!(c + 1, /) p0=c

k=0(/)kk!p0r1

k=0(/)kk!p0 +c

k=r(e/k)k2kp0, (5.27)wherer is chosen large enough that Stirlings formula is a good approximation, but not solargeastointroducenumerical errors. Agoodchoicewouldber=10, whichgivestherelative error of1r!r! 2r_re_r = 0.0083 .Inthe above formulawe see that for large values of k the expressions (/)k/k! and(e/k)k/2kareasymptoticallyequal. However, when/andcarelarge, computa-tionally it is more accurate to calculate the second expression, which avoids division of verylarge numbers. Note that since/ = /, this approximation is applicable to queues withCHAPTER5. M/M/CQUEUEWITHRENEGING 43many servers (largec) operating under heavy load (large/).In a similar manner, by rearranging terms and applying Stirlings formula toc!, we obtainan approximation toqn forn > 0 which is numerically stable:qn=n+cc!c

nj=1(c +j) p0=__c_c_nc!

nj=1_1 +jc_ p0ec_c_n+c2c

nj=1_1 +jc_ p0. (5.28)Note thatp0can simply be computed by enforcing the normalization condition. We thenused MATLABsfzero function to calculate from equation (5.25).5.4 ReneginginServiceHere we consider the possibility of units leaving the service station before their service iscompleted. We assume that the in-service reneging time is exponentially distributed, withparameter

. This greatly simplies the analysis, for now the length of stay in the servicestation is exponential with meanW

= (

+)1, and only a fraction/(

+) actuallycomplete service,while the rest renege. In other words,the probability of reneging insidethe service station is given by

=

W

. (5.29)We note that equation (5.25) can also analogously be written as = W (5.30)usingLittlesTheorem, whereWdenotesthemeanwaittimeinthequeuebyall units,whether they renege or not.Chapter6TwoQueuesinTandemInourmodel ofthehospital, theICUandtheMUhaveanitenumberofbedsandnowaiting space in between. In other words,a patient ready to leave the ICU would not beabletoif theMUisfull. Thiscausesblockingof thepatientintheICU. If aninnitequeue were allowed in between the two units and if the reneging process were ignored, thisqueueingnetworkwouldbethesameasthatof section2.8, resultinginaproductformsolution for the equilibrium distribution of each station, independent of the other.Product formsolutions of queueingnetworks areveryimportant fromacomputationalstandpoint,fortheyprovideawaytodecomposeanotherwisevery largestatespaceintoindependent subspaces. Even for a small number of service stations and a moderately smallnumber of servers in each, storing the whole state space and performing computations on itbecomes a daunting task at best. However, if the stations can be considered as independent,allowingforaproductformsolution,wecanperformthecomputationonthestatespaceof each of the individual stations independently of the others, resulting in a great reductioninthecomputational complexity. Hence, muchworkhasbeendevotedtoapproximatingnon-product-form queueing networks using product-form networks.In most studies, the individual stations are treated as independent queues but with modiedarrival or service rates. Perros [27] and Balsamo et al. [4] have collected a vast literature onthe approximation of queueing networks with blocking, but they consider only single-server44CHAPTER6. TWOQUEUESINTANDEM 45stations. Thereareotherdecompositionschemeswithsingle-serverassumptionsthatarenot considered in these two books. Among them are the work by Boxma etal. [7], wherethey approximate each single-server node by a superposition of twoM/M/1/Nqueue dis-tributions, each of which is valid in a specic phase (N 1 is the maximum waiting spacefor each station). The probability of being in each phase and the parameters of each of theM/M/1/Nqueuesaredeterminedbysolvingasetofnonlinearequationsinaniterativefashion. In fact, most of the research in this area involves solving a set of nonlinear equationsfortheparametersoftheservicestationsofthedecomposednetwork, sincetheblockingphenomenon causes interaction between them.Theliteratureonmulti-servernitecapacityqueueingnetworkismoresparse. Insection6.6.2of [6], Bosedescribesanalgorithm, calledtheMaximumEntropyMethod, fortheapproximate decomposition of a queueing network with nite capacity service stations. TheExpansion Method is another approximation algorithm, which though originally proposedfor single-server queueing networks, was extended by Jain et al. [19] to multi-server stations.In this method, the original network is expanded by inserting anM/M/ queue betweenevery two adjacent stations; any blocked unit is served in this intermediate node and retriesforentryintothenextstationafteritsserviceiscompleted. Bothofthesemethods, likethe previous ones, rely on solving a set of nonlinear equations iteratively to nd the desiredparameters. The power of such algorithms is best realized in networks of considerably largesize, so that the computational advantage of the iterative schemes surpasses that of numer-ically solving the whole network.Inthisproject, havinganetworkof onlytwostations, wefocusonsimplerapproaches,whichdonotrelyoniterativeschemes. In[20], Koizumietal.presentanapproximationmethod, which decomposes the network by computing eective service rates for the blockedstations, andaneectivearrivalratebyconsideringtheowfromneighbouringstations.The eective service rate is obtained by incorporating the average wait time in the upstreamstations into the actual service rate of that station. In another method, by Korporaal et al.[21], the authors use the average queue length from upstream stations to compute the meannumber of blocked servers, which when subtracted from the total number of servers, yieldstheaveragenumberof availableservers. Bothof thesemethodsarediscussedatlengthCHAPTER6. TWOQUEUESINTANDEM 46 "# "$ %# Figure 6.1: Two queues in tandemin section 6.2. The advantages of these methods are ease of implementation and intuitiveunderstanding.The queueing system considered in this thesis is composed of only two nite capacity sta-tions placed in tandem (Fig. 6.1). Consider the situation in which customers,after beingservedattherststation(S1), mustproceedtothenext(S2)forfurtherservice. If allservers are occupied inS2, these customers cannot proceed and get blocked, staying atS1andoccupyingtheirservers. UponcompletingserviceinS2, customersleavethesystem,in which case the earliest blocked customer inS1, if any, proceeds toS2. We assume thatinter-arrival andservicetimesareall exponential andthatblockingoccursafterservice;note that in certain manufacturing problems, blocking before service is used, in which if aunit arriving at a service station nds an upstream station full, then it does not begin itsservice and is blocked.The following quantities completely specify this tandem queueing system: : arrival rate intoS1 i: service rate inSi fori = 1, 2 ci: number of servers inSi fori = 1, 2Our goal is to solve for the steady-state distribution of the number of units waiting in thequeue and also for the distribution of the wait time. We rst present a numerical solutionfor this queueing system that is exact to machine precision, and then present approximateanalytical solutions.CHAPTER6. TWOQUEUESINTANDEM 476.1 NumericalSolutionConsidertheextendedstatespace(m, n)form=0, 1, 2, . . . andn=0, 1, 2, . . . , c1 + c2.Here, the variable m denotes the number of units in the S1 subsystem, that is, those waitinginthequeuebeforeS1inadditiontothosebeingservedinthestation. Thevariablendenotes the number of units in theS2subsystem, where in this case units waiting for thisstation are those that are blocked in S1. In other words, n is the sum of the number of unitsbeingservedinS2andthenumberofunitsblockedinS1. Asaresult, valuesof n c2representthenumberofbusyserversinS2, whileforn>c2, allthec2serversinS2arebusy andn c2 represents the number of units blocked inS1. By deningr = min(m, c1) (6.1)as the number of occupied (but not necessarily busy) servers inS1, we can write the statetransitions and their associated rates as follows:Table 6.1: Transition rates of tandem queuestate transition rate condition(m, n) (m+ 1, n) m 0 ,n 0(m, n) (m1, n + 1) r1m > 0 ,n < c2(m, n) (m, n + 1) (r +c2 n)1m > 0 ,n c2(m, n) (m, n 1) n2m 0 , 0 n c2(m, n) (m1, n 1) c22m > 0 ,n > c2Thetransition(m, n) (m + 1, n)isduetothearrivalsintothesystem. ThesecondtransitionoccurswhenaunitcompletesitsserviceinS1andgoestoS2, whichispossi-bleonlywhentherearefreeserversthere, i.e. n 0, (6.3)where we used j = max(mc1, 0). Now, following the discussion in section 2.6, we can ndw(t) numerically. We demonstrate this using an example. Let us choose = 2,c1= 10, c2= 20,1=13, 2=17,fromwhichwe numericallycompute the PGFP(z) = m=0qjzjusing z =nz forz = 0.01 andn = 100, 99, . . . , 99, 100. Then, by using theratpolyfit function withpolynomial degreek = 1 for both the numerator and denominator we arrive at the rationalapproximationP1(z) =0.567 z 0.9210.646 z 1. (6.4)The error in the approximation in this case ise0 = [[P(z) P1(z)[[ = 5.1 104. (6.5)CHAPTER6. TWOQUEUESINTANDEM 49Usingw(s) = P(1 s/), the approximate LT of the wait time distribution withk = 1 isgiven by w1(s) =1 + 0.800 s1 + 0.912 s(6.6)Now, by inverting the LT we obtain w1(t) = 0.878 (t) + 0.134e1.097t(6.7)as an approximation to the pdf of the wait time distribution. The error estimate e1, obtainedby comparing the coecient of the delta function to the probability that a unit upon arrivalatS1 nds a free server (see section 2.6), is given bye1 =c11

m=0qm 0.878 = 6.95 104. (6.8)In addition, the measure of how well our estimated pdf is normalized is given bye2 =1 _0 w1(t) dt = 5.1 104. (6.9)In a similar fashion, we can obtain the wait time distributions for other polynomial degreesk. Below we lists the expressions wk(t) obtained fork = 1, 2, 3, 4k = 1 : w1(t) = 0.878(t) + 0.130e1.075t,k = 2 : w2(t) = 0.877(t) + 0.047e.839t+ 0.092e1.376t,k = 3 : w3(t) = 0.877(t) + 0.083e1.393t+ 0.040e.930t+ 0.016e.806t,k = 4 : w4(t) = 0.877(t) + 0.005e1.700t+ 0.090e1.347t+ 0.045e.832t+ 0.115e4.0576t.Ascanbeseen, fork= 4, theapproximatedwaittimepdfgrowsexponentially, whichisunacceptable. In fact, the same behaviour repeats for values ofk 4. This is in line withour discussion in section 2.6 where we stated that values ofkclose to 1 should be chosen,since with largerk the conditioning of the rational approximation becomes worse. Becausetheerrorintherationalapproximationtranslatestoanerrorintherootsofthepolyno-mials,andsincetheexponentsintheLTinversionaretherootsofthepolynomialinthedenominator, exponentially growing terms may emerge as a result of a poor approximation.CHAPTER6. TWOQUEUESINTANDEM 50Ignoring thek = 4 case, the error estimates corresponding tok = 2 andk = 3 arek = 2 : e0 = 5.0 106, e1 = 6.7 106, e2 = 4.1 102,k = 3 : e0 = 5.3 104, e1 = 3.6 105, e2 = 5.3 104.Comparing these to thek = 1 case, we may conclude that both thek = 2 andk = 3 casesgiveverygoodresults. Furthermore, taking w3asthebestapproximation, thefollowingrelativeerrorsindicatethatallthreeapproximationsarequitesimilarnumerically, whichmay not be evident from the mathematical expressions themselves:[[ w3 w1[[2[[ w3[[2= 6.0 104[[ w3 w2[[2[[ w3[[2= 1.3 104It can thus be seen that in using the method of section 2.6 for the purpose of nding thewait time pdf from the queue length distribution of anM/G/c queue, one can start with ak = 1 approximation, measuring the error estimatese0,e1, ande2, and repeat the processfor incrementally larger values of k until the inverted LT yields exponentially growing terms,at which time we can stop the process and choose the best of the approximations using theerror estimatese1, e2 ande3.6.2 App