• No results found

The two aims of this Chapter are explored in two studies. The first study uses a Vari- able Neighbourhood Search (VNS) to investigate which pair-wise relationships appear throughout the optimisation process across all instances in both datasets. We set the VNS to optimise one of the five objectives each time, while monitoring the evolution of the others. We chose to use VNS for this task as it systematically changes only one solution at a time, so that we can track how the objectives change from one to another solution. The second study uses NSGA-II [65] to find out which pair-wise relationships appear in the approximation sets obtained with each dataset. In this case, we chose NSGA-II because we wanted to obtain not one, but a set of non-dominated solutions.

7.2.1 VNS settings

We encode route-plans as sequences of customers identifiers (customers ids). Each sequence represents a route within the route-plan. The first and last element of all sequences is 0, meaning the depart and return from/to the depot. For example, the route-plan (0 2 1 4 0 5 3 6 0 9 8 0) has three routes. The first route is (0 2 1 4 0), the second route is (0 5 3 6 0) and the third route is (0 9 8 0). In the first route, the vehicle departs from the depot 0, then visits customer 2, followed by customers 1 and 4 be- fore returning to the depot 0. The other two sequences in the encoding have similar interpretations.

of customers with distance k within a route-plan. This distance k corresponds to the number of elements in between two other elements. For example, the distance k be- tween the customers with ids 2 and 5 in the route-plan (0 2 1 4 0 5 3 6 0 9 8 0) is 4. Initially, a route-plan is randomly generated as a list (sequence) of customers ids. VNS swaps pairs of customer ids from k = 1 (adjacent customers) to k = L−1 (customers in the extremes of the route-plan), where L is the number of elements (length) of the route-plan. If a better solution is found for a given k, the process starts over by resetting kto 1. This process finishes when no improvement occurs from k=1 to k = L−1. As mentioned before, the improvement is tested according to the fitness value of only one objective.

Figure 7.1 shows how VNS operates when using the route-plan (0 2 1 4 0 5 3 6 0 9 8 0). It first swaps customers with distance k equal to 1. That is, it will swap the pair of customers in positions i = 1 and j = 2. Next, VNS will swap the pair of customers in positions i = 2 and j = 3. This will continue until i and j take values 9 and 10, respectively. The process will then start over with k equal to 2. VNS will therefore swap the pair of customers in positions i = 1 and j= 3. The whole process will finish

when k is equal to its maximum value 9. If a better solution was found from k = 1 to k =9, the process will start over using this new solution as starting point. If no solution was found, the process will be over.

In the experiments, VNS was run 20 times for each objective and instance of both datasets with the same seeds.

7.2.2 NSGA-II settings

For the NSGA-II development we used the implementation of an Evolutionary Algo- rithm (EA) for the VRPTW [158] as a starting point. This implementation is based on the optimisation framework ParadisEO-MOEO [25]. We extended this implementation to support multiple objectives, process our dataset and use the NSGA-II.

In this implementation we used a different encoding to that of the VNS. The encoding of an individual for the NSGA-II is a list of routes (a list of lists). Each element in a

i j 0 2 1 4 0 5 3 6 0 9 8 0 i: 1, j: 2 [k = 1] 0 1 2 4 0 5 3 6 0 9 8 0 swap i: 2, j: 3 0 2 4 1 0 5 3 6 0 9 8 0 swap i: 3, j: 4 0 2 1 0 4 5 3 6 0 9 8 0 swap i: 4, j: 5 ... 0 2 1 4 0 5 3 6 0 8 9 0 swap i: 9, j: 10 i j 0 2 1 4 0 5 3 6 0 9 8 0 i: 1, j: 3 [k = 2] 0 4 1 2 0 5 3 6 0 9 8 0 swap i: 2, j: 4 0 2 0 4 1 5 3 6 0 9 8 0 swap i: 3, j: 5 ... 0 2 1 4 0 5 3 6 8 9 0 0 swap i: 3, j: 5 ... i j 0 2 1 4 0 5 3 6 0 9 8 0 i: 1, j: 10 [k = 9] 0 8 1 4 0 5 3 6 0 9 2 0 swap i: 1, j: 10 [k = 9]

Figure 7.1:Example of VNS running using the route-plan (0 2 1 4 0 5 3 6 0 9 8 0) list represents a customer. The position of a customer within a list specifies the turn in which he/she will be served.

The population is initialised using a constructive method that aims at satisfying first the customers farthest from the depot. After the initialisation process, all individuals are evaluated. The fitness assignment procedure of NSGA-II is called non-dominated sorting criterion [65]. It consists of dividing the population into non-dominated fronts. This way, the fitness of an individual depends on the depth of its front.

Once the individuals are evaluated, a sub-group is selected for crossover. This pro- cess recombines two parents (solutions) with certain probability γ, creating one or two offsprings (new solutions). In this implementation, NSGA-II has 3 standard crossover operators: (1) One-point crossover, (2) Edge crossover and (3) Generic crossover [21]. In the One-point crossover, a random number of consecutive customers are copied from one parent to another, removing duplicates. The Edge crossover consists of (1) constructing new intermediate solutions by joining edges from both route-plans (par- ents) and (2) merging sub-tours creating feasible solutions. In the Generic crossover, an entire route is copied from one route-plan to another, removing duplicates.

In order to promote diversity within the population, the offspring solutions undergo a mutation operation with certain probability ν. NSGA-II was run using four standard

mutation operators (Swap, Insertion, Inversion and Displacement) [21].

The Swap mutation interchanges the position of two customers within a route-plan. The Insertion mutation consists of moving a random customer to a new position within the route-plan. In the Inversion mutation, customers in a portion of the route-plan are reversed. The Displacement mutation is a generalisation of the insertion mutation in which a number of consecutive customers are moved.

In order to re-use the genetic operators of the previous implementation [158], route- plans were forced to be feasible in terms of vehicle capacity constraints. This process was carried out by splitting routes in which the vehicle capacity was exceeded.

In the experiments, NSGA-II evolved a population of 50 individuals for 10000 gen- erations. We compared Solomon’s 100 customer dataset against our dataset with 100 customers. The algorithm is applied to each dataset 20 times (repetitions) with the same parameters and seeds. This new implementation is open source and is available at [34].