Constraint Optimization For Nurse Rostering Using Particle Swarm Optimization With Global Optimum Test Function.
BORANG セengsah@
STATUS TESIS*
JUDUL: CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING PARTICLE
SWARM OPTIMIZATION WITH GLOBAL OPTlMUM TEST FUNCTION
SESI PENGAJIAN: 2001 I 2012
Saya ________________セnorazャエbjtilM@
(HURUF BESAR)
mengaku membenarkan tesis (PSM/Sarjana/Doktor Falsafah) ini disimpan di Perpustakaan
Fakulti Teknologi Maklumat dan Komunikasi dengan syarat-syarat kegunaan seperti berikut:
l. Tesis dan projek adalah hakmilik Universiti Teknikal Malaysia Melaka.
2. Perpustakaan Fakulti Teknologi Maklumat dan Komunikasi dibenarkan membuat salinan
untuk tujuan pengajian sahaja.
3. Perpustakaan Fakulti Teknologi Maklumat dan Komunikasi dibenarkan membuat salinan
tesis ini sebagai bahan pertukaran antara institusi pengajian tinggi.
4. usila tandakan(/)
I
SULIT
(Mengandungi
maklumat
yang
berdarjah
keselamatan atau kepentingan Malaysia seperti
yang termaktub di dalam AKTA RAHSIA RASMI
1972)
TERHAD
(Mengandungi maklumat TERHAD yang telah
ditentukan oleh organisasi/badan di mana
penyelidikan dijalankan)
TIDAK TERHAD
(TANDAT ANGAN PENULIS)
Alamat tetap: No. 38C, Kg Ulu Ladang,
(TANDA TANGAN PENYELIA)
NUZULHA KHILWANI BT ffiRAHTM
73400 Gemas, N.Sembilan.
Tarikh: _ _ _. :. 1セP@ セo]gZNsRPQM
CATATAN:
Nama Penyelia
Tarikh:
3o/S /l'J.
----------------
• Tesis dimaksudkan sebagai Laporan Akhir Projek Sarjana Muda (PSM)
•• Jika tesis ini SULIT atau TERHAD, sila lampirkan surat daripada pihak
berkuasa.
© Universiti Teknikal Malaysia Melaka
CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING PARTICLE
SWARM OPTIMIZATION WITH GLOBAL OPTIMUM TEST FUNCTION
NORAZIRA BINTI A JALIL
This report is submitted in partial fulfillment of the requirements for the Bachelor of
Computer Science (Artificial Intelligence)
FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGY
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
2012
© Universiti Teknikal Malaysia Melaka
DECLARATION
I hereby declare that this project report entitled
CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING
PARTICLE SWARM OPTIMIZATION WITH GLOBAL OPTIMUM TEST
FUNCTION
is written by me and is my own effort and th:at no part has been plagiarized
without citations.
Date: 10 AUGUST 2012
STUDENT
e.
(NORAZIRA BINTI A JALIL)
SUPERVISOR:
Date:
•
(NUZULHA KHIL W ANI BINTI IBRAHIM)
© Universiti Teknikal Malaysia Melaka
,3()
I& iセ@
Ill
DEDICATION
To my beloved parents, A Jalil Bin Aman and Normah Binti Salleh, for their expression
of love and fully support.
To my supervisor, Miss Nuzulha Khilwani Binti Ibrahim, thank for making it all
worthwhile.
© Universiti Teknikal Malaysia Melaka
iv
ACKNOWLEDGEMENTS
One above all of gratitude, the omnipresent God, for answering my prayers for giving
me the strength to plod on despite my constitution wanting to give up and throw in the
towel, thank you so much Dear Allah.
I am heartily thankful to my supervisor, Miss Nuzulha Khilwani Binti Ibrahim, whose
encouragement, supervision and support from the preliminary to the conclusion level
enabled me to develop an understanding of the subject. This research would not have
been possible unless Miss Nuzulha, assisted me on the idea of developing this constraint
optimization system.
I am grateful to my parents who have given me a full support for the encouragement,
inspiration and patience which they provided at every step during this course of studies.
I would also like to thank my classmates for making this study a wonderful experience.
Besides that, I would like to thank my friends that have accessed to my system and
giving me valuable and sincere comments.
l owe my deepest gratitude to my friends, for making this study a wonderful experience.
Besides, I would like to thanks them for their valuable and sincere comments for my
work. Lastly, I offer my regards and blessings to all of those who supported me in any
respect during the completion of this research.
© Universiti Teknikal Malaysia Melaka
v
ABSTRACT
The decision making in assigning all nursing staffs to shift duties in a hospital
unit must be done appropriately because it is a difficult task due to various requirements
and constraints that need to be fulfilled. The shift assignment or also known as roster has
a great impact on the nurses' operational circumstances which are strongly related to the
intensity of quality of health care. The head nurse usually spends a substantial amount of
time developing manual rosters, especially when there are many staff requests. Yet,
sometimes she could not ensure that all constraints are met. Therefore, this research
identified the relevant constraints being imposed in optimizing the nurse rostering
problem and examined the efficient method to generate the nurse roster based on
constraints involved. Subsequently, as part of this research, we use a Particle Swarm
Optimization (PSO) to solve this problem. The proposed PSO technique is evaluated for
its efficiency, where 50 samples of rosters generated were taken for analysis. The
feasible solutions were evaluated based on their minimum penalty values. The penalty
values were given based on different violations of soft constraints. The PSO technique is
able to optimize the soft constraints as much as possible.
© Universiti Teknikal Malaysia Melaka
vi
ABSTRAK
Tugas dalam menentukan pembahagian kerja bagi setiap jururawat dihospital
hendaklah dilaksanakan dengan sebaiknya kerana
ianya perlu mengikut pelbagai
kehendak dan kekangan yang telah ditetapkan oleh pihak pentadbiran hospital. Jadual
pembahagian kerja yang memenuhi kehendak pihak pentadbiran dan jururawat amat
penting dalam melahirkan suasana kerja yang produktif untuk setiap staf. Pada
kebiasaannya, ketua jururawat terpaksa mengambil masa yang lama untuk menyiapkan
sesebuah jadual kerja berikutan terpaksa menyesuaikan kehendak setiap jururawat dan
kekangan yang perlu dipatuhi oleh pihak hospital. Walau bagaimanapun, tidak kesemua
kehendak jururawat dapat dipatuhi dan ini mampu melahirkan perasaan tidak senang
dikalangan staf. Oleh itu, kajian ini sangat bersesuaian untuk mengenalpasti kekangankekangan yang boleh digunakan dalam membina sesebuah jadual kerja. Maka, dalam
kajian ini, penggunaaan teknik Particle Swarm Optimization (PSO) telah digunakan
untuk menyelesaikan masalah. Teknik ini dinilai melalui keupayaannya dengan
menggunakan 50 contoh jadual kerja dan pelbagai jenis kekangan digunakan untuk
dianalisa. Teknik PSO dilihat mampu untuk mengoptimakan kekangan yang ada
sebanyak yang mungkin.
© Universiti Teknikal Malaysia Melaka
TABLE OF CONTENTS
SUBJECT
CHAPTER
CHAPTER I
PAGE
DECLARATION
ii
DEDICATION
iii
ACKNOWLEDGEMENTS
iv
ABSTRACT
v
ABSTRAK
vi
TABLE OF CONTENTS
vii
LIST OF TABLES
xi
LIST OF FIGURES
XII
INTRODUCTION
J•I Project Background
CHAPTER D
1.2 Problem Statement(s)
3
1.3 Objective
3
1.4 Scopes
4
1.5 Project Significance
4
1.6 Expected Output
4
I. 7 Conclusion
5
LITERATURE REVIEW AND PROJECT
METHODOLOGY
2.1 Introduction
6
2.2 Fact and Finding
6
2.3 Project Methodology
10
© Universiti Teknikal Malaysia Melaka
2.4 Project Requirements
II
2.4.1 Software Requirement
II
2.4.2 Hardware Requirement
12
2.5 Project Schedule and Milestones
13
2.6 Conclusion
15
CHAPTER ill ANALYSIS
CHAPTER IV
3.1 Introduction
16
3.2 Problem Analysis
16
3.3 Requirement Analysis
17
3.4 Conclusion
21
DESIGN
4.1 Introduction
22
4.2 High-level Design
22
4.2. J System Architecture
23
4.2.2 User Interface Design
24
4.2.2. I Navigation Design
24
4.2.2.2 Input Design
32
4.2.2.3 Output Design
33
4.2.3 Database design
4.3 Detailed Design
4.3. I Software Specification
4.4 Conclusion
CHAPTERV
33
36
36
38
IMPLEMENTATION
5. I Introduction
39
5.2 Software Development Environment Setup
39
5.3 Software Configuration Management
40
5.3. I Configuration Environment Setup
40
5.3.2 Version Control Procedure
41
© Universiti Teknikal Malaysia Melaka
CHAPTER VI
5.4 Implementation Status
42
5.5 Conclusion
46
TESTING
6.1 Introduction
47
6.2 Test Plan
47
6.2.1 Test Organization
47
6.2.2 Test Environment
48
6.2.3 Test Schedule
49
6.3 Test Strategy
6.3.1 Classes of Tests
6.4 Test implementation
CHAPTER
50
51
53
6.4.1 Test Description
53
6.4.2 Test Data
57
6.5 Test Results and Analysis
58
6.6 Conclusion
60
PROJECT CONCLUSION
VII
7.1 Observation on Weaknesses and Strengths
61
7.2 Propositions for Improvement
62
7.3 Contribution
62
7.4 Conclusion
63
REFERENCES
64
BffiLIOGRAPHY
66
APPENDICES
67
© Universiti Teknikal Malaysia Melaka
XI
LIST OFTABLES
PAGE
TABLE
TITLE
2.1
Minimum hardware requirement
12
2.2
Milestone
13
2.3
Table of Milestone Adivity
14
4.1
User Input Table
32
4.2
Data for soft constraint
34
4.3
Example of tbe combination of soft constraint
34
5.1
Environment Setup
41
5.2
Procedure and Control Source Code Venion
42
of Co-PSO system
5.3
Implementation Status of Co-PSO system
43
6.1
Test Organization for PCs
48
6.2
Hardware and Software Configuration of PCs
49
6.3
Test Schedule for PCs
50
6.4
Software Testing Under Black-box and Wbite-
51
box Strategy
6.5
System Test Description for PCs
© Universiti Teknikal Malaysia Melaka
54
xii
LIST OF FIGURES
FIGURE
TITLE
2.1
Bird flocking inspired the idea of Particle
PAGE
8
Swarm Optimization
2.2
OOAD methodology diagram
10
3.1
PSO Algorithm
19
4.1
Constraint Optimization for Nune Rostering
23
Using Particle Swarm Optimization with
Global Optimum Test Function (Co-PSO)
Architecture
4.2
Main User Interface
24
4.3
User enter the PSO parameter input
25
4.4
'Compute PSO' button for debugging the
26
PSO function
4.5
The resulting graph from the execution of
27
PSO
4.6
'Compute Six Hump' button for testing the
28
result produced from PSO by using Six Hump
Camelback Function
4.7
4.8
4.9
4.10
'Compute Branins' button for testing the
result produced from PSO by using Branins'
Function
'Compute Goldstein' button for testing the
result produced from PSO by using Goldstein
Price Function
'Details' button for viewing the entire plotted
graph
View for the entire plotted graph
© Universiti Teknikal Malaysia Melaka
29
30
31
31
Xlll
4.11
'Reset' button for reset the user interface
32
4.12
33
6.1
Viewing the entire plotted graph for all
functions
Test Result for Co-PSO system
6.2
Another Test Result for Co-PSO system
60
© Universiti Teknikal Malaysia Melaka
59
LIST OF ATTACHMENTS
TITLE
Appendix A Project Source Code
© Universiti Teknikal Malaysia Melaka
PAGE
67
LIST OF ABBREVIATIONS
Co-PSO-
Constraint Optimization for Nurse Rostering using
Particle Swarm Optimization with Global Optimum
Test Function
PSO-
Particle swarm optimization
AI-
Artificial Intelligent
GA-
Genetic Algorithms
LP-
Linear Programming
IP-
Integer Programming
NLP-
Nonlinear Programming
GP-
Goal Programming
SI-
Swarm Intelligence
GCPSO-
Guaranteed Convergence Particle Swann Optimizer
DCPSO-
Dynamic Particle Swarm Optimization Algorithm
RAD-
Rapid Application Development
OOAD-
Object-Oriented Analysis and Design
HOnN-
Hours On Number
DOnN-
Shift Type
DOff-
Day Off
DOnWd-
Days On Most for Weekday
DOnWe-
Days On at Most for Weekend
BA-
Bees Algorithm
RAD-
Rapid Application Development
© Universiti Teknikal Malaysia Melaka
CHAPTER 1
INTRODUCTION
1.1 Project Background
Nurse rostering is a complex scheduUng problem that affects hospital
personnel on a daily basis all over the world. Solving properly the nurse scheduling
problem has a great impact on nurses' working conditions which are strongly related
to nursing quality and working moral. The need to take into account individual
preferences further complicates the process. Thus, to improve nurses' level of
satisfaction, schedules are generated individually for each hospital unit by the nurse
chiefs.
The nurse rostering can be defined as the problem of placing resources or
nurses, subject to constraints, into slot in a pattern, where the pattern denotes a set of
legal shifts defmed in terms of work that needs to be done. Rostering process of
nurses is actually the allocating of nurses to execute their nursing services per shift
per day in a department. The nurse rostering is a set of work and rest days assigned
to each nurse in the planning horizon and must satisfy the entire problem rules and
regulations that apply to the complete roster entity. Through this rostering process,
the nursing services or operation times can be worked out as expected. Rosters are
cyclic prototypes of days off and days on (or shifts-off and shifts-on) that are
allocated as a whole to nurses.
The importance of a systematic approach to create good timetables is very
high, especially in healthcare, where it is unacceptable not to fully support patient
care needs and staff requirements. Periodically, for example daily, pool nurses have
© Universiti Teknikal Malaysia Melaka
2
to be assigned for the following days while considering a variety of soft and hard
constraints regarding working date and time, working patterns, nurses' qualifications,
nurses' and hospital preferences, as well as costs. Thus, optimizing the nurse
scheduling is important to efficiently utilize time and effort, to evenly balance the
workload among people and to attempt to satisfy personnel preferences.
The constraint conditions for nurse scheduling is broad, and may differ from
case to case. Some of the constraint conditions even conflict with each other. For
example, the shift preferences of nursing staff may violate the requirement for shift
fairness. In practice, the nurse chiefs arrange the schedule based on their subjective
experience. In fact, the nurse scheduling issue remains challenging, and the
developments of more sophisticated approach to solve the problem deserve further
exploration.
Particle swarm optimization (PSO) is an evolutionary computation method. It
is a population based random search strategy and an adaptive optimization technique
developed by Dr. Eberhart and Dr. Kennedy in 1995, inspired by social behavior of
bird flocking or fish schooling. Because of the unique search mechanism, excellent
convergence performance and easy realization, the algorithm has obtained rapid
development and has been widely used in many fields since it was proposed.
PSO shares many similarities with evolutionary computation techniques such
as Genetic Algorithms (GA). The system is initialized with a population of random
solutions and searches for optima by updating generations. However, unlike GA,
PSO has no evolution operators such as crossover and mutation. In PSO, the
potential solutions or a set of software agents, called particles, fly through the
problem space and search for a good solutions by following the current optimum
particles.
Compared to GA, the advantages of PSO are that PSO is easy to implement
and there are few parameters to adjust. PSO has been applied to many different
problems and is another example of successful artificiaVengineering swarm
intelligence system. Thus. for this project, the application of PSO in introduced in the
© Universiti Teknikal Malaysia Melaka
3
nurse scheduling to predict the minimum total penalty that will satisfy as many as
possible of a set of soft constraints.
1.2 Problems Statemeot(s)
Nurse scheduling can be considered as a partial constraint satisfaction
problem. The task is to find a consistent allocation of shift values, for a group of
nurses, over a fixed period of time, that satisfy as many as possible of a set of
rostering constraints. There are two basic type of constraint: (i) schedule constraints
defining acceptable shift combinations and (ii) staff constraints defining acceptable
overall staffing levels. Some constraints are hard (must be satisfied) while others are
soft (may be violated). Thus, the best schedule would be the one that minimizes total
penalty for nurse scheduling optimization and produced the best combination of
constraints.
1.3 Objective
Design and development of robust and reliable scheduling algorithms has
been an active research area in Computer Science and Artificial Intelligence. Given
that the general problem is computationally intractable, many heuristic-based
techniques have been developed, while other approaches have used optimizing
techniques for specific and limited problem domains. Therefore, the objectives of
presenting Particle Swann Optimization technique in nurse scheduling are:
I. To investigate the total penalty optimization associated for nurse scheduling
optimization.
2. To model the nurse scheduling optimization usmg Six Hump Camelback,
Branins' and Goldstein Price test functions.
© Universiti Teknikal Malaysia Melaka
4
1.4 Scope
The data collection will only cover the combination of soft constraint and the
penalty assigned for each soft constraint. There will be no suggestion schedule
assigned, but it will concentrate on analyzing the graph produced from the data
collection.
1.5 Project Significance
This project will bring benefits to the hospital management and nurses where
it helps optimize the schedule of nurses' by fulfilling the nurse satisfaction with
optimizing soft constraints while minimizing the penalty that had been assigned. The
roster must be optimize especially to the healthcare organization that consist of many
type of nurses and requirements in their environment to make sure that all the
operation that has been scheduled can work precisely.
By optimizing the nurse scheduling will give enormous impact upon the
working environment. The nurses for sure will give their best performance if they
can work with comfortable environment as much as they want.
1.6 Expected Output
The system should be able to analyze nurse schedule data collection and plot
the graph that corresponds to the data produced. Based on the generated graph, the
analysis can be done to evaluate the corresponding combination of soft constraint
and the optimization value (fitness value) with total penalty assigned.
© Universiti Teknikal Malaysia Melaka
4
1.4 Scope
The data collection will only cover the combination of soft constraint and the
penalty assigned for each soft constraint. There will be no suggestion schedule
assigned, but it will concentrate on analyzing the graph produced from the data
collection.
l.S Project Significance
This project will bring benefits to the hospital management and nurses where
it helps optimize the schedule of nurses' by fulfilling the nurse satisfaction with
optimizing soft constraints while minimizing the penalty that had been assigned. The
roster must be optimize especially to the healthcare organization that consist of many
type of nurses and requirements in their environment to make sure that all the
operation that has been scheduled can work precisely.
By optimizing the nurse scheduling will give enormous impact upon the
working environment. The nurses for sure will give their best performance if they
can work with comfortable environment as much as they want.
1.6 Expected Output
The system should be able to analyze nurse schedule data collection and plot
the graph that corresponds to the data produced. Based on the generated graph, the
analysis can be done to evaluate the corresponding combination of soft constraint
and the optimization value (fitness value) with total penalty assigned.
© Universiti Teknikal Malaysia Melaka
5
1.7 Conclusion
The nurses will get a moral burst to be more efficient in their work as they
will feel treated nicely by the employer by getting the fairness roster. In real life
situation, departmental rostering appear to become more appropriate and more
effective for the high number of nurses with high difficulty of rostering problem. For
the medium size number of nurses, the suitable rostering is team rostering, while the
self-rostering is the less effective rostering to apply in the industries.
Cyclical scheduling is not suitable to be applied among nurse because there
will be no rotation that will lead to the unfairness roster. Non-cyclical scheduling is
the suitable schedule to be practice by the healthcare organization because they work
around the clock.
© Universiti Teknikal Malaysia Melaka
CHAPTER2
LITERATURE REVIEW
2.1 Introduction
In this chapter, the literature part of this research study will be presented and
discussed. This includes the study on the nurse scheduling problem and the
techniques used in the development of scheduling. Some of the optimization
algorithms are discussed and compared in order to justify the choice of Particle
Swarm Optimization (PSO) method. Furthermore, the project methodology will also
be determined and justified its selection. Then followed by the requirement needed to
build the proposed system will also be stated. Lastly, the project schedule and
milestones are planned in order the system can finished in time by following them.
2.2 Fact and Finding
Before starting the analysis and design part of the system, some facts and
findings have to be made so that suitable technique and methodology are chosen.
2.2.1 Existing System
While staff scheduling plays an important role in any company that relies on
shift work, scheduling nurses has its own unique factors that make the problem both
© Universiti Teknikal Malaysia Melaka
7
interesting and complex. As with all businesses, costs must be kept to a minimum
and contractual obligations adhered to. However, in nursing there are other important
factors, for example fatigue. A poorly constructed nurse schedule can lead to
fatigued nurses which can in turn lead to mistakes. Roger et aL (2004) reported a
significant increase in mistakes made by nurses if shifts of more than 12 hours were
worked, when more than 40 hours was worked in a one week period or, if extensive
overtime was worked. The preferred rotating pattern has been shown to be morning,
evening and then night shifts. The number of days a particular shift is worked before
changing, the length of the break between changing shift and the distribution of days
off have also been shown to have an impact on a person's health and productivity at
work (Kostreva et al.; 2002).
Regular reports in the news about the shortage of qualified nurses all around
the world has highlighted the importance for hospitals to retain their staff and good
scheduling practices can help with this. Me Vicar (2003) found that shift working is
an increasing resource of distress for nurses. The UK's Royal College of Nursing has
reported that "Nurses who are forces to work a rotating pattern of day and night
shifts are more likely than other nurses to want to leave National Health Service"
(Royal College of Nursing; 2004) supporting the idea of more flexible schedules.
Many ideas for improving nurse scheduling have been used in recent research
with a tendency to focus on flexibility and giving nurses greater control over their
own schedules. This has been introduced into schedules in a number of ways with
preference scheduling being adopted to some degree by many researchers (warner;
1976; De Grano et al,; 2009).
2.2.2 Techniques
Optimization approach is a mathematical programmmg approach, which
some objectives to minimized or maximized subject to a set of constraints on the
possible solution sets (Sitompol &
r。ョ、ィキセ@
1990). These include the linear
programming (LP), the integer programming (IP), the nonlinear programming (NLP)
© Universiti Teknikal Malaysia Melaka
8
and the goal programming (GP). Several of these approaches had been employed in
e-arlier works on the nurse rostering problem.
Swarm Intelligence (SI) is an innovative distributed intelligent paradigm for
solving optimization problems that originally took its inspiration from the biological
examples by swarming, flocking and herding phenomena in vertebrates. Ant Colony
Optimization, Genetic Algorithm, Particle Swarm Optimization are vanous
Evolutionary Algorithms proposed by researchers. Due to simplicity in Particle
Swarm Optimization (PSO) equation and fast convergence, PSO is found to be best
among these (Hem lata and Prof. Rahila Patel, 20 12). After analyzing each parameter
in PSO equation, Yuhui Shi and Russel Eberhart proposes new parameter "w" called
inertia weight in the basic equation. It can be imagined that the search process for
PSO without the first part is a process where the search space statically shrinks
through the generations. It resembles a local search algorithm. Addition of this new
parameter causes exploration and exploitation in the search space. Firstly, value of w
was kept static. Later on it was kept linear from 0.9 to 0.4.
Figure 2.1: Bird flocking inspired the idea of Particle Swarm Optimization
© Universiti Teknikal Malaysia Melaka
STATUS TESIS*
JUDUL: CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING PARTICLE
SWARM OPTIMIZATION WITH GLOBAL OPTlMUM TEST FUNCTION
SESI PENGAJIAN: 2001 I 2012
Saya ________________セnorazャエbjtilM@
(HURUF BESAR)
mengaku membenarkan tesis (PSM/Sarjana/Doktor Falsafah) ini disimpan di Perpustakaan
Fakulti Teknologi Maklumat dan Komunikasi dengan syarat-syarat kegunaan seperti berikut:
l. Tesis dan projek adalah hakmilik Universiti Teknikal Malaysia Melaka.
2. Perpustakaan Fakulti Teknologi Maklumat dan Komunikasi dibenarkan membuat salinan
untuk tujuan pengajian sahaja.
3. Perpustakaan Fakulti Teknologi Maklumat dan Komunikasi dibenarkan membuat salinan
tesis ini sebagai bahan pertukaran antara institusi pengajian tinggi.
4. usila tandakan(/)
I
SULIT
(Mengandungi
maklumat
yang
berdarjah
keselamatan atau kepentingan Malaysia seperti
yang termaktub di dalam AKTA RAHSIA RASMI
1972)
TERHAD
(Mengandungi maklumat TERHAD yang telah
ditentukan oleh organisasi/badan di mana
penyelidikan dijalankan)
TIDAK TERHAD
(TANDAT ANGAN PENULIS)
Alamat tetap: No. 38C, Kg Ulu Ladang,
(TANDA TANGAN PENYELIA)
NUZULHA KHILWANI BT ffiRAHTM
73400 Gemas, N.Sembilan.
Tarikh: _ _ _. :. 1セP@ セo]gZNsRPQM
CATATAN:
Nama Penyelia
Tarikh:
3o/S /l'J.
----------------
• Tesis dimaksudkan sebagai Laporan Akhir Projek Sarjana Muda (PSM)
•• Jika tesis ini SULIT atau TERHAD, sila lampirkan surat daripada pihak
berkuasa.
© Universiti Teknikal Malaysia Melaka
CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING PARTICLE
SWARM OPTIMIZATION WITH GLOBAL OPTIMUM TEST FUNCTION
NORAZIRA BINTI A JALIL
This report is submitted in partial fulfillment of the requirements for the Bachelor of
Computer Science (Artificial Intelligence)
FACULTY OF INFORMATION AND COMMUNICATION TECHNOLOGY
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
2012
© Universiti Teknikal Malaysia Melaka
DECLARATION
I hereby declare that this project report entitled
CONSTRAINT OPTIMIZATION FOR NURSE ROSTERING USING
PARTICLE SWARM OPTIMIZATION WITH GLOBAL OPTIMUM TEST
FUNCTION
is written by me and is my own effort and th:at no part has been plagiarized
without citations.
Date: 10 AUGUST 2012
STUDENT
e.
(NORAZIRA BINTI A JALIL)
SUPERVISOR:
Date:
•
(NUZULHA KHIL W ANI BINTI IBRAHIM)
© Universiti Teknikal Malaysia Melaka
,3()
I& iセ@
Ill
DEDICATION
To my beloved parents, A Jalil Bin Aman and Normah Binti Salleh, for their expression
of love and fully support.
To my supervisor, Miss Nuzulha Khilwani Binti Ibrahim, thank for making it all
worthwhile.
© Universiti Teknikal Malaysia Melaka
iv
ACKNOWLEDGEMENTS
One above all of gratitude, the omnipresent God, for answering my prayers for giving
me the strength to plod on despite my constitution wanting to give up and throw in the
towel, thank you so much Dear Allah.
I am heartily thankful to my supervisor, Miss Nuzulha Khilwani Binti Ibrahim, whose
encouragement, supervision and support from the preliminary to the conclusion level
enabled me to develop an understanding of the subject. This research would not have
been possible unless Miss Nuzulha, assisted me on the idea of developing this constraint
optimization system.
I am grateful to my parents who have given me a full support for the encouragement,
inspiration and patience which they provided at every step during this course of studies.
I would also like to thank my classmates for making this study a wonderful experience.
Besides that, I would like to thank my friends that have accessed to my system and
giving me valuable and sincere comments.
l owe my deepest gratitude to my friends, for making this study a wonderful experience.
Besides, I would like to thanks them for their valuable and sincere comments for my
work. Lastly, I offer my regards and blessings to all of those who supported me in any
respect during the completion of this research.
© Universiti Teknikal Malaysia Melaka
v
ABSTRACT
The decision making in assigning all nursing staffs to shift duties in a hospital
unit must be done appropriately because it is a difficult task due to various requirements
and constraints that need to be fulfilled. The shift assignment or also known as roster has
a great impact on the nurses' operational circumstances which are strongly related to the
intensity of quality of health care. The head nurse usually spends a substantial amount of
time developing manual rosters, especially when there are many staff requests. Yet,
sometimes she could not ensure that all constraints are met. Therefore, this research
identified the relevant constraints being imposed in optimizing the nurse rostering
problem and examined the efficient method to generate the nurse roster based on
constraints involved. Subsequently, as part of this research, we use a Particle Swarm
Optimization (PSO) to solve this problem. The proposed PSO technique is evaluated for
its efficiency, where 50 samples of rosters generated were taken for analysis. The
feasible solutions were evaluated based on their minimum penalty values. The penalty
values were given based on different violations of soft constraints. The PSO technique is
able to optimize the soft constraints as much as possible.
© Universiti Teknikal Malaysia Melaka
vi
ABSTRAK
Tugas dalam menentukan pembahagian kerja bagi setiap jururawat dihospital
hendaklah dilaksanakan dengan sebaiknya kerana
ianya perlu mengikut pelbagai
kehendak dan kekangan yang telah ditetapkan oleh pihak pentadbiran hospital. Jadual
pembahagian kerja yang memenuhi kehendak pihak pentadbiran dan jururawat amat
penting dalam melahirkan suasana kerja yang produktif untuk setiap staf. Pada
kebiasaannya, ketua jururawat terpaksa mengambil masa yang lama untuk menyiapkan
sesebuah jadual kerja berikutan terpaksa menyesuaikan kehendak setiap jururawat dan
kekangan yang perlu dipatuhi oleh pihak hospital. Walau bagaimanapun, tidak kesemua
kehendak jururawat dapat dipatuhi dan ini mampu melahirkan perasaan tidak senang
dikalangan staf. Oleh itu, kajian ini sangat bersesuaian untuk mengenalpasti kekangankekangan yang boleh digunakan dalam membina sesebuah jadual kerja. Maka, dalam
kajian ini, penggunaaan teknik Particle Swarm Optimization (PSO) telah digunakan
untuk menyelesaikan masalah. Teknik ini dinilai melalui keupayaannya dengan
menggunakan 50 contoh jadual kerja dan pelbagai jenis kekangan digunakan untuk
dianalisa. Teknik PSO dilihat mampu untuk mengoptimakan kekangan yang ada
sebanyak yang mungkin.
© Universiti Teknikal Malaysia Melaka
TABLE OF CONTENTS
SUBJECT
CHAPTER
CHAPTER I
PAGE
DECLARATION
ii
DEDICATION
iii
ACKNOWLEDGEMENTS
iv
ABSTRACT
v
ABSTRAK
vi
TABLE OF CONTENTS
vii
LIST OF TABLES
xi
LIST OF FIGURES
XII
INTRODUCTION
J•I Project Background
CHAPTER D
1.2 Problem Statement(s)
3
1.3 Objective
3
1.4 Scopes
4
1.5 Project Significance
4
1.6 Expected Output
4
I. 7 Conclusion
5
LITERATURE REVIEW AND PROJECT
METHODOLOGY
2.1 Introduction
6
2.2 Fact and Finding
6
2.3 Project Methodology
10
© Universiti Teknikal Malaysia Melaka
2.4 Project Requirements
II
2.4.1 Software Requirement
II
2.4.2 Hardware Requirement
12
2.5 Project Schedule and Milestones
13
2.6 Conclusion
15
CHAPTER ill ANALYSIS
CHAPTER IV
3.1 Introduction
16
3.2 Problem Analysis
16
3.3 Requirement Analysis
17
3.4 Conclusion
21
DESIGN
4.1 Introduction
22
4.2 High-level Design
22
4.2. J System Architecture
23
4.2.2 User Interface Design
24
4.2.2. I Navigation Design
24
4.2.2.2 Input Design
32
4.2.2.3 Output Design
33
4.2.3 Database design
4.3 Detailed Design
4.3. I Software Specification
4.4 Conclusion
CHAPTERV
33
36
36
38
IMPLEMENTATION
5. I Introduction
39
5.2 Software Development Environment Setup
39
5.3 Software Configuration Management
40
5.3. I Configuration Environment Setup
40
5.3.2 Version Control Procedure
41
© Universiti Teknikal Malaysia Melaka
CHAPTER VI
5.4 Implementation Status
42
5.5 Conclusion
46
TESTING
6.1 Introduction
47
6.2 Test Plan
47
6.2.1 Test Organization
47
6.2.2 Test Environment
48
6.2.3 Test Schedule
49
6.3 Test Strategy
6.3.1 Classes of Tests
6.4 Test implementation
CHAPTER
50
51
53
6.4.1 Test Description
53
6.4.2 Test Data
57
6.5 Test Results and Analysis
58
6.6 Conclusion
60
PROJECT CONCLUSION
VII
7.1 Observation on Weaknesses and Strengths
61
7.2 Propositions for Improvement
62
7.3 Contribution
62
7.4 Conclusion
63
REFERENCES
64
BffiLIOGRAPHY
66
APPENDICES
67
© Universiti Teknikal Malaysia Melaka
XI
LIST OFTABLES
PAGE
TABLE
TITLE
2.1
Minimum hardware requirement
12
2.2
Milestone
13
2.3
Table of Milestone Adivity
14
4.1
User Input Table
32
4.2
Data for soft constraint
34
4.3
Example of tbe combination of soft constraint
34
5.1
Environment Setup
41
5.2
Procedure and Control Source Code Venion
42
of Co-PSO system
5.3
Implementation Status of Co-PSO system
43
6.1
Test Organization for PCs
48
6.2
Hardware and Software Configuration of PCs
49
6.3
Test Schedule for PCs
50
6.4
Software Testing Under Black-box and Wbite-
51
box Strategy
6.5
System Test Description for PCs
© Universiti Teknikal Malaysia Melaka
54
xii
LIST OF FIGURES
FIGURE
TITLE
2.1
Bird flocking inspired the idea of Particle
PAGE
8
Swarm Optimization
2.2
OOAD methodology diagram
10
3.1
PSO Algorithm
19
4.1
Constraint Optimization for Nune Rostering
23
Using Particle Swarm Optimization with
Global Optimum Test Function (Co-PSO)
Architecture
4.2
Main User Interface
24
4.3
User enter the PSO parameter input
25
4.4
'Compute PSO' button for debugging the
26
PSO function
4.5
The resulting graph from the execution of
27
PSO
4.6
'Compute Six Hump' button for testing the
28
result produced from PSO by using Six Hump
Camelback Function
4.7
4.8
4.9
4.10
'Compute Branins' button for testing the
result produced from PSO by using Branins'
Function
'Compute Goldstein' button for testing the
result produced from PSO by using Goldstein
Price Function
'Details' button for viewing the entire plotted
graph
View for the entire plotted graph
© Universiti Teknikal Malaysia Melaka
29
30
31
31
Xlll
4.11
'Reset' button for reset the user interface
32
4.12
33
6.1
Viewing the entire plotted graph for all
functions
Test Result for Co-PSO system
6.2
Another Test Result for Co-PSO system
60
© Universiti Teknikal Malaysia Melaka
59
LIST OF ATTACHMENTS
TITLE
Appendix A Project Source Code
© Universiti Teknikal Malaysia Melaka
PAGE
67
LIST OF ABBREVIATIONS
Co-PSO-
Constraint Optimization for Nurse Rostering using
Particle Swarm Optimization with Global Optimum
Test Function
PSO-
Particle swarm optimization
AI-
Artificial Intelligent
GA-
Genetic Algorithms
LP-
Linear Programming
IP-
Integer Programming
NLP-
Nonlinear Programming
GP-
Goal Programming
SI-
Swarm Intelligence
GCPSO-
Guaranteed Convergence Particle Swann Optimizer
DCPSO-
Dynamic Particle Swarm Optimization Algorithm
RAD-
Rapid Application Development
OOAD-
Object-Oriented Analysis and Design
HOnN-
Hours On Number
DOnN-
Shift Type
DOff-
Day Off
DOnWd-
Days On Most for Weekday
DOnWe-
Days On at Most for Weekend
BA-
Bees Algorithm
RAD-
Rapid Application Development
© Universiti Teknikal Malaysia Melaka
CHAPTER 1
INTRODUCTION
1.1 Project Background
Nurse rostering is a complex scheduUng problem that affects hospital
personnel on a daily basis all over the world. Solving properly the nurse scheduling
problem has a great impact on nurses' working conditions which are strongly related
to nursing quality and working moral. The need to take into account individual
preferences further complicates the process. Thus, to improve nurses' level of
satisfaction, schedules are generated individually for each hospital unit by the nurse
chiefs.
The nurse rostering can be defined as the problem of placing resources or
nurses, subject to constraints, into slot in a pattern, where the pattern denotes a set of
legal shifts defmed in terms of work that needs to be done. Rostering process of
nurses is actually the allocating of nurses to execute their nursing services per shift
per day in a department. The nurse rostering is a set of work and rest days assigned
to each nurse in the planning horizon and must satisfy the entire problem rules and
regulations that apply to the complete roster entity. Through this rostering process,
the nursing services or operation times can be worked out as expected. Rosters are
cyclic prototypes of days off and days on (or shifts-off and shifts-on) that are
allocated as a whole to nurses.
The importance of a systematic approach to create good timetables is very
high, especially in healthcare, where it is unacceptable not to fully support patient
care needs and staff requirements. Periodically, for example daily, pool nurses have
© Universiti Teknikal Malaysia Melaka
2
to be assigned for the following days while considering a variety of soft and hard
constraints regarding working date and time, working patterns, nurses' qualifications,
nurses' and hospital preferences, as well as costs. Thus, optimizing the nurse
scheduling is important to efficiently utilize time and effort, to evenly balance the
workload among people and to attempt to satisfy personnel preferences.
The constraint conditions for nurse scheduling is broad, and may differ from
case to case. Some of the constraint conditions even conflict with each other. For
example, the shift preferences of nursing staff may violate the requirement for shift
fairness. In practice, the nurse chiefs arrange the schedule based on their subjective
experience. In fact, the nurse scheduling issue remains challenging, and the
developments of more sophisticated approach to solve the problem deserve further
exploration.
Particle swarm optimization (PSO) is an evolutionary computation method. It
is a population based random search strategy and an adaptive optimization technique
developed by Dr. Eberhart and Dr. Kennedy in 1995, inspired by social behavior of
bird flocking or fish schooling. Because of the unique search mechanism, excellent
convergence performance and easy realization, the algorithm has obtained rapid
development and has been widely used in many fields since it was proposed.
PSO shares many similarities with evolutionary computation techniques such
as Genetic Algorithms (GA). The system is initialized with a population of random
solutions and searches for optima by updating generations. However, unlike GA,
PSO has no evolution operators such as crossover and mutation. In PSO, the
potential solutions or a set of software agents, called particles, fly through the
problem space and search for a good solutions by following the current optimum
particles.
Compared to GA, the advantages of PSO are that PSO is easy to implement
and there are few parameters to adjust. PSO has been applied to many different
problems and is another example of successful artificiaVengineering swarm
intelligence system. Thus. for this project, the application of PSO in introduced in the
© Universiti Teknikal Malaysia Melaka
3
nurse scheduling to predict the minimum total penalty that will satisfy as many as
possible of a set of soft constraints.
1.2 Problems Statemeot(s)
Nurse scheduling can be considered as a partial constraint satisfaction
problem. The task is to find a consistent allocation of shift values, for a group of
nurses, over a fixed period of time, that satisfy as many as possible of a set of
rostering constraints. There are two basic type of constraint: (i) schedule constraints
defining acceptable shift combinations and (ii) staff constraints defining acceptable
overall staffing levels. Some constraints are hard (must be satisfied) while others are
soft (may be violated). Thus, the best schedule would be the one that minimizes total
penalty for nurse scheduling optimization and produced the best combination of
constraints.
1.3 Objective
Design and development of robust and reliable scheduling algorithms has
been an active research area in Computer Science and Artificial Intelligence. Given
that the general problem is computationally intractable, many heuristic-based
techniques have been developed, while other approaches have used optimizing
techniques for specific and limited problem domains. Therefore, the objectives of
presenting Particle Swann Optimization technique in nurse scheduling are:
I. To investigate the total penalty optimization associated for nurse scheduling
optimization.
2. To model the nurse scheduling optimization usmg Six Hump Camelback,
Branins' and Goldstein Price test functions.
© Universiti Teknikal Malaysia Melaka
4
1.4 Scope
The data collection will only cover the combination of soft constraint and the
penalty assigned for each soft constraint. There will be no suggestion schedule
assigned, but it will concentrate on analyzing the graph produced from the data
collection.
1.5 Project Significance
This project will bring benefits to the hospital management and nurses where
it helps optimize the schedule of nurses' by fulfilling the nurse satisfaction with
optimizing soft constraints while minimizing the penalty that had been assigned. The
roster must be optimize especially to the healthcare organization that consist of many
type of nurses and requirements in their environment to make sure that all the
operation that has been scheduled can work precisely.
By optimizing the nurse scheduling will give enormous impact upon the
working environment. The nurses for sure will give their best performance if they
can work with comfortable environment as much as they want.
1.6 Expected Output
The system should be able to analyze nurse schedule data collection and plot
the graph that corresponds to the data produced. Based on the generated graph, the
analysis can be done to evaluate the corresponding combination of soft constraint
and the optimization value (fitness value) with total penalty assigned.
© Universiti Teknikal Malaysia Melaka
4
1.4 Scope
The data collection will only cover the combination of soft constraint and the
penalty assigned for each soft constraint. There will be no suggestion schedule
assigned, but it will concentrate on analyzing the graph produced from the data
collection.
l.S Project Significance
This project will bring benefits to the hospital management and nurses where
it helps optimize the schedule of nurses' by fulfilling the nurse satisfaction with
optimizing soft constraints while minimizing the penalty that had been assigned. The
roster must be optimize especially to the healthcare organization that consist of many
type of nurses and requirements in their environment to make sure that all the
operation that has been scheduled can work precisely.
By optimizing the nurse scheduling will give enormous impact upon the
working environment. The nurses for sure will give their best performance if they
can work with comfortable environment as much as they want.
1.6 Expected Output
The system should be able to analyze nurse schedule data collection and plot
the graph that corresponds to the data produced. Based on the generated graph, the
analysis can be done to evaluate the corresponding combination of soft constraint
and the optimization value (fitness value) with total penalty assigned.
© Universiti Teknikal Malaysia Melaka
5
1.7 Conclusion
The nurses will get a moral burst to be more efficient in their work as they
will feel treated nicely by the employer by getting the fairness roster. In real life
situation, departmental rostering appear to become more appropriate and more
effective for the high number of nurses with high difficulty of rostering problem. For
the medium size number of nurses, the suitable rostering is team rostering, while the
self-rostering is the less effective rostering to apply in the industries.
Cyclical scheduling is not suitable to be applied among nurse because there
will be no rotation that will lead to the unfairness roster. Non-cyclical scheduling is
the suitable schedule to be practice by the healthcare organization because they work
around the clock.
© Universiti Teknikal Malaysia Melaka
CHAPTER2
LITERATURE REVIEW
2.1 Introduction
In this chapter, the literature part of this research study will be presented and
discussed. This includes the study on the nurse scheduling problem and the
techniques used in the development of scheduling. Some of the optimization
algorithms are discussed and compared in order to justify the choice of Particle
Swarm Optimization (PSO) method. Furthermore, the project methodology will also
be determined and justified its selection. Then followed by the requirement needed to
build the proposed system will also be stated. Lastly, the project schedule and
milestones are planned in order the system can finished in time by following them.
2.2 Fact and Finding
Before starting the analysis and design part of the system, some facts and
findings have to be made so that suitable technique and methodology are chosen.
2.2.1 Existing System
While staff scheduling plays an important role in any company that relies on
shift work, scheduling nurses has its own unique factors that make the problem both
© Universiti Teknikal Malaysia Melaka
7
interesting and complex. As with all businesses, costs must be kept to a minimum
and contractual obligations adhered to. However, in nursing there are other important
factors, for example fatigue. A poorly constructed nurse schedule can lead to
fatigued nurses which can in turn lead to mistakes. Roger et aL (2004) reported a
significant increase in mistakes made by nurses if shifts of more than 12 hours were
worked, when more than 40 hours was worked in a one week period or, if extensive
overtime was worked. The preferred rotating pattern has been shown to be morning,
evening and then night shifts. The number of days a particular shift is worked before
changing, the length of the break between changing shift and the distribution of days
off have also been shown to have an impact on a person's health and productivity at
work (Kostreva et al.; 2002).
Regular reports in the news about the shortage of qualified nurses all around
the world has highlighted the importance for hospitals to retain their staff and good
scheduling practices can help with this. Me Vicar (2003) found that shift working is
an increasing resource of distress for nurses. The UK's Royal College of Nursing has
reported that "Nurses who are forces to work a rotating pattern of day and night
shifts are more likely than other nurses to want to leave National Health Service"
(Royal College of Nursing; 2004) supporting the idea of more flexible schedules.
Many ideas for improving nurse scheduling have been used in recent research
with a tendency to focus on flexibility and giving nurses greater control over their
own schedules. This has been introduced into schedules in a number of ways with
preference scheduling being adopted to some degree by many researchers (warner;
1976; De Grano et al,; 2009).
2.2.2 Techniques
Optimization approach is a mathematical programmmg approach, which
some objectives to minimized or maximized subject to a set of constraints on the
possible solution sets (Sitompol &
r。ョ、ィキセ@
1990). These include the linear
programming (LP), the integer programming (IP), the nonlinear programming (NLP)
© Universiti Teknikal Malaysia Melaka
8
and the goal programming (GP). Several of these approaches had been employed in
e-arlier works on the nurse rostering problem.
Swarm Intelligence (SI) is an innovative distributed intelligent paradigm for
solving optimization problems that originally took its inspiration from the biological
examples by swarming, flocking and herding phenomena in vertebrates. Ant Colony
Optimization, Genetic Algorithm, Particle Swarm Optimization are vanous
Evolutionary Algorithms proposed by researchers. Due to simplicity in Particle
Swarm Optimization (PSO) equation and fast convergence, PSO is found to be best
among these (Hem lata and Prof. Rahila Patel, 20 12). After analyzing each parameter
in PSO equation, Yuhui Shi and Russel Eberhart proposes new parameter "w" called
inertia weight in the basic equation. It can be imagined that the search process for
PSO without the first part is a process where the search space statically shrinks
through the generations. It resembles a local search algorithm. Addition of this new
parameter causes exploration and exploitation in the search space. Firstly, value of w
was kept static. Later on it was kept linear from 0.9 to 0.4.
Figure 2.1: Bird flocking inspired the idea of Particle Swarm Optimization
© Universiti Teknikal Malaysia Melaka