33
1 Nurse Rostering with CARE. Jonathan Thompson 1 , Kath Dowsland 2 & Bill Dowsland 2 . 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides & Adobe PDF copies of published academic papers: http://www.goweralg.co.uk/talks/ Details of the CARE software: http://www.goweralg.co.uk/CARE/

1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

Embed Size (px)

Citation preview

Page 1: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

1

Nurse Rostering with CARE.

Jonathan Thompson1, Kath Dowsland2

& Bill Dowsland2.

1. Cardiff University

2.Gower Optimal Algorithms Ltd.

These slides & Adobe PDF copies of published academic papers: http://www.goweralg.co.uk/talks/

Details of the CARE software: http://www.goweralg.co.uk/CARE/

Page 2: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

2

Outline

• The problem

• A quantitative model

• Solution approach

• Performance quality and flexibility.

Page 3: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

3

The problem.

To produce weekly schedules of work for all nurses on the ward so that:

• minimum covering requirements are met

• nurses’ preferences and requests are considered

• schedules are deemed to be fair

Page 4: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

4

The day:

A day is made up of 3 shifts:

• earlies (7.5 hour day)

• lates (7.5 hour day)

• nights (9.5 or 9 hour night)

Nurses work either a whole week of days (usually a mixture of earlies and lates) or a whole week of nights.

Page 5: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

5

Types:

A full-time nurse works 5 days or 4 nights.

Part-timers work other combinations

e.g. (4,3), (3,3), (3,2).

Sickness, leave and study days yield yet more combinations.

Page 6: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

6

Grades:

There are 3 grade bands.

Covering requirements are given cumulatively for each band.

For example

Grade G+ 2

Grade E/F 4

Grade D 8

Page 7: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

7

Page 8: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

8

Page 9: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

9

Each nurse type defines a set of feasible shift patterns.

A full time nurse defines 21*25 feasible day patterns and 35 night patterns. (Amalgamating earlies and lates gives 21 patterns)

Each nurse-pattern pair has a penalty cost given by:

• general quality of pattern

• meeting of requests for days off

• history of patterns worked recently

Patterns:

Page 10: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

10

Pattern cost.

A cost of 0,1,2 or 3 depending on the desirability of the pattern.• Good features include consecutive days off, nights

without a gap.

• Bad features include on/off/on/off etc.

Default pattern costs can be overwritten for an individual nurse.

Some preference for early or late but less important.

Page 11: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

11

Request cost.

Request are graded into 5 classes• Essential. • Top priority 18

• High priority 12

• Medium priority 8

• Low priority 3

Where requests for the following week are available their consequences are included in this weeks costs

Page 12: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

12

History cost.

Based on the previous 3 weeks and ensures compliance with working practices and fairness. • Patterns exceeding successive day limit banned.

• Patterns resulting in on/off/on/off penalised

• Decreasing penalty for recent weekend/night working

• Increased penalty this week if undesirable shift last week.

Can be overridden with respect to specific contracts.

Page 13: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

13

Where.xij = 1 if nurse i works pattern j, = 0 otherwise.

pij is the penalty associated with nurse i working pattern j

F(i) is the set of patterns feasible for nurse i.ajk = 1 if pattern j covers shift k

Gr is the set of nurses of grade-band r or above

R(k,r) is the minimum acceptable number of nurses of grade r or above for shift k.

)4(1or 0

)3(,),(

)2(1..

)1(min

)(

)(

1 )(

ij

iFjijjk

Gi

iFjij

n

i iFjijij

x

krrkRxa

ixts

xpz

r

Formulation.

Page 14: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

14

Why heuristic?

• Large number of variables

• I.P. approach would need ‘advanced’ options

• Solution to be implemented on each ward

• Possible changes in problem specification

• Requirement for a set of different solutions

BUT

Page 15: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

15

Potential problems.

• Problem may not be feasible (call in bank nurses).

• Large solution space (early/late allocation just fine-tuning).

Solution.• Preprocessing with a knapsack model to determine

over/under covering and invite response

• Postprocessing with a network flow model to allocate earlies/lates to those working days.

Result.

• Heuristic can focus on difficult part of problem.

Page 16: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

16

)8(integer

)7(,1

)6(..

)5(

11

1

i

ii

T

iii

T

iii

T

iii

y

TiNy

DdNydts

yeMax

Let E and D be the number of night and day shifts required,

ei and di the number of nights and days worked by a nurse of type i,

and Ni the number of nurses of type i available.

Then the problem is feasible if there is a set of integer variables y i such that:

The knapsack model.

is at least E.

This is a standard bounded knapsack problem and can easily be solved using a straightforward branch and bound algorithm.

The model / solution process can be modified to include grades.

Page 17: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

17

Nurses Days

LB = min. earliesUB = max. earliesCost = 0

LB = req. earliesUB = tot-req. lates. Cost = 0

LB = 0UB = 1Cost = penalty for early, - penalty for late

The network model.

This model can easily be adapted to deal with grades and to balance the earlies/lates for each nurse.

Page 18: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

18

LB = 0UB = max. earliesCost = penalty

Relaxing balance

LB = 0UB = di – max earlies

Cost = penalty

Page 19: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

19

From grade 1 nurses

From grade 2 nurses

From grade 3 nurses

LB, UB based on grade 1

LB, UB based on grade 2

LB, UB based on grade overall reqs

Adding grades

Page 20: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

20

Local search framework

Solution space: feasible solutions

Neighbourhood move: change the shift pattern of a single nurse

Cost: sum of pij penalty values.

Page 21: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

21

Potential problems with solution landscape.

• Disconnected or sparsely connected regions (as many moves violate covering restrictions)

• Plateau-like areas (as many patterns have similar costs)

• Valleys separated by high ‘mountains’ (due to day/night balance)

Solutions.

• Relaxation of covering constraints when necessary using strategic oscillation.

• Intelligent use of variable neighbourhoods.

• Intelligent diversification using tabu lists and frequency based criteria to change day/night allocation.

Result.

• Aggressive search process that is able to seek out good local optima within very fast computing time.

Page 22: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

22

Shift-Chain Move

• Nurse 1 1111100

• Nurse 2 0110101

• Nurse 3 1011101

• Days 3 and 5 have too many staff, day 6 has 2 too few staff

• Changing individual shifts increase penalty costs.

• Nurse 1 0111110 Nurse 2

1010101 Nurse 3

1101101

Instead, we

change chains of shifts.

Page 23: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

23

Nurse-Chain Move

• Nurse 1 1111100 0000000

• Nurse 2 0000000 0111100

• Nurse 3 1101101 0000000

• Days 3 and 5 have too many staff, day 6 has 2 too few staff

• Changing individual shifts increase penalty costs.

• Nurse 1 1101101 0000000 Nurse 2 1101110 0000000 Nurse 3 0000000

0111100 Instead,

we change chains of nurses

Page 24: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

24

Phase 1 moves.

neighbour-

hood

candidate list evaluation

function

selection

1 standard no PC

increase

CC first decrease

2 standard balance

restoring

CC best

3 shift-chain all PC first non-

increasing

4 nurse-chain all PC first non-

increasing

5 standard over to

under

CC best

6

standard all - first

Phase 2.

Reduce preference cost while remaining feasible.

Random descent over 3 neighbourhoods.

neighbour-

hood

candidate list evaluation

function

selection

1 standard no CC

increase

PC first decrease

2

shift-chain all PC first decrease

3

nurse-chain all PC first decrease

When a local optima is reached a single phase 3 move

reduces the penalty cost at the expense of covering cost.

Page 25: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

25

0

20

40

60

80

100

120

0 50 100 150

Optimal

Mea

n

10 optimal (41)

9 optimal (4)

7 optimal (5)

6 optimal (1)

Optimal v. mean penalty cost over 10 random starts

Page 26: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

26

Changes to specification.

Change:

Two most highly qualified nurses to work at most one w/e shift.

Solution:

Treat as a covering constraint. In general this would restrict the flexibility of the larger neighbourhoods but is OK because only a small number of nurses involved.

Change:

Introduction of contracts to work both days and nights in a single week.

Solution:

Add to pattern base and adjust knapsack model to account for these nurses.

Page 27: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

27

Changes to specification (cont.).

Change:

‘Earlies’ covering requirement often for preferred cover. Real requirement to cover as many days (sometimes with preference for certain days) with this cover and the remainder with one less.

Solution:

Use the knapsack pre-processor to calculate the number of days where preferred cover is possible. Introduce a ‘dummy’ nurse to cover the remainder and allocate patterns to meet any preferences between days.

Page 28: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

28

Changes to specification (cont.).

Change:Nurses allocated to one of 2 teams. At least one nurse from each team required to be on duty at all times.Note: Including this constraint as a covering constraint would severely restrict the power of the larger neighbourhoods.

Solution:Include in the moves using the basic neighbourhood only and ignore violations elsewhere. Because the combination of aggressive downhill pressure and diversification ingredients ensure that many good local optima are visited this is sufficient to nudge the search towards optimal solutions that also satisfy the team constraint.

Page 29: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

29

Summary

• A combination of a knapsack pre-processor, network post-processor and a tabu search algorithm with intelligent use of strategic oscillation, variable neighbourhoods and frequency based diversification has resulted in a powerful solution tool.

• Many additional objectives and constraints can be incorporated with minimal additional development.

• Where this is not possible the ability of the search to seek out many good local optima means that solutions satisfying additional objectives and constraints are likely to be found quickly and easily.

Page 30: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

30

CARE in the ‘community’• Developed by academics and successfully implemented in

several wards of a major UK hospital.

• Proven over a period of many months to be adaptable to the changing requirements encountered in the practical environment.

• Able to be operated by appropriate nursing / administrative staff and to produce good schedules from both operational and nursing perspectives.

• Has been subjected to extensive further testing on practical and artificially generated data sets – proving the power and adaptability of its algorithmic core.

• Details published in articles in leading scientific journals.

HOWEVER!

Page 31: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

31

CARE in the ‘hospital’

The original version of CARE had a strong algorithmic basis that was flexible enough to solve the REAL problem.

But lacked:

• A full modern Windows interface.

• Customer support by a proven software company.

• Platform independent operation.

• Marketing support.

In recent months the software interface has been re-written to incorporate enhancements to the algorithms, interface and operating environment.

Page 32: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

32

CARE in the future.• Gower Optimal Algorithms Ltd: for 20 years involved

in the commercial implementation of OR techniques in logistics & scheduling.

• We intend, in partnership with the original developers, to further develop the ideas & techniques described for this together with other scheduling / rostering problems.

www.goweralg.co.uk/CARE/

Page 33: 1 Nurse Rostering with CARE. Jonathan Thompson 1, Kath Dowsland 2 & Bill Dowsland 2. 1. Cardiff University 2.Gower Optimal Algorithms Ltd. These slides

33

These slides & Adobe PDF copies of published academic papers:

http://www.goweralg.co.uk/talks/

Details of the CARE software: http://www.goweralg.co.uk/CARE/