• No results found

Operators: Mutation and Crossover

8.3 Proposed MODPSO Algorithm

8.3.3 Operators: Mutation and Crossover

The crossover process recombines two parents (solutions) creating one or two offsprings (new solutions). In this implementation, we worked with three standard crossover operators: (1) Generic crossover, (2) Two-point crossover, and (3) Edge crossover. In the One-point crossover (Fig. 8.2), a random number of consecutive customers are copied from one parent to another, removing duplicates. The Edge crossover (Fig. 8.3) consists of (1) constructing new intermediate solutions by joining edges from both route-plans (parents) and (2) merging sub-tours creating feasible solutions. In the Generic crossover (Fig. 8.4), an entire route is copied from one route-plan to another, removing duplicates. The mutation mechanism is the only process that the proposed MODPSO uses to pro-

mote diversity within the population. We used four basic mutation operators: Swap (Fig. 8.5), Insertion (Fig. 8.6), Inversion (Fig. 8.7) and Displacement (Fig. 8.8).

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 which moves not one but a number of consecutive customers.

Given two route-plans:

Route-plan #1: [4] [3 2 7] [8 6 1 5] Route-plan #2: [7 1] [2 6] [3 5 4 8]

1) Select a random Route from a route-plan (e.g. Route-plan #1).

Route-plan #1: [4] [3 2 7] [8 6 1 5] => Route: [3 2 7]

2) Copy the nodes of the other route-plan (i.e. Route-plan #2) in the new route-plan without the nodes contained in Route, that is:

Route-plan #2: [7 1] [2 6] [3 5 4 8] => [1] [6] [5 4 8]

3) Insert Route (selected in Step 1) in the new route-plan.

New route-plan: [1] [6] [5 4 8] [3 2 7]

Figure 8.2:Generic recombination operator.

Given two route-plans:

Route-plan #1: [4] [3 2 7] [8 6 1 5] Route-plan #2: [7 1] [2 6] [3 5 4 8]

1) Select a random Sequence of nodes from one parent (e.g. Route-plan #1).

Route-plan #1: [4] [3 2 7] [8 6 1 5] => Sequence: 2 7 8

2) Copy the nodes of the other route-plan (i.e. Route-plan #2) in the new route-plan without the nodes contained in Sequence, that is:

Route-plan #2: [7 1] [2 6] [3 5 4 8] => [1] [6] [3 5 4]

3) Place the Sequence (selected in Step 1) at a random place in the new route-plan.

New route-plan: [1] [6 2 7 8] [3 5 4]

Figure 8.3:Two-point recombination operator.

8.4

Experimental Design

We validate this approach performance using the Solomon’s dataset [233] and the MOVRPTW dataset [37].

The development of the NSGA-II was carried out in CODEA v3. We used the imple- mentation of an Evolutionary Algorithm (EA) for the VRPTW [158] as a starting point.

Given two route-plans:

Route-plan #1: [4] [3 2 7] [8 6 1 5] Route-plan #2: [7 1] [2 6] [3 5 4 8]

1) Create an edge-list with adjacent nodes to each node in both route-plans: Node 1: edges to other nodes: 6 5 7

Node 2: edges to other nodes: 3 7 6 Node 3: edges to other nodes: 2 5 Node 4: edges to other nodes: 5 8 Node 5: edges to other nodes: 1 3 4 Node 6: edges to other nodes: 2 1 Node 7: edges to other nodes: 2 1 Node 8: edges to other nodes: 6 4

2) Select a random node - Current node (e.g. Current node = 4).

3) Create the new route-plan using the edge-list.

3a) Examine which nodes can be accessed from the Current node.

Node 4: edges to other nodes: 5 8

Candidate nodes are 5 and 8

3b) Examine the degree of the Candidate nodes:

Node 5: edges to other nodes: 1 3 4 => degree = 3

Node 8: edges to other nodes: 6 4 => degree = 2

3c) Insert the Candidate node with the lowest degree in the new route-plan (i.e. 8).

(in case of a tie, select a random Candidate node).

3d) Set Current node to the just inserted node (i.e. Current node = 8).

3e) Go to Step 3a if all nodes have not been yet inserted in new route-plan.

Figure 8.4:Edge recombination operator.

Given a route-plan:

Route-plan: [4] [3 2 7] [8 6 1 5]

1) Select two random nodes from the parent:

Route-plan: [4] [3 2 7] [8 6 1 5] => Selected nodes: 2 and 1

2) Interchange the positions of the selected nodes within the route-plan:

New route-plan: [4] [3 1 7] [8 6 2 5]

Figure 8.5:Swap operator.

Given a route-plan:

Route-plan: [4] [3 2 7] [8 6 1 5] 1) Select a random node from the parent:

Route-plan: [4] [3 7 7] [8 6 1 5] => Selected node: 7

2) Insert the selected node in a random position within the route-plan:

New route-plan: [7 4] [3 2] [8 6 2 5]

Figure 8.6:Insert operator.

Given a route-plan:

Route-plan: [4] [3 2 7] [8 6 1 5]

1) Select a random Sequence of nodes from the parent:

Route-plan: [4] [3 2 7] [8 6 1 5] => Sequence: 2 7 8

2) Invert the selected sequence:

New route-plan: [4] [3 8 7] [2 6 1 5]

Given a route-plan:

Route-plan: [4] [3 2 7] [8 6 1 5]

1) Select a random Sequence of nodes from the parent:

Route-plan: [4] [3 2 7] [8 6 1 5] => Sequence: 2 7

2) Invert the selected sequence:

New route-plan: [4] [3] [8 2 7 6 1 5]

Figure 8.8:Displacement operator.

This implementation is based on the optimisation framework ParadisEO-MOEO [25]. We extended this implementation to support multiple objectives (Section 8.3.2), process our dataset and use the NSGA-II.

The proposed MOPSO used the same probability for all attractors: cx = 0.25, x ∈

{1, 2, 3, 4}. All particles used the star communication topology. Thus each particle

knew the location of all the others at any time. No mechanisms were used to promote diversity within the swarm.

In the experiments, NSGA-II and the proposed MODPSO evolved a population of 25 individuals for 1000 generations. Both algorithms run on each instance 20 times (repe- titions), with the exact same operators, probabilities, parameters and seeds.

8.5

Discussion of Results

In order compare the performance of our MODPSO against that of NSGA-II, we use three standard metrics: hypervolume, coverage and overall non-dominated vectors (see Sec- tion 2.3.4). We calculate the value of these metrics using the approximation sets ob- tained by the proposed MODPSO and NSGA-II on Solomon’s and MOVRPTW datasets. Tables 8.1, 8.2 and 8.3 present these metric results averaged over 20 runs. These val- ues are also averaged over instance categories for the Solomon’s instance sets{C1, C2, R1, R2, RC1, RC2}and the MOVRPTW instance sets{s0, s10}. The second and fourth rows of each table show the average values obtained by MODPSO and NSGA-II. The third and fifth row show the number of instances for which the result is significantly better than the other algorithm in brackets. We ran pair-wise comparisons using the Mann-Whitney-Wilcoxon test to determine which algorithm is better for each instance and metric.

For clarity, we discuss the results obtained for each metric in three subsections. Ad- ditionally, we provide an overview of the performance of both algorithms in terms of speed in Section 8.6.