A GENETIC ALGORITHM-BASED METHOD FOR
CREATING IMPARTIAL WORK SCHEDULES FOR NURSES
Feng-Cheng Yang
*and Wei-Ting Wu
Institute of Industrial Engineering
National Taiwan University
Taipei (10617), Taiwan
ABSTRACT
The head nurse is generally responsible for creating work schedules for nurses in a nursing unit. However, since versatile constraints, shift requirements, and leave requests are imposed in the problem, the generated schedule usually incurs complaints or criticisms from nurses on its im-partiality. This study investigates a complex real nurse scheduling problem and constructs an optimization model for the problem. The model consists of five minimization goals subject to five hard constraints. Then a genetic algorithm-based optimization method is developed for solving the optimization model. The method proposes a dedicated GA coding scheme for the solution to this problem. Based on the scheme the method presents tailored crossover and mu-tation operators for solution evolution. In the GA method, four selection operation modes are proposed to round in superior chromosomes for the next generation. A personnel data set from a nursing unit of a real hospital is used in numerical tests. In addition, a modified hill climbing greedy method and a well-performed variable depth search method from the literature are im-plemented to solve the same problem for numerical comparison. Numerical results suggest that a deterministic selection mode outperforms others and our method generates better schedules than other methods on every run.
Keywords: Genetic Algorithm, Impartial, Work Schedules, Nurses
1. INTRODUCTION
*
An employee scheduling problem is to create a pertinent or fixed working schedule that distributes manpower evenly and fairly to routine jobs or tasks. Typically, an employee schedules is stable, since or-dinary employees have relatively stable work routines. Generally ordinary employees work day shifts on weekdays and rest on weekends. In contrast, in hospi-tals, nurses work very dynamic day-and-night shifts. Nurses in the same nursing unit must share around-the-clock nursing work during both weekdays and weekends.
Employee scheduling for nurses is generally a challenging and laborious task that must be routinely completed by the head nurse in each nursing unit. Complaints about the schedule generally outweigh compliments, when the schedule is announced. An automatic optimal scheduler is needed to evenly and fairly distribute the workload and impartially grant leave requests for the nurses in a nursing unit.
The goal of this study is to create a genetic algo-rithm based scheduling method for creating impartial schedules for nurses. In particular, the study defines a complex scheduling problem for nurses in a domestic hospital. Then this study use the developed
*Corresponding author: [email protected]
meta-heuristic algorithm to creating optimal impartial schedules for the problem.
2. LITERATURE REVIEW
Over the past decade, a variety of methods have been used to create work schedules for nurses. Yih [10] showed that heuristic methods, such as modified hill climbing, can be used to create work schedules for any type of employee. The modified hill climbing method uses a deterministic greedy search technique to re-peatedly assign the most favorable jobs to the most favorable employees.Azaiez and Sharif [1] used a goal programming approach to creating work schedules for nurses. The goal programming method creates work schedules to meet the expectations of the nurses. Brucker et al., [2] used an adaptive constructive method to create work schedules for nurses. The adaptive constructive method creates rosters and then uses a greedy local search technique to create work schedules.
Dowsland [8] identified requirements for creating day and night shift work schedules for nurses. Dow-sland and Thompson [7] used a three-stage method to create complex work schedules for nurses. The first stage uses a knapsack technique to create schedules that fulfill human resource requirements. The second
stage uses a tabu search technique to create schedules that fulfill day and night shift work schedule require-ments. The third stage divides the day shifts into early and late shifts. Li and Aickelin [9] enhanced the three-stage method to create work schedules for nurses. The method uses four scheduling rules and a Bayesian optimization algorithm to create feasible work sched-ules. They used the method to create work schedules for 52 test cases.
Burke et al., [3-5] used several different methods to create work schedules for nurses. They also created a website that contains several test cases, which can be used for benchmark testing. Their time variable depth search method, which was implemented in the C# programming language, outperformed the other methods on the benchmark tests. They also proposed other methods, such as a scatter search method, which could be used to create better work schedules.
Chiaramonte [6] used an agent-based method to create work schedules for nurses. The method uses nurse agents that simulate intelligent human behaviors. The nurse agents bid for work shifts and work leaves until all of the agents are satisfied with their work schedules.
Prior studies created methods that improve work schedules for nurses. The methods used to create work schedules include local search techniques, heuristic search techniques, stochastic search techniques, or intelligent agents. Most of the optimization techniques can conduct local searches effectively. However, they cannot conduct extensive searches effectively.
Meta-heuristic algorithms, on the other hand, can conduct extensive searches effectively. Genetic algo-rithms (GAs), ant colony optimization algoalgo-rithms (ACOs), and particle swam optimization algorithms (PSOs) have been used to solve many different types of optimization problems. They can be used to find near-optimal solutions to complex optimization prob-lems with nonlinear constraints and multiple goals.
Meta-heuristic algorithms have many advantages over traditional optimization techniques. They can search the optimal solution without gradient informa-tion; they can conduct effective population search for a wider solution space; they can use heuristic informa-tion for advantageous optimum search; and they are generally controlled or governed by evolution laws or natural intelligence techniques.
This study develops a genetic algorithm-based method to create impartial work schedules for nurses. The evolution method adopts natural intelligence techniques to create work schedules that meet various nonlinear constraints and multiple goals.
3. THE GENETIC ALGORITHM-
BASED METHOD
The goal of this study is to model a work sched-uling problem for nurses at a target hospital and to create a genetic algorithm-based method that can generate impartial work schedules for the problem. The hospital uses a shift bundled technique to create work schedules for nurses in ordinary nursing units. The hospital monthly assigns nurses to their dedicated shifts for an entire month.
The head nurse is responsible for creating new work schedules for each new month at the middle of each current month. To create the new work schedules, the head nurse must review previous shift assignments, previous leave request approval records, and all future leave requests. It usually takes about one week to complete the new work schedules for each new month. The process is difficult and time consuming, manual scheduling is subject to actual or perceived biases, and manually created records can be incomplete, inaccu-rate, or inaccessible.
The goal of this study is to create an automatic method that can be used to reduce the time and effort needed to create work schedules for nurses. The method must create impartial work schedules for the
p nurses in a nursing unit P=
{
1, 2, ,L p}
. The skill level of nurse i, αi, is classified into one of four skill levels αi∈{
1, 2,3, 4}
. Higher skill levels indicate higher seniorities and higher level nursing skills. A good schedule should not let the nurses on the same shift are all with the lowest skill levels.A good schedule must adequately staff a nursing unit on both weekdays and weekends. Nurses cannot always take days off on weekends. They must submit leave requests to the head nurse. The head nurse must consider all leave requests as well as the approval records to approve or deny the leave requests.
Normally, each nurse is given eight days off per month. However, a head nurse may ask nurses to for-feit days off when there are unexpected needs. On the other hand, a head nurse may ask nurses to take extra days off when there are reduced needs. A head nurse may also grant leave requests that exceed eight days per month.
Leave approvals must be recorded and used for create new work schedules. For each nursei, if εi is
the number of leaves granted to nursei , a good schedule must prioritize leave requests to give nurses with lower values of εi higher opportunities for their
leave requests. A good schedule should grant leave requests to eventually balance the values of εi for all
of the nurses.
Exceeded or shorted number of days off must also be recorded and used to create work schedules. For nurse i, if γi is the cumulated shortage of leave days taken, when γi is positive, the nursing unit owes the
nurse γi days off; when γi is negative, the nurse owes
the nursing unit γi working days.
The target hospital has three work shifts for the nursing units. Shift 1 is a day shift that runs from 8 am to 5 pm, shift 2 is an evening shift that runs from 3 pm to 11 pm, and shift 3 is a night shift that runs from 11 pm to 8 am. K=
{
1, 2,3}
is the set of all work shifts.The night shift, Shift 3, is generally considered to be an undesirable work shift. A good schedule must impar-tially assign night shifts to nurses. However, the target hospital has assigned the type of work shift to each nurse based upon the seniority. If nurse i is dedicated to work shiftβi, thenβi∈K. Work shifts are
sched-uled for q days in a monthQ=
{
1, 2, ,L q}
. Days are indexed sequentially from Monday to Sunday. IfRj isthe week index of day j , then Rj∈
{
1, 2, ,7 .L}
Therefore, ifRj =1, day j is Monday; if Rj =7, dayj is Sunday.
Nurses submit their leave requests for each new month by completing leave request forms. The leave requests are classified into eleven categories. Category 1 is for regular leaves; 2 is for annual vacations; 3 is for medical leaves; 4 is for wedding leaves; 5 is for ma-ternity leaves; 6 is for miscarriage leaves; 7 is for fu-neral leaves; 8 is for personal leaves; 9 is for officially required leaves; 10 is for work-related injury leaves; and 11 is for official in-service training leaves.
{
1, 2, ,11}
{ }0U= L ∪ is the set of all leave categories, including no leave request, which is category 0. For nurse iand day j, Hijis the leave request of nurse i for day j. Hij∈U.
The number of nurses that are needed for each day and each shift is known or determined in advance. For day jand shiftk, ρjkis the number of nurses needed
on day jand shiftk. The number of nurses that can take a leave day is 3 1 jk
k
p−
∑
= ρ . When the number of nurses that submit a leave request for day jexceeds the number of nurses that can take a leave day on dayj, the head nurse must determine which nurses can take a leave day, based on the information of Hij,εi, andγi.For nurse iand day j, xij is the leave request result for nurse i and day j. Initially, xij is set to -1. During scheduling, xij is set to 0 if nurse i requests a
leave day on day j and the request is approved. A request approving operation evaluates values of Hij,
i
ε , and γi to approve or decline the leave requests.
After leave requests are completed, the GA-based scheduling algorithm replaces xij that are -1 with a
shift index (xij∈K) or a value 0 for a day-off. After
all of the xij are set, nurse i is given a leave day on
day j if xij =0 ; nurse i is assigned to shift
ij i
x =β ∈K on day j. In practice, after a schedule is created, minor changes can be made to the schedule. Generally, nurses may want to trade shifts or leave days with other nurses. Changes may need to be made throughout the scheduled month. The changes must be approved by the head nurse. If the changes are ap-proved, they must be recorded for future reference.
The schedule must be checked before it can be used. The schedule might not be a good schedule, might not be feasible, or might not meet regulations. For example, the schedule might decline too many leave requests, assign too many single-day leaves ra-ther than two-day leaves, assign a nurse to two shifts on the same day, or assign a nurse to more working days than labor laws allow.
The goal of the scheduling process is to create impartial work schedules that meet the expectations of the nurses. However, the schedules must be feasible, and satisfy all kinds of regulations. In this study, the expectations of the nurses and the target hospital are modeled as optimization objectives and regulations are modeled as hard constraints. Five objectives are iden-tified and weighted and their weighted values are added to the single objective function.
In general, meta-heuristic optimization tech-niques do not deal with hard constraints directly. In-stead, they either count the occurrences of constraint violations or measure the degree or amount of the violations. Then the values of constraint violations are regarded as penalty to the objective value. In this study, five hard constraints are established to meet the re-quirements and regulations from the nursing unit, hospital, and the labor law. The counts of constraint violations are added to the objective function as pen-alties by multiplying a large penalty value. The objec-tive function for the problem is
( )
5 51 s s 1 s
s s
T x =
∑
= z f +M∑
=v . (1)In Equation 1, zs is a user specified weight for
optimization objective value fs; M is a fixed weight
for hard constraint violation countvs ; andx is the
generated schedule. The goal of the optimization pro-cess is to minimize the overall value of the objective function.
3.1 Optimization Objectives
When nurses request leave days for official in-service training, they prefer to have the days before and after training scheduled as leave days, to get ade-quate rest before and after training. The objective function contains a term that counts the number of
times that an in-service training request is granted (Hij = ∧11 xij=0) and either the day before or after the in-service training session is not scheduled as a leave day (xi j( −1) >0 or xi j( +1) >0): ( ) ( )
(
)
(
)
1 ; =2,3,..., 1 1 1 11 0 0 0 i j q ij ij i j i j f Count H x x x ∀ − − + = = ∧ = ∧ > ∨ > . (2)For regular days off, nurses don’t expect to get weekend leaves every week. However, they prefer to have some weekend leaves every month. The objective function contains a term that counts the number of nurses who do not receive any weekend leave:
( )
(
)
2 6 0 1 0 1 j ij i j i j R f Count Count x x + ∀ ∀ ∋ = ⎛ ⎞ = ⎜ = ∧ = < ⎟ ⎝ ⎠. (3)For regular days off, nurses prefer to have one two-day leave, rather than two single-day leaves to get enough rest. The objective function contains two terms that count the number of times nurses receive sin-gle-day leaves and nurses have two days off separated by a working day: ( ) ( )
(
)
3 ; 2,3,..., 1 1 1 11 0 0 0 i j q ij ij i j i j f Count H x x x ∀ = − − + = ≠ ∧ = ∧ > ∧ > , (4) ( ) ( )(
)
4 i j; =2,3,...,q1 ij 0 i j1 0 i j1 0 f Count x x − x + ∀ − = > ∧ = ∧ = . (5)A good schedule should approve all the leave requests to meet nurses’ expectations. However, it is nearly impossible. Therefore, based on the available manpower and averaged workload, each nursing unit has set up a target ratio of granted leave requests to the total number of leave requests. The head nurse should try to meet the target δ when creating a schedule. The objective function, therefore, contains a term that measures the difference between the target and the ratio of granted leave requests to the total number of leave requests:
(
)
(
)
5 0 0 max 0.0,100 0 ij ij i j ij i j Count H x f Count H δ ∀ ∀ ∀ ∀ ⎧ ⎛ > ∧ = ⎞⎫ ⎪ ⎜ ⎟⎪ = ⎨ ⎜ − ⎟⎬ > ⎜ ⎟ ⎪ ⎝ ⎠⎪ ⎩ ⎭ .(6) 3.2 Hard ConstraintsThe number of nurses assigned to each shift on each day must be equal to the predetermined number of nurses that the hospital needs. The objective function contains a term that counts the number of times the
number of nurses assigned to each shift on each day does not match the predetermined number of nurses that the hospital needs:
(
)
(
)
1 , ij jk j k i v Count Count x k ρ ∀ ∀ = = ≠ . (7)The work schedule of a nurse is regulated by labor laws and hospital rules. If labor laws or hospital rules limit the number of consecutive working days of a nurse toDdays, a feasible schedule must limit the number of consecutive working days of the nurse to no more thanDdays. The objective function contains a term that counts the number of times that assigned working days exceed the limit:
(
)
(
)
2 i r, 1,2,...,q D j r r, 1,...,r D ij 0 x Count D v Count = + + ∀ = − > ≥ = . (8)In general, nursing units need a lower number of nurses during night shifts. Low skill level nurses are usually assigned to night shifts because they are young, they have less seniority, and they are generally single. However, if all of the nurses have low skill levels, service quality is low. As a result, hospital rules require that at least one nurse must have a skill level greater than 1. Therefore, the sum of the levels of nurses on the night shift should not smaller or equal to the number of nurses. The objective function contains a term that counts the number of times that a night shift does not meet the requirement:
(
)
(
)
3 , 3 3 ij i ij i x j i v Count ∀ =α Count x ∀ ∀ =∑
≤ = . (9)Nurses can be asked to work more days in a month than usual. However, working too many days in a month can affect the nurses’ physical health. As a result, hospital rules require that nurses have at leastC leave days every month. The objective function con-tains a term that counts the number of times that the number of leaves does not meet the requirement:
(
)
(
)
4 ij 0 i j v Count Count x C ∀ ∀ = = < . (10)Hospital rules also require that nurses have at least eight hours of break between two consecutive shifts. As a result, nurses cannot work an evening or night shift and a subsequent day shift. The objective function contains a term that counts the number of times that assigned shifts do not meet the requirement:
{ }
( )(
)
5 , 1,2,..., 1 ij 2,3 i j1 1 i j q v Count x x + ∀ = − = ∈ ∧ = . (11)3.3 The Genetic Algorithm
The genetic algorithm repeatedly evolves a set of solutions toward optimality using simulated genetic operators including genetic selection, crossover, and mutation operators. The genetic algorithm-base nurse scheduling method consists of a dedicated genetic coding and customized genetic operators to generate near-optimum schedules for the nurses. In this model, a schedule represented by a matrix of integers
p q× = ⎣ ⎦⎡ ⎤xij
x wherexij∈ ∪K
{ }
0 . The value of ijx indicates whether nurse i is assigned to a shift or given a leave day on day j. The genetic operators do not evolve xij values that are initially set to 0 in leave approval, which mean nurse i has requested and been granted a day-off on day j.
The proposed method uses an Approve_Leaves() operation to set some xij values to 0 to grant or turn down the leave requests. The operation grants leave request based the information of cumulated shortage of leave days γiand the number of leave days granted
i
ε for each nurse and the number of nurses needed on each shift ρjk. The Approve_Leaves() operation sets
ij
x to -1 if the leave request is not approved: Approve_Leaves
(
ρ, H, x)
1 xij ← − ∀1; ,i j 2 for j←1 toq 3 for k←1 to 3 4(
)
1,2, , i jk i p allowed Count β k ρ = ← = − L 5 V←{
i Hij > ∧0 βi = ∀k; i}
6 if V >allowed7 Sort nurses in V in descending orders of γi and ascending orders
of εi, such that v←
{
v v1, ,2 L}
, 1 1 k k k k v v v v γ ≤γ + ∧ε ≥ε + 8 xij ← ∀ ∈0; i{
v v1, ,...,2 vallowed}
9 else 10 xij ← ∀ ∈0; i V 11 end if 12 end for 13 end forIf the number of leave requests for a shift exceeds the number of leaves that can be allowed, the nurses are sorted by the cumulated shortage of leave days taken and the number of leave days given. Nurses that
have greater cumulated shortages of leave days taken and smaller numbers of leave days given are given higher priorities for leave approval.
3.4 Initial Population
The initial population of schedule chromosomes is
{
x(1),x(2),...,x( )ϕ}
. The population size ϕis speci-fied by the user. An Initialize_Population() operation is used to initialize the chromosome values to create an initial population of schedules:
Initialize_Population
(
ρ,x( )c)
1 for j←1 toq
2 Assign_Daily_Shifts
(
, , ( )c)
j ρ x 3 end for
The Initialize_Population() operation executes an Assign_Daily_Shifts() procedure to assign shifts for all of the q work days:
Assign_Daily_Shifts
(
, , ( )c)
j ρ x 1 fork←1 to 3 2 v←{
i xij = − ∧1 βi =k}
={
v v1, ,2 L}
3 for s←1 toρjk 4 i′ ←Random( )
v 5 ( )c i j x′ ←k 6 v← −v{ }
i′ 7 end for 8 ( )c 0; ij x ← ∀ ∈i v 9 end forIn line 2, the Assign_Daily_Shifts() procedure identifies the set of nurses that did not submit leave requests for day j and is bundled with shift k. In lines 3-8, the procedure randomly assigns ρjk nurses from the set to shift k on day j and then gives other nurses leave days. This procedure calls a Random() operation to randomly select a nurse from the set of nurses that did not submit leave requests for day j and shift k. 3.5 Crossover Operator
This study develops a dedicated crossover op-erator to breed offspring from a pair of parent chro-mosomes. The operator randomly selects θ days and swaps theirs shifts between parents. θis a user speci-fied number and 7≤ ≤θ 15is suggested. For a pair of parent chromosomes x(1)and x(2), the operator clones
and modifies x(1)and x(2)to generate offspring
chro-mosomes x′(1)and x′(2)via the implemented operation:
1
{
}
( )
1, ,...,2 , Random ; 1, 2,..., s a a a a Q s θ θ ← ← = A 2 (2) (1) (1) ,if , , ,otherwise ij ij ij x j x i j x ⎧ ∈ ⎪ ′ ←⎨ ∀ ⎪⎩ A 3 (1) (2) (2) ,if , , ,otherwise ij ij ij x j x i j x ⎧ ∈ ⎪ ′ ←⎨ ∀ ⎪⎩ AIn line 1, the Date_Scattered_Crossover() opera-tion randomly selects θ days from the current month.
In lines 2 and 3, the operation exchanges the schedules of the parent chromosomes for the selected days to create offspring chromosomes.
3.6 Mutation Operator
This study also develops a corresponding muta-tion operator to yield new chromosome. As noticed, column j, 1( )c ( )2c ( )c T j j pj x x x ⎡ ⎤ ⎣ L ⎦ , in chromosome matrix ( )c
x is a schedule for day j that meets the nursing unit’s need for nurses. A mutation operation that simply swaps two arbitrary columns is likely to yield an in-feasible solution. Therefore, the mutation operation proposed is conducted within a column (day) by ran-domly reassigning the work shifts for the nurses. For chromosome matrix x( )c , the mutation operator
ran-domly selects ω days to reassign the day shifts and clones the schedules of other days to yield a new chromosome matrix ˆx: Mutation
(
ρ,x( )c , ,xˆω)
1{
}
( )
1, ,...,2 , Random ; 1, 2,..., m a a a a Q m ω ω ← ← = A 2 forj←1 to q 3 if j∈A 4 Assign_Daily_Shifts(
j, ,ρxˆ)
5 else 6 ˆ ( )c, 1, 2, , ij ij x ←x ∀ =i L p 7 end if 8 end forIn line 4, the mutation operator creates a new schedule for each of the ω randomly selected days. Conversely, the operator copies the parent schedule for each of the unselected days.
3.7 Selection
Genetic selection constitutes a new set of chro-mosomes and evolves to the next generation of genetic evolution. The selection pool of our method consists of parent and offspring chromosomes. Four selection modes are proposed: (1) deterministic selection, (2) stochastic selection, (3) hybrid selection, and (4)
grouped stochastic selection. All of the selection modes select parent or offspring chromosomes based upon their fitness values (objective values of the schedules).
For the combined set of parent and offspring schedule chromosomesG=
{
1, 2, ,L m}
, m>ϕ, Tc isthe objective value of chromosomec in G, 1≤ ≤c m. The goal of the optimization process is to minimize the value of the objective function. Therefore, the fitness of schedule chromosome c is set to 1Tc.
The deterministic mode chooses the ϕ
chromo-somes that have the highest fitness values to constitute the next generation U′:
Deterministic_Selection(G)
1. Sort chromosomes in G in descending orders of their fitness as
{
}
1 1, 2,..., , 1 1 , 1, , 1 c c m G G G G G c m T T + ′← ′ ′ ′ ≥ ∀ = − G L 2. U′←{
G G1′ ′, 2,...,Gϕ′}
The stochastic selection mode chooses ϕ sched-ule chromosomes from G by calling a Probabilis-tic_Selection() operation:
Stochastic_Selection(G)
1 U′ ← Probabilistic_Selection
(
G,ϕ)
The Probabilistic_Selection() operation stochas-tically selects nchromosomes from chromosome set
Uto constitute a subset U′based on the fitness values of the chromosomes: Probabilistic_Selection
(
U,n)
1 , 1 c c c c n p c T T ′ ∀ ∈ ′ ← ∀ ∈∑
U U 2 U′ ←{ }
3 cumulated ←0 4 μ←RealRandom(),0≤ ≤μ 1 5 forc←1 ton 6 cumulated ←cumulated+pc 7 whilecumulated>μ 8 U′←U′∪{ }c 9 μ← +μ 1 10 end while 11 end for 12 return U′In line 1, the operation sets the relative probability of each schedule chromosome in U. Each pc is
pro-portional to the fitness value1Tc. In line 4, the
op-eration calls a RealRandom() function to obtain a random number between 0 and 1.0. In line 8, the op-eration adds chromosome c to U′, one or more times.
The hybrid selection mode chooses the best ϕ′ schedule chromosomes deterministically, with ϕ ϕ′ < . The mode then choosesϕ ϕ− ′ chromosomes stochas-tically from the remaining chromosomes.
The grouped stochastic selection mode groups the schedule chromosomes in G into three groups, based on their fitness values: high fitness, medium fitness, and low fitness. In each selection step, the mode sto-chastically chooses a group first and then stosto-chastically chooses a schedule chromosome from the group. The procedure repeats ϕ times to complete the selection:
Grouped_Stochastic _Selection(G)
1 Sort chromosomes in G in descending orders of their fitness as
{
}
1 1, 2,..., , 1 1 , 1, , 1 c c m G G G G G c m T T + ′← ′ ′ ′ ∋ ≥ ∀ = − G L 2 m′ ←⎣0.6m⎦ 3 m′′ ←⎣0.9m⎦ 4 (1){
}
1, 2,..., m G G′ ′ G′′ ← G 5 ( 2){
}
1, 2,..., m m m G′′+ G′′+ G′′′ ← G 6 (3){
}
1, 2,..., m m m G′′′+ G′′′+ G′ ← G 7 U′ ←{ }
8 for c←1 to ϕ 9 μ←RealRandom(),0≤ ≤μ 1 10 (1) (2) (3) ,if 0 0.6 , else if 0.6 0.9 ,otherwise μ μ ⎧ ≤ ≤ ⎪ ←⎨ < ≤ ⎪ ⎩ G G G G % 11 U′←U′∪Probabilistic _ Selection( )
G%,1 12 end forIn lines 4-6, the Grouped_Stochastic _Selection() operation groups the schedule chromosome into three groups. In lines 8-12, the operation stochastically chooses chromosomes from these three groups with probabilities 60%, 30%, and 10% separately.
3.8 Stopping Conditions
The proposed genetic algorithm-based method can use different stopping conditions to complete the searching process: iteration limits, CPU execution time limits, and limit of number of objective function evaluations. After completing the searching process, the genetic algorithm gives the best (highest fitness) schedule chromosome * * ij x ⎡ ⎤ = ⎣ ⎦ x .
After the schedule is used, the number of leaves granted εi and the cumulated shortages of leaves taken
i
γ , for each nurse i is updated accordingly:
* 1,if 0 0 , ,otherwise i ij ij i i x H i ε ε ε ⎧ + = ∧ = ⎪ ←⎨ ∀ ⎪⎩ ; (12)
(
)
(
8 * 0 ,)
i i ij j Count x i γ γ ∀ ← + − = ∀ . (13)4. TEST RESULTS
The method was implemented in a software pro-gram, the Impartial Schedule Targeted Nurse Sched-uling System (ISTNSS). The ISTNSS program was implemented in the C# programming language on a MicroSoft .Net platform. Input data concerning the nurses, nursing unit needs, and previous schedules can be directly accessed from databases or manually en-tered with the software interface shown in Figure 1.
The ISTNSS program was used to create work schedules for nurses in a nursing unit of the target hospital. Tests were conducted to determine which of the four selection modes give the best work schedules. The best selection mode was then used to compare the ISTNSS program to a program using the variable depth search method and a program using the modified hill climbing method. The two programs were recon-structed from descriptions in previous studies [3,10].
4.1 Data
The nursing unit of the hospital consists of 15 nurses. Table 1 shows data for the nurses. Table 2 shows the nursing unit’s needs for nurses. Table 3 shows the leave requests filed by the nurses for the new month.
Table 1: Data for the nurses
Nurse i 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Rank αi 3 3 3 3 2 3 2 3 3 2 1 2 3 4 1 Shift βi 1 1 1 1 1 1 1 1 2 2 2 2 3 3 3 Leave Shortages γi -3 5 0 3 -5 1 2 0 -1 0 -1 3 1 0 2 Leaves Granted εi 1 19 11 13 9 9 0 0 11 8 5 9 14 5 3 The weight values for the five optimization ob-jectives f1- f5 were all set to 1; i.e., zs =1,
1, 2, ,5
s
∀ = K . The fixed penalty value M for the hard constraint counts v v1- 5 was set to 100. The
ge-netic algorithm population size ϕ was set to 20; the crossover rate was set to 1.0; the mutation rate was set to 0.1; and the stopping condition was set to elapsed CPU time for 30 seconds.
Figure 1: The ISTNSS software interface
Table 2: The nursing unit’s needs for nurses
Shift k Monday Tuesday Wednesday Thursday Friday Saturday Sunday
1 5 5 5 5 5 4 4
2 3 3 3 3 3 3 3
3 2 2 2 2 2 2 2
Table 3: Leave requests for the new month
j 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 j R 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 i Hij 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 11 2 1 1 2 2 2 2 2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 4 1 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 2 2 11 2 2 2 11 2 2 2 0 0 5 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
To determine the best selection mode, the ISTNSS program was run ten times on the sample problem for each selection mode. Table 4 shows the best and the average objective function values obtained in each selection mode.
Table 4: Objective function values
Technique 1 2 3 4
Best value 36 143 39 112 Average value 45.2 236.6 56.0 197.6
The weight values for the five optimization ob-jectives f1-f5 were all set to 1; i.e., zs =1 ,
1, 2, ,5 s
∀ = K . The fixed penalty value M for the hard constraint counts v v1- 5 was set to 100 The genetic
algorithm population size ϕ was set to 20; the cross-over rate was set to 1.0; the mutation rate was set to 0.1; and the stopping condition was set to elapsed CPU time for 30 seconds.
To determine the best selection mode, the ISTNSS program was run ten times on the sample problem for each selection mode. Table 4 shows the best and the average objective function values obtained in each selection mode.
Figure 2 shows the progresses of the objective function values during the running process of the ISTNSS program. The deterministic mode outper-formed the other modes. As a result, deterministic mode was used to complete the rest of the tests. The same data was used to create work schedules using the ISTNSS program, the program implementing the var-iable depth search method, and the program imple-menting the modified hill climbing method. The first two programs were run 10 times. Since the modified hill climbing method is a deterministic method only one run was conducted.
Figure 2: The objective value progresses for different selection modes
Table 5 lists objective function values obtained from the three programs. The results show that the ISTNSS program created better schedules than the
other two programs. The objective function values obtained from ISTNSS never exceed 100. This indi-cates that the schedule does not violate any hard con-straint because the penalty for hard concon-straints M was set to 100. On the contrary, the other two programs did not create schedules that met all hard constraints and the obtained schedules are infeasible.
Table 6 shows the best schedule that was created by the ISTNSS program, which had an objective function value of 36. For the test schedule, f1=0,
2 7
f = , f3 =23 , f4 =6 , f5 =0 , and vs =0 1, 2, ,5
s
∀ = K . Although the solution is a good schedule, but it is not a perfect one. There are seven nurses, whose indices are double underlined in Table 6, unable to have at least one full weekend leave. More-over, six working shifts break two successive leaves and 23 single-day leaves lie between two working shifts. These shifts or leaves are shown in bold-italic face and underlined in the Table 6.
Notice that obtaining a perfect schedule that has objective valueT =0 is nearly impossible, if the
available nurse resources are inadequate for what are required. The resource condition on the evening and night shifts for the sample unit is critical in the sample problem: 4 nurses serving for evening shifts that re-quire 3 nurses daily and 3 for night shifts that rere-quire 2.
Although, the obtained schedule might not please all of the nurses, but the ISTNSS program offers the head nurse alternatives to try different results of objectivesf1 to f5by setting different weights on them. The provided soft computing method is therefore able to let user adjust the types and counts of unsatisfied cases for a critical scheduling environment. Once the importance degrees of the goals are set, the ISTNSS will try its most to meet as much the requirement from head nurse, nurses, and the hospital.
Table 5: Objective function values for the three programs
Program 1 2 3 4 5 6 7 8 9 10 Best Average
ISTNSS 41 45 47 38 42 46 50 41 36 58 36 45.2
Variable Depth Search 122 132 148 156 232 185 156 145 117 116 129 123.0 Modified Hill Climbing 127 - - - 127 127.0
5. CONCLUSIONS
Hospitals must create impartial work schedules for nurses every month. Creating good impartial schedules helps to maintain an efficient and pleasant working environment. Manual scheduling is difficult and time consuming. As a result, manual scheduling can lead to dissatisfaction and complaints. This study creates a genetic-algorithm-based method for creating impartial work schedules for nurses. The method can
creates work schedules that consider optimization objectives, hard constraints, and the expectations of the nurses. The method can be used to create stable im-partial workloads that are based upon the ranks and skill levels of the nurses in a nursing unit, as well as hospital rules and government regulations. The study shows that the genetic algorithm-based method can find optimal or near-optimal work schedules that are feasible and acceptable for real hospital nursing units.
Table 6: The best ISTNSS schedule j 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 j R 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 i Hij 1 3 1 -3 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 0 0 1 1 1 2 3 1 5 19 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 1 1 0 3 3 1 0 11 0 1 1 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 4 3 1 3 13 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 5 2 1 -5 9 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 6 3 1 1 9 1 0 0 1 1 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1 1 0 0 7 2 1 2 0 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 0 8 3 1 0 0 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 1 1 0 0 1 1 9 3 2 -1 11 2 2 2 2 0 2 2 2 2 2 0 2 2 2 2 2 2 0 2 2 2 2 0 2 2 2 2 2 0 0 10 2 2 0 8 0 0 0 2 2 2 2 0 2 2 2 2 0 0 2 2 2 2 2 2 0 2 2 2 0 2 2 2 2 2 11 1 2 -1 5 2 2 2 0 2 2 2 2 0 0 2 2 2 2 2 2 0 2 2 0 2 2 2 0 2 2 2 2 2 2 12 2 2 3 9 2 2 2 2 2 0 0 2 2 2 2 0 2 2 0 0 2 2 0 2 2 0 2 2 2 0 0 0 2 2 13 3 3 1 14 3 3 3 0 0 3 3 3 0 3 3 3 0 0 0 3 3 3 3 0 0 3 0 3 3 0 0 0 3 3 14 4 3 0 5 3 3 3 3 3 0 0 3 3 3 3 0 3 3 3 3 3 0 0 3 3 0 3 3 3 3 3 3 0 0 15 1 3 2 3 0 0 0 3 3 3 3 0 3 0 0 3 3 3 3 0 0 3 3 3 3 3 3 0 0 3 3 3 3 3
REFERENCES
1. Azaiez, M. and Al Sharif, S., 2005, “A 0-1 goal programming model for nurse scheduling,” Computers and Operations Research,Vol. 32, No. 3, pp. 491-508.
2. Brucker, P., Burke, E. K., Curtois, T., Qu, R. and Vanden Berghe, G., 2010, “A shift sequence based approach for nurse scheduling and a new benchmark dataset,” Journal of Heuristics, Vol. 16, No. 4, pp. 559-573.
3. Burke, E., Curtois, T., Qu, R. and Berghe, G., 2007, “A time pre-defined variable depth search for nurse rostering,” Computer Science Technical Report, No. NOTTCS-TR-2007-6. University of Nottingham, Jubilee Campus, UK.
4. Burke, E., Curtois, T., Qu, R. and Berghe, G., 2009, “A scatter search methodology for the nurse rostering problem,” Journal of the Operational Research Society, Vol. 61, pp. 1667-1679.
5. Burke, E., De Causmaecker, P., and Vanden Berghe, G., 1999, “A hybrid Tabu search algorithm for the nurse rostering problem,” Simulated Evolution and Learning, 187-194. 6. Chiaramonte, M. V. and Chiaramonte, L. M.,
2008, “An agent-based nurse rostering system under minimal staffing conditions. International Journal of Production Economics, Vol. 114, No. 2, pp. 697-713.
7. Dowsland, K. and Thompson, J. M., 2000, “Solving a nurse scheduling problem with knapsacks, networks and Tabu search,” Journal of Operational Research Society, Vol. 51, No. 7, 825-833.
8. Dowsland, K., 1998, “Nurse scheduling with tabu search and strategic oscillation,” European
Journal of Operational Research, Vol. 106, No. 2/3, pp. 393-407.
9. Li, J. and Aickelin, U., 2004, “The application of Bayesian optimization and classifier systems in nurse scheduling,” In: Yao X et al. (Eds). Parallel Problem Solving from Nature. Springer Lecture Notes in Computer Science, 3242, 581-590. 10. Yih, Y., 2010, Handbook of Healthcare Delivery
Systems. CRC Press
ABOUT THE AUTHORS
Feng-Cheng Yang is currently an associate professor in the Institute of Industrial Engineering at National Taiwan University. He received the Bachelor’s degree in Mechanical Engineering from National Taiwan University, in 1980, and the Ph.D. degree in Me-chanical Engineering from the University of Iowa, USA, in 1991. His present research interests include various heuristics techniques for solving industrial optimization problems. Recently, his focus is the newly developed Bandwidth Restricted Transmis-sion-Simulated Optimization Algorithm for various optimization problems. He has developed several software systems covering various heuristics: ant colony optimization algorithms, electromagnetism-like mechanism, genetic algorithms, wrapped-round self-organizing maps, water flow-like algorithm etc. These systems are developed to facilitate academic research and teaching. Various benchmark problems frequently used for new algorithm verification are included in these systems.
Wei-Ting Wu is currently a junior production engineer of the Taiwan Semiconductor Manufacturing Co., Taiwan. He received his MS degree from Institute of Industrial Engineering, NTU, in August 2010. His specialties include algorithms, soft computing, and optimization techniques.
(Received May 2012, revised August 2012, accepted September 2012)