6
ORIGINAL REPORTS Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm T. Eugene Day, DSc*, Joseph T. Napoli, DSc*, and Paul C. Kuo, MD *Department of Systems Science and Mathematics, Washington University, St. Louis, Missouri; Department of Surgery, Duke University, Durham, North Carolina OBJECTIVE: The resident 80-hour work week requires that programs now schedule duty hours. Typically, scheduling is performed in an empirical “trial-and-error” fashion. However, this is a classic “scheduling” problem from the field of opera- tions research (OR). It is similar to scheduling issues that air- lines must face with pilots and planes routing through various airports at various times. The authors hypothesized that an OR approach using iterative computer algorithms could provide a rational scheduling solution. METHODS: Institution-specific constraints of the residency problem were formulated. A total of 56 residents are rotating through 4 hospitals. Additional constraints were dictated by the Residency Review Committee (RRC) rules or the specific sur- gical service. For example, at Hospital 1, during the weekday hours between 6 AM and 6 PM, there will be a PGY4 or PGY5 and a PGY2 or PGY3 on-duty to cover Service “A.” A series of equations and logic statements was generated to satisfy all con- straints and requirements. These were restated in the Optimi- zation Programming Language used by the ILOG software suite for solving mixed integer programming problems. RESULTS: An integer programming solution was generated to this resource-constrained assignment problem. A total of 30,900 variables and 12,443 constraints were required. A total of man-hours of programming were used; computer run-time was 25.9 hours. A weekly schedule was generated for each res- ident that satisfied the RRC regulations while fulfilling all stated surgical service requirements. Each required between 64 and 80 weekly resident duty hours. CONCLUSIONS: The authors conclude that OR is a viable approach to schedule resident work hours. This technique is sufficiently robust to accommodate changes in resident num- bers, service requirements, and service and hospital rotations. (Curr Surg 63:136-141. © 2006 by the Association of Program Directors in Surgery.) KEY WORDS: residency, schedule, operations research, algo- rithm, decision analysis INTRODUCTION Institution of the 80-hour work week for residency programs poses many challenges for general surgery residency programs. Although it is imperative that residency programs are viewed as educational experiences rather than service functions, a wide variety of stakeholders draw on the available 80 hours. There- fore, constructing a schedule for a group of residents that will comply with the requirements of the Residency Review Com- mittee (RRC) and the needs of various hospitals, general sur- gery, and specialty surgical services can prove to be extremely challenging and frustrating. Typically, a schedule is made em- pirically via “trial-and-error” and multiple iterations are con- structed weekly or monthly, as gaps arise in residency hours or patient care responsibilities. Fortunately, the scheduling of the resident 80-hour work week is an example of the classic “sched- uling” problem in the discipline of operations research or man- agement science and is commonly taught to first year students in M.B.A. programs. Operations research (OR) is the science of decision making. Operations research originated before World War II with the establishment of scientific teams to study strategic and tactical problems in military operations. The objective was to find the most effective utilization of limited military resources by the use of quantitative techniques, such as linear and nonlinear pro- gramming, network analysis, Markov processes, or stochastic programming. 1 In our setting, resident scheduling is a classic OR problem, typically termed “staff scheduling.” Given a set of employees, assign them to a schedule such that they are working when most needed, while ensuring that certain constraints (such as work hours) are maintained. With the advent of more powerful personal computing resources over the last 15 years, optimization methodologies that combine ideas from OR with techniques from logic and artificial intelligence are available to a wide array of users. Given the history of successful implemen- tation of OR techniques in the realm of business decision mak- ing, the authors hypothesized that OR techniques would be Correspondence: Inquiries to Paul C. Kuo, MD, MBA, Department of Surgery, Duke Univeristy, 110 Bell Bldg, Box 3522, Durham, NC 27710; fax: (919) 684-8716; e-mail: [email protected] CURRENT SURGERY • © 2006 by the Association of Program Directors in Surgery 0149-7944/06/$30.00 Published by Elsevier Inc. doi:10.1016/j.cursur.2005.12.001 136

Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

Embed Size (px)

Citation preview

Page 1: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

O

SA

T

*o

Oppttlaar

MptRghaeszs

Rt3owisw

Casb(D

CUk

1

RIGINAL REPORTS

cheduling the Resident 80-Hour Work Week:n Operations Research Algorithm

. Eugene Day, DSc*, Joseph T. Napoli, DSc*, and Paul C. Kuo, MD†

Department of Systems Science and Mathematics, Washington University, St. Louis, Missouri; †Department

f Surgery, Duke University, Durham, North Carolina

Kr

I

IpAevfcmgcpspruai

OepmogpOew(potat

BJECTIVE: The resident 80-hour work week requires thatrograms now schedule duty hours. Typically, scheduling iserformed in an empirical “trial-and-error” fashion. However,his is a classic “scheduling” problem from the field of opera-ions research (OR). It is similar to scheduling issues that air-ines must face with pilots and planes routing through variousirports at various times. The authors hypothesized that an ORpproach using iterative computer algorithms could provide aational scheduling solution.

ETHODS: Institution-specific constraints of the residencyroblem were formulated. A total of 56 residents are rotatinghrough 4 hospitals. Additional constraints were dictated by theesidency Review Committee (RRC) rules or the specific sur-ical service. For example, at Hospital 1, during the weekdayours between 6 AM and 6 PM, there will be a PGY4 or PGY5nd a PGY2 or PGY3 on-duty to cover Service “A.” A series ofquations and logic statements was generated to satisfy all con-traints and requirements. These were restated in the Optimi-ation Programming Language used by the ILOG softwareuite for solving mixed integer programming problems.

ESULTS: An integer programming solution was generated tohis resource-constrained assignment problem. A total of0,900 variables and 12,443 constraints were required. A totalf man-hours of programming were used; computer run-timeas 25.9 hours. A weekly schedule was generated for each res-

dent that satisfied the RRC regulations while fulfilling all statedurgical service requirements. Each required between 64 and 80eekly resident duty hours.

ONCLUSIONS: The authors conclude that OR is a viablepproach to schedule resident work hours. This technique isufficiently robust to accommodate changes in resident num-ers, service requirements, and service and hospital rotations.Curr Surg 63:136-141. © 2006 by the Association of Programirectors in Surgery.)

orrespondence: Inquiries to Paul C. Kuo, MD, MBA, Department of Surgery, Duke

iniveristy, 110 Bell Bldg, Box 3522, Durham, NC 27710; fax: (919) 684-8716; e-mail:

[email protected]

CURRENT SURGERY • © 2006 by the Association of Program DirPublished by Elsevier Inc.

36

EY WORDS: residency, schedule, operations research, algo-ithm, decision analysis

NTRODUCTION

nstitution of the 80-hour work week for residency programsoses many challenges for general surgery residency programs.lthough it is imperative that residency programs are viewed asducational experiences rather than service functions, a wideariety of stakeholders draw on the available 80 hours. There-ore, constructing a schedule for a group of residents that willomply with the requirements of the Residency Review Com-ittee (RRC) and the needs of various hospitals, general sur-

ery, and specialty surgical services can prove to be extremelyhallenging and frustrating. Typically, a schedule is made em-irically via “trial-and-error” and multiple iterations are con-tructed weekly or monthly, as gaps arise in residency hours oratient care responsibilities. Fortunately, the scheduling of theesident 80-hour work week is an example of the classic “sched-ling” problem in the discipline of operations research or man-gement science and is commonly taught to first year studentsn M.B.A. programs.

Operations research (OR) is the science of decision making.perations research originated before World War II with the

stablishment of scientific teams to study strategic and tacticalroblems in military operations. The objective was to find theost effective utilization of limited military resources by the use

f quantitative techniques, such as linear and nonlinear pro-ramming, network analysis, Markov processes, or stochasticrogramming.1 In our setting, resident scheduling is a classicR problem, typically termed “staff scheduling.” Given a set of

mployees, assign them to a schedule such that they are workinghen most needed, while ensuring that certain constraints

such as work hours) are maintained. With the advent of moreowerful personal computing resources over the last 15 years,ptimization methodologies that combine ideas from OR withechniques from logic and artificial intelligence are available towide array of users. Given the history of successful implemen-

ation of OR techniques in the realm of business decision mak-

ng, the authors hypothesized that OR techniques would be

ectors in Surgery 0149-7944/06/$30.00doi:10.1016/j.cursur.2005.12.001

Page 2: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

aEtrtgih

M

Taabi

CP

xt

1

w

7

d

to

RVtplFp

T

g

F

c

Du

FF

Fd

F

F

s

s

D

1h2

Tw

1

2

3

P

L

N

N

I

T

C

pplicable for scheduling the resident 80-hour work week.qually important, the lack of an OR solution would indicate

hat the problem is overly constrained, suggesting too manyotations, service requirements, and/or hospitals or, conversely,oo few available residents. Finally, this technique could beeneralized to set schedules while changing the number of res-dents, make-up of the resident teams, number of participatingospitals, number of rotations, or work-hour requirements.

ETHODS

he scheduling problem was modeled based on the followingssumptions. This schedule was generated for Duke Hospital,s a proof of concept. However, the same iterative process cane performed for other hospitals, based on manpower availabil-ty as described below.

onditions for the 80-Hour Work Weekroblem

1 Residents are divided into 5 clinical years, labeled R1hrough R5. R5s are the most senior.

x2 There are a total of 25 R1, 10 R2, 7 R3, 7 R4, 7 R5, andR6 residents.P The residents are allowed to work a total of 80 hours per

eek averaged over 4 weeks.Q Residents must have off 1 complete 24 hour day out ofdays, averaged over 4 weeks.A There must be at least a 10-hour period of rest between

uty periods.B Residents cannot work more than 24 hours straight, al-

hough an additional 6 hours of time may be used for learningr outpatient clinic activities.

x7 The resident work day begins at 6:00 AM.The residents rotate through 4 hospitals: Duke, Durham

egional Hospital (DRH), Durham VAH (VA1), and AshvilleAH (VA2). At Duke, the primary services (n � 5) are Gas-

rointestinal, Vascular, Surgery Oncology, Trauma, and Trans-lant. On some services, there are additional caregivers, Fel-

ows, who can cover the residents’ uncovered hours. Theseellows are not subject to work hour restrictions. Our firstriority is to cover the services at Duke.C Gastrointestinal, Vascular, Surgery Oncology, and

rauma must have at least 1 R5, 1 R3 or R4, and 1 R1 or R2.R Vascular has an R6 resident. Gastrointestinal and Sur-

ery Oncology each have a Fellow.D Transplant must have an R3 and R2. Transplant has a

ellow.E VA1 must have 1 R5, 1 R3 or R4, and 1 R1 or R2.F VA2 must have 1R5, 1 R3 or R4, and 2 R1 or R2s (or a

ombination thereof)G DRH must have 1 R3 or R4 and 1 R1 or R2.From this point onward, the manpower requirements atuke are listed. The other hospitals will configure their sched-

les, once the residents are assigned. r

URRENT SURGERY • Volume 63/Number 2 • March/April 2006

H During the hours of 6 AM to 6 PM, Monday throughriday, each service at Duke must have an R4, R5, R6, orellow on duty.I During the hours of 6 AM to 6 PM, Monday through

riday, each service at Duke must have an R1, R2, or R3 onuty.J During the hours of 6 PM to 6 AM, Monday through

riday, all of Duke will have a single R4, R3, or R5 on duty.K During the hours of 6 PM to 6 AM, Monday through

riday, all of Duke will have 2 or 3 R1s or R2s on duty.L On Saturday and Sunday, from 6 AM to 10 AM, each

ervice at Duke must have an R4, R3, or R5 on duty.M On Saturday and Sunday, from 6 AM to 10 AM, each

ervice at Duke must have an R1 or R2 on duty.N On Saturday and Sunday, from 10 AM to 6 AM, all ofuke must have 2 or 3 R1s or R2s on duty.14 Two R2s are assigned to Critical Care, and they rotate

2 hours on, 12 hours off, then 24 hours on, followed by 24ours off. There is an Anesthesia resident who rotates with theseSurgery R2s.15 Each resident changes services once per month.16 Each resident is allowed 4 weeks of vacation per year.

his can be taken as a lump or spread through out the year ineek-long blocks.The questions to be answered are as follows:

. Can these manpower needs be accommodated within thetotal number residents available and the 80-hour workweek requirements? If so, what is the minimum number ofR1 through R5 residents required?

. If there are excess residents, how many are there and what isthe total number of excess hours available? The authorswould like to know this so they can rotate residents throughelective courses.

. Can this solution be configured in a general format as thenumbers of residents change from year-to-year? The man-power requirements do not.

roblem Formulation

et NRi be the number of residents i for i�1,�,6.Let NR be the total number of residents 1 through 5, not 6.Let NF be the number of Fellows.Let NW be the total number of workers.

R � NR1 � NR2 � NR3 � NR4 � NR5

� 25 � 10 � 7 � 7 � 7 � 56

W � NR � NR6 � NF � 56 � 1 � 3 � 60

Let NS be the total number of services. NS � 11.Let NT be the total number of shifts. NT � 42.

ndices

he authors will use 3 subscripts: i, j, and k. The first number (i)

efers to the numeral assigned to each resident (Table 1). The

137

Page 3: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

sta

cpPgpniattvnspdslplotsaapc

R

At3

otrsrTmgMTSqsscOitct

tsHptaSclrsof

tsclatsbatibc

T

1 43–49

T(

1

econd number (j) refers to the numeral assigned to each rota-ion (transplant, etc.) (Table 2). The third number (k) refers toparticular 4-hour shift (Table 3).The model was designed as a linear program to satisfy all

onstraints. (See the Appendix.) The complete formulation, asresented in the tables, was reconfigured in the Optimizationrogramming Language used by ILOG for solving mixed inte-er programming problems (MIPs). As described, the 4-weekeriod was divided into 168, 4-hour shifts. The residents areumbered 1 to 58, and the services are numbered 1 to 11,

ncluding 11 as the “off duty” service. The binary variables Xnd Z denote the assignment of a resident to a Service (Z) ando the particular shifts (X). The use of the Z variables ensureshat no resident switches services in a 4-week period. The Xariables are used to staff each service with the appropriateumber of properly experienced residents. The lettered con-traints correspond directly to the numbered constraints in theroblem formulation. The formulation guarantees that resi-ents work no more than 80 hours, and that each staffing con-traint is satisfied. The formulation given above is for a 4-week-ong work period. Given the memory constraints of thelatform used to solve the problem, and the fact that the prob-

em as stated has tens of thousands of binary variables and tensf thousands of constraints, it was decided to relax the problemo a single week solution. By limiting all variables and con-traints to the first 42 indices, an optimal solution was found forperiod of 1 week, which could be repeated each week there-

fter for a 4-week period. Further extension beyond the 4-weekeriod is possible simply by a new drawing of residents to indi-es, thus providing a new 4-week schedule.

ESULTS AND DISCUSSION

s described, an integer programming solution was generatedo this resource-constrained assignment problem. A total of0,900 variables and 12,443 constraints were required. A total

ABLE 1. Resident Types Are Mapped to Their Corresponding

R1 R2 R3

–25 26–35 36–42

ABLE 2. Services Are Mapped to Their Corresponding Indices“j”)

1. Gastrointestinal2. Vascular3. Surgical Oncology4. Trauma5. Transplant6. VA17. VA28. DRH9. Critical Care

10. Duke subspecialty

u11. Home

38 CU

f 44 man-hours of programming were used; computer run-ime was 25.9 hours. A weekly schedule was generated for eachesident that satisfied the RRC regulations while fulfilling alltated surgical service requirements. Each required 80 weeklyesident duty hours. All worked shifts that lasted 8 or 12 hours.he resulting scheduling matrix is displayed in spreadsheet for-at. An extremely large grid (57 � 21) results. This approach

enerated a typical R1 schedule for the Trauma rotation to beonday 6 AM to 6 AM, Tuesday 6P to 6 AM, Wednesday Off,

hursday 10 AM to 6 AM, Friday Off, Saturday 6 AM to 2 AM, andunday Off. Clearly, as resident number change or service re-uirements change, the solution will also change. The con-traints of this problem were formulated to a strict 80-hourchedule. The educational component of resident training is alear driver underlying the 80-hour schedule. The techniques ofR can be used to address education as another constraint built

nto the overall formulation. For example, if it was determinedhat 4 hours per week for education were required, the authorsould adjust the 80-hour constraint to 76 hours. The formula-ion would then be re-run.

Because they maximize hours worked by residents, subject tohe 80-hour per week constraint, and all residents in the finalolution work at most 80 hours, the solution is “optimal.”owever, it may be noted that in future considerations of the

roblem, it may be desirable to run a slightly suboptimal solu-ion. In this way, a resident could call in sick and be replaced byn off duty resident without violating the 80-hour constraint.upposing each resident was scheduled for 76 hours, each couldover 1 shift a week for an ill comrade and remain within theegal proscription. It is not known at this time whether at cur-ent staffing levels a 76-hour work week could cover all neces-ary shifts. However, it is well known in the field of OR thatften slightly suboptimal solutions are more robust and, there-ore, more applicable in the real world.

In addition, this schedule has been derived via an algorithmhat can be reused with a change in resident number or rotationchedule. The current alternative of empiric ad hoc schedulingan be very confusing and play havoc with patient care, residentives, and simple communication. This technique is a simplend viable alternative. Clearly, a solution has been generatedhat addresses all constraints that were posed at the outset. Thecheduling algorithm can be reconfigured for a change in num-er of residents and changes in rotations. However, the avail-bility of a solution is not guaranteed. In the absence of a solu-ion, the constraints are too stringent, which suggests thatnsufficient manpower or an excessive number of rotations haveeen applied to the problem. Of course, additional levels ofonstraints can be implemented for increasingly defined sched-

s (“i”)

R5 R6 Fellow

50–56 57 58–60

Indice

R4

ling. For example, the authors may wish to add more require-

RRENT SURGERY • Volume 63/Number 2 • March/April 2006

Page 4: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

mwTdpTiauvltartswqm

mrttsdsglagaccihtcutOapCm

tpSotbmtis1cHt

lvvcemwtaapgspdupas

imsniCsqt

T

612612

C

ents, such as, Service A has clinic on Monday and Friday,hile its operating days are on Tuesday, Wednesday, andhursday. Each resident on the service must be in clinic for 1ay per week. Vacation has been accounted for by removing aarticular resident from the formulation and reoptimizing.heoretically, the degree of complexity and stringency can be

ncreased to find a potentially optimal solution for all residentctivities. In addition, variablity is a key component of sched-ling in operations management. To assume that there is noariability by using only a linear programming technique willead to failure. Therefore, the authors placed a buffer within theime constraints. Again, it should be emphasized that the avail-bility of a solution is not guaranteed. This specific formulationesulted in a solution without “excess” residents. In review ofhe scheduling, several residents were indeed found to be as-igned to Service 11 or “off time.” An alternative approachould be to determine the minimum number of residents re-uired to fulfill all listed constraints. Determining the strictinimum would be very computationally intense, but feasible.Operations research is a collection of techniques based onathematics and other scientific approaches to model and solve

eal business problems. Linear programming, which revolu-ionized the field 50 years ago, lets business planners find solu-ions to problems that involve hundreds of thousands of deci-ion points and an equal number of constraints on thoseecisions. With a linear-programming model, all system con-traints and objectives are linear functions. Although these al-orithms have been known for decades, it has only been in theast 15 years that effective software implementation has beenvailable. Other optimization methods either extend linear pro-ramming or use radically different methods to offset the strongssumptions of linear functions. For instance, a method calledonstraint programming was developed over the last decadeombining ideas from OR with methods in logic and artificialntelligence. Constraint-programming systems can generallyandle much more-complicated limits on decisions, but theradeoff is that they can process fewer decisions. For still moreomplicated systems, heuristic or self-learning methods aresed to find near-optimal solutions in a reasonable amount ofime. Every year, academic and business researchers improveR methods, making them even more useful. Better and more

vailable software has brought OR into many companies viaackaged applications such as Microsoft’s Excel (Microsoftorporation, Redmond, WA), which includes the Solver opti-

ABLE 3. Shift Days and Times Are Mapped to Their Indices (“

M Tu W

a–10a 1 7 130a–2p 2 8 14p–6p 3 9 15p–10p 4 10 160p–2a 5 11 17a–6a 6 12 18

ization capability. Other applications include optimization n

URRENT SURGERY • Volume 63/Number 2 • March/April 2006

ools such as analytic, decision support, ERP, and financial-lanning software. In this example, the authors the ILOGolver package, which is commercially available software forptimal scheduling of resources and tasks over a finite period ofime. ILOG is a C�� library for solving scheduling problems,y providing specialized modeling and algorithmic enhance-ents for problems involving scheduling resources and activi-

ies over time. “ILOG Scheduler users report typical cost sav-ngs of 20 percent and a reduction of 75 percent in the timepent planning operations.”2 Approximate cost is $8K for every0 perpetual users needing access to these modules, with a dis-ount to �$6K if bundled under an academic discount plan.owever, this is certainly not the only software package of this

ype that is currently available.In OR, linear programming is defined as a procedure for

ocating the maximum or minimum of a linear function ofariables that are subject to linear constraints. This technique isery powerful as thousands of variables and constraints can beonsidered. The constraints are usually described as linear in-qualities. Often the goal is to either minimize a cost or maxi-ize a value. In certain instances, the goals can be prioritized oreighted. Graphically, a linear inequality is a line that relates 2

ypes of numbers on a graph. Every point on 1 side of the line isn impossible solution. Every point on the other side representspossible solution, but most of these will be wasteful. The

oints on the line are usually adequate solutions because theyive the maximum result from a minimum of resource. When aecond constraint (or another line) is added, the optimum is theoint where the lines intersect. The classic hand method is toraw the lines on a graph, 1 per constraint. The optimal point issually obvious: A point where 2 lines intersect represents aossible solution for all constraints. Computer programs oper-te in a similar way, except that they have no overall view of theystem.1

Operations research has become a near-ubiquitous presencen the business world. There are multiple examples in which

athematical optimization algorithms have been applied. Oneuch example is Continental Airlines. A few years ago, Conti-ental Airlines, together with Caleb Technologies, began build-

ng disaster-recovery models. They posed a question, such as: Ifhicago’s O’Hare Airport was shut down for a day due to a

nowstorm, how could Continental get back on scheduleuickly? Such models are generally difficult to solve because ofheir size and the complexity of the issues involved. For Conti-

Th F Sa Su

19 25 31 3720 26 32 3821 27 33 3922 28 34 4023 29 35 4124 30 36 42

k”)

ental, contingency plans had to accommodate 1400 daily

139

Page 5: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

flmtwvdndmmdtm

ssAmsTapachtAb

R

1

2

3

AF

SDw

s

(

a

a

a

1

CTiArot8s

ibnespcfsfsgRgsmstrTf

1

ights, 5000 pilots, and 9000 flight attendants, and they had toeet a confusing mixture of FAA regulations and union con-

racts. The resulting system lets Continental react to adverseeather quickly and economically, while minimizing an ad-erse effect on passengers. This system easily saves millions ofollars per year while increasing customer-service responsive-ess in difficult situations. The model proved its worth in theays after 9/11. Never before had airlines experienced suchassive disruption to their planned operations. Continental’sodel, developed for snowstorms, worked equally well in han-

ling the federally mandated airport closures. Continental washe first airline to resume normal operations after the govern-ent gave airlines permission to resume flights.3

With regard to the resident 80-hour work week, academicurgery programs must comply with this mandate. Therefore,cheduling the residents in a rational fashion will be critical.lthough ad hoc approaches to scheduling might work, theultiple iterations that are required to arrive at the “final”

chedule may require weeks to months of empiric adjustments.his difficulty notwithstanding, additional time and effort

rises when the number of rotations changes, resident man-ower changes, or service requirements change. This empiricpproach is suboptimal, but it may certainly work. In this arti-le, the authors describe a technique by which this iterative adoc process might be replaced by a rational approach using ORechniques, readily available software, and a personal computer.lthough clearly the standard in the business world, this has noteen previously described for the resident 80-hour work week.

EFERENCES

. Kuo PC, Schroeder RA, Mahaffey S, Bollinger RR. Opti-mization of operating room allocation using linear pro-gramming techniques. J Am Coll Surg. 2003;197:889-895.

. http://www.ilog.com/products/scheduler/.

. Trick M. Best possible outcome. Optimize Magazine [serialonline]. 2003. Available at: http://www.optimizemag.com/article/showArticle.jhtml?articleId�17700837&pgno�2.

PPENDIX: MATHEMATICALORMULATION OF PROBLEM

tate Variablesefine zij for I � 1,�,56 and j � 1,�,8. Define zij � 1 (0) iforker i is (not) assigned to service j.Define xijk for i � 1,�,56, j � 1,�,11, and k � 1,�,42.Define xijk � 1(0) if worker i (does not) work service j during

hift k. (These assign residents to service shifts.)We also define state variables x57,j,k for j � 2,11 and for all k.

This assigns Resident 6 to home or to Vascular shifts.)Define state variables x58,j,k for j � 1,11 and for all k. (This

ssigns Fellow 1 to home or Gastrointestinal shifts.) k

40 CU

Define state variables x59,j,k for j � 3,11 and for all k. (Thisssigns Fellow 2 to home or Surgical Oncology shifts.)

Define state variables x60,j,k for j � 5,11 and for all k. (Thisssigns Fellow 3 to home or Transplant shifts.)

Define yi,11,k for i � 1,�,56, and k � 1,�,42. Define yi,11,k �(0) if resident i begins his day off at shift k.

onstraintshe constraints with Greek letters are for the problem of assign-

ng residents to their rotations and for unstated assumptions.lpha assigns each resident to a rotation. Beta ensures that if

otation j is chosen for resident i, that resident i does not workther services from 1 to 8. If rotation j is chosen for resident j,hen Beta just ensures that resident i works less than 20 shifts, ie,0 hours. Delta ensures that no one works in 2 places at theame time. Epsilon ensures that all shifts are covered.

) �j�1

8

zij � 1 ∀ i � 1, · · · , 56

) �k�1

42

xijk � 20zij ∀ i � 1, · · · , 56 ∀ j � 1, · · · , 8

) �k�1

11

xijk � 1 ∀ i � 1, · · · , 60 ∀ k � 1, · · · , 42

) �k�1

42

�i�1

60

xijk � 1 ∀ j 11

Each constraint specifically refers to a service, shift, and res-dent level that was specified in the original problem, and it cane determined by referring to the tables provided by serviceumber, shift number, and resident index corresponding toxperience level. The A constraint recognizes when a residentwitches from working to not working and forces the followingeriods to be rest periods. This ensures a 12-hour break. The Bonstraint recognizes when a resident goes rest to work andorces at least 1 break in the following 24 hours of shifts. Con-traints C to G assign residents to services. These constraintsorce the staffing requirements to be minimally satisfied in eachervice. All are completely analogous. In C, for example, it isuaranteed that at least 1 resident of R1 or R2 and 1 resident of3, 4,or 5 level are assigned to Gastrointestinal, Vascular, Sur-ical Oncology, and Trauma services each. Constraints H to Oatisfy the individual timing constraints and fulfill the require-ent that the proper number of each resident type is at each

ervice for the proper shifts. The first subscript number (i) referso the numeral assigned to each resident. The second number (j)efers to the numeral assigned to each rotation (transplant, etc).he third number (k) refers to a particular 4-hour shift. There-

ore, resident Xijk serves on service j for the 4-hour time period

. These constraints are the vitality of the 80-hour solution, as

RRENT SURGERY • Volume 63/Number 2 • March/April 2006

Page 6: Scheduling the Resident 80-Hour Work Week: An Operations Research Algorithm

tQs

A

B

C

D

E

F

G

H

I

J

K

L

M

N

P

Q

E

K

DSM

Kaco2al

C

C

hey are restricted by the beta constraint to 20 shifts. Constraintforces at least one 24-hour rest period during the week. The

econd part of Q forces the corresponding shifts to be at home.

) 10xi11k 10xi11k�! � 5xi11k�2 � 5xi11k�3 � 0

∀ i � 1, · · · , NR ∀ k � 1, · · · ,NT

Addition on k is done mod NT.

) 10xi,11,k � 10xi,11,k�1 � 10xi,11,k�2 � 10xi,11,k�3

� 10xi,11,k�4 � 10xi,11,k�5 � 10xi,11,k�6 � 10xi,11,k�7 � 0

∀ i � 1, · · · , NR ∀ k � 1, · · · ,NT

Addition on k is done mod NT.

) �i�1

35

zij � 1 and �i�36

56

zij � 1 ∀ j � 1, 2, 3, 4

) �i�26

35

zi5 � 1 and �i�36

42

zi5 � 1

) �i�1

35

zi6 � 1 and �i�36

56

zi6 � 1

) �i�1

35

zi7 � 2 and �i�36

56

zi7 � 1

) �i�1

35

zi8 � 1 and �i�36

56

zi8 � 1

) �i�43

56

xijk � 1 ∀ j � 1, 2, 3, 4, 5

∀ k � 1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 25, 26, 27

) �i�1

42

xijk � 1 ∀ j � 1, 2, 3, 4, 5

∀ k � 1, 2, 3, 7, 8, 9, 13, 14, 15, 19, 20, 21, 25, 26, 27

) �i�36

56

xijk � 1 ∀ j � 10

∀ k � 4, 5, 6, 10, 11, 12, 16, 17, 18, 22, 23, 24, 28, 29, 30CM

URRENT SURGERY • Volume 63/Number 2 • March/April 2006

) �i�1

35

xijk � 2 ∀ j � 10

∀ k � 4, 5, 6, 10, 11, 12, 16, 17, 18, 22, 23, 24, 28, 29, 30

) �i�36

56

xijk � 1 ∀ j � 1, 2, 3, 4, 5 ∀ k � 31, 37

) �i�1

36

xijk � 1 ∀ j � 1, 2, 3, 4, 5 ∀ k � 31, 37

) �i�1

36

xijk � 2 ∀ j � 10

∀ k � 32, 33, 34, 35, 36, 38, 39, 40, 41, 42

) Taken care of with Alpha and Beta.

) �k�1

42

yi,11,k � 1 ∀ i � 1, · · · , 56 ∀ k � 31, 37

6yi,11,k � xi,11,k � xi,11,k�1 � xi,11,k�2

� xi,11,k�3 � xi,11,k�4 � xi,11,k�5 � 0

∀ i � 1, · · · , 56 ∀ k � 1, · · · , 42

ditorial Comment

aren Brasel, MD, MPH

ivision of Trauma and Critical Care, Department ofurgery, Medical College of Wisconsin,ilwaukee, Wisconsin

uo et al use the elegant technique of operations research toddress the difficult problem of resident scheduling under theonstraints of the 80-hour work week. Proof of the complexityf the problem is found in the 44 hours of personnel time and6 hours of computer time required to solve it. Unfortunately,s with most current approaches to scheduling, the end result isikely to satisfy no one.

Some constraints of the model described are problematic,

orrespondence: Inquiries to Karen Brasel, MD, MPH, Division of Trauma and Critical

are, Department of Surgery, Medical College of Wisconsin, 9200 W. Wisconsin Avenue,ilwaukee, WI 53226; fax: (414) 805-8641; e-mail: [email protected]

141