# Balancing Staff Finishing Times vs. Minimizing Total Travel Distance in Home Healthcare Scheduling
## 4 Solution Method
### Initial Solution
The operator will then concatenate the two selected paths and two unselected paths together. ### Ruin and Recreate Procedure

The procedure aims to help escape from the local optimum by deleting one of the caretakers (routes) and trying to feasibly insert the deleted patients into the remaining routes using the Algorithm 2. If there is no place to insert them, a new caretaker will be spawned. The main idea is to jump out of being stuck in a local optimum and reduce the total number of caretakers at the same time [31]. The pseudocode is presented in Algorithm 3. Figure 1: Example of moving operation. Figure 3: Example of path exchange operation. ## 5 Results and Discussions

To evaluate the efficacy of the proposed algorithm, we applied it to the well-known benchmark instances, [PERSON]'s instances. The initial objective behind the creation of [PERSON]'s instances was to minimize the total number of customers and total travel distance [32; 33]. In this work, we modify the benchmark instances to better suit our problem. The vehicles can represent caretakers, while the customer nodes can represent patients. The objective function is modified into a bi-objective optimization problem to minimize the total finishing time differences between each pair of caretakers and minimize total distance. The benchmark includes six varieties based on the node distribution pattern and the range of time windows: random with narrow and wide time windows (R1, R2), clustered with narrow and wide time windows (C1, C2), and a mixture of random and clustered with narrow and wide time windows (RC1, RC2). All of the algorithms in this study were coded using the Julia programming language [34; 35] and executed on AMD Ryzen 9 12-core processors with 3.8 GHz CPU and 64 GB of RAM. To study the sensitivity of the two objectives, each of them will first be used as a single objective to the problem and then the bi-objectives will be considered and compared using the proposed method in Section 3. Table 2 presents the computational results of a comparison between our algorithm and the exact algorithm for the problem with an objective function to minimize the total finishing time differences between each pair of caretakers. To clarify the column headings in Table 2, Name represents the name of the instance starting with the distribution of the problem followed by the width of time windows and the numbering of problem in the last two digits. Time represents execution time in seconds. The rest of the columns show a comparison between our results and the optimal solutions obtained by the exact algorithm [36]. The second and third columns show the number of vehicles obtained by our algorithm and by the exact algorithm, respectively. The fourth and fifth columns show the calculated total distance from our solution and the optimal solution, respectively. The objective values (minimizing the total finishing time differences in each pair of caretakers) from our algorithm and from the exact algorithm are reported in the sixth and seventh columns. Columns eight and nine show, in brackets, the minimum and maximum number of patients per caretaker, respectively. Note that cases where the optimal solution cannot be found within the defined execution time (1 h) are indicated by \"-\". Additionally, Table 2 reports only the lowest number of caretakers. We can see that the algorithm can find the optimal solution in most cases for 25 customers. In some instances, the algorithm can find another optimal solution (same value of total difference) that is more balanced (the minimum number of patients per caretaker is greater while the maximum number is lower) than the optimal solution obtained from the Gurobi solver.