Synthesis of Employer and Employee Satisfaction – Case Nurse Rostering in a Finnish Hospital

Workforce management has become increasingly important for both the public sector and private companies. Workforce optimization encompasses all aspects of managing the complete workforce lifecycle. The goal is to optimize the performance of staff on both financial efficiency and customer satisfaction. This paper presents a successful process to optimize employer and employee satisfaction simultaneously. The slightly improved PEAST algorithm is used to roster nurses in a Finnish Hospital. The results show that it is possible to successfully optimize employer and employee satisfaction simultaneously. The generated schedules are highly acceptable for the hospital’s administration. The algorithm has been integrated into the market-leading workforce management software in Finland. The paper also introduces three simple test problems which will help researchers to test the value of their optimization methods. 


I. INTRODUCTION
Workforce scheduling, also called staff scheduling and labor scheduling, is a difficult and time consuming problem that every company or institution that has employees working on shifts or on irregular working days must solve.The workforce optimization is the key to efficient use of workforce, customer satisfaction, employee satisfaction and control over rapidly changing situations, duties and competence demands.The workforce scheduling problem has a fairly broad definition.Most of the studies focus on assigning employees to shifts, determining working days and rest days or constructing flexible shifts and their starting times.Different variations of the problem and subproblems are NP-hard and NP-complete [1]- [6], and thus extremely hard to solve.The first mathematical formulation of the problem based on a generalized set covering model was proposed by Dantzig [7].Good Manuscript received July 22, 2015; revised December 15, 2015.overviews of workforce scheduling are published by Alfares [8], Ernst et al. [9], Meisels and Schaerf [10] and De Causmaecker and G. Vanden Berghe [11].
The goal of this paper is to show that it is possible to find staff rostering solutions where the synthesis of employer and employee satisfaction is realized.Section 2 introduces the real-world workforce scheduling process and the role of optimization.In Section 3 the characteristics of the nurse rostering problem occurring in Finnish hospitals are described.It also defines the constraint model of the problem.Section 4 gives a somewhat detailed description of the PEAST algorithm which is used to solve the nurse rostering problem.Section 5 sets out the computational results.Finally, in Section 6 three simple test problems are introduced.They will help researchers to test the value of their solution methods.

II. REAL-WORD WORKFORCE SCHEDULING PROCESS AND THE ROLE OF OPTIMIZATION
When the ultimate goal is to generate both the best possible academic solutions and the best possible commercial solutions, it's essential to understand the complexity of the workforce scheduling process.The real-world workforce scheduling process starts from three entry points.
First, workload prediction (or demand forecasting) is the phase of determining the staffing levels -that is, how many employees are needed for each timeslot in the planning horizon.The nature of determining the amount and type of work to be done at any given time during the next planning horizon depends greatly on the nature of the job.Some form of workload prediction is called for if the workload is overly uncertain [9].Some examples of this are the calls incoming to a call center or the customer influx to a hospital.
Second, the HR master system provides necessary employee data, such as labor contract, work unit and working hours.Third, the competences and preferences of the employees are maintained by the workforce management system itself.These three entry points gather the required information for shifts and employees (see Fig. 1).
Figure 1.The real-world workforce scheduling process.
Shift generation transforms the determined workload into shifts.This includes deciding break times when applicable.Shift generation is essential especially in cases where the workload is not static.A basic shift generation problem includes a variable number of activities for each task in each timeslot.An example of an optimized solution to a real-world shift generation problem can be found in [14].
Future staffing requirements are carefully considered in resource and holiday planning.Holidays, training sessions and other short-term absences as well as longterm sick-leaves and forthcoming retirements have major impact to actual staff rostering.To see if there will be any chance of succeeding at matching the workforce with the shifts while adhering to the given constraints, a resource analysis should be run on the data.The analysis checks the balance between the shifts and the available employees.
The usefulness and utility of the optimized rosters depend more on the good-quality outcome of the preceding phases than the actual optimization result.However, when the input data for the staff rostering is valid and correct, it's possible to gain significant benefit in financial efficiency and employee satisfaction by using optimization.Some academic researchers have announced that their optimization methods for nurse rostering are in commercial use [15][16][17][18].Some real-world datasets are huge.They may consist of hundreds of employees with a corresponding number of jobs.In these cases it is probably computationally impossible to try to roster the whole set of employees at once.Therefore, we could partition the data into smaller units, roster them separately and assemble the units back together.Unfortunately, this is not an easy task and requires optimization (see e.g.[19]).
Unfortunately, the optimized staff rosters need to be changed.Daily rescheduling deals with ad hoc changes that are necessary due to sick leaves and other no-shows.The changes are usually carried out manually.Still, the system should suggest suitable substitutes considering the qualifications, employment contract, legal limitations and salaries.The goal is to find the most economical candidates.
Finally, the completed working times will be booked and made available for payroll accounting system.A reporting tool should provide performance measures in such a way that the personnel managers can easily evaluate both the realized staffing levels and the employee satisfaction.When necessary, the workload prediction or/and the shift generation phases may be restarted.In any case, the staff rostering will be restarted for the next planning horizon.
There are hundreds of workforce management solutions commercially available and in widespread use.However, most of the commercial products do not include any optimization or computational intelligence [11].Those that do, claim to reach at least 5% reduction in staffing costs, 5% gain in employee efficiency and 25% reduction in sick leaves.In our experience this would require the correct use of optimization in the shift generation, the resource analysis, the data partioning and the staff rostering phase.

III. NURSE ROSTERING IN FINNISH HOSPITALS
Nurse rostering is by far the most studied application area in workforce scheduling.Recent nurse rostering studies can be found in [20]- [23].The recent interest of the academic workforce scheduling community has somewhat shifted to other lines of businesses.Some of these are retail sector [24], transportation sector [25] and contact centers [26].In fact, the need for effective commercial workforce scheduling has been driven by the growth of these industries, in which efficient deployment of labor is of crucial importance.The balance between offering a superior service and reducing costs to generate revenues must constantly be found.
As noted in Section 2, we have cases where the nurse rostering cooperation between commercial software vendors, hospitals and academics work well.The implementation and deployment of staff rostering optimization is not an easy task.Our earlier experience in public transport (see e.g.[27]), freight transport, service sector and retail sector indicates that it will take at least one year and probably two years to get the optimization in production.Based on our first nurse rostering study (see [28]) we started a cooperation with a Finnish hospital (Satakunta Hospital District) and with a workforce management software company (Numeron Ltd.).The hospital offers specialized medical care services for the 231, 000 residents of the Satakunta region.It has nearly 4000 employees.
We believe that explicating the deployment process in some detail will help other academics in their cooperation with commercial vendors.The deployment timeframe was agreed to be two years as the whole workforce scheduling process as described in Section 2 had to be reconstructed.The major actions were the following: 1. Integrating the current HR master system to the WFM software 2. Integrating the WFM software to the current payroll accounting system 3. Creating the competence and preference database 4. Describing the collective labor agreement regulations and the hospital-specific rules to the WFM software 5. Creating the common workforce optimization framework for the entire hospital 6. Incorporating new features to the current staff rostering optimization module 7. Integrating the staff rostering optimization module to the WFM software.
We were in charge of the last three actions.However, our job was heavily dependent on the progress of the third and fourth actions.The entire implementation took 28 months to reach production.
A solid, coherent and collective nurse rostering optimization framework was created to maximize the functionality of the rosters.The main focus was in the synthesis of employer and employee satisfaction.Furthermore, each department or unit had had its own manual routine to roster the nurses.The second focus was in generating a homogenous and uniform rostering routine.The optimization framework was created in collaboration with head nurses, nurses responsible for rostering, personnel administration, financial administration, IT administration and with a member of the executive board.The major policies of the framework are the following:  Each department creates its own shifts for each day.The shifts can and should be different in different planning horizons because of the expected patient flow, forthcoming training sessions and information transfer sessions between departments.The main characteristics of the shifts are the shift type, the length and the required competence.For example, the intensive-care unit has more than 10 different shifts per day. The labor regulations must always be respected. National and hospital-specific work contract recommendations are deployed when both employer and employees accept them.Their importance and weight values in optimization are determined together. The preferences of an employee supersede the above recommendations.Employees cannot set preferences which are in conflict with the labor regulations. A new three stage preference allocation model is introduced.Each employee can fix 10% of her shifts in each planning horizon.These shifts are guaranteed for her.Furthermore, she can suggest another 40% of her shifts.Her preferences will be respected as well as possible considering the overall workforce demand (employer's perspective) and the collective benefit and equality (employee's perspective).The remaining 50% of her shifts will be optimized considering mainly employer's perspective.However, the above mentioned recommendations will also be considered. The double-shifts (two consecutive shifts per day) can only be assigned by employee's request.A limit is defined for the total number of doubleshifts and for the maximum number of consecutive double-shifts. In addition to the day-specific shift preferences, each employee can wish for an arbitrary number of night shifts per period, plus the maximum number of consecutive night shifts.In case the employee wishes no night shifts, the wish is fully respected.An employee must have a so called sleeping day and at least one day off after each stretch of night shifts.In addition, the day off cannot be followed by a morning shift. The employees in different departments or units can be optimized together.A home department is assigned to each employee to ensure that the majority of her shifts will be in that department.The combining enables employees to operate as deputies for other departments. There is no limit on the maximum number of employees that can be optimized at the same time. Shifts and days-off are optimized at the same time.To the best of our knowledge the created framework has characteristics which have rarely or never been covered in academic literature.Other unique features for Finnish hospitals include:  The number of nurses in a department can be as high as 300. The total working hours for a nurse within the planning horizon can be any number of hours. Some shifts last more than 12 hours (doubleshifts). Each nurse has a right to assign the number of her night shifts. Some nurses should always work on the same shifts. The nurses' total working hours in the planning horizon must be either truncated or extended to the exact required number of working hours given by the work contract.The nurse rostering problem triggered by the presented framework can be modeled as a constraint satisfaction problem.The framework includes 23 constraints as follows.The constraint numbers refer to the model presented in [29].The new constraints are denoted by +.
Coverage Issues (C1) A nurse cannot be assigned to overlapping shifts (C2) A minimum number of nurses with particular competences must be guaranteed for each shift (C5+) In case of surplus nurses, a balanced number of extra days-off are assigned to nurses Labor Regulations (R1) The required number of working days, working hours and days-off within a timeframe must be respected (R2) The planned number of holidays within a timeframe must be respected (R3) One free weekend (both Saturday and Sunday free) within a timeframe must be respected (R5) Nine hours rest time between two shifts must be respected (R6) The planned number of special shifts (such as union steward duties and training sessions) for particular nurses within a timeframe must be respected (R7) Nurses cannot work consecutively for more than six days (R10+) The maximum working time of h 1 hours within each consecutive w 2 days must be respected (R11+) Nurses should have at least one rest time of length 35 hours within each week Operational requirements (O1) A nurse can only be assigned to a shift he/she has competence for (O5) A nurse assigned to a shift type t 1 must not be assigned to a shift type t 2 on the following day (certain stints are not allowed) (O7+) From a group of g 1 nurses, at least g 2 of them must be working at the same time Hospital Preferences (E1) Single days-off should be avoided (E2) Single working days should be avoided (E3) The maximum length of consecutive days-off is three (E5) A balanced assignment of different shift types must be guaranteed between nurses (E6) A balanced assignment of different tasks (shifts with different competences) must be guaranteed between the nurses (E8) Assign or avoid a given shift type before or after a free period (days-off, vacation) (E10+) A nurse can have at most ten night shifts within a timeframe and the maximum length of consecutive night shifts is five Personal Preferences (P1) Assign or avoid assigning given nurses to the same shifts (P2) Assign a requested day-on or avoid a requested day-off (P3) Assign a requested shift or avoid an unwanted shift.
Research by Kellogg and Walczak [30] indicates that it is crucial for a workforce management system to allow the employees to affect their own schedules.In general it improves employee satisfaction.This in turn reduces sick leaves and improves the efficiency of the employees, which means more profit for the employer.The new three stage preference allocation model realizes this by optimizing employer and employee satisfaction simultaneously.
Characteristics of the future work include flexibility, agility and disintegration.People's life situations vary and their possibilities and wishes to work in varying work periods are present day.Specifically, the private healthcare sector has adopted this fact.The public hospitals should follow them to ensure competent workforce in the future.The extensive research [31] by Finnish Institute of Occupational Health showed that good mental health in combination with the opportunity to control work time seem to be key factors in extended employment into older age.In addition, high work time control might promote work life participation irrespective of employees' somatic disease status.We believe that workforce management systems and especially workforce optimization has a significant role in extending working life.

IV. SOLUTION METHOD
This section describes the PEAST algorithm which is used to solve the constraint satisfaction problem presented in Section 3. The usefulness of an algorithm depends on several criteria.The two most important ones are the quality of the generated solutions and the algorithmic power of the algorithm.Other important criteria include flexibility, extensibility and learning capabilities.We believe that the PEAST algorithm realizes these criteria.It has been used to solve several real-world scheduling problems (see eg. [14,19,27,32,33]) and it is in industrial use.In this section we present the components of the algorithm and give details of its use in solving the nurse rostering problem.The heart of the algorithm is the local search operator called GHCM (greedy hill-climbing mutation).The GHCM operator is used to explore promising areas in the search space to find local optimum solutions.Another important feature of the algorithm is the use of shuffling operators.They assist in escaping from local optima in a systematic way.Furthermore, simulated annealing and tabu search are used to avoid staying stuck in promising search areas too long.We next discuss these and other important characteristics briefly.For the detailed discussion of the PEAST algorithm and its components we refer to [34].
The PEAST algorithm applies a number of shuffling operators to perturb a solution into a potentially worse solution in order to escape from local optima.The operators are called after a given number of iterations have passed.Three shuffling operators are used in nurse rostering: 1. Select a random day and two random nurses and swap all their jobs 2. Select a random job and move that job to a random nurse within the same day 3. Select a random job from two random nurses and swap the jobs.
The algorithm avoids staying stuck (i.e., the objective function value does not improve for some predefined number of generations) in the same areas of the search space using tabu search and the refined simulated annealing method.A tabu list is used to prevent reverse order moves in a single application of the GHCM operator.The simulated annealing refinement is used to decide whether or not to commit to a sequence of moves in the GHCM operator.This refinement is different from the standard simulated annealing [37].It is used in a three-fold manner: 1) when choosing an object to be moved, 2) when choosing the destination of the object, and 3) when the sequence of moves is cut short (a worsening move is made, and it worsens the solution more than the previous worsening move did).
The PEAST algorithm uses the adaptive genetic penalty method (ADAGEN) to solve multi-objective problems such as the constraint satisfaction problem.A traditional penalty method assigns positive weights (penalties) to the soft constraints and sums the violation scores to the hard constraint values to get a single value to be optimized.The ADAGEN method assigns dynamic weights to the hard constraints based on the search trajectory and the constant weights assigned to the soft constraints.The soft constraints are assigned fixed weights according to their significance.The significance is given by the problem owner (end-user).
The PEAST algorithm uses random initial solutions.They have worked best in all the real-world cases where we have applied the algorithm.Furthermore, in our extensive test runs we have found no evidence that a sophisticated initial solution improves results The acronym PEAST stems from the methods used: Population, Ejection, Annealing, Shuffling and Tabu.To the best of our knowledge, the heart of the algorithm, the GHCM operator, is one of a kind.The same applies to our implementation of the shuffling operators, the simulated annealing refinement and the penalty method.Our test runs with the real-world problem referred earlier and with several artificial and benchmark problems, including school timetabling [38], balanced incomplete block design [39], single round robin tournaments with balanced home-away assignments and pre-assignments [39], days-off scheduling [40] and constraint minimum break problems [41] have clearly shown that the solution quality radically decreases if we omit even one of the core methods used in the algorithm.
Even though the best parameter values vary depending on the problem and the instance, our extensive test runs over several years have shown that the same values can safely be used in different real-world problems and instances.However, we wanted to conduct new test runs to be sure that these parameter values apply also to the nurse rostering problem given in Section 3. The test runs showed us once again that the following general parameter values work well also in nurse rostering:  The population size n is 10  The cloning interval c is 500  The next shuffling interval is a random integer between 5,000 and 10,000  The maximum length of the move sequence in the GHCM operator is 10  The size of the tournament selection in the GHCM operator is 5

V. NOTES ON COMPUTATIONAL RESULTS
This section sets out the computational results for solving the nurse rostering problem for a Finnish hospital (Satakunta Hospital District) which has nearly 4000 employees.Because of the fact that we are solving a number of different instances for different departments with different timeframes, we can only present some general notes on the computational results together with the feedback we have reserved.Still, we present how the violations of the constraints are calculated and an example result for a single instance.In Section 6 we present three simplified test problems derived from the hospital's real-world case.
Table I shows the hard and soft constraints of the sample instance from the hospital's intensive-care unit, and describes how the soft constraint violations are calculated.It also shows the result of an optimization run.Three of the constraints were not in use in this particular instance.The unit has 130 nurses.The average number of different shifts per day is 10.The rostering requires nine different competences to be described for the shifts and for the nurses.The planning horizon was three weeks.The total number of working hours for a nurse varied from 57h to 114h 45min.
As the hard constraints state, the most important goal is to find a solution that has no overlapping shifts and guarantees a sufficient number of competences for each shift, and where employees do not work consecutively for more than six days and they are guaranteed to have sufficient rest time between shifts.As the soft constraint violations state, the most important goal is to find individual rosters with exactly the required number of working hours given by the work contract.When necessary, the nurses' total working hours in the planning horizon are either truncated or extended to the exact required number.The second most important goal is to fulfill the employee's requests.
In general, a nurse cannot be assigned to more than one shift per day.However, two consecutive shifts per day (double-shifts) are allowed in Finnish hospitals.The definition of constraint C1 allows two or more shifts to be assigned provided they do not overlap.Quite often, departments have more nurses working than are needed to cover the minimum number of nurses each working day.The surplus nurses are used to cover the expected sick leaves and other no-shows.In case of surplus nurses, the optimization assigns a balanced number of extra daysoff to nurses (C5).The number of forbidden consecutive shift types (O5) was nine, five of which were hard constraints.For example, a nurse assigned to a certain night shift must not be assigned to some early shifts the following day.The constraint O7 ensures that, for example of the ten aidmen at least four must be working at the same.
As described in Section 3, each planning horizon is preceded with a three stage preference allocation phase where nurses express their wishes for days-off and shifts (P2 and P3).The result shows that it is possible to successfully optimize employer and employee satisfaction simultaneously.The solution was highly acceptable for the administration.The hospital preferences were well fulfilled.Furthermore, the optimization found a solution where more than 95% of the second stage nurse requests were fulfilled.A special request is that some nurses should always work on the same shifts because they travel together to work from nearby cities (P1).

VI. THREE SIMPLE TEST PROBLEMS
As stated in Section 5, we believe that instead of presenting the detailed data for the real-world staff rostering instances here, presenting some simplified problems that are based on the real-world instances will be far more valuable to other researchers.This is realized by simplifying the problems to the point where the used constraints comprise the core of almost any nurse rostering problem.This enables a large number of researchers to find out how well their optimization methods work compared to ours in these particular problems.
Another justification behind this is that we have not been able to use the PEAST algorithm to the well-known nurse rostering benchmarks (see [43][44][45][46]).The benchmarks have surprisingly different constraint model than in any of the staff rostering problems we have encountered so far in Finnish business life, including the one presented in this paper.Unfortunately, we have not yet found time to change our implementation to confront these benchmarks.So, we decided to introduce test problems that will not remain unsolved by other researchers because of the complexity of the problems.We provide the detailed data of the real-world instances on request.*Note that single days-off and single working days at the start or at the end of the planning period are not calculated We next present three simplified test problems derived from the hospital's real-world case.Table II shows the hard and soft constraints of the test problems.The number of nurses is 76.The planning period is three weeks.The data for the test problems is available online [47].
We solved these three problems using the PEAST algorithm with exactly the same parameter values that are used in the production version.We did not try to fine tune the algorithm anyway.Table III shows the best solutions found for the problems by running the algorithm ten times.We are quite certain that better solutions exist.

VII. CONCLUSIONS AND FUTURE WORK
This paper presented a successful process to optimize employer and employee satisfaction simultaneously.The slightly improved PEAST algorithm was used to roster nurses in a Finnish Hospital.The PEAST algorithm is a population-based local search heuristic which incorporates features from ejection chains, simulated annealing, shuffling and tabu search.The algorithm was capable of finding financially efficient rosters that were highly acceptable to the hospital's administration.Furthermore, the rosters were considered fair and almost all of the nurses' preferences could be fulfilled.The algorithm is integrated into the hospital's workforce management software.
The paper also introduced three test problems which will help researchers to test the value of their optimization methods.The problems are simplified versions of the hospital's real-world case.In the near future we will introduce more test instances based on real-world cases.We will also introduce carefully crafted test instances for which the optimum value is knows.We also try to find time to change our staff rostering implementation to confront the current well-known benchmark instances.
Our goal is to gather together workforce optimization academics interested in commercial solutions.This would help us all to better understand the complexity of the workforce scheduling process.

Figure 2 .
Figure 2. The pseudo-code of the PEAST algorithm.

TABLE I .
HARD AND SOFT CONSTRAINTS OF THE SAMPLE INSTANCE FROM THE HOSPITAL'S INTENSIVE-CARE UNIT.THE SOFT CONSTRAINTS ARE FOLLOWED BY THE WEIGHT OF THE CONSTRAINT.THE THIRD COLUMN GIVES THE FORMULAS FOR CALCULATING THE SOFT CONSTRAINT VIOLATIONS.THE LAST COLUMN GIVES THE NUMBER OF VIOLATIONS.

TABLE II .
HARD AND SOFT CONSTRAINTS OF THE THREE TEST PROBLEMS.THE SOFT CONSTRAINTS ARE FOLLOWED BY THE WEIGHT OF THE CONSTRAINT.THE LAST THREE COLUMNS INDICATE THE CONSTRAINTS THAT ARE IN USE IN EACH PROBLEM.

TABLE III .
THE BEST SOLUTIONS FOUND FOR EACH TEST PROBLEM BY RUNNING THE ALGORITHM TEN TIMES.THE VALUES INDICATE THE NUMBER OF VIOLATIONS.THE TOTAL COST IS THE WEIGHTED VALUE OF THE SOFT CONSTRAINTS.