• No results found

Part II: Asymmetric Problems 91

Algorithm 2: Prim’s Algorithm for the 1-Tree

Find e = (i, j) ∈ E0 the minimal weighted edge.

Initialize T = {e} the tree.

Initialize V = {i, j} the set of visited nodes.

whileV 6= I0 do

Find e = (i, j) ∈ E0 the minimal weighted edge with a visited node, i ∈ V , and an unvisited node, j ∈ I0r V .

Add this edge to the tree: T = T ∪ {e}.

Add the unvisited node: V = V ∪ {j}.

end while

Find e = (1, i) ∈ E the minimal weighted edge connected to the depot.

Add this edge to the tree: T = T ∪ {e}.

Find e = (1, j) ∈ E the second minimal weighted edge, i.e., j 6= i.

Add this edge to the tree: T = T ∪ {e}.

return T .

1.5 An Experiment in Convergence

The purpose of this section is to show the importance of the step size on the Subgradient algorithm. An easy problem has been chosen to demonstrate its important, the Spanish Airports problem which requires visiting once each of the 37 airports of Spain, see An-nexAppendix A. The travel distance has been obtained applying the Euclidean distance from the GPS coordinates, rounding it by integer values. Solving the problem 1.1using the software IBMr ILOGr CPLEXr Optimization Studio (2015), its optimal value is L = 7223, however, using the Nearest Neighbor Heuristic, it is found an upper bound of value U B = 8188.

In order to compare the performance of the step size, the Subgradient algorithm is applied to the model of the Lagrangian relaxation of the TSP, see section1.4. Figure1.3 shows the convergence of the different step sizes for the Spanish Airports problem.

Fig. 1.3a shows convergence using the next three steps sizes. It should be noticed that despite initial perturbations the step size c) leads much faster convergence than the other steps.

a) λk= 1k. This holds becauseP

kλk → ∞, and λk→ 0 as k → ∞.

b) λk= δ{k−N }·ρ for parameters δ0= 2 and ρ = 0.95. This holds because the parameter δk is reduced every N iterations.

c) λk= δkU B−L(u k)

kk2 and the parameter δk is reducing by ρ = 0.95 every N consecutive iterations without improving the lower bound with δ0= 2. This holds if the parameter U B is tight upper bound.

1.6 Tailored Lagrangian Metaheuristic 33

(b) Rule c using an upper bound or the optimal value

Figure 1.3: Convergence of the Subgradient Algorithm with different step sizes for Span-ish Airports problem.

Fig. 1.3b shows the convergence of the step size c) using different values. Using U B = 8188, the gap between the best Lagrangian value and the optimal value is of 5%

at the iteration k = 200. However, using the optimal value L = 7223, it leads much faster convergence and finds an optimal solution at the iteration k = 104.

1.6 Tailored Lagrangian Metaheuristic

Due to the wide range of applications and the complexity of the TSP problem, innovative and efficient algorithms are needed. Therefore, we propose a metaheuristic methodology based on the Lagrangian Relaxation to solve the TSP. A metaheuristic “refers to a master strategy that guides and modifies other heuristics to produce solutions beyond those that are normally generated in a quest for local optimality” (Glover & Laguna, 1997).

Our Lagrangian metaheuristic uses the Subgradient optimization algorithm

com-bined with a heuristic which obtains a primal feasible solution from the dual variable.

Compared with classical heuristics, our Lagrangian Metaheuristic provides both an up-per and a lower bounds (U B and LB), and a posteriori quality check of the solution is obtained.

The main contribution of our method is that it has been introduced a parameter to improve the algorithm convergence on the optimal solution. That parameter is improved within the same process using the upper bound (U B) of the primal solutions obtained by the heuristic.

Our Tailored Lagrangian Metaheuristic metaheuristic in detail

Our proposed TLM metaheuristic is shown in Algorithm3. A heuristic obtains a feasible solution from the dual variable, so it tries to improve the U B and hence, a better convergence using rule (c) is obtained. Eventually, the best of these feasible primal solutions may be provided if the method is stopped.

An optimal solution will be found if the method reaches γik = 0, i.e., the 1-Tree is a Hamiltonian cycle. Since we are interested in developing a methodology applicable to real problems where the computational time to solve instance is limited, it is added two stopping criteria based on the maximum number of iterations (k < maxiterations) and on a floating-point exception (step-size λk< 10−15), see line 5.

The proposed metaheuristic uses the Nearest Neighbor Heuristic to obtain an initial value of the Upper Bound in line 3. This heuristic is one of the most commonly used to find U B, since that is easy to implement and it is computationally efficient, (Lin &

Kernighan,1973).

In line 6, Prim’s algorithm is used to solve the Lagrangian Dual Problem of the TSP, as explained in section1.4. Then, the subgradient is calculated in line 7, if its values are 0, the optimal solution is found and the iterative procedure is stopped in line 10.

The Proposed Heuristic

The proposed heuristic to improve the U B is applied when the 1-Tree is nearly a Hamil-tonian cycle, that is when the subgradient satisfies k γkk2< ξ, see lines 11-12.

A parameter ξ is used to determine when to apply the heuristic, in line 11. A good estimation of the parameter ξ would avoid increasing the computation time excessively.

First, its value may be large, for instance the value of the first iteration, ξ = k γ1 k2, but it should be updated whenever a better feasible solution is found according to ξ =k γkk2. Eventually, the heuristic could find the optimal solution without detecting it, so the method would continue iterating until LB = U B.

As any solution is a 1-Tree, this criterion means that the solution has few vertices without two incident edges. This heuristic replaces an edge e = (i, j) where j has some extra edges (i.e., γjk < 0) for an edge e = (i, l) where vertex l has one single edge (i.e., γlk= 1) minimizing the cost of the exchange.

In the presented approach, two different moves have been defined (Figure 1.4): (a) unlimited move respect the vertices, and (b) limited move only replaces edges which

1.6 Tailored Lagrangian Metaheuristic 35