0% found this document useful (0 votes)
7 views

A Flexible Mixed Integer Programming Framework For

This paper presents a mixed integer programming model for nurse scheduling aimed at automating and optimizing the scheduling process in hospitals by balancing hospital requirements and nurse preferences. The model incorporates flexibility in nurse duty transfers and additional policies to ensure continuous care while minimizing costs and addressing nurses' preferences for shifts and rest days. The framework is implemented using AIMMS, demonstrating its effectiveness in generating fair and efficient schedules.

Uploaded by

levi123
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

A Flexible Mixed Integer Programming Framework For

This paper presents a mixed integer programming model for nurse scheduling aimed at automating and optimizing the scheduling process in hospitals by balancing hospital requirements and nurse preferences. The model incorporates flexibility in nurse duty transfers and additional policies to ensure continuous care while minimizing costs and addressing nurses' preferences for shifts and rest days. The framework is implemented using AIMMS, demonstrating its effectiveness in generating fair and efficient schedules.

Uploaded by

levi123
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

A Flexible Mixed Integer Programming framework for Nurse

Scheduling
Murphy Choy, Michelle Cheong

arXiv (arXiv: 1210.3652v1)

Generated on April 13, 2025


A Flexible Mixed Integer Programming framework for Nurse Scheduling

Abstract
In this paper, a nurse-scheduling model is developed using mixed integer
programming model. It is deployed to a general care ward to replace and
automate the current manual approach for scheduling. The developed model
differs from other similar studies in that it optimizes both hospitals
requirement as well as nurse preferences by allowing flexibility in the
transfer of nurses from different duties. The model also incorporated
additional policies which are part of the hospitals requirement but not part of
the legislations. Hospitals key primary mission is to ensure continuous ward
care service with appropriate number of nursing staffs and the right mix of
nursing skills. The planning and scheduling is done to avoid additional non
essential cost for hospital. Nurses preferences are taken into considerations
such as the number of night shift and consecutive rest days. We will also
reformulate problems from another paper which considers the penalty objective
using the model but without the flexible components. The models are built using
AIMMS which solves the problem in very short amount of time.

A Flexible Mixed Integer Programming framework for Nurse Scheduling

Murphy Choy
Michelle Cheong

Abstract

In this paper , a nurse -scheduling model is developed using mixed integer programming model .

It is deployed to a general care ward to replace and automate the current manual approach for
scheduling . The developed model differs from other similar studies in that it optimizes both
hospital’s requirement as well as nurse preferences by allowing flexibility in the transfer of
nurses from different duties. The model also incorporated additional policies which are part of
the hospital’s requirement but not part of the legislations. Hospital ’s key primary mission is to
ensure continuous ward care service with appropriate number of nursing staffs and th e right
mix of nursing skills . The planning and scheduling is done to avoid additional non essential
cost
for hospital . Nurses’ preferences are taken into considerations such as the number of night
shift
and consecutive rest days. We will also reformulate problems from another paper which
considers the penalty objective using the model but without the flexible components . The
model s are built using AIMMS which solves the problem in very short amount of time .

Introduction

Nurse scheduling is a multi -objective problem . Systematic approach for nurse allocation is
needed to ensure continuous and adequate level of patient care services while maintaining the
legislative requirements as well as internal policies. This problem becomes complex when
addi tion factors such as patient admission, nurse qualifications or license to practice, type of
disease as well as unforeseen accidents. The personal needs of the nurses such as vacation or
work shift preferences add a new dimension to the scheduling problem. The need to balance all
the various dimension of the problem makes nurse scheduling a particularly daunting manual
task.

The schedul e should specify the day -to-day sh ift assignments for every nurse in a specified
time
horizon which satisfy the requirements. It should attempt to be fair in terms of the distribution
of shifts and satisfy the needs of the nurses. There are various grades of nurses ranging from
registered nurse to junior nu rse. Some the nurses might be trained to manage certain medical
conditions or skilled in certain area such as intensive care. Due to the varied trainings and
specializations, certain type of nurses has to be staffed for wards requiring those skills. These
varied conditions cause manual nurse scheduling to consume a significant amount of time. Even
when the schedule has been planned manually, it does not necessarily guarantee the fairness of
distribution o f work such as the number of night shifts or weekend shifts . While the nurses
might have indicated their preferences, the planner might not have taken all these into
consideration resulting in poorly designed schedules which has to be modified by the nurses
swapping duties or working under undesired conditions. Occasionally, the plans did not attempt
to efficiently utilize the manpower properly.

The flexible mixed integer programming model attempts to develop a simple approach to the
nurse scheduling problem by modifying the nursing scheduling problem into a linear form
which can be solved by a variety of solvers in Excel. The model also attempts to enforce fairness

and incorporate the nurses’ preferences to maximize the perceived equa lity and morale .

There are several sections to the paper. In the next section, we will review the existing
literature. The mixed integer model will be covered in section 3 where nursing policies,
legislation, human resource policies and nursing preferen ces will be described. The various
policies and constraints will then be constructed as mathematical forms which can then be used
in the formulation. In Section 4, we will discuss the results, conclusion and future directions in
research.

Literature revi ew

Nursing scheduling has been widely studied since 1960s. Prior to the development of
mathematical programming, most nursing scheduling approaches were based on cyclical
modeling. Cyclic models consist of regular patterns which can be rotated across multiple time
periods. The pattern will only repeat after one cycle. These types of models are highly repetitive
and regular. Even though such models are considered to be fair in terms o f distribution of work ,

the modeling process ignores the preferences of the nurses. Howell’s approach (1966) provides
the first cyclical scheduling approach which takes into considerations the behavior and
preferences of the individual nurse. Subsequently, nurse scheduling began to adopt heuristic
models which are able to consider all the requirements at the planning stage (Maier -Rothe and
Wolfe, 1973 ; Isken and Hancock, 1991 ). This enables the models to attempt satisfying all the
requirements. The developm ent of mathematical programming also gave rise to various
approaches to solving the nurse scheduling problem especially the non -cyclical problem
(Harmeier, 1991; Ozkarahan, 1989; Ozkarahan, 1991 ; Tobon, 1984 ; Warner, 1976b ).

Literature involving e xact algorithms usually consider simplified scenario such as cyclic
models
which are not realistic while heuristic approaches can result in serious solution feasibility issues.

Such issues can lead to labor grievance. In certain situations , the solution derived heuristically
may be suboptimal . Most heuristic solutions are dependent on the environment and it cannot
be deployed effectively over multiple scenarios. One of the major problems of nurse scheduling

problem is the potential size of the set of individual schedules. Given that D is the number of
days to be planned and a ny nurse can be assigned to S different shifts each day, then an order
of DS schedules will be evaluated for a nurse. Most s olution s using the integer/mixed
generalized linear prog ramming approach involve s a linear relaxation of the master problem
and an integer or mixed solution search procedure. In Jaumard et.al.(1998), the generalized
model involves the generalization of the various conditions and constraints in nurse scheduling
problem. Many critical conditions and constraints were listed in the paper such as the
preference of allocation, allocation of specialty and others. In the subsequent section, we will
expand on the constraints and conditions in Jaumard et. Al. to incorporate flexibility in nurse
allocation by ward and skill specialty.

The general model

The general form of the nurse scheduling problem takes the form of either a maximization
problem (in the case of nurse preferences) or a minimization problem (in the case of nurse
costs ). Before we formulate the objective function, let us first declare the various sets and
parameters that will be used in the formulation .

Sets of Values

S Shifts of the day (1 – AM, 2 - PM, 3 - MN)


N Nurse
D Days of the planning horizon
L Leave
M Demand
O Supply
P Preference
C Cost
E No of duties required
S1 Specific set S 1
..
..
..
Sn Specific set S n

Parameters

Xnsd… Assignment for nurse n , shift s of day d (with S 1, … ,S n)


Pnd… Leave for nurse n for day d (with S 1, … ,S n)
Pnsd… Preference for nurse n, shift s of day d (with S 1, … ,S n)
Cnsd… Cost for nurse n, shift s of day d (with S 1, … ,S n)
Msd… Demand for shift s of day d (with S 1, … ,S n)
Osd… Supply for shift s of day d (with S 1, … ,S n)
Ens… No of s hifts for nurse n for shift s (with S 1, … ,S n)

Thus the objective function can be declared as below

or

In the case of penalized objective functions, they can be declared in the following form s.
In all the cases above, the decision variable X n…sd is defined as below.

The above formulation will be used in the subsequent sections which define the constraints of
the model.

Nursing policies

Nurses of various specialty and seniority are needed for different types of ward. Any nurse
schedule produced must satisfy the standard constraints such as regulations, req uirements of
the special wards and ensuring that the leave plans of the nurses are met. Ot her constraints
may include avoidance of shifts which are assigned too close together (e.g. afternoon shift
followed by morning shift the next day), nurses -ward gender mis-match . In selected literature
s,
there are discussions about the ability of the senio r nurses covering the junior nurses
(Dowsland, 1998; You, Yu and Lien, 2010), this discussion will be incorporated into the general
model . Most of the nursing policies constraints are legal requirements or industry adopted
standards.

The first key constr aint is the shift constraint. Any nurse is allowed to work no more than a
single shift per working day.

This constraint ensures that no nurse is forced to work multiple shifts in a day. If there are any
nurse working multiple shifts in a day, than the nurse will not receive sufficient rest which is
undesirable and potentially dangerous . At the same time, there is minimum number of rest
days that any nurse is entitled to. This constraint i s known as the minimum rest day s constraint.

The number of rest days for a schedule of d days can be expressed as the complement of the
maximum number of y working days for any period of d days .

The constraint enforces proper rest days for the nursing staffs which is necessary for their
individual well being. However, this constraint alone is insufficient to enforce proper amount of
rest as it only prescribe s the number of days to rest . The sched ule might arrange the work in
such a way that the nurse have to work almost continuously within the d days period. To
prevent this, an additional constraint is needed to limit the maximum consecutive number of
working days. This constraint is known as the maximum consecutive work days constraint and
is
used together with the C2 constraint for enforcement of rest days .

Given any K consecutive work days within the d days period , there must be at least 1 rest day.

This constraint is developed further should the consecutive work days comprises of night
shifts.
Under most legislations, after i consecutive night shifts, there must be at least 1 sleep day and h
rest day (equivalent to 1+h rest days, but only the h rest day s will be counted towards legally
required rest day ).

Where

This constraint manifest s in two separate forms. The first form enforces the start of the
mandatory rest day for continuous night shifts. The second form enforces the maximum
num ber of continuous night shifts which is usually a variation of the C2 but applied to night
shifts with additional rest day requirements .

Annual leaves and training leaves are usually mandatory and forms part of the hospital’s
policies on human resource management as well as personal development and well being. At
the same time , the leave policies mandate that any leaves must be approved unless there are
extenuating circumstances. The leave constraint is defined as below.

For nurse n who has applied for leave on day d ,

Where S 1,…, Sn represent other peripheral requirements.

One special case of consecutive day constraint is the MN – AM constraint, which is also known
as the night – morning shift problem. As the night shift belongs to the previous day and the
morning shift in the new day, the previous constraints does not prevent this scenario fro m
happening. As such consecutive shifts are not permissible legally; we need to have an additional

constraint for this.

Consecutive shifts Night -Morning are not permitted in the schedule.

Where and

In most countries, the wards are required to be staffed with a certain number of nurses that is
determined by the number of patient in the ward. Should the number of patients be very low,
there are requirements that the wards are staffed with minimal staff s. The nurses will normally
need to be trained in the specialty of the ward if it is a special class ward and there are
allocated minimum number of nurse of certain ranks. The allocation of nurses can be affected
by other factors such as gender as well as language proficiency especially for hospitals with
international patients. To simplify the requirements, we will generalize the requirement
constraints.

The number of nurses in a ward must satisfy the following constraint,

Where S 1,…, Sn represent other peripheral requirements.

Because senior nurses with specialty training can operate as normal nurses, in certain cases, C8
may be modified slightly to carter for nurses with specialty training and rank to be deployed to
other wards to cover shortages of nurses.

Where nurses with t+1 specialty in ward w+1 can be transferred to work in ward w with
specialty t nurses. The last key constraint is the number of shifts that a nurse needs to work.
There are specified numbers of shifts that a nurse has to work and they need to be satisfied.
All the constraints discussed so far are mandatory in most hospitals as they are prescribed by
the government as well as the industry standards. In the next section, we will discuss about the
other types of constraints which are not mandatory but helps to improve the usability of the
schedule.

Hospital and Nurse Preferences

Certain constraints are good to have but not mandatory. Most of the constraints are developed
to meet the preferences of the nurses as well as maintaining the operational level of the wards.
The hospital s do not wish to have schedules with excessive number of rest days which impacts
the number of nurses that can be activated without concerns on rest days . On the other hand,
most nurses do not enjoy the situation where they have to report to work in the mor ning for
the next day after working afternoon shifts for the current day. The constraints below are the
most common ones.

1. An afternoon shift should not be followed by a morning shift the next day.
2. Three or four consecutive night shifts are not preferred.

Managing such constraints can be difficult as they are not always mandatory and often they are
preferences. To manage these constraints, we will derive two versions of the constraints. The
first version assumes that these are hard constraints while the s econd version considers them
as penalties on the objective functions.

For the case of afternoon shift being followed by a morning shift, the hard constraints can be
formulated as below.

Where and

The objective function can be formulated to the following to incorporate the penalty in the
form of a soft constraint . Before, we can do that, we need to declare the penalty variable Z.

Zkv… Penalty for assignment result of k and v

Where

Using declaration, we can then impose the penalty on the objective function
For the case of reducing multiple night shifts , the hard constraints can be formulated as below.

Where is the maximum number of night shifts which is considered acceptable and mee ts
the preference of the nurse s. The constraint can also be incorporated into the objective
function as a penalty value . To achieve that, we need to declare the penalty variable Z.

Zv1,v2…,vn Penalty for assignment result of

Where

Where the penalty parameter takes the following form ,

Given the generalization of the nu rsing model, we will prepare an example of a general ward in
a hospital. We will demonstrate the applicability of the general model to the problem and how
it can be implemented in AIMMS.

Model building in AIMMS : A general ward example

The ward requires a schedule involving 20 nurses over a 2 -week period for the general care .
In
this example, we use the case of 20 nurses with rank requirements for a single ward for a 14 -
day schedule. The nursing requirement stipulates that the senior nurse can cover the duties of
the junior nurse but no vice versa . All the nursing policies constraints defined in the earlier
section are implemented. We will also incorporate the nurses’ general preference in the
calculation of the total utility .

Sets of Values

S Shifts of the day (1 – AM, 2 - PM, 3 - MN)


N Nurse
D Days of the planning horizon
R Rank of Nurse
L Leave
M Demand
O Supply
P Preference
C Cost

Parameters

Xnrsd Assignment for nurse n, rank r and shift s of day d


Lnrd Leave for nurse n, rank r for day d
Pnrsd Preference for nurse n, rank r and shift s of day d
Cnrsd Cost for nurse n, rank r and shift s of day d
Mrsd Demand for rank r and shift s of day d
Orsd Supply for rank r and shift s of day d

Thus the objective function can be declared as below

In all the cases above, the decision variable X nrsd is defined as below.

Below are the various constraints that need to be satisfied . The number of permissible shift in a
single day is 1.

The maximum number of working days for a schedule of 14 days is 11 working days.

The number of rest days for a schedule of 5 days has a maximum number of 4 working days.

Under the legislations, given 3 consecutive night shifts, there must be at least 1 sleep day and 1
rest day .
The nurse cannot work on any days that she has applied for leave or assigned training leave .

Consecutive shifts in the form Night -Morning shifts are not permitted in the schedule under the
legislation.

Where and
The number of nurses in general ward must satisfy the following constraint,

As the senior nurses can cover the duties of the junior nurses, the following constraints can be
used for the junior rank demand constraint.

All the nurses are required to fulfill the required number of shifts in a d (14 days) days period.

Using a ll the parameters, constraints as well as variables, we input all the information into
AIMMS as set, parameters, constraints and objective functions. The optim ization was done
using an intel centrino duo laptop.

Screenshot 1: Setup of the variables, parameters and constraints.

Due to the nature of the formulation, the nursing scheduling problem is constructed in a linear
integer programming form. In this case, it can be solved using CPLEX quite easily.

Screenshot 2: CPLEX Solver result .

From the r esults, the problem has been solved in 1.92 seconds which is extremely fast. At the
same time, we can observe that solution is cons idered optimal by the software. Repeats of the
optimization indicate that the solution can be found in less than 2 seconds fo r most of the time.
AIMMS produces the result in a simple form that can be used by the nurses directly.
Model building in AIMMS: Li et. Al., 2003

The nurse scheduling problem as defined by Li et. Al. (2003) prepares a simple schedule
involving 2 7 nurses over a 1-week period for the general care. In this example, there are neither
rank requirements nor ward requirements for a 7 -day schedule. The nursing requirement
stipulates that there can only be 1 night shift with a maximum of shifts in the 7 da ys period .
Due to the nature of the problem, only certain applicable nursing policies constraints defined in
the earlier section are implemented. The problem is formulated as cost problem as opposed to
a utility problem. Each nurse has a cost attached to t hem which can be reduced by assigning
them to duties which they have indicated their preferences.

Sets of Values

S Shifts of the day (1 – AM, 2 - PM, 3 - MN)


N Nurse (27)
D Days of the planning horizon (7)
L Leave
M Demand
O Supply
P Assigned Cost
C Cost

Parameters

Xnsd Assignment for nurse n, shift s of day d


Lnd Leave for nurse n for day d
Pn Assigned Cost for nurse n
Cnsd Cost for nurse n, shift s of day d
Msd Demand for shift s of day d
Osd Supply for shift s of day d

Thus the objective fu nction which involves cost is declared as below

In all the cases above, the decision variable X nrsd is defined as below.

The number of permissible shift in a single day is 1.


The maximum number of working days for a schedule of 7 days is 5 working days.

The maximum number of working night shifts for a schedule of 7 days is 1 days.

Where

The nurse cannot work on any days that she has applied for leave or assigned training leave.

Consecutive shifts in the form Night -Morning shifts are not permitted in the schedule under the
legislation.

Where and

The number of nurses in general ward must satisfy the following constra int,

Where

Using the information , we input all the information into AIMMS as set, parameters, constraints
and objective functions. The optimization was done using an intel centrino duo.

Screenshot 1: Setup of the variables, parameters and constraints.

The nursing scheduling problem is constructed in a linear integer programming form which can
be solved using MOSEK quite easily.

Screenshot 2: MOSEK Solver result .


From the results, the problem has been solved in 0.89 seconds which is extremely fast.
However the solution is considere d sub-optimal as compared to the results produced by Roster
Booster which contains the original implementation of the solution (Li et. Al., 2003) . This may
be due to the nature of the problem which is better served by the algorithm designed to solve
the pr oblem. Repeats of the optimization indicate that the solution can be found in less than 2
seconds for most of the time.

Conclusion and future directions

We have developed a flexible linear integer programming model for nurse scheduling. The
model incorporated the general constraints required. The resulting schedule includes balanced
schedules in terms of the distribution of shift duties, fairness in terms of the number of
consecutive night duties and the preferences of the nurses. This is an improvement over the
traditional manual approach which is costly in terms of labor as well as inefficient in producing
a good schedule .

The flexible linear integer pr ogramming model allows for simple implementation in
mathematical programming program easily. Due to the formulation of the problem, the linear
nature allows for the application of solvers which are extremely efficient at solving such
problems. Given that t he nurse scheduling problem is considered by many to be a NP hard
problem, the ability to solve it using a linear mathematical solver makes it easier to implement
an automated approach. In this regard, the model makes it a practical computerized tool. The
model is also generalized to a degree where it is possible to extend it to incorporate various
new constraints and preferences.

The future direction of this work involves the building and solving of the model using open
source solvers which makes it easi er for the hospitals to use. At the same time, there are
certain requirements and constraints which might not have been captured in the constraints
developed. With the evolving legal frameworks, there remain the possibilities of new legal
requirements for the nurse scheduling problem which will need to be formulated to
incorporate into the model. The current model also considered only two major preferences of
the hospital and nurses which might not be the case in other circums tances given the variations
in human preferences. Nevertheless, the general form has made provisions for the extension of
the model should the need ever arises.

References

Dowsland K. (1998). “Nurse Scheduling with Tabu Search and Strategic Os cillation”. European
Journal of Operational Research
393-407.
Harmeier PE. Linear programming for optimization of nurse scheduling. Computers in Nursing
1991;9(4):149 –51.

Howell JP. Cyclical scheduling of nursing personnel. Hospitals 1966;40:77 –85.

Isken MW, Hancock WM. A heuristic approach to nurse scheduling in hospital units with non -
stationary ,urgent demand , and a
fixed staff size . Journal of the Society for Health Systems 1991;2(2):24 –40.

Jaumard, B., F. Semet and T. Vovor (1998). A generalized linear programming model for nurse
scheduling. European Journal of
Operational Research, 107, 1 -18.

L. Trilling, A. Guinet, D. Le Magny, "Nurse scheduling using integer linear programming and
constraint programming", A
Proceedings volume from the 12th IFAC International Symposium, Saint -Etienne, France, 17 -
19 May 2006, Elsevier, Elsevier ,
Volume 3, Saint -Etienne, France, p.651 -656.

Li, H., A. Lim, and B. Rodrigues, A hybrid AI approach for Nurse rostering problem, Ž in
Proceedings of the 2003 ACM
Symposium on Applied Computing, ISBN 1 -58113 -624-2, 2003, pp. 730 …735.

Maier -Rothe C, Wolfe HB. Cyclical schedulin g and allocation of nurs ing staffs . Socio -
Economic Planning Science 1973;7:471 –87.

Ozkarahan I. An integrated nurse scheduling model. Journal of the Society for Health Systems
1991;3(2):79 –101.
1976a;21(3):77 –90.

Ozkarahan I, Bailey JE. Goal programming model subsystem of a Fexible nurse scheduling
support system. IIE Transactions
1988;20(3):306 –16.

Ozkarahan I. A Eexible nurse scheduling support system. Computer Methods and Programs in
Biomedicine 1989;30(2/3):145 –53.

Tobon Perez MV. An integrated methodology to solve staf fing, scheduling and budgeting
problems in a nursing department.
Ph.D. dissertation, University of Pittsburgh, 1984.
Trivedi VM. A mixed -integer goal programming model for nurse service budgeting. Operations
Research 1981;29(5):1019 –34.

Warner DM. Nurse staffing, scheduling, and reallocation in the hospital. Hospital and Health
Services Administration
1976a;21(3):77 –90.

Ying -Shiuan You, Tian -Li Yu, and Ta -Chun Lien. (2010). Psychological Preference -based
Optimization Framework: An
Evolutionary Computation App roach for Constrained Problems Involving Human Preference .
Master Thesis, TEIL Working paper.

You might also like