Shaking
This phase is the heart of the algorithm. The choice of the neighborhoods and the definition of how to explore them are crucial. Two different types of operators are used; the move and the cross-exchange operator. A more detailed explanation of them can be found in Van Breedam (1994), and Kindervater and Savelsbergh (1997).
Basically, the move operator moves a sequence of jobs from one tour to another tour. The sequence, as well as the tours are chosen randomly; but such that the segment of jobs can be treated by the new nurse. The sequence is uniformly distributed between 1 and the minimum of the current neighborhood size and the maximum tour length.
Cross-exchange is a combination of two moves in the sense that a segment is moved from tour 1 to tour 2 and a segment from tour 2 is moved to tour 1. Again, the assignment constraints have to hold. The tours and the segments are chosen randomly. The upper bound of the segment length depends on the maximum tour length and the current neighborhood size.
The size of the neighborhoods was determined with the help of a sensitivity analysis. Different combinations of move and cross exchange operators have been tested. A number of 4 move operators and a number of 8 cross exchange operators give the best results. Hence, in total 12 neighborhoods are used.
Local search
The obtained solution of the shaking step might not be optimal according the ordering of the jobs. The improvement heuristic 3-opt introduced by Lin (1965) is used to optimize the two changed tours. Basically, 3-opt exchanges 3 edges and replaces them by 3 new ones. A tour is usually accepted if it leads to a smaller total distance. In this approach we used a different concept of validation. The tour is first optimized according reduced waiting times and an optimal break position. Then the driving times and time window violations are compared to the previous tour. If both have improved the tour is accepted. The best improvement strategy was used.
Acceptance
In each iteration it has to be decided whether to keep the new solution or not. Plenty of possibilities exist. If only improving solutions are accepted during the search, one could easily get trapped in local minima. For diversification reasons it might be even beneficial to allow infeasible solutions temporarily. We defined an acceptance criterion consisting of two parts, a penalty function and a probability measure.
If the new solution is better according to the penalty function (41) it is always accepted. Otherwise, a random number between 0 and 1 is chosen. If it is smaller than the probability measure described in (42), the new solution is also accepted. The search starts then again with neighborhood ; if the solution is not accepted with neighborhood . The penalty function consists of the objective function , the time window violations , and the working time violations is hereby the solution, is the solution of tour , and is the solution of nurse 's tour. and are dynamically adjusted weights. If the solution is feasible according to time windows (resp. working time) the weight is divided by . If it is infeasible, it is multiplied by this factor as long as the weights keep in the interval [1,10]. The initial value for both is 10. The values of the boundaries of the interval as well as the initial value have been the result of various test runs.
(42)
In (42) equals the number of iterations, is the probability of accepting a solution straight at the beginning, whereas is the probability of accepting a solution after iterations. The values of , the bounds of the interval, the starting value of 10, , and have been estimated with the help of a sensitivity analysis. is set to 1.001, equals 0.3, and is set to 0.1.