{'fraction_non_alphanumeric': 0.022859266830832132, 'fraction_numerical': 0.008037912930353575, 'mean_word_length': 4.680654526260227, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Vehicle Routing Problem for the Collection of Medical Samples at Home: Case Study of Morocco

This paper aims to solve the problem of sampling and collecting blood and/ or urine tubes from sick people at home via a medical staff (nurse/ caregiver) to the laboratory in an optimal way. To ensure good management, several constraints must be taken into account, namely: staff schedules, patient preferences, the maximum delay time for a blood sample, etc. This problem is considered as a vehicle routing problem with time windows, preference and priority according to urgent cases. We first proposed a mathematical formulation of the problem by using a mixed integer linear programming (MILP) as well as various metaheuristics. Also, we applied this method to a real instance of a laboratory in Morocco (Témara) named Laboratory BioGuich, which gave the most optimal results. Keywords—Optimization; metaheuristics; vehicle routing problem; allocation and planning; home care


I. INTRODUCTION
For twenty years, the population of Morocco has climbed by ten million according to the 2014 census estimating a considerable increase in the rate of aging people implying an increase in the number of patients with chronic diseases requiring treatment and periodical samples to ensure adequate medical follow-up. This changes the philosophy of doing things that encourage medical structures (hospitals, laboratories, etc.) to diversify their services and thus to move around on their own in order to provide the necessary care and samples for patients.
In general, a pickup and delivery problem (PDP) is a problem where a client can request that a certain quantity of goods and merchandise have to be delivered or collected in their homes or a specific sites. Usually, a couple origin/destination is considered for each product. Reference [1] proposed a bi-objective genetic algorithm in order to resolve the PDP applied on oil distribution. The PDP became the Dial-a-Ride Problem (DARP) when transporting people is concerned instead of merchandise. This variant includes a quality service with the aim of minimizing the wait time and wait return generally used for modeling the transportation issue of disabled and aged people from their homes to the hospital. A more detailed state of the art concerning these problems can be found in the works of [2] and [3].
This article deals more specifically with the problem of collecting and delivering samples during a specific time interval where a qualified caregiver is assigned the task of doing the process.

II. LITERATURE REVIEW
In the context of home medical sampling services, the issue of logistics affects several points, namely the problem of allocation and planning as well as the problem of pickup and delivery.
In the work of [4], [5] and [6], the authors considered the planning and routing of caregivers (nurses) at home and developed a system of spatial decision support. To do this, a heuristic was carried out to build routes for each nurse while limiting itself to the constraint of unavailability of staff and caregivers. Another aspect of the problem was introduced by [7] who proposed a variant of the Dial-a-Ride problem where a team of caregivers is sent simultaneously to the patient in order to perform a required service before the main service (care / blood samples, etc.) such as complete washing of the patient, change of clothing, blood pressure measurement, taking pills… This requires coordination between the various actors (caregivers, nurses…) to provide these services in an optimal way. This same author underlined the importance of the constraints of synchronizations which make it possible to emphasize the priority aspect of the visits.
Reference [8] discussed a vehicle scheduling problem encountered in home care logistics. This involves providing patients with medical devices and home care company drugs, delivering special drugs from hospital to patients, and collecting biological samples and unused drugs and medical devices for patients. The problem can be seen as a particular vehicle routing problem with simultaneous deliveries, pick-up and time windows, with four types of requirements: delivery from the depot to the patient, delivery from a hospital to the patient, pickup from patient location to depot and pickup from patient location to a medical laboratory. In the event that the patient needs medication provided by the hospital, the vehicle should visit the hospital first. Two mixed programming models have been proposed with a genetic algorithm (GA) and a taboo search method (TS). The genetic algorithm is based on a chromosome permutation, a division procedure and a local search. The attributes for assigning routes for patients form the basis of the tabu search method. These approaches are tested on test cases from existing VRPTW benchmarks. References [9] and [10] proposed a vehicle routing problem with time windows, synchronization, precedence and lunch break constraints for home care services in order to add a realistic aspect of the problem by adding the break aspect for caregivers, the authors applied a mathematical formulation solved by a linear solver for small instances, then used various metaheuristics for larger instances. In order to make a detour on the problem encountered in the home health care sector, a classification of recent papers addressing the vehicle routing problem in HHC according to two main criteria. The first one will be the optimization criteria, the second one are the constraints studied. Table. I shows the overall objectives encountered in the recent papers and Table.II shows the main optimization criteria considered in the home health care issues.

III. PRESENTATION OF THE PROBLEM
The problem dealt with in this article falls under the case of the vehicle routing problem with time windows, synchronization and priority.
Suppose V is the set of requested services and V1 the subset of fixed-time requests and V2the subset of flexible hours requests. Each request i is characterized by a location (patient's home) and a time slot [ai, bi] where each caregiver (worker) is forced to take and / or collect the sample (blood / urine tube, etc.).
Let ei be the estimated turnaround time required for sample collection. In the event that a required service has been performed by an external entity, a cost ci is considered. For specific tests where it is imperative to take / collect a sample, its duration must not exceed a maximum duration between the collection and the performance of the test within the laboratory and is affiliated a variable Dmaxi, unless the test becomes unnecessary. In general, when the samples are taken, it is necessary that the tubes arrive within a period not exceeding 90 minutes at the laboratory, as for the collection, they are ensured by vehicles managed by the laboratory itself which run continuously in order to collect the tubes across the geographical field where the laboratory performs its services. These critical samples are estimated at 30% of the overall tests carried out by the laboratory in question, which is why the laboratory has delegated this task to a team specially designed for this and which travels only for this kind of case.
To generalize and simplify the problem, we have considered a daily work schedule.
In this article, the main goal is to find a set of possible routes to deliver and collect blood / urine tubes from the laboratory to the homes of patients (clients) and vice versa in an optimal way. For this, we will follow a plan as follows: • Propose a mathematical formulation of the problem considered.
• Use a linear CPLEX solver to find an exact result of the problem.
• Apply 2 metaheuristic algorithms in order to find an approximate solution to the problem.
• Apply these techniques on a real instance of BioGuich laboratory for a maximum interval of one working day.
• Compare the different results obtained by the techniques applied.

IV. MATHEMATICS FORMULATION
Several mathematical formulations have been proposed in order to modify this type of problem. In this section, we will present a formulation known for its simplicity which was first introduced by [31]. This model is defined by a directed graph where N is the set of sampling requests, D represents the starting point and the end point of each nurse and finally C denotes the laboratory / collection point combination each specified by her collection time in accordance with its transport schedule. Node 0 represents the laboratory and each node represents a patient who needs to be sampled. Each arch has a weight that represents the time the vehicles travel from the laboratory to the patient's home. The time required to charge an entire collection point is denoted by. A set M of nurses is available to slave all requests. Nurses are denoted by the index k such that, and are characterized by a work schedule (for start time and end time), a starting point usually the laboratory and an end point either a collection point or the laboratory. We also introduce the parameter SV which represents a real number and an indicator for each request i which takes the Boolean value 1 if the test is critical and 0 otherwise. In the case of the laboratory whose study is Abbr.
Subject to: ∀ ∈ = N 1 ∪ N 2 : t : Time of arrival at the patient's home (20) ∀ ∈ , ∀ ∈ :: Time of arrival of nurse k at the collection point with collection time equal to t (21) ∀ ∈ : Ret :: Nurse's delay k (Additional work) ∀ ∈ : :: Delay of request I The objective function (1) is to minimize delays while respecting the time windows of the patients and the hourly planning of the nurses responsible for taking and collecting the blood / urine tubes as well as minimizing the total sum of the distances traveled. The constraint (2) indicates that each node can only be visited once and only once. The constraint (3) ensures the continuity of the roads. The constraints (4), (5) and (6) are put in place to define the starting and ending points of each of the routes. Constraint (7) specifies the possible preferences and requirements of certain nurses for a patient. The constraints (8), (9) and (10) represent the duration of a trip between two points. The work schedule is ensured by the constraints (11), (12) and (13) while the constraints (14) and (15) define the time windows of each request established by a patient. The constraint (16) is specially designed to allow delays provided they are delimited. Finally, the constraints (17) and (18) serve to demonstrate that the time elapsed between the collection of a critical test and the moment when it is tested in the laboratory must not exceed a time limit.DMax i . The constraints (19), (20), (21), (22), (23) and (24) define the nature of the decision variables.

V. RESOLUTION APPROACH
This approach is based on the breakdown of the problem into a daily routing problem. First, we will determine the routes for each nurse for a working day. At the beginning, we considered the planning for a large period going from a week to a month, but after a reconsideration and broad reflection we found that this idea is not attractive and that it complicates the problem of planning given the number of constraints to consider is large. To remedy this, it has been found that the best solution is to schedule the nurses' visits in accordance with the demands of the patients day by day and by doing this, a load balancing is achieved.
The experiments we performed using the linear CPLEX solver showed a limitation and that we could only get good results for small instances. The fact that the problem studied in this paper will be applied on a real instance and therefore a practical case, the demands will only increase and for that we are deemed to find another approach that will satisfy the demands of the patients for thus better manage the movements of nurses to the patients concerned, which leads to find a more persistent and more adequate approach such as the approximate methods, namely in this case the metaheuristics of which we will use two methods; the taboo search algorithm and the variable neighborhood search algorithm.

A. Neighborhood Operators
The tabu search and variable neighborhood search algorithms are based on two types of neighborhood operators. The first type is the insertion operator which has three possible movements: -A request which already belongs to a route can be inserted into another route, a request subcontracted by an external entity can be inserted into a route and finally, a request belonging to a route can be removed from a route and added to the set of subcontracting requests.
The second type of neighborhood operator is the permutation operator. This operator has two types of movement. A request belonging to the set of subcontracted requests can be exchanged with a request belonging to a route, the second movement is that a request previously belonging to a route can be exchanged with another request belonging to the same route or to a different route.

B. Algorithms
The tabu search and variable neighborhood search algorithms are based on two types of neighborhood operators. The first type is the insertion operator which has three possible movements: -A request which already belongs to a route can be inserted into another route, a request subcontracted by an external entity can be inserted into a route and finally, a request belonging to a route can be removed from a route and added to the set of subcontracting requests.
The second type of neighborhood operator is the permutation operator. This operator has two types of movement. A request belonging to the set of subcontracted requests can be exchanged with a request belonging to a route, the second movement is that a request previously belonging to a route can be exchanged with another request belonging to the same route or to a different route.

1) Initial solutions:
The first step to consider before using each of the two methods introduced is to generate a first solution commonly called the initial solution. This solution is built by inserting patient requests into the routes one by one within the best possible position, taking into account their priority. In this case, priority is given to requests with fixed schedules by considering the sizes of the time windows in descending order for each visit of a patient, while the requests with variable schedules, they are processed by the numbers of days remaining until 'at the end of their specified time window. If a request is not inserted, all of these requests will be placed in a list of deferred requests. For critical requests, a collection point is inserted.
2) The taboo search algorithm: This algorithm follows a classical structure: from an initial solution, the algorithm moves from the current solution to another solution, exploring the neighborhood while avoiding those which are currently taboo until meeting the stopping condition. In this case, we opted to use the type of insertion operator. The algorithm in question uses a taboo list of recently moved requests. The stop condition used in this case is the maximum number of iterations corresponding to the size of the tabu list.

C. Numerical Results
The laboratory to which we will apply the algorithms and methods described above has provided the study with real instances of a working week, namely a working week starting on Monday and ending on Friday, including the working hours for each stall day. 8:00 a.m. to 6:00 p.m. For the generalization of the studied problem, the staff rest time has not been taken into account and may be the subject of a future work as a perspective. We have generated two groups of instances, the first group is a relatively small and simple set made up of 10, 15 and 20 requests, with 6, 9 and 12 requests at fixed times respectively. The number of nurses allocated for these requests is usually 1 or 2 and no collection point for this instance group (No critical testing). This small instance is practically tied up for the exact method (MILP) in order to obtain an optimal solution to be able to compare it with the results obtained by the heuristic algorithms. The second group of instances is obtained by the BioGuich laboratory for real requests during a working week, the number of requests for each day generally varies from 150 to 200 in the majority of cases with respectively requests to fixed times from 90 up to 120. We have opted to apply the algorithms proposed for the number of requests of 150, 175 and 200 with respectively fixed time requests of 90, 105 and 120. For critical tests, the percentage is approximately 20% (5 collection points) which will be slaved and will depend on the distance from the laboratory.

Algorithm1. VNS
Start -Initial solution generation  Sol best -k 1 -As long as a predefined number of iterations without improvement: -Repeat -S' Shake yourself using the kth operator and start from The tests of the methods studied in this paper were performed on a 2.4 GHz Intel Core (TM) i7-5500 CPU machine with 8GB of RAM, running Windows 10 Home. The codes were programmed in CPLEX Studio version 12.10 for the mathematical formulation, and Python 3.8 for the heuristic algorithms. In order to better understand Table.III, each row represents a set of 10 instances. The first three columns represent the size of each instance and is made up of the number of patients, the number of nurses and the collection point. The MILP column represents the percentage of instances where the linear CPLEX solver has found an optimal solution. The maximum execution time has been limited to a maximum of one hour. In the case where CPLEX has not found an optimal solution, we use the best solution found after one hour of execution to compare it with the results of the heuristic algorithms.
The remaining two columns indicate the proportion of instances where each algorithm found a better solution than that found by the linear CPLEX solver. As it is clear, the linear solver always find optimal results than that of heuristics provided that the collection point is not used, but when a collection point comes into effect, the heuristics manage to converge towards a better solution than that of the linear solver. Despite the power of heuristic algorithms compared to the linear solver, this does not prove that the latter have been able to find optimal solutions.
Regarding the speed of the proposed algorithms, it is obvious that the taboo search algorithm is clearly faster than the others, despite this the quality of the solutions produced by the latter are inferior.
After having carried out several tests on small instances, it was deduced that the parameters of the strategic values of the heuristic algorithms are as follows: the size of the tabu list is fixed at 65% of the total number of requests, and the number of iteration without improvement while respecting the best solutions was fixed at 1000. For the variable neighborhood search algorithm, the maximum number of iterations was fixed at 500. These values were chosen in order to be able to obtain results for real instances of the problem investigated in a reasonable time. Table.IV shows the results obtained by the group of instances number 2, of a week of work in the BioGuich laboratory. Each row represents a set of 10 instances. The first three columns show the number of patients, the number of nurses and the number of collection points. Columns 4 and 6 show the total percentage of instances for which effective solutions are found, which can give us an idea of which method gave the best results. Columns 5 and 7 indicate the execution time of each solution for the two algorithms which specify that the variable neighborhood search algorithm is faster than taboo search algorithm while for the quality of the results obtained. Table.V provides details on a work week (End of September 2020) in the BioGuich laboratory with a total of 801 requests executed by 8 nurses during the week. Table.VI and Table.VII highlight the objective values of each criterion of the heuristic algorithms studied in this paper.

VI. CONCLUSION AND PERSPECTIVES
In this paper, we have studied a specific case of the vehicle routing problem for blood / urine samples and collection of samples in the city of Témara located in Morocco. As part of this study, the BioGuich laboratory for medical analyzes since the start of containment in March 2020 due to COVID-19 in Morocco has added the service to travel to patients at their homes in order to take samples and collect required to limit patient movement. For this, it turned out to be necessary for the laboratory to develop a logistics system aimed at optimizing resources for proper management of this service. The result obtained by this study is the development of two meta-heuristics to optimize and plan as best as possible the movements of nurses in order to control the demands of patients, which are constantly increasing day by day. This study was able to save the laboratory considerable time and increase the traceability of the samples collected, which improves the quality of the tests carried out. For future work, it is necessary to add human constraints such as breaks for nurses, introduce a penalty system for late tests, refine the available routes in order to minimize travel times. This study was able to save the laboratory considerable time and increase the traceability of the samples collected, which improves the quality of the tests carried out.