Academia.eduAcademia.edu

Workforce Scheduling Linear Programming Formulation

IFAC-PapersOnLine

This paper introduces a linear programming formulation for a ternary-integration Workforce Scheduling and Routing Problem that incorporates scheduling of tasks, assigning of workers to the tasks according to their skills and the definition of the workers' trips. Each task has a time window, and is related to a customer who has a preference list of the workers. Each worker has a cost, a preference list of tasks and a working time window. The objective is to perform the tasks and simultaneously minimizing the number of unassigned tasks, the traveling distance, the workers' cost, and maximizing the customers and workers preference satisfaction.

Workforce Scheduling Linear Programming Formulation Thierry Garaix, M. Gondran, P. Lacomme, Enzo Mura, N. Tchernev To cite this version: Thierry Garaix, M. Gondran, P. Lacomme, Enzo Mura, N. Tchernev. Workforce Scheduling Linear Programming Formulation. 16th IFAC Symposium on Information Control Problems in Manufacturing INCOM 2018, Jun 2018, Bergamo, Italy. pp.264-269, ฀10.1016/j.ifacol.2018.08.289฀. ฀hal-02024652฀ HAL Id: hal-02024652 https://hal.archives-ouvertes.fr/hal-02024652 Submitted on 19 Feb 2019 HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. Available online at www.sciencedirect.com ScienceDirect IFAC PapersOnLine 51-11 (2018) 264–269  Workforce Scheduling Linear Programming Formulation   T. Garaix**, M. Gondran*, P. Lacomme*, E. Mura***, N. Tchernev*   *Université Clermont-Auvergne, LIMOS, UMR CNRS 6158, Campus des Cézeaux, 63178 Aubière Cedex  France (e-mail: {gondran, placomme, tchernev}@isima.fr). **Ecole des Mines de Saint-Etienne, 158 cours Fauriel, 42000 Saint-Etienne France (e-mail: [email protected]). ***Université de Technologie de Troyes, ICD-LOSI, UMR CNRS 6281, 12 rue Marie Curie, CS 42060, 10004 Troyes Cedex, France (e-mail: [email protected]). Abstract: This paper introduces a linear programming formulation for a ternary-integration Workforce Scheduling and Routing Problem that incorporates scheduling of tasks, assigning of workers to the tasks according to their skills and the definition of the workers’ trips. Each task has a time window, and is related workers’Each trips worker has a cost, a preference list of tasks to a customer who has a preference list of the workers. workers’ trips trips workers’ and a working time window. The objective is workers’ to perform the tasks and simultaneously minimizing the trips workers’ trips cost, and maximizing the customers and number of unassigned tasks, the traveling distance, the workers’ workers’ trips ’ cost workers preference satisfaction. cost ’’’ cost cost © 2018, IFAC (International Federation of Automatic Control) Hosting ’ costby Elsevier Ltd. All rights reserved. ’ cost Keywords: Workforce Scheduling, Routing, Linear Programming Formulation, Integrated Problem 1. INTRODUCTION This paper presents an investigation into the application of a mixed-integer linear programming approach to tackle a Workforce Scheduling and Routing Problem (WSRP). WSRP refers to matching workers with tasks that are required by customers. The assignment of the workers with skills to a series of tasks at different locations mustconcerning be achieved ’ skill s’ wishes the ’ to skill s’ wishes according the required skills to perform the concerning tasks and of the ’ skill s’ wishes concerning the workers’’ skills skill and the workers’ s’ wishes wishes concerning concerning the the geographical (or do not want)the to ’ skilllocation where theys’want wishes concerning ’ skillcustomers and s’ wishes concerning the work. Both workers have time windows workers’ workers’ in which tasks have to be defining the task period availability workers’ time availability in which performed and defining the workers’ workers’ worker wish to work. The WSRP resolution requires tackling, workers’ workers’ in a proper coordination, the assignment of tasks to workers, the scheduling of the tasks and the routing of the workers to travel between the locations of the tasks with the objective to maximize the number of performed first,window to minimize worker’s workingtasks time working time Quality of Service worker’s of the workers second (thatwindow includes the worker’s working working time time window window and respect of the worker’s worker’s working time window geographical working regions), to maximize preference worker’s working time the window worker’s working time thirdly windowand to satisfaction between customers and workers minimize the cost (which includes the transport and the cost for a worker to perform a task) fourthly. additional temporal constraints including, but not limited to, pairwise synchronization and pairwise temporal precedence. WSRP encompasses problems encountered in Home Health Care (HHC) logistics where demands include transportation of drugs/medical devices between the depot and patients' home, delivering drugs from hospital to patients or blood samples from patients to the laboratory. A high quality of service should have to be defined considering both customers (or patients) and vehicles (health care managers) assuming transportation patterns constantly optimized, and flexible organizations, while minimizing costs. To propose flexibility and efficiency, a strong cooperation between scheduling and routing must be warranted. Home Health Care planning problems differ from the WSRP by constraints and objective functions (Castillo-Salazar et al., 2016). (Pinheiro et al., 2016) proposed a variable neighbourhood search for solving the WSRP, incorporating two novel heuristics. (Algethami and Landa-Silva, 2017) introduced an adaptive genetic algorithm that uses a diversity-based adaptive parameter control method to solve the WSRP with an indirect representation of the solution. (Misir et al., 2010) defines the main characteristics of HHC in two sets which can be used to the WSRP, and including but are not limited to: 𝑤𝑤 𝑤𝑤 , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 ] 𝑤𝑤  For worker, [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 𝑤𝑤 𝑤𝑤 , 𝑇𝑇𝑊𝑊 ] 𝑤𝑤  [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 𝑤𝑤 𝑤𝑤 , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 𝑤𝑤 ]  [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 A working time window [𝑇𝑇𝑊𝑊 [𝑇𝑇𝑊𝑊 𝑤𝑤 , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 ], a worker 𝑤𝑤 is 𝑖𝑖𝑖𝑖𝑖𝑖  , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 ] 𝑤𝑤 𝑖𝑖𝑖𝑖𝑖𝑖 𝑤𝑤 definition 𝑤𝑤 available only in that period. The , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 ] of the working 𝑤𝑤  [𝑇𝑇𝑊𝑊 2. WORKFORCE SCHEDULING PROBLEM 𝑖𝑖𝑖𝑖𝑖𝑖 𝑤𝑤 𝑤𝑤 , scenarios: 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 ] the traveling 𝑤𝑤  [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 time window can vary in different time is considered as working time; a worker can be forced 2.1 Definition of the WSRP and related work to violate his working time windows if it is necessary to Workforce Scheduling and Routing Problems combine vehicle perform a task. In this paper, the traveling time is not routing and scheduling problems with time-window and considered as working time and a worker is allowed to The WSRP definition is given in Section 2, Section 3 provides the MILP formulation and Section 4 is devoted to numerical experiments. 2405-8963 © 2018, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2018.08.289 T. Garaix et al. / IFAC PapersOnLine 51-11 (2018) 264–269 work over his time window if necessary but this overtime is penalized in the objective function.  Departure and finishing locations: are the locations where workers begin and finish their trips. These locations may be a unique depot (Eveborn et al., 2006) or several locations in the case assuming that each worker may start from their own home (Castillo-Salazar et al., 2016). Different scenarios are possible, for example, some company’s policy can enforce workers to start their working time at the main office but they are allowed to return home directly after the last task performed.  Skills: each worker has different skills.  Teaming: some tasks may require several workers to be performed, and can start only when all workers are together.  Available regions: workers have preference regions to work and despised regions. For task,  Time window [𝑒𝑒𝑗𝑗 , 𝑙𝑙𝑗𝑗 ] to perform a task 𝑗𝑗: if a worker arrives before the time window, the task cannot begin and a waiting-time is incurred (Akjiratikarl et al., 2007).  Skill requirements: a task necessitates one or several specific skills. In order to perform a task, a worker must have at least one required skill by the task (Cordeau et al., 2010).  Processing time is the time to perform a task. The processing time is often assumed to be a fixed duration but it could be worker dependent or stochastic.  Location: each task has a location and so a transportation time has to be taken into account from one location to another one. For the WSRP, the following characteristics have to be considered:  Each customer has a preference list between the workers who can perform the required task.  Each task is included into an agreement between the customer and the company, this contract also includes a list of workers who are allowed to perform the task. 2.2 Problem description This section describes the Workforce Scheduling and Routing Problem with time-dependent activities constraints. (de Armas et al., 2015) introduces a formalization of a Ship Routing and Scheduling Problem with Time Window that can be tuned to WSRP. We define a graph 𝐺𝐺 = (𝑉𝑉, 𝐸𝐸), where 𝑉𝑉 is the set of nodes, and 𝐸𝐸 the set of edges. 𝑉𝑉 = 𝑇𝑇 ∪ 𝐷𝐷 ∪ 𝐷𝐷′ is composed of the set 𝐷𝐷 of departure locations of the workers (the workers can start their trip from their home, or from a depot), the set 𝐷𝐷′ of finishing locations of the workers (and similar remarks hold for the departure locations and for the finishing location of the trips), and the set 𝑇𝑇 of tasks characterized by their processing time and their location. A task 𝑗𝑗 ∈ 𝑇𝑇 requires to be achieved 265 by 𝑟𝑟𝑗𝑗 workers; if 𝑟𝑟𝑗𝑗 > 1, the task is represented by 𝑟𝑟𝑗𝑗 nodes in the graph. An edge between two nodes represents the trip of a worker between both tasks’ location: an edge between two tasks meaning that both tasks are performed by the same worker. Transportation time between two tasks 𝑖𝑖 and 𝑗𝑗 is 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 . 𝑊𝑊 = {𝑤𝑤1 , 𝑤𝑤𝑖𝑖 , … 𝑤𝑤|𝑊𝑊| } is the set of available workers. For a task 𝑗𝑗 and a worker 𝑤𝑤, there are three types of preferences: satisfaction worker-customer pairing: 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 ; worker’s satisfaction regions: 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 ; and the customer’s satisfaction skills: 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 . These three preferences are aggregated in 𝜌𝜌𝑗𝑗𝑤𝑤 = (𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 ). Moreover, 𝑝𝑝𝑗𝑗𝑤𝑤 is the cost of the worker 𝑤𝑤 performing the task 𝑗𝑗 according to the agreement between the customer and the company. Both workers and tasks have time window: a task 𝑗𝑗 must be started during its time window [𝑒𝑒𝑖𝑖 , 𝑙𝑙𝑖𝑖 ] (but can be finished over the time window if the processing time is too long); and a worker 𝑤𝑤 can work only 𝑤𝑤 𝑤𝑤 , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 ]: the during his working time window [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 traveling time is not considered as working time in this paper. Table 1. Objectives and Constraints in the proposed model Objective Constraints Preferences Traveling cost Skill requirements Worker Time Windows Payment cost Contract Worker available regions Preferences (skills, regions, workers) Task time window Number of required workers by a task Unassigned tasks Table 1 introduces the objectives, constraints and preferences to the WSRP in this paper. The objective is to simultaneously minimize: the traveling cost of the workers, the payment cost from the customers, the number of unassigned tasks; and maximize the preferences (of the workers’ preferred regions, customers’ preferred skills, and preferred matching workertask). The objective is to minimize a weighted function considering four parts: 1) Minimization of the traveling cost and the working cost of the workers, 2) Maximization of the preferences (of the workers’ preferred regions, customers’ preferred skills, and preferred matching worker-task). This objective models the Quality of Services for both customers and workers. 3) Minimization of the total number of tasks assigned to workers with a process finishing time exceeding the workers’ time window, plus the total number of tasks assigned to one worker and that tasks are located into a region that does not fit with the worker’s preferences. 266 T. Garaix et al. / IFAC PapersOnLine 51-11 (2018) 264–269 4) Minimization of the number of workers required by a task and who has not been assigned to the task. 6. the starting time of each task must comply with the task time window and the arrival time of the workers. The constraints are the required skills, the respect of the contract between customers and workers (a worker who does not appear on the contract cannot work for the customer) and the time windows of the tasks. 3.2 Notations for parameters Let us note that part 2, part 3 and part 4 of the objective function define a satisfaction score, evaluating a degree of satisfaction for preferences that encompass both preference of tasks (and by consequence of customers) and preferences of workers. 3. WORKFORCE SCHEDULING AND ROUTING PROBLEM 3.1 Model description 𝑊𝑊 𝑇𝑇 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 𝑝𝑝𝑗𝑗𝑤𝑤 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 𝑟𝑟𝑗𝑗 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 The objective of the tackled WSRP is to assign customers’ tasks to workers and to define the workers’ trip. Let us remind that 𝑊𝑊 = {𝑤𝑤1 , 𝑤𝑤𝑖𝑖 , … 𝑤𝑤|𝑊𝑊| } is the set of workers; 𝑇𝑇 = {𝑇𝑇1 , 𝑇𝑇𝑖𝑖 , … 𝑇𝑇|𝑇𝑇| } is the set of tasks to be performed; and some tasks can require more than one worker. 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 A solution to the WSRP requires all tasks to be assigned while satisfying some requirements:  Assignment of tasks must be achieved considering workers skills;  Assignment of workers to tasks must be achieved considering customers preferences;  Assignment of workers to tasks must be achieved considering the worker-customer compatibility matrix (a customer cannot be assigned to a worker due to legacy constraints).  Time-conflicts must be avoided to obtain workers’ planning with no overlapping in time. A high quality solution for a WSRP should have both low operational costs and a penalty cost referring to high quality of service for customers and workers. [𝑒𝑒𝑗𝑗 , 𝑙𝑙𝑗𝑗 ] 𝑤𝑤 𝑤𝑤 [𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 ] , 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 In this section, we introduce a MILP that deals with the WSRP. The proposed MILP simultaneously considers the following set of constraints: 1. the assignment of tasks to workers to define trip for workers; 2. the assignment of workers to tasks considering the number of workers required by each task 3. the assignment of tasks depending on the workers’ working time window that differ for each worker according to their individual contract; and the satisfaction of the workers’ preference regions; 𝜌𝜌𝑗𝑗𝑤𝑤 set of workers. set of tasks. distance from task 𝑖𝑖 to task 𝑗𝑗. worker 𝑤𝑤’s cost to perform 𝑗𝑗. processing time of the task 𝑗𝑗 number of workers required to achieve the task 𝑗𝑗. level of satisfaction (𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 ∈ [0,1]) when worker 𝑤𝑤 is assigned to task 𝑗𝑗. level of satisfaction (𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 ∈ [0,1]) when worker 𝑤𝑤 is assigned to task 𝑗𝑗 considering the regional preferences (task j is located into one region 𝑘𝑘). level of skill satisfaction (𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 ∈ [0,1]) with 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 = 𝑀𝑀𝑎𝑎𝑥𝑥 (𝑝𝑝𝑑𝑑𝑗𝑗𝑖𝑖 ) when the task 𝑗𝑗 is assigned to worker 𝑤𝑤. 𝜌𝜌𝑗𝑗𝑤𝑤 = (𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 ) ∀ 𝑤𝑤 ∈ 𝑊𝑊, 𝑗𝑗 ∈ 𝑇𝑇 is the quality of service. time window of task 𝑗𝑗. working time window of worker 𝑤𝑤. 3.3 Notations for decision variables Binary variables: =1 if worker w moves from task i to j 𝑤𝑤 𝑥𝑥𝑖𝑖,𝑗𝑗 { =0 otherwise =1 if worker w moves from departure 𝑤𝑤 𝑥𝑥0,𝑗𝑗 { location to task i =0 otherwise =1 if worker w moves from task i 𝑤𝑤 𝑥𝑥𝑖𝑖,0 { to finishing location 0 =0 otherwise =1 if the worker w is assigned to a task j 𝜓𝜓𝑗𝑗𝑤𝑤 { situated outside w's preference region =0 otherwise =1 if time window violation occurs when task j 𝑤𝑤 𝜃𝜃𝑗𝑗 { is assigned to worker w =0 otherwise Continuous variables: 𝑦𝑦𝑗𝑗 number of workers not available to achieve the task 𝑗𝑗. starting time of task 𝑗𝑗. departure time of worker 𝑤𝑤 from task 𝑗𝑗. arrival time of worker w to task 𝑗𝑗. 𝑑𝑑𝑗𝑗 𝑑𝑑𝑗𝑗𝑤𝑤 𝑎𝑎𝑗𝑗𝑤𝑤 4. the respect of the contracts between workers and customers; 5. the departure/arrival time of the workers at the task location depending on the transportation time and the finishing time of the previous task; 𝑊𝑊 𝑇𝑇 𝑇𝑇 𝑇𝑇 3.4 Linear Programming 𝑇𝑇 𝑊𝑊 𝑇𝑇 𝑊𝑊 𝑇𝑇 𝑤𝑤 𝑤𝑤 ) + 𝜆𝜆3 ∑ ∑ (𝜓𝜓𝑗𝑗𝑤𝑤 + 𝜃𝜃𝑗𝑗𝑤𝑤 ) + 𝜆𝜆4 ∑ 𝑦𝑦𝑗𝑗 + 𝜆𝜆2 ∑ (3𝑟𝑟𝑗𝑗 − ∑ ∑ 𝜌𝜌𝑗𝑗𝑤𝑤 𝑥𝑥𝑖𝑖,𝑗𝑗 𝑀𝑀𝑖𝑖𝑀𝑀 𝑓𝑓(𝑆𝑆) = 𝜆𝜆1 ∑ ∑ ∑( 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 + 𝑝𝑝𝑗𝑗𝑤𝑤 )𝑥𝑥𝑖𝑖,𝑗𝑗 𝑤𝑤=1 𝑖𝑖=0 𝑗𝑗=1 𝑗𝑗=1 𝑖𝑖=0 𝑤𝑤=1 𝑗𝑗=1 𝑤𝑤=1 𝑗𝑗=1 T. Garaix et al. / IFAC PapersOnLine 51-11 (2018) 264–269 s.t. 𝑤𝑤 ∑𝑇𝑇𝑗𝑗=0 𝑥𝑥𝑖𝑖,𝑗𝑗 ≤1 𝑤𝑤 ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 ≤1 𝑤𝑤 𝑤𝑤 ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 = ∑𝑇𝑇𝑢𝑢=0 𝑥𝑥𝑗𝑗,𝑢𝑢 𝑇𝑇 𝑤𝑤 ∑𝑊𝑊 𝑤𝑤=1 ∑𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 + 𝑦𝑦𝑗𝑗 = 𝑟𝑟𝑗𝑗 𝑤𝑤 𝜓𝜓𝑗𝑗𝑤𝑤 + 𝑀𝑀. 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 ≥ ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 𝑤𝑤 𝑤𝑤 + (∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 − 1). 𝑀𝑀 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 − 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 𝑤𝑤 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 − 𝑑𝑑𝑗𝑗 + (∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 − 1). 𝑀𝑀 𝑤𝑤 ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 ≤ 𝑐𝑐𝑗𝑗𝑤𝑤 𝑤𝑤 𝑑𝑑𝑗𝑗𝑤𝑤 ≥ (𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 ) + (∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 − 1). 𝑀𝑀 𝑎𝑎𝑗𝑗𝑤𝑤 ≥ (𝑑𝑑𝑖𝑖𝑤𝑤 + 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 ) + (𝑥𝑥𝑖𝑖𝑗𝑗𝑤𝑤 − 1). 𝑀𝑀 𝑑𝑑𝑗𝑗 ≥ 𝑎𝑎𝑗𝑗𝑤𝑤 𝑑𝑑𝑗𝑗 ≥ 𝑒𝑒𝑗𝑗 𝑑𝑑𝑗𝑗 ≤ 𝑙𝑙𝑗𝑗 𝑥𝑥𝑖𝑖𝑗𝑗𝑤𝑤 , 𝜃𝜃𝑗𝑗𝑤𝑤 , 𝜓𝜓𝑗𝑗𝑤𝑤 ∈ {0,1} , 𝑦𝑦𝑗𝑗 ∈ ℕ, 𝑑𝑑𝑖𝑖 , 𝑎𝑎𝑗𝑗𝑤𝑤 , 𝑑𝑑𝑗𝑗𝑤𝑤 ∈ ℝ Constraints can be divided into six sets: each set of equations represents one type system constraints. 1) The assignment of tasks to workers to define trips (constraints 1.1, 1.2 and 1.3) 𝑤𝑤 = The trip of a worker 𝑤𝑤 from task 𝑖𝑖 to task 𝑗𝑗 is defined by 𝑥𝑥𝑖𝑖,𝑗𝑗 1 (task 0 is the starting location and task |𝑇𝑇| is the finishing location). Hence, constraints 1.1, 1.2 and 1.3 ensure that for a worker 𝑤𝑤: from a task 𝑖𝑖 a worker 𝑤𝑤 can travel to at most one other task (constraint 1.1); to a task 𝑗𝑗 a worker can travel from at most one task (1.2); and if 𝑤𝑤 is assigned to a task 𝑗𝑗 after task 𝑤𝑤 𝑤𝑤 =1 = 1 and (1.3) can be rewritten as ∑𝑇𝑇𝑢𝑢=0 𝑥𝑥𝑗𝑗,𝑢𝑢 𝑖𝑖 then 𝑥𝑥𝑖𝑖,𝑗𝑗 meaning that 𝑤𝑤 must travel to another task (or to the finishing location) and cannot stay in this position. 2) The assignment of workers to tasks considering the number of workers required by each task (constraint 2) The number of assigned workers to task 𝑗𝑗 must comply with 𝑟𝑟𝑗𝑗 i.e. with the number of required workers to achieved task 𝑗𝑗 (constraint 2). 𝑦𝑦𝑗𝑗 is the number of missing workers to achieved 𝑇𝑇 𝑤𝑤 task 𝑗𝑗 and it is defined by: 𝑦𝑦𝑗𝑗 = 𝑟𝑟𝑗𝑗 − ∑𝑊𝑊 𝑤𝑤=1 ∑𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 . If a task 𝑗𝑗 requires 3 workers (𝑟𝑟𝑗𝑗 = 3), but only one worker 𝑤𝑤1 is 𝑤𝑤 assigned to 𝑗𝑗 so there exists one and only one 𝑥𝑥𝑖𝑖,𝑗𝑗 = 1 and (2) 𝑇𝑇 𝑤𝑤 𝑊𝑊 can be rewritten as ∑𝑤𝑤=1 ∑𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 + 𝑦𝑦𝑗𝑗 = 1 + 𝑦𝑦𝑖𝑖 = 3. By consequence, 𝑦𝑦𝑖𝑖 = 2 that is the number of missing workers to perform the task. 3) The assignment of tasks depending of the workers’ preferences (constraints 3, 4.1. and 4.2) Ideally, a worker should be assigned to tasks in his available geographical regions. However preference region violations are possible and have to be measured to define the third part of the objective function. In the constraint 3, if 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 = 0, the worker 𝑤𝑤 is assigned to task 𝑗𝑗 which is located into a non 267 ∀ 𝑖𝑖 = 0. . |𝑇𝑇|, 𝑤𝑤 = 1. . |𝑊𝑊 | (1.1) ∀ 𝑗𝑗 = 0. . |𝑇𝑇|, 𝑤𝑤 = 1. . |𝑊𝑊 | (1.3) ∀ 𝑗𝑗 = 0. . |𝑇𝑇|, 𝑤𝑤 = 1. . |𝑊𝑊 | (1.2) ∀ 𝑗𝑗 = 1. . |𝑇𝑇| (2) ∀ 𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑗𝑗 = 1. . |𝑇𝑇| (4.1) ∀ 𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑗𝑗 = 1. . |𝑇𝑇| (3) ∀ 𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑗𝑗 = 1. . |𝑇𝑇| (4.2) ∀𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑗𝑗 = 1. . |𝑇𝑇| (6.1) ∀𝑗𝑗 = 1. . |𝑇𝑇| , 𝑤𝑤 = 1. . |𝑊𝑊 | (5) ∀𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑖𝑖 = 0. . |𝑇𝑇|, 𝑗𝑗 = 1. . |𝑇𝑇| (6.2) ∀ 𝑗𝑗 = 1. . |𝑇𝑇| (7.2) ∀𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑖𝑖 = 0. . |𝑇𝑇|, 𝑗𝑗 = 1. . |𝑇𝑇| (8) ∀𝑤𝑤 = 1. . |𝑊𝑊 |, 𝑗𝑗 = 1. . |𝑇𝑇| ∀ 𝑗𝑗 = 1. . |𝑇𝑇| (7.1) (7.3) wished region, constraint 3 can be rewritten as, 𝑤𝑤 ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 implying 𝜓𝜓𝑗𝑗𝑤𝑤 ≥ 1. 𝜓𝜓𝑗𝑗𝑤𝑤 ≥ 𝑤𝑤 = 1 and When both tasks 𝑖𝑖 and 𝑗𝑗 are assigned to worker 𝑤𝑤, 𝑥𝑥𝑖𝑖,𝑗𝑗 the constraints 4.1: 𝑤𝑤 𝑤𝑤 + (∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 − 1). 𝑀𝑀 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 − 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 𝑤𝑤 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 − 𝑑𝑑𝑗𝑗 + (∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 − 1). 𝑀𝑀 (4.1.) (4.2.) can be rewritten as: 𝑤𝑤 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 − 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 − 𝑑𝑑𝑗𝑗 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 (4.1.) (4.2.) Constraint (4.1) ensures that if the completion time (𝑑𝑑𝑗𝑗 + 𝑤𝑤 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 ) of task 𝑗𝑗 exceeds 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 , the binary variable 𝜃𝜃𝑗𝑗 is set to 𝑤𝑤 1. Since 𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 − 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 > 0, the constraint (4.1.) is 𝑤𝑤 > 0 and ensures that rewritten as 𝑀𝑀. 𝜃𝜃𝑗𝑗 ≥ 𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 − 𝑇𝑇𝑊𝑊𝑠𝑠𝑢𝑢𝑠𝑠 𝑤𝑤 𝜃𝜃𝑗𝑗 = 1. Constraint (4.2.) ensures that 𝜃𝜃𝑗𝑗 = 1, if 𝑑𝑑𝑗𝑗 < 𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 , 𝑤𝑤 i.e. when 𝑇𝑇𝑊𝑊𝑖𝑖𝑖𝑖𝑖𝑖 − 𝑑𝑑𝑗𝑗 > 0, meaning that worker 𝑤𝑤 has to perform task 𝑗𝑗 before the end of his working time window. 4) The assignment of tasks to workers considering the legacy constraints meaning that a task can be assigned to authorized workers (constraints 5) only In the scenarios tackled in this paper, a worker can achieve a task requires by a customer if and only if the worker has been included in the customer’s contract (5), in this case 𝑐𝑐𝑗𝑗𝑤𝑤 = 1, 𝑤𝑤 𝑤𝑤 otherwise 𝑐𝑐𝑗𝑗𝑤𝑤 = 0 and ∑𝑇𝑇𝑖𝑖=0 𝑥𝑥𝑖𝑖,𝑗𝑗 < 0 that enforces 𝑥𝑥𝑖𝑖,𝑗𝑗 = 0. 5) The departure and arrival time of the workers to the tasks (constraints 6.1 and 6.2.) 𝑤𝑤 =1 If a worker 𝑤𝑤 is assigned to a task 𝑗𝑗 after a task 𝑖𝑖, so 𝑥𝑥𝑖𝑖,𝑗𝑗 𝑤𝑤 then constraint (6.1) can be rewritten as 𝑑𝑑𝑗𝑗 ≥ (𝑑𝑑𝑗𝑗 + 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 ) implying that the departure time 𝑑𝑑𝑗𝑗𝑤𝑤 of worker 𝑤𝑤 from task 𝑗𝑗 268 T. Garaix et al. / IFAC PapersOnLine 51-11 (2018) 264–269 must be greater than the starting time 𝑑𝑑𝑗𝑗 of 𝑗𝑗 plus the processing 𝑤𝑤 time 𝐷𝐷𝐷𝐷𝑟𝑟𝑗𝑗 of 𝑗𝑗. If 𝑥𝑥𝑖𝑖,𝑗𝑗 = 0, (6.1) can be rewritten as: 𝑑𝑑𝑗𝑗𝑤𝑤 ≥ −𝑀𝑀 and this constraint holds. Constraint (6.2) ensures that if a worker 𝑤𝑤 is assigned to task 𝑤𝑤 𝑗𝑗 after task 𝑖𝑖 (𝑥𝑥𝑖𝑖,𝑗𝑗 = 1) so 𝑎𝑎𝑗𝑗𝑤𝑤 ≥ (𝑑𝑑𝑠𝑠𝑤𝑤𝑖𝑖 + 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 ) must hold, implying that the arrival time 𝑎𝑎𝑗𝑗𝑤𝑤 of 𝑤𝑤 on the task 𝑗𝑗 is after his departure time 𝑑𝑑𝑖𝑖𝑤𝑤 from task 𝑖𝑖 plus the distance between the 𝑤𝑤 = 0, (6.2) can be rewritten as: 𝑎𝑎𝑗𝑗𝑤𝑤 ≥ −𝑀𝑀 tasks 𝑖𝑖 and 𝑗𝑗. If 𝑥𝑥𝑖𝑖,𝑗𝑗 and this constraint holds. 6) The starting times of each task according to their time windows and arrival time of the required workers (constraints 7.1. and 7.2.) The experiment has been achieved considering instances provided by (Pinheiro et al., 2016) and (Laesanklang and Landa-Silva, 2017) from real-world HHC scenarios in the United Kingdom. These instances offer the data for six different scenarios and seven different planning periods resulting in 42 instances. The instances are classified into two datasets: small one and large one. The smallest instances are those referred to as WSRP-A and WSRP-B, whereas the largest instances are those referred to as WSRP-C, WSRP-D, WSRP-E and WSRP-F, each dataset contains seven instances from 01 to 07. 4.2 Experiment conditions The starting time 𝑑𝑑𝑗𝑗 of task 𝑗𝑗 must be after the arrival time 𝑎𝑎𝑗𝑗𝑤𝑤 of all the required workers 𝑤𝑤 to perform the task (7.1). Moreover, a task 𝑗𝑗 has a time window [𝑒𝑒𝑗𝑗 , 𝑙𝑙𝑗𝑗 ] and can start only after the beginning 𝑒𝑒𝑗𝑗 of its time window (7.2) and before the end of its time window (7.3). The experiments have been performed under Windows 7 on a 3.60 GHz Intel Core i7-4790 computer with 16.0 GB RAM, which is equivalent to 2671 MFlops according to Dongarra (http://www.roylongbottom.org.uk/linpackresults.htm). The computer used by (Laesanklang and Landa-Silva, 2017) has the same number of MFlops. The objective function The linear programs have been solved by CPLEX 12.7 with the parameter “set threads 1”: in this case the CPU times of CPLEX is equal to the User Time. The objective function to be minimized involves four criteria which are balanced by four weights (𝜆𝜆1 , … , 𝜆𝜆4 ) corresponding to priority levels. The associated weights to each criteria clearly reflect the difference between the priority levels and are defined in (Algethami and Landa-Silva, 2017). Since one of the most important objectives of the service is to perform as many tasks as possible, the highest priority in the objective function is given to minimize unassigned tasks through weight 𝜆𝜆4 . Since, in practical case (in particular in HHC, see (Rasmussen et al., 2012) and (Laesanklang and Landa-Silva, 2017)), some workers must accept to perform some tasks that are over their working time window or outside their available geographical region; the second highest priority in the objective function is to minimize the number of workers time availability violations and the number of working region preference violations, through weight 𝜆𝜆3 . Weight 𝜆𝜆2 gives priority to minimize the preferences penalties: preferred workers-customers pairing, workers preferred regions and customers preferred skills. The degree of satisfaction of these preferences when worker 𝑤𝑤 is assigned to task 𝑗𝑗 is given by 𝜌𝜌𝑗𝑗𝑘𝑘 = 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 + 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 which has a value in the range [0, 3] since the satisfaction of the three types of preferences for each assignment has value 𝑝𝑝𝑎𝑎𝑗𝑗𝑤𝑤 , 𝑝𝑝𝑤𝑤𝑗𝑗𝑤𝑤 , 𝑝𝑝𝑑𝑑𝑗𝑗𝑤𝑤 ∈ [0,1]3 : a value of 1 means that 𝑤𝑤 is fully satisfied, a value 0 meaning 𝑤𝑤 is not at all satisfied. The satisfaction level is reverted to penalty by subtracting it from the maximal satisfaction score, which is 3𝑟𝑟𝑗𝑗 for each task 𝑗𝑗. These values are given by (Pinheiro et al., 2016). Lastly, through weight 𝜆𝜆1 , the lowest priority is given to minimize the monetary cost that represents the operational cost in terms of total travel cost 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 and worker’s salary 𝑝𝑝𝑗𝑗𝑤𝑤 . 4. NUMERICAL EXPERIMENTS 4.1 WSRP instances 4.3 Results Table 2 introduces: the best solution from (Laesanklang and Landa-Silva, 2017), with the objective value and the computational time; the optimal solutions found by CPLEX and the CPU time of CPLEX to find the optimal solutions. Let us note that the data of the instance C-02 are incoherent and so the instance is impossible to solve. Table 2. Linear programming results A-01 A-02 A-03 A-04 A-05 A-06 A-07 B-01 B-02 B-03 B-04 B-05 B-06 B-07 C-01 C-02 C-03 C-04 C-05 C-06 C-07 AVG |𝑇𝑇| 32 31 38 28 13 28 13 36 12 69 30 61 57 61 177 (Algethami and Proposed MILP Landa-Silva, 2017) S* t (sec) S* t (sec) |𝑊𝑊| 23 3.49 7.00 3.119 2.11 22 2.49 8.00 1.608 2.18 22 3.00 14.00 1.978 5.23 19 1.42 5.00 0.521 1.87 19 2.42 1.00 1.574 0.21 21 3.55 5.00 2.516 1.28 21 3.71 1.00 2.559 0.11 25 1.70 21.00 0.294 7.06 25 1.75 2.00 0.684 0.07 34 1.72 6003.00 0.229 82.47 34 2.07 25.00 0.429 6.50 32 1.82 585.00 0.355 46.21 32 1.62 184.00 0.257 38.11 32 1.79 300.00 0.262 47.71 1037 114.21 301.32 113.406 8959.79 150 32 29 158 6 1077 979 821 816 349 103.52 11.15 12.44 140.44 4.30 20.93 550.29 103.449 1775.47 90.00 11.129 23.71 55.00 12.427 7.51 323.52 140.319 615.81 1.00 4.304 0.17 424.11 20.07 581.179 T. Garaix et al. / IFAC PapersOnLine 51-11 (2018) 264–269 The average value of the objective of the MILP resolution is 20.07 in 581.179 seconds and all instances are proved to be optimal, while the average value of the (Laesanklang and Landa-Silva, 2017) is 20.93 in 424.11 seconds, but the solutions are not proved optimal. When the instances have less than 40 tasks, the linear formulation is solved in few seconds whatever the numbers of workers. CPLEX solves these instances in less than 15 seconds although the numbers of workers can be high: 821 workers for instance C-05. The instance C-04 has 32 tasks but required a longer time to be solved (23 seconds), due to a huge number of workers: 979. The instances with more than 100 tasks have a long CPU time up to four hours for instance C-01 due to a 𝑤𝑤 since 𝑤𝑤 ∈ huge number of variables, in particular 𝑥𝑥𝑖𝑖,𝑗𝑗 [0; 1037] and 𝑖𝑖, 𝑗𝑗 ∈ [0; 177]². Table 3 provides the details of the optimal solutions found by CPLEX. For convenience, we define: 𝑇𝑇 𝑇𝑇 𝑤𝑤 𝑤𝑤  𝑧𝑧1 = ∑𝑊𝑊 𝑤𝑤=1 ∑𝑖𝑖=0 ∑𝑗𝑗=1( 𝑑𝑑𝑖𝑖𝑑𝑑𝑑𝑑𝑖𝑖,𝑗𝑗 + 𝑝𝑝𝑗𝑗 )𝑥𝑥𝑖𝑖,𝑗𝑗 𝑤𝑤 𝑤𝑤  𝑧𝑧2 = ∑𝑇𝑇𝑖𝑖=0 ∑𝑊𝑊 𝑤𝑤=1 𝜌𝜌𝑗𝑗 𝑥𝑥𝑖𝑖,𝑗𝑗 𝑇𝑇 𝑊𝑊  𝑧𝑧3 = ∑𝑗𝑗=1 ∑𝑤𝑤=1(𝜓𝜓𝑗𝑗𝑤𝑤 + 𝜃𝜃𝑗𝑗𝑤𝑤 )  𝑧𝑧4 = ∑𝑇𝑇𝑗𝑗=1 𝑦𝑦𝑗𝑗 Let us note that very few instances have a 𝑧𝑧4 > 1 (i.e. some unassigned tasks) which is heavily penalized in the objective function because it is the priority criteria to minimized thanks to a 𝜆𝜆4 bigger than the others 𝜆𝜆. Table 3. Details of the solutions A-01 A-02 A-03 A-04 A-05 A-06 A-07 B-01 B-02 B-03 B-04 B-05 B-06 B-07 C-01 C-02 C-03 C-04 C-05 C-06 C-07 S* 3.119 1.608 1.978 0.521 1.574 2.516 2.559 0.294 0.684 0.229 0.429 0.355 0.257 0.262 113.406 𝑧𝑧1 555.60 529.95 639.78 407.90 237.25 511.73 247.71 951.24 318.43 1235.32 378.64 1153.75 917.87 1000.82 43797.19 𝑧𝑧2 60.38 73.62 96.21 69.92 25.15 70.08 24.33 98.16 28.48 197.3 77.68 164.56 156.85 167.56 167.88 𝑧𝑧3 103.449 11.129 12.427 140.319 4.304 349828.82 4625.08 3304.08 38755.94 1408.63 155.39 28.56 21.23 181.46 7.99 128 18 21 119 5 5. 4 2 3 0 1 4 3 0 0 0 0 0 0 0 136 𝑧𝑧4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 2 0 CONCLUDING REMARKS This paper introduces a linear formulation for a Workforce Scheduling and Routing Problem which has been benchmarked on literature instances. The linear formulation is able to solve 269 instances up to 177 workers and 1077 tasks. For the smallest instances up to about 40 tasks, the linear programming solves them in few seconds, and the biggest instances require several hours. Our researches are now directed on resolution of the biggest instances with more than 400 tasks up to 1500 and a metaheuristic may be considered. Acknowledgements: This work was carried out and funded within the framework of the European Regional Development Fund and other European programs. 6. REFERENCES Akjiratikarl, C., Yenradee, P., Drake, P.R., 2007. PSO-based algorithm for home care worker scheduling in the UK. Comput. Ind. Eng. 53, 559–583. doi:10.1016/j.cie.2007.06.002 Algethami, H., Landa-Silva, D., 2017. Diversity-based adaptive genetic algorithm for a Workforce Scheduling and Routing Problem, in: Evolutionary Computation (CEC), 2017 IEEE Congress On. IEEE, pp. 1771–1778. Castillo-Salazar, J.A., Landa-Silva, D., Qu, R., 2016. Workforce scheduling and routing problems: literature survey and computational study. Ann. Oper. Res. 239, 39–67. Cordeau, J.-F., Laporte, G., Pasin, F., Ropke, S., 2010. Scheduling technicians and tasks in a telecommunications company. J. Sched. 13, 393–409. doi:10.1007/s10951-010-0188-7 de Armas, J., Lalla-Ruiz, E., Expósito-Izquierdo, C., LandaSilva, D., Melián-Batista, B., 2015. A hybrid GRASPVNS for ship routing and scheduling problem with discretized time windows. Eng. Appl. Artif. Intell. 45, 350–360. doi:10.1016/j.engappai.2015.07.013 Eveborn, P., Flisberg, P., Rönnqvist, M., 2006. Laps Care—an operational system for staff planning of home care. Eur. J. Oper. Res. 171, 962–976. doi:10.1016/j.ejor.2005.01.011 Laesanklang, W., Landa-Silva, D., 2017. Decomposition techniques with mixed integer programming and heuristics for home healthcare planning. Ann. Oper. Res. 256, 93–127. doi:10.1007/s10479-016-2352-8 Misir, M., Verbeeck, K., De Causmaecker, P., Berghe, G.V., 2010. Hyper-heuristics with a dynamic heuristic set for the home care scheduling problem, in: Evolutionary Computation (CEC), 2010 IEEE Congress On. IEEE, pp. 1–8. Pinheiro, R.L., Landa-Silva, D., Atkin, J., 2016. A Variable Neighbourhood Search for the Workforce Scheduling and Routing Problem, in: Pillay, N., Engelbrecht, A.P., Abraham, A., du Plessis, M.C., Snášel, V., Muda, A.K. (Eds.), Advances in Nature and Biologically Inspired Computing. Springer International Publishing, Cham, pp. 247–259. doi:10.1007/978-3-319-27400-3_22 Rasmussen, M.S., Justesen, T., Dohn, A., Larsen, J., 2012. The Home Care Crew Scheduling Problem: Preference-based visit clustering and temporal dependencies. Eur. J. Oper. Res. 219, 598–610. doi:10.1016/j.ejor.2011.10.048