Lecture Notes in Computer Science Commenced Publication in 1973 Founding and Former Series Editors: Gerhard Goos, Juris Hartmanis, and Jan van Leeuwen
Editorial Board David Hutchison Lancaster University, UK Takeo Kanade Carnegie Mellon University, Pittsburgh, PA, USA Josef Kittler University of Surrey, Guildford, UK Jon M. Kleinberg Cornell University, Ithaca, NY, USA Alfred Kobsa University of California, Irvine, CA, USA Friedemann Mattern ETH Zurich, Switzerland John C. Mitchell Stanford University, CA, USA Moni Naor Weizmann Institute of Science, Rehovot, Israel Oscar Nierstrasz University of Bern, Switzerland C. Pandu Rangan Indian Institute of Technology, Madras, India Bernhard Steffen TU Dortmund University, Germany Madhu Sudan Microsoft Research, Cambridge, MA, USA Demetri Terzopoulos University of California, Los Angeles, CA, USA Doug Tygar University of California, Berkeley, CA, USA Gerhard Weikum Max Planck Institute for Informatics, Saarbruecken, Germany
6373
María J. Blesa Christian Blum Günther Raidl Andrea Roli Michael Sampels (Eds.)
Hybrid Metaheuristics 7th International Workshop, HM 2010 Vienna, Austria, October 1-2, 2010 Proceedings
13
Volume Editors María J. Blesa Universitat Politècnica de Catalunya 08034 Barcelona, Spain E-mail:
[email protected] Christian Blum Universitat Politècnica de Catalunya 08034 Barcelona, Spain E-mail:
[email protected] Günther Raidl Technische Universität Wien 1040 Wien, Austria E-mail:
[email protected] Andrea Roli Università di Bologna 47521 Cesena, Italy E-mail:
[email protected] Michael Sampels Université Libre de Bruxelles 1050 Bruxelles, Belgium E-mail:
[email protected] Library of Congress Control Number: 2010934937 CR Subject Classification (1998): D.2, F.1, F.2, J.3, E.1, D.3 LNCS Sublibrary: SL 1 – Theoretical Computer Science and General Issues ISSN ISBN-10 ISBN-13
0302-9743 3-642-16053-0 Springer Berlin Heidelberg New York 978-3-642-16053-0 Springer Berlin Heidelberg New York
This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, re-use of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer. Violations are liable to prosecution under the German Copyright Law. springer.com © Springer-Verlag Berlin Heidelberg 2010 Printed in Germany Typesetting: Camera-ready by author, data conversion by Scientific Publishing Services, Chennai, India Printed on acid-free paper 06/3180
Preface
Research in hybrid metaheuristics is now established as a reference field in the areas of optimization and problem solving. Hybrid metaheuristics have a strong impact on applications because they provide efficient and powerful problem solving techniques for optimization problems in industry. Furthermore, the related interdisciplinary research community provides a fertile environment where innovative techniques are presented and discussed. The International Workshop on Hybrid Metaheuristics pursues the direction of combining application-oriented and foundational research. This is demonstrated by the papers in the proceedings of this 7th HM event. The contributions selected for this volume represent an important sample of current research in hybrid metaheuristics. It is worth emphasizing that the selected papers cover both theoretical and applicational results, including applications to logistics and bioinformatics and new paradigmatic hybrid solvers. As is the tradition of the workshop, special care was exercised in the review process: out of 29 submissions received, 14 papers were selected on the basis of the reviews and evaluations provided by the Program Committee and Program Chair members. Reviews were detailed and reviewers provided authors with constructive suggestions for improving their work. Special thanks are extended to the Program Committee members who devoted their effort and time to this service. We believe that this selection of papers will be of interest to researchers and scholars working in the area of optimization and problem solving. Moreover, we hope that, by showing the success of ideas generated from connections between two different research fields, we can stimulate cross-fertilization between computer science and engineering. August 2010
Mar´ıa J. Blesa Christian Blum G¨ unther Raidl Andrea Roli Michael Sampels
Organization
General Chair G¨ unther Raidl
Technische Universit¨ at Wien, Austria
Program Chairs Mar´ıa J. Blesa Christian Blum Andrea Roli Michael Sampels
Universitat Polit`ecnica de Catalunya, Barcelona, Spain Universitat Polit`ecnica de Catalunya, Barcelona, Spain Universit` a di Bologna, Italy Universit´e Libre de Bruxelles, Belgium
Program Committee Mauro Birattari J¨ urgen Branke Marco Chiarandini Carlos Cotta Luca Di Gaspero Karl F. Doerner Andreas T. Ernst Antonio J. Fern´ andez Paola Festa Jos´e E. Gallardo Sa¨ıd Hanafi Thomas Jansen Joshua Knowles Andrea Lodi Manuel L´ opez-Ib´ an ˜ ez Rafael Mart´ı Daniel Merkle Bernd Meyer Martin Middendorf Jos´e A. Moreno P´erez J. Marcos Moreno Vega Nysret Musliu Boris Naujoks David Pelta Petrica C. Pop
Universit´e Libre de Bruxelles, Belgium Warwick Business School, UK Syddansk Universitet, Denmark Universidad de M´ alaga, Spain Universit` a di Udine, Italy Universit¨ at Wien, Austria CSIRO, Australia Universidad de M´ alaga, Spain Universit`a di Napoli Federico II, Italy Universidad de M´ alaga, Spain Universit´e de Valenciennes, France University College Cork, Ireland University of Manchester, UK Universit` a di Bologna, Italy Universit´e Libre de Bruxelles, Belgium Universitat de Val`encia, Spain Syddansk Universitet, Denmark Monash University, Australia Universit¨ at Leipzig, Germany Universidad de La Laguna, Spain Universidad de La Laguna, Spain Technische Universit¨at Wien, Austria Technische Universit¨ at Dortmund, Germany Universidad de Granada, Spain Universitatea de Nord Baia Mare, Romania
VIII
Organization
Steven Prestwich Christian Prins Caroline Prodhon G¨ unter Rudolph Andrea Schaerf Marc Sevaux Thomas St¨ utzle Greet Vanden Berghe
4C, Cork, Ireland Universit´e de Technologie de Troyes, France Universit´e de Technologie de Troyes, France Technische Universit¨ at Dortmund, Germany Universit` a di Udine, Italy Universit´e Europ´eenne de Bretagne, France Universit´e Libre de Bruxelles, Belgium KaHo Sint-Lieven, Gent, Belgium
Local Organization Andreas Chwatal Doris Dicklberger Aksel Filipovic Bin Hu Markus Leitner Sandro Pirkwieser Mario Ruthmair
Technische Technische Technische Technische Technische Technische Technische
Universit¨ at Universit¨at Universit¨at Universit¨ at Universit¨ at Universit¨at Universit¨ at
Wien, Wien, Wien, Wien, Wien, Wien, Wien,
Austria Austria Austria Austria Austria Austria Austria
Table of Contents
A Hybrid Metaheuristic for the Longest Common Subsequence Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Manuel Lozano and Christian Blum Hybrid Algorithms for the Variable Sized Bin Packing Problem . . . . . . . . Christian Blum, Vera Hemmelmayr, Hugo Hern´ andez, and Verena Schmid A Hybrid Tabu Search Heuristic for a Bilevel Competitive Facility Location Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ˙ Kuban Altınel Hande K¨ uc¸u ¨kaydın, Necati Aras, and I. A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem . . . . . . Luca Di Gaspero, Johannes G¨ artner, Nysret Musliu, Andrea Schaerf, Werner Schafhauser, and Wolfgang Slany
1 16
31 46
A New Approach for Solving the Generalized Traveling Salesman Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . P.C. Pop, O. Matei, and C. Sabo
62
Hybrid Heuristics for Dynamic Resource-Constrained Project Scheduling Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Andr´e Renato Villela da Silva and Luiz Satoru Ochi
73
A Multi-Start Evolutionary Local Search for the Two-Echelon Location Routing Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viet-Phuong Nguyen, Christian Prins, and Caroline Prodhon
88
A Memetic Algorithm for Reconstructing Cross-Cut Shredded Text Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Christian Schauer, Matthias Prandtstetter, and G¨ unther R. Raidl
103
New Hybrid Matheuristics for Solving the Multidimensional Knapsack Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sa¨ıd Hanafi, Jasmina Lazi´c, Nenad Mladenovi´c, Christophe Wilbaut, and Igor Cr´evits An Improved Memetic Algorithm for Break Scheduling . . . . . . . . . . . . . . . Magdalena Widl and Nysret Musliu Consultant-Guided Search Algorithms for the Quadratic Assignment Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Serban Iordache
118
133
148
X
Table of Contents
On Index Structures in Hybrid Metaheuristics for Routing Problems with Hard Feasibility Checks: An Application to the 2-Dimensional Loading Vehicle Routing Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Johannes Strodl, Karl F. Doerner, Fabien Tricoire, and Richard F. Hartl
160
Variable Neighborhood Search Coupled with ILP-Based Very Large Neighborhood Searches for the (Periodic) Location-Routing Problem . . . Sandro Pirkwieser and G¨ unther R. Raidl
174
SearchCol: Metaheuristic Search by Column Generation . . . . . . . . . . . . . . . Filipe Alvelos, Amaro de Sousa, and Dorabella Santos
190
Survey: Matheuristics for Rich Vehicle Routing Problems . . . . . . . . . . . . . Karl F. Doerner and Verena Schmid
206
Author Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
223
A Hybrid Metaheuristic for the Longest Common Subsequence Problem Manuel Lozano1 and Christian Blum2 1 2
Dept. of Computer Science and Artificial Intelligence, University of Granada, Spain
[email protected] ALBCOM Research Group, Universitat Polit´ecnica de Catalunya, Barcelona, Spain
[email protected]
Abstract. The longest common subsequence problem is a classical string problem. It has applications, for example, in pattern recognition and bioinformatics. This contribution proposes an integrative hybrid metaheuristic for this problem. More specifically, we propose a variable neighborhood search that applies an iterated greedy algorithm in the improvement phase and generates the starting solutions by invoking either beam search or a greedy randomized procedure. The main motivation of this work is the lack of fast neighborhood search methods for the tackled problem. The benefits of the proposal in comparison to the state of the art are experimentally shown.
1
Introduction
The longest common subsequence (LCS) problem is one of the classical string problems. Given a problem instance (S, Σ), where S = {s1 , s2 , . . . , sn } is a set of n strings over a finite alphabet Σ, the problem consists in finding a longest string t∗ that is a subsequence of all the strings in S. Such a string t∗ is called a longest common subsequence of the strings in S. Note that a string t is called a subsequence of a string s, if t can be produced from s by deleting characters. For example, dga is a subsequence of adagtta. Traditional computer science applications of this problem are in data compression [1], syntactic pattern recognition [2], file comparison [3], text edition [4] and query optimization in databases [5]. More recent applications include computational biology [6], and the production of circuits in field programmable gate arrays [7]. The LCS problem was shown to be NP-hard [8] for an arbitrary number n of input strings. Due to its classical nature, the LCS problem has attracted quite a lot of research efforts over the past decades. Much work has been dedicated to the development of efficient dynamic programming procedures (see, for example, [9]). Recently, different metaheuristics have exhibited many successful applications in solving the
This work was supported by the Research Projects TIN2008-05854, P08-TIC-4173, and by grant TIN2007-66523 (FORMALISM) of the Spanish government. In addition, Christian Blum acknowledges support from the Ram´ on y Cajal program of the Spanish government of which he is a research fellow.
M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 1–15, 2010. c Springer-Verlag Berlin Heidelberg 2010
2
M. Lozano and C. Blum
LCS problem in terms of solution quality and computational efficiency. They include ant colony optimization [10], large neighborhood search heuristic [11], evolutionary algorithms [12], constructive one-pass heuristics [13,14], and beam search [15], which is currently a state-of-the-art method for solving this problem. Due to the constructive nature of the problem, no fast neighborhood search algorithm has been proposed so far. However, such an algorithm would be very useful for improving the solutions generated by algorithms based on the construction of solutions. This was the main motivation of this work. Over the last years, a large number of search algorithms were reported that do not purely follow the concepts of one single classical metaheuristic, but they attempt to obtain the best from a set of metaheuristics (and even other kinds of optimization methods) that perform together and complement each other to produce a profitable synergy from their combination. These approaches are commonly referred to as hybrid metaheuristics (HMs) [16,17]. HMs may be categorized into two different classes attending on their control strategy [18]: 1) collaborative HMs, which are based on the exchange of information between different metaheurisics (and possibly other optimization techniques) running sequentially or in parallel, and 2) integrative HMs, where one search algorithm is considered a subordinate, embedded component of another algorithm. In this paper, we propose a HM for the LCS problem that combines ideas from four well-known metaheuristics: variable neighborhood search (VNS), iterated greedy (IG), beam search (BS), and greedy randomized adaptive search procedures (GRASP). Specifically, the proposal has been conceived as a VNS algorithm that employs IG as the improvement phase and uses BS and a greedy randomized procedure for the generation of high quality starting solutions. In this way, the proposal may be categorized as an integrative HM. The remainder of this paper is organized as follows. Firstly, in Section 2, we describe the constructive heuristics for the LCS problem, which play a fundamental role in our proposal. In Section 3, we present the proposed HM for the LCS problem. In Section 4, we outline the experimental evaluation. Finally, in Section 5, we offer conclusions and an outlook to future work.
2
Constructive Heuristics for the LCS Problem
In this section we outline the so-called Best-Next heuristic [13,14], which is a fast heuristic for the LCS problem. Given a problem instance (S, Σ), the BestNext heuristic produces a common subsequence t sequentially from left to right by appending at each construction step a letter to t such that t maintains the property of being a common subsequence of all strings in S. The algorithm stops when no more letters can be added, that is, when each further letter would produce an invalid solution. The pseudo-code of this heuristic is shown in Figure 1. In order to explain all the components of the algorithm we need to introduce the following definitions and notations. They all assume a given common subsequence t of the strings in S.
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
3
Procedure Best Next (S, Σ) 1: t := ∅ (where ∅ denotes the empty string) 2: while |Σtnd | > 0 do 3: a := Choose From(Σtnd ) 4: t := ta 5: endwhile 6: return t Fig. 1. Pseudocode algorithm for the Best-Next heuristic
1. Let si = xi · yi be the partition of si into substrings xi and yi such that t is a subsequence of xi and yi has maximal length. Given this partition, which is well-defined, we introduce position pointers pi := |xi | for i = 1, . . . , n. 2. The position of the first appearance of a letter a ∈ Σ in a string si ∈ S after the position pointer pi is well-defined and denoted by pai . In case a letter a ∈ Σ does not appear in yi , pai is set to ∞. 3. A letter a ∈ Σ is called dominated, if exists at least one letter b ∈ Σ, a = b, such that pbi < pai for i = 1, . . . , n. 4. Σtnd ⊆ Σ denotes the set of non-dominated letters of the alphabet Σ with respect to t. Obviously it is required that a letter a ∈ Σtnd appears in each string si at least once after the position pointer pi . Function Choose From(Σtnd) (see line 4 of Figure 1) is used to choose at each iteration exactly one letter from Σtnd . The chosen letter is subsequently appended to t. A letter is chosen by means of a greedy function. In the following we present two different greedy functions from the literature [8,15]: η1 (a) := min{|si | − pai |i = 1, . . . , n}, ∀a ∈ Σtnd , ⎞−1 a p − p i⎠ i η2 (a) := ⎝ , ∀a ∈ Σtnd . |y | i i=1,...,n ⎛
Function Choose From (Σtnd ) chooses a ∈ Σtnd such that η1 (a) ≥ η1 (b) (respectively, η2 (a) ≥ η2 (b)) for all b ∈ Σtnd . If more than one letter fulfills this condition, the one that is lexicographically smaller is taken. In this paper, we have considered four versions of the Best-Next heuristic. They are distinguished in the direction the chosen letters are appended to t (from left to right or from right to left) and in the applied greedy function (η1 or η2 ). Their names and features are shown in Table 1.
3
Proposed Variable Neighborhood Search
VNS [19] is a metaheuristic that exploits systematically the idea of neighborhood change (from a given set of neighborhood structures Nk , k = 1, . . . , kmax ), both in the descent to—and the esacape from—local optima. Our implementation
4
M. Lozano and C. Blum Table 1. Versions of the Best-Next heuristic Name Best Next1 Best Next2 Best Next3 Best Next4
Direction Greedy function Left to right η1 Right to left η1 Left to right η2 Right to left η2
of VNS mainly consists of the following three phases, which work on a single candidate solution, the current solution, tvns : – Generation phase: a method is executed to generate a feasible solution tvns . – Improvement phase: tvns is refined, usually by a local search method. The current solution is updated whenever the improvement phase obtained a better solution. – Shaking phase: it is performed to escape from the basin of attraction of tvns . Generally, this process randomly picks a solution from the current neighborhood Nk . For the algorithm to have a reactive behavior, the parameter k is adjusted dynamically depending on the quality of the solutions obtained. At the beginning of the run, and every time the improvement process improves over the current solution, k is set to one; otherwise, k is incremented. The improvement and shaking phases are iterated until k exceeds kmax . In this case, the generation phase is invoked and k is re-initialized to 1. The VNS algorithm is performed until an imposed time limit is reached. The best solution generated during the iterative process is kept as the overall result. The algorithmic framework of the proposed VNS, called VNS-IG, is depicted in Figure 2. Below, we describe the design choices taken to obtain this specific instance of the VNS metaheuristic for the LCS problem. Generation phase (Steps 1 and 17). The initial solution, tvns , is provided by beam search [15], which is, up to now, the best performing method for the LCS problem. Later, whenever k exceeds kmax , the algorithm proceeds with a new initial solution, which is generated by a greedy randomized procedure based on randomizing the Best-Next algorithm. Sections 3.2 and 3.3 are devoted to these two generation methods. Improvement phase (Step 6). We have developed a customized iterated greedy algorithm that acts as an improvement method. For a detailed description we refer to Section 3.1. Shaking phase (Step 5). We have employed a very simple shaking method for perturbing the solution tvns . Specifically, it applies k times a procedure that removes one character chosen at random from tvns .
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
5
Procedure VNS-IG (S, Σ) 0: tb := ∅ (where ∅ denotes the empty string) 1: tvns := BeamSearch (S, Σ) 2: while (elapsedtime < total time limit) do 3: k := 1 4: while (k ≤ kmax ) do 5: t := Shake (tvns , k) 6: t := IG (t, S, Σ) 7: if (|t | > |tvns |) then 8: tvns := t 9: k := 1 10: else 11: k := k + 1 12: endif 13: endwhile 14: if (|tvns | > |tb |) then 15: tb := tvns 16: endif 17: tvns := Greedy Randomized (S, Σ) 18: endwhile 19: return tb Fig. 2. Pseudocode algorithm for VNS-IG
3.1
Iterated Greedy Algorithm
The IG [20,21,22] methodology generates a sequence of solutions by iterating over greedy constructive heuristics using two main phases: destruction and construction. During the destruction phase, some solution components are removed from a previously constructed complete candidate solution. The construction procedure then applies a greedy constructive heuristic to reconstruct a complete candidate solution. Once a newly re-constructed solution has been obtained, an acceptance criterion is applied to decide whether it will replace the incumbent solution or not. The process iterates through these two phases until some termination conditions (e.g. maximum number of iterations, or maximum computation time allowed) have been met. The following aspects of an IG algorithm must be defined: – The choice by how much a complete candidate solution should be destructed; here, we use the parameter nd to specify the number of solution components that are removed from the current solution. – The method employed to select those solution components. – The acceptance criterion to decide whether the new solution will replace the incumbent solution or not. We propose an IG algorithm that attempts to improve a starting common subsequence t. It was specifically developed to serve as improvement procedure for the
6
M. Lozano and C. Blum
LCS problem. At each iteration, our IG algorithm chooses a value for nd at random. Subsequently, it generates four new common subsequences as follows. First, it selects nd consecutive positions of t and deletes the corresponding characters. Then, it applies the Best-Next heuristic to rebuild the affected part of t, generating a new common subsequence. The process is repeated four times applying the different variants of this heuristic (Table 1). Finally, the best common subsequence from the four ones competes with t to be the new incumbent solution for the next iteration (acceptance criterion). The IG process is repeated until no improvements are obtained for δIG successive iterations (stopping condition). Procedure IG (t, S, Σ) 1: repeat 2: nd := Random ({1, ..., |t| · ρ}) 3: for j = 1, . . . , 4 do 4: υ := SelPos (t, nd ) 5: td := Remove (t, υ + 1, nd ) υ ω 6: S := {Extract(si , pυi + 1, pω i − 1), . . . , Extract(sn , pn + 1, pn − 1)} 7: t := Best Nextj (S , Σ) 8: tcj := Insert (td , t , υ + 1) c 9: tb := Best subsequence from {tc1 , tc2 , tc3 , tc4 } 10: t := AcceptanceCriterion (t, tcb ) 11: until (stopping condition met) 12: return t
Fig. 3. Pseudocode algorithm for the IG algorithm
Figure 3 outlines the pseudo-code of the proposed IG for the LCS problem. In the following we describe its main components. Choice of nd (Step 2). nd is randomly chosen in the set consisting of the integers from one to |t| · ρ . In order to do this, IG uses the Random procedure, which returns one element from the given set, uniformly sampled at random. ρ ∈ (0, 1) is a parameter associated with the IG algorithm that is called maximum destruction ratio. Destruction phase (Step 5). In the destruction phase, nd characters of the current solution t are removed, starting at the position υ + 1, generating solution td . Parameter υ ∈ {0, . . . , |t| − nd } is an integer generated by the SelPos procedure (Step 4), which is detailed below. The procedure Remove (t, ω, m) returns a string with all the characters in t except the substring of length m that starts at character position ω. Construction phase (Steps 6–8). Since t is a common subsequence of all the strings in S, it can be created by deleting specific letters from si ∈ S
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
7
(i = 1, . . . , n). We can specify the positions of the characters in si that are not removed by this process (i.e., the positions of si that determine t). With |t| respect to si , let p1i , . . . , pi (i = 1, . . . , n) be these positions. The construction phase applies the Best-Next heuristic (Step 7) to find the longest common subsequence of the strings in S : υ ω S := {Extract(si , pυi + 1, pω i − 1), . . . , Extract(sn , pn + 1, pn − 1)},
where ω = υ + nd + 1 and Extract (s, μ1 , μ2 ) returns the sequence of characters from s that starts at character position μ1 and ends at character position μ2 . Let t be the common subsequence built by Best-Next for S . Then, t is inserted in td at character position υ + 1, producing tcj (Step 8). This is done by employing the procedure Insert. Selection of the start position υ (Steps 4). The SelPos procedure finds the piece of t with length nd that will be destroyed and rebuilt by the BestNext heuristic. It uses the following function Ψ , which measures the suitability of choosing the piece that starts at position μ: Ψ (μ) =
μ pω i − pi , |si | i=1,...,n
where ω = μ + nd + 1. In essence, Ψ is the sum of the characters available in the pieces of si defined by the positions pμi and pω i , for i = 1, . . . , n. If the total number is large (high Ψ value), then, the probability of finding common characters in these pieces becomes high as well. The procedure SelPos involves running a tournament among nT starting positions chosen at random (each one representing a piece with length nd ). Hereby, nT is a parameter of the algorithm. The winner, υ, is the one with the highest Ψ value. Acceptance criterion (Step 10). After the creation of the new four common subsequences, tc1 , . . . , tc4 , the best one is selected, tcb . If |tcb | ≥ |t| then tcb becomes the new current solution. This acceptance criterion is an extended version of the Markovian acceptance criterion (only better solutions are accepted) that also accepts new common subsequences with the same length as the current solution. In this way, on the one hand, the intensification ability of our IG approach is emphasized, and, on the other hand, it makes use of a source of diversification that may help the algorithm to escape from possible search stagnations. We should point out that to give structure to the solution space of the LCS problem, Easton and Singireddy [11] provide a general neighborhood structure for this problem. Given a set of n strings, a substring of each of the n strings, and a common subsequence t, the concept behind the neighborhood is to remove each substring from its string. By removing these substrings t will be reduced to two disjoint subsequences, t1 and t3 . A common subsequence, t , is in the neighborhood of t if and only if t can be represented as (t1 , t2 , t3 ) where t2 is any common subsequence of the removed substrings. Precisely, our IG algorithm processes this kind of neighborhoods by means of the Best-Next heuristic.
8
3.2
M. Lozano and C. Blum
Beam Search
BS is an incomplete derivative of branch and bound that was introduced in [23]. The central idea behind BS is to allow the extension of partial solutions in several possible ways. At each step, the algorithm chooses at most μkbw feasible extensions of the partial solutions stored in a set B, called the beam. Hereby, kbw is the so-called beam width that limits the size of B, and μ ≥ 1 is a parameter of the algorithm. The choice of feasible extensions is done deterministically by means of a greedy function that assigns a weight to each feasible extension. At the end of each step, the algorithm creates a new beam B by selecting up to kbw partial solutions from the set of chosen feasible extensions. For that purpose, BS algorithms calculate (in the case of maximization) an upper bound value for each chosen extension. Only the maximally kbw best extensions (with respect to the upper bound) are chosen to constitute the new set B. Finally, the best found complete solution is returned. Blum et al. [15] presented a BS approach for the LCS problem. The algorithm is based on the construction mechanism of the Best-Next heuristic outlined in Section 2. They applied two configurations of the BS algorithm to three different sets of bench-mark instances and compared the results to the best techniques from the literature. The first configuration (low time) was chosen such that the algorithm is fast, whereas the second configuration (high quality) aimed for higher solution quality. In the following we refer to these algorithm versions as lt-BS and ht-BS. The results of these algorithms showed that none of the earlier algorithms came even close to derive good solutions for difficult problem instances. VNS-IG employs lt-BS in the generation phase, because it is able to provide good solutions in reduced time allocations. 3.3
Greedy Randomized Procedure
The other generation method used by VNS-IG is a greedy randomized procedure based on the Best-Next algorithm. Greedy randomized procedures are used in the construction phase of the well-known multi-start metaheuristic called GRASP [24], which is often characterized by a strong design effort dedicated to combine the power of greedy heuristics and randomization for the randomized generation of high quality starting solutions. With this aim, the solution construction mechanism builds an initial solution using a greedy randomized procedure, whose randomness allows solutions to be obtained in different areas of the solution space. Each solution is randomly produced step-by-step by uniformly adding one new element from a restricted candidate list (RCL) to the current solution. We propose a greedy randomized procedure based on randomizing the BestNext heuristic (Section 2), which is denominated Greedy Randomized. It assumes the cardinality-based scheme [24] to build the RCL. In this scheme, an integer kRCL is fixed and the kRCL top ranked candidates are placed in the RCL. Specifically, our method performs the same operations as the Best-Next heuristic, except the way a letter is chosen from Σtnd . Greedy Randomized constructs
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
9
a list of candidates RCL with the kRCL letters in Σtnd with the highest values of the greedy function η1 . Then, it randomly selects an element from RCL as the letter to be appended to t.
4
Computational Experiments
In this section we describe the experiments carried out in order to study the behavior of the VNS-IG algorithm presented in the previous section. Firstly, we detail the experimental setup (Section 4.1), then we analyze the results obtained from different experimental studies carried out with VNS-IG. Our aim is (1) to analyse the influence of the parameter ρ associated with our algorithm (Section 4.2), (2) to carry out a comparison between VNS-IG and the state-ofthe-art algorithm for the LCS problem, ht-BS (Section 4.3), and (3) examining the synergetic effects among the versions of the Best-Next heuristic invoked by IG, which are based on the greedy functions η1 and η2 (Section 4.4). 4.1
Experimental Setup
We implemented VNS-IG in ANSI C using Dev-C++ 4.9.8.0 for compiling the software. The experimental results that we outline in the following were obtained on a PC with a 2.5 GHz Pentium Dual-Core processor with 3 GB of RAM running Windows Vista Business. We considered the following sets of instances for our experiments: – Set BB. It was introduced by Blum and Blesa in [25] and generated by the following procedure. First, for each combination of an alphabet Σ, a number of strings n and a length l, a base string of length l was created by randomly generating letters from Σ. Then, each of the n strings was produced by traversing the base string and deleting each letter with a probability of 0.1. Ten instances were generated for each of the 80 combinations of |Σ| ∈ {2, 4, 8, 24}, n ∈ {10, 100}, and l ∈ {100, 200, 300, . . ., 1000}. In our experiments, we have considered only the largest instances with l = 1000. – Sets Virus, Rat, and Random. They were introduced by Shyu and Tsai in [10]. Their instances are biologically inspired, and thus, they consider alphabets of size |Σ| = 4, corresponding to DNA sequences, and of size |Σ| = 20, corresponding to protein sequences. Shyu and Tsai provided three different types of instances. One is randomly generated and we denote this set henceforth as Random. The other two sets consist of real DNA and protein sequences of rats and viruses, Rat respectively Virus. Each of these three sets consists of 20 instances, 10 with an alphabet size of 4 and another 10 with an alphabet size of 20. The string length is always 600, while the number of strings per instance varies from 10 to 200, that is n ∈ {10, 15, 20, 25, 40, 60, 80, 100, 150, 200}. For the experimentation, we have fixed the values of the following VNS-IG parameters: δIG = |t| and nT = 0.1 · |t| (where t is the current solution kept by
10
M. Lozano and C. Blum
IG), kmax = 0.1 · |tvns | (where tvns is the current solution processed by VNSIG), and kRCL = 2. The parameter setting for lt-BS is the one suggested in [15]. Since our main objective is to compare VNS-IG with ht-BS, the maximum CPU time limits allotted for each run of our algorithm were comparable with the running times reported in [15] for ht-BS. In this context, note that both BS versions were executed on a machine with an Intel Core2 1.66 GHz processor with 2 MB of cache size. Only one run of VNS-IG was performed for each problem instance. 4.2
Influence of the Maximum Destruction Ratio
The maximum destruction ratio, ρ (see Section 3.1), is a parameter associated with the proposed IG algorithm that determines the maximum possible value for nd (i.e., the length of the piece that is removed and subsequently reconstructed by Best-Next). In this section, we investigate the sensitivity of VNS-IG with respect to this parameter by analyzing the behavior of the algorithm on the considered problem instances when different values for this parameter are considered (ρ = 0.1, 0.25, and 0.5). Tables 2 and 3 present the results. For the set BB, Table 2 displays the mean of the results of VNS-IG with different ρ values for 10 instances with the same characteristics. For the sets Virus, Rat, and Random, Table 3 shows the best known value for each instance (which were found by ht-BS and were reported in [15]), and, the improvement, Δ, of VNS-IG with different ρ values with respect to these results. A row with the sum of these improvements was included as well. Table 2. Results of VNS-IG with different ρ values (instances of the set BB) Σ 2 4 8 24 2 4 8 24
n 10 10 10 10 100 100 100 100
ρ = 0.1 ρ = 0.25 660.9 659.2 542.7 542.1 462.2 460.8 385.6 385.4 560.1 556.4 387.9 388.5 269.7 266.8 148.1 147.1
ρ = 0.5 656.7 538.6 460.6 385.5 551.1 384.2 264.5 146
A visual inspection of Table 2 allows us to note that, in general, the best results for the instances of the set BB are achieved with ρ = 0.1, which indicates that the manipulation of short pieces of the current solution becomes the best choice for these LCS problem instances. However, in the case of the instances of sets Virus, Rat, and Random, higher values for ρ resulted more effective. Particularly, with ρ = 0.25, VNS-IG achieves an acceptable robustness for these problem instances; the total improvements achieved were 18, 18, and -4, respectively. An important difference between the set BB and the other sets is the length of the strings that belong to S. For the case of the set BB, all instances consider |si | ≈ 900 for i = 1, . . . , n, and, for Virus, Rat, and Random, |si | = 600 for i = 1, . . . , n. Evidently, the length of the strings in S is a determinant factor
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
11
Table 3. Results of VNS-IG with different ρ values for instances of the sets Virus, Rat, and Random
|Σ| 4
20
Total:
n 10 15 20 25 40 60 80 100 150 200 10 15 20 25 40 60 80 100 150 200
BS 212 193 181 185 162 158 153 150 148 145 75 63 57 53 49 45 44 43 44 43
Virus ρ = 0.1 0.25 Δ Δ 6 7 4 4 1 1 2 2 3 1 0 2 1 1 1 2 0 0 0 1 -4 -1 -2 -2 -1 0 -2 0 -3 -1 -1 1 -1 0 -1 0 -1 0 0 0 2 18
0.5 Δ 4 4 -1 0 1 0 0 0 0 0 -3 -1 1 0 -1 1 0 0 0 0 5
BS 191 173 163 162 146 144 135 132 121 121 69 60 51 51 49 46 43 38 36 33
Rat ρ = 0.1 0.25 Δ Δ 3 5 5 4 1 2 -2 -1 3 3 1 3 0 3 -1 -1 1 3 -1 -2 -1 0 -2 1 0 2 -1 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 -1 0 1 18
0.5 Δ 1 3 4 3 3 4 0 1 3 -1 0 0 2 -1 -1 0 0 0 0 0 21
BS 211 194 184 179 167 161 156 154 148 146 61 51 47 43 37 34 32 31 29 27
Random ρ = 0.1 0.25 Δ Δ 0 2 2 1 0 0 -1 0 -2 -1 -2 -1 -2 2 -3 -1 -2 -1 -2 -1 -1 -1 -1 0 -2 -1 -1 0 -1 0 0 0 0 0 -1 -1 -1 -1 0 0 -20 -4
0.5 Δ -1 1 -1 0 2 0 1 0 1 -1 0 -1 -1 0 1 0 0 -1 0 0 0
that affects the complexity of the problem (higher length may entail more complexity). As complexity increases, IG may find difficulties to increase the quality of the incumbent solution by processing large pieces of it. This explains why ρ = 0.1 was the best setting for the set BB. However, this did not occur for the other instance sets. In this case, the manipulation of pieces that are proportionally greater allowed Best-Next to detect better common subsequences. 4.3
VNS-IG vs. ht-BS
In a recent publication, Blum et al. [15] presented the ht-BS algorithm for the LCS problem (see also Section 3.2). This algorithm has shown to be largely superior to any other existing technique for what concerns the LCS problem. The objective of this section is to pit VNS-IG against ht-BS. The results of these two algorithms for the instances of the BB set and for the ones of the sets Virus, Rat, and Random may be compared in Tables 4 and 5, respectively. Table 4 shows the quality of the solutions returned by ht-BS and VNS-IG (ρ = 0.1) and their computation times in seconds. Table 5 presents the quality of the solutions achieved by ht-BS, the improvement (Δ) of VNS-IG (ρ = 0.25) with respect to ht-BS, and the running times of these algorithms. Several comments are worth being mentioned from Tables 4 and 5: – For the set BB (Table 4), we clearly notice that VNS-IG exhibits overall a better performance than ht-BS. Only for the cases of (Σ = 8, n = 10) and (Σ = 24, n = 10), the performance is comparable to ht-BS. An encouraging result is that the improvements are quite considerable for most problem
12
M. Lozano and C. Blum Table 4. VNS-IG (ρ = 0.1) vs. ht-BS (instances of the set BB) |Σ| 2 4 8 24 2 4 8 24
n 10 10 10 10 100 100 100 100
ht-BS 648 534.7 462.3 385.6 541 369.3 258.7 147.7
time VNS-IG time 13.6 660.9 10 18.1 542.7 15 21.2 462.2 20 37.4 385.6 30 72.5 560.1 60 121.6 387.9 100 154.7 269.7 100 268.3 148.1 200
instances. Specifically, we remark the advantages for (Σ = 2, n = 10), (Σ = 2, n = 100), (Σ = 4, n = 100), and (Σ = 8, n = 100). – For the two sets consisting of real DNA and protein sequences, Virus and Rat (Table 5), our algorithm was able to obtain better solutions than ht-BS in 10, respectively 9, out of 20 cases. Additionally, the total improvements achieved by VNS-IG over ht-BS for these two instance sets are significant (18 for both sets). Note that this has been achieved employing a comparable computation time limit. – Only for the case of the Random problem instances (Table 5), our algorithm is slightly inferior to the performance of ht-BS. In summary, the simulation results show that our proposal is very competitive with the up-to-now best performing algorithm for the LCS problem. Table 5. VNS-IG (ρ = 0.25) vs. ht-BS (instances of the sets Virus, Rat, and Random) Virus Rat Random n ht-BS time Δ time ht-BS time Δ time ht-BS time Δ time 10 212 11.6 7 11 191 9.7 5 9 211 9.8 2 9 15 193 15.4 4 15 173 12.3 4 12 194 13.2 1 13 20 181 17.2 1 17 163 12.6 2 12 184 14.9 0 14 25 185 17.9 2 17 162 15.8 -1 15 179 15.8 0 15 40 162 21.9 1 21 146 19.4 3 19 167 21.0 -1 21 60 158 29.1 2 29 144 26.7 3 26 161 27.6 -1 27 80 153 36.0 1 36 135 31.8 3 31 156 33.5 2 33 100 150 43.9 2 43 132 38.5 -1 38 154 40.3 -1 40 150 148 64.5 0 64 121 51.1 3 51 148 56.4 -1 56 200 145 84.5 1 84 121 69.1 -2 69 146 74.3 -1 74 20 10 75 27.2 -1 27 69 27.4 0 27 61 33.3 -1 33 15 63 38.6 -2 38 60 36.7 1 36 51 37.6 0 37 20 57 40.3 0 40 51 34.4 2 34 47 39.5 -1 39 25 53 38.9 0 38 51 39.0 0 39 43 39.5 0 39 40 49 48.4 -1 48 49 47.4 -1 47 37 43.2 0 43 60 45 56.1 1 56 46 60.3 -1 60 34 46.5 0 46 80 44 67.4 0 67 43 64.4 -1 64 32 53.2 0 53 100 43 74.2 0 74 38 64.8 -1 64 31 59.2 -1 59 150 44 108.0 0 108 36 77.8 0 77 29 75.6 -1 75 200 43 140.0 0 140 33 101.0 0 101 27 98.0 0 98 Total: 18 18 -4 |Σ| 4
4.4
Synergy among the Best-Next Versions Used by IG
IG employs two different greedy functions within the four versions of the BestNext heuristic (see Table 1); two versions are based on the greedy function η1 ,
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
13
while the other two versions are based on η2 . Interestingly, Blum et al. [15] discovered that BS based on η1 is well-suited for the instances of set BB, whereas, BS based on η2 is preferable for dealing with sets Virus, Rat, and Random. In this section, we attempt to examine whether the simultaneous use of both greedy functions in IG decisively affects the performance of VNS-IG, i.e., whether there exists synergy between them. The synergy will occur when the combination of the two kinds of the Best-Next versions performs better than the sole usage of any one of them. Experimental results are shown in Tables 6 and 7. They show the results of VNS-IG and two variants; one that applies IG with only the versions of Best-Next based on η1 (Best-Next1 and Best-Next2), which will be called VNS-η1 , and another that only employs the ones based on η2 (Best-Next3 and Best-Next4), which will be referred as VNS-η2 . Table 6. VNS-IG vs. VNS-η1 and VNS-η2 (instances of the set BB) |Σ| 2 4 8 24 2 4 8 24
n VNS-η1 VNS-η2 VNS-IG 10 660.3 633.1 660.9 10 542.5 492.7 542.7 10 461.1 440.1 462.2 10 385.5 385.1 385.6 100 562.3 529.8 560.1 100 390.3 351.6 387.9 100 269.7 240.5 269.7 100 147.7 139.1 148.1
The results presented in Table 6 reveal that the sole usage of η1 is better than the sole usage of η2 for instances of the BB set. However, we notice the opposite situation in Table 7, for the case of Virus, Rat, and Random. These findings are Table 7. VNS-IG vs. VNS-η1 and VNS-η2 (instances of the sets Virus, Rat, and Random)
|Σ| 4
20
Total:
n 10 15 20 25 40 60 80 100 150 200 10 15 20 25 40 60 80 100 150 200
BS 212 193 181 185 162 158 153 150 148 145 75 63 57 53 49 45 44 43 44 43
Virus Rat Random VNS-η1 VNS-η2 VNS-IG VNS-η1 VNS-η2 VNS-IG VNS-η1 VNS-η2 VNS-IG Δ Δ Δ BS Δ Δ Δ BS Δ Δ Δ 3 3 7 191 -2 0 5 211 0 0 2 0 5 4 173 5 5 4 194 -3 -1 1 0 2 1 163 3 -2 2 184 -3 -1 0 -1 1 2 162 -3 0 -1 179 -4 0 0 1 1 1 146 3 3 3 167 -4 2 -1 1 1 2 144 1 4 3 161 -2 0 -1 0 -2 1 135 0 0 3 156 -3 1 2 1 -3 2 132 -1 -1 -1 154 -4 0 -1 0 -4 0 121 2 0 3 148 -2 0 -1 2 -2 1 121 0 -4 -2 146 -1 -1 -1 -2 -2 -1 69 0 0 0 61 -1 0 -1 -2 -2 -2 60 -1 1 1 51 -1 -1 0 0 0 0 51 0 1 2 47 -2 -1 -1 -2 0 0 51 -1 -1 0 43 -1 -1 0 -2 -1 -1 49 -1 -1 -1 37 -1 0 0 0 1 1 46 -1 -1 -1 34 0 0 0 0 0 0 43 -1 0 -1 32 0 0 0 -1 1 0 38 -1 -1 -1 31 -1 -1 -1 -1 -1 0 36 0 0 0 29 -1 -1 -1 0 0 0 33 -1 -1 0 27 0 0 0 -3 -2 18 1 2 18 -34 -5 -4
14
M. Lozano and C. Blum
in accordance with the aforementioned claim made by Blum et al [15]. Another encouraging result is that VNS-IG clearly improves over the results of both VNS-η1 and VNS-η2 on most considered problem instances (Tables 6 and 7). This result suggests that the synergy caused by combining Best-Next variations based on different greedy functions has a positive influence on the performance of VNS-IG.
5
Conclusions
In this work, we have proposed a hybrid metaheuristic based on neighborhood search for the longest common subsequence problem. More specifically, we developed a VNS algorithm with iterated greedy, beam search, and a greedy randomized procedure as its subordinate, embedded components. In this way, our proposal may be categorized as an integrative hybrid metaheuristic. The proposed method has turned out to be competitive with the state-of-the-art algorithm for the tackled problem. Concretely, our empirical study revealed a clear superiority when tackling instance sets BB, Virus, and Rat. Future work will be concerned with the integration of our proposed improvement method into construction-based algorithms such as, for example, BeamACO [26].
References 1. Storer, J.: Data Compression: Methods and Theory. Computer Science Press, MD (1988) 2. Lu, S.Y., Fu, K.S.: A sentence-to-sentence clustering procedure for pattern analysis. IEEE Transactions on Systems, Man and Cybernetics 8(5), 381–389 (1978) 3. Aho, A., Hopcroft, J., Ullman, J.: Data structures and algorithms. Addison-Wesley, Reading (1983) 4. Sankoff, D., Kruskal, J.B.: Time Warps, String Edits, and Macromolecules: The Theory and Practice of Sequence Comparison. Addison-Wesley, Reading (1983) 5. Sellis, T.: Multiple query optimization. ACM Transactions on Database Systems 13(1), 23–52 (1988) 6. Jiang, T., Lin, G., Ma, B., Zhang, K.: A general edit distance between RNA structures. Journal of Computational Biology 9(2), 371–388 (2002) 7. Brisk, P., Kaplan, A., Sarrafzadeh, M.: Area-efficient instruction set synthesis for reconfigurable system-on-chip design. In: Proceedings of the 41st Design Automation Conference, pp. 395–400. IEEE Press, Los Alamitos (2004) 8. Maier, D.: The complexity of some problems on subsequences and supersequences. Journal of the ACM 25, 322–336 (1978) 9. Bergroth, L., Hakonen, H., Raita, T.: A survey of longest common subsequence algorithms. In: Proceedings of SPIRE 2000 – 7th International Symposium on String Processing and Information Retrieval, pp. 39–48. IEEE press, Los Alamitos (2000) 10. Shyu, S.J., Tsai, C.Y.: Finding the longest common subsequence for multiple biological sequences by ant colony optimization. Computers & Operations Research 36(1), 73–91 (2009)
A Hybrid Metaheuristic for the Longest Common Subsequence Problem
15
11. Easton, T., Singireddy, A.: A large neighborhood search heuristic for the longest common subsequence problem. Journal of Heuristics 14(3), 271–283 (2008) 12. Julstrom, B.A., Hinkemeyer, B.: Starting from scratch: Growing longest common subsequences with evolution. In: Runarsson, T.P., Beyer, H.G., Burke, E.K., Merelo Guerv´ os, J.J., Whitley, L.D., Yao, X. (eds.) PPSN 2006. LNCS, vol. 4193, pp. 930– 938. Springer, Heidelberg (2006) 13. Fraser, C.B.: Subsequences and supersequences of strings. PhD thesis, University of Glasgow (1995) 14. Huang, K., Yang, C., Tseng, K.: Fast algorithms for finding the common subsequences of multiple sequences. In: Proceedings of the International Computer Symposium, pp. 1006–1011. IEEE press, Los Alamitos (2004) 15. Blum, C., Blesa, M.J., L´ opez Ib´ an ˜ez, M.: Beam search for the longest common subsequence problem. Computers & Operations Research 36(12), 3178–3186 (2009) 16. Blum, C.: Hybrid Metaheuristics – Guest Editorial. Computers & Operations Research 37(3), 430–431 (2010) 17. Talbi, E.G.: A taxonomy of hybrid metaheuristics. Journal of Heuristics 8(5), 541– 565 (2002) 18. Raidl, G.R.: A unified view on hybrid metaheuristics. In: Almeida, F., Blesa Aguilera, M.J., Blum, C., Moreno Vega, J.M., P´erez, M.P., Roli, A., Sampels, M. (eds.) HM 2006. LNCS, vol. 4030, pp. 1–12. Springer, Heidelberg (2006) 19. Hansen, P., Mladenovi´c, N.: Variable neighborhood search: Principles and applications. European Journal of Operational Research 130, 449–467 (2001) 20. Culberson, J., Luo, F.: Exploring the k-colorable landscape with iterated greedy. In: Cliques, coloring, and satisfiability: Second DIMACS implementation challenge, pp. 245–284. American Mathematical Society, Providence (1996) 21. Jacobs, L.W., Brusco, M.J.: A local-search heuristic for large set-covering problems. Naval Research Logistics 42, 1129–1140 (1995) 22. Ruiz, R., St¨ utzle, T.: An iterated greedy heuristic for the sequence dependent setup times flowshop problem with makespan and weighted tardiness objectives. European Journal of Operational Research 187, 1143–1159 (2008) 23. Ow, P.S., Morton, T.E.: Filtered beam search in scheduling. International Journal of Production Research 26, 297–307 (1988) 24. Feo, T.A., Resende, M.G.C.: Greedy randomized adaptive search procedures. Journal of Global Optimization 6, 109–133 (1995) 25. Blum, C., Blesa, M.J., L´ opez-Ib´ an ˜ez, M.: Beam search for the longest common subsequence problem. Technical Report LSI-08-29, Department LSI, Univeristat Polit`ecnica de Catalunya (2008) 26. Blum, C.: Beam-ACO—Hybridizing ant colony optimization with beam search: An application to open shop scheduling. Computers & Operations Research 32(6), 1565–1591 (2005)
Hybrid Algorithms for the Variable Sized Bin Packing Problem Christian Blum1 , Vera Hemmelmayr2 , Hugo Hern´ andez1 , and Verena Schmid2 1
ALBCOM Research Group, Universitat Polit`ecnica de Catalunya, Barcelona, Spain {cblum,hhernandez}@lsi.upc.edu 2 Department of Business Administration, Universit¨ at Wien, Vienna, Austria {vera.hemmelmayr,verena.schmid}@univie.ac.at
Abstract. This paper deals with the so-called variable sized bin packing problem, which is a generalization of the one-dimensional bin packing problem in which a set of items with given weights have to be packed into a minimum-cost set of bins of variable sizes and costs. First we propose a heuristic and a beam search approach. Both algorithms are strongly based on dynamic programming procedures and lower bounding techniques. Second, we propose a variable neighborhood search approach where some neighborhoods are also based on dynamic programming. The best results are obtained by using the solutions provided by the proposed heuristic as starting solutions for variable neighborhood search. The results show that this algorithm is very competitive with current state-of-the-art approaches.
1
Introduction
The variable sized bin packing problem (VSBPP) is a generalization of the wellknown one-dimensional bin packing packing (BPP). The objective consists of packing a set of given items into a minimum-cost set of bins of variable sizes and costs. Practical applications of the problem arise in packing, transportation planning, and cutting [6]. The literature on the VSBPP offers work on approximation algorithms [4,3,8] and exact algorithms [11,2,1,7]. However, even the best-performing exact approaches can only be applied to relatively small problem instances. The best algorithms for larger problem instances were proposed by Haouari and Serairi in [6]. After introducing a range of greedy heuristics, Haouari and Serairi also presented a genetic algorithm. They applied their algorithms to two sets of problem instances. While the genetic algorithm was best for linear-cost instances, a heuristic based on set covering performed better for other types of instances.
This work was supported by the binational grant Acciones Integradas ES16-2009 (Austria) and MEC HA2008-0005 (Spain), and by grant TIN2007-66523 (FORMALISM) of the Spanish government. In addition, Christian Blum acknowledges support from the Ram´ on y Cajal program of the Spanish Government of which he is a research fellow, and Hugo Hern´ andez acknowledges support from the Catalan Government through an FI grant.
M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 16–30, 2010. c Springer-Verlag Berlin Heidelberg 2010
Hybrid Algorithms for the Variable Sized Bin Packing Problem
17
In this paper we propose hybrid algorithms based on dynamic and linear programming techniques. First, we introduce a heuristic and a beam search approach, both based on dynamic programming procedures and bounding techniques. In addition to evaluating them as stand-alone-approaches, both algorithms are also used for providing high-quality starting solutions to a variable neighborhood search algorithm. As we will show, the combination of our heuristic with variable neighborhood search obtains the best results, beating or equalling the results of the best algorithms from the literature on two sets of problem instances. The organization of this work is as follows. The VSBPP is technically presented in Section 2. While the proposed heuristic and beam search are outlined and experimentally evaluated in Section 3, the same is done for variable neighborhood search in Section 4. Finally, in Section 5 we offer conclusions and an outlook to future work.
2
Variable Sized Bin Packing
The VSBPP can be formally defined as follows. Given is a set S of n items, S = {1, . . . , n}. Each item i ∈ S has a weight wi > 0. Furthermore, given is a set B of m different bin types, B = {1, . . . , m}, where each bin type k ∈ B has a capacity Wk > 0 and a cost ck . Without loss of generality we assume that W1 < . . . < Wm . The goal is to pack the n items into a number of bins such that the sum of the costs of the bin types is minimized. In the following we present an integer programming model for the VSBPP. This model includes two sets of binary variables. A variable xij ∈ {0, 1} is set to 1, that is, xij = 1, in case item i is placed in bin j. Note that we assume here that maximally n bins may be used. In this extreme case each item is packed into its own bin. Moreover, a variable yjk ∈ {0, 1} is set to 1, that is, yjk = 1, in case bin j has bin type k. With these variables the VSBPP can be expressed as follows. min
n m
ck · yjk
(1)
j=1 k=1
subject to: n j=1 m
n i=1
xij = 1 for i = 1, . . . , n
(2)
yjk ≤ 1 for j = 1, . . . , n
(3)
k=1
wi · xij ≤
m
Wk · yjk for j = 1, . . . , n
(4)
k=1
xij ∈ {0, 1} for i, j = 1, . . . , n yjk ∈ {0, 1} for j = 1, . . . , n and k = 1, . . . , m
(5) (6)
18
C. Blum et al.
Note that, as a generalization of the one-dimensional bin packing problem, the VSBPP is NP-hard.
3
A Heuristic and Beam Search for the VSBPP
The two algorithms that we propose in the following are strongly based on dynamic programming and/or lower bounding techniques. First we introduce a heuristic that uses lower bounding techniques as greedy information. Then we describe a beam search (BS) approach, which is a heuristic variant of branch & bound introduced in the context of scheduling problems [12]. The central idea of BS is the parallel construction of several solutions guided by two crucial algorithmic components, a greedy heuristic and a lower bound. 3.1
The SSP3 Heuristic from the Literature
As mentioned already in the introduction, Haouari and Serairi [6] proposed a range of greedy heuristics for the VSBPP. The best balance between speed and quality is obtained by a heuristic labeled SSP3 in [6], which works as follows. SSP3 iteratively fills one bin after the other until no unpacked items are left. In the context of SSP3 (and beam search) we henceforth denote (partial) solutions to the VSBPP as sequences t = t1 . . . t|t| , where ti ∈ B for all i = 1, . . . , |t|. In other words, a (partial) solution is represented by an ordered sequence of bin types. The interested reader may note that in the context of SSP3 such a representation is well-defined. At each iteration of SSP3, given a partial solution t, let us denote by S t ⊆ S the set of unpacked items, that is, S \ S t are the items that are packed into the |t| bins of partial solution t. Two design decisions have to be made: (1) a bin type must be chosen, and (2) the set of items that will be packed into the new bin have to be selected from S t with the condition that the heaviest remaining item—that is, argmax{wi | i ∈ S t }—is among the chosen items. Due to this condition, only bin types k with Wk ≥ max{wi | i ∈ S t } may be considered. Let us denote the bin type with the smallest feasible capacity by kmin . The feasible extensions of a partial solution t are all sequences tk where k ∈ {kmin , . . . , m}. The greedy value η(tk) of an extension tk is calculated as follows. First, the following NP-hard subset sum problem is solved in pseudopolynomial time by dynamic programming [9]: wi · xi (7) zk := max i∈S t
subject to:
wi · xi ≤ Wk
(8)
i∈S t
xi ∈ {0, 1} for i ∈ S t
(9)
Hybrid Algorithms for the Variable Sized Bin Packing Problem
19
Apart from the value zk of the calculated optimal solution, let us denote by Ik ⊆ S t the set of items that corresponds to this optimal solution, that is, Ik := {i ∈ S t | xi = 1}. The greedy value of tk is then defined as ck /zk , that is, η(tk) := ck /zk . At each step SSP3 chooses the bin type k ∗ ∈ {kmin , . . . , m} for which η(tk ∗ ) is minimal. The algorithm stops once all items are packed, that is, when S t = ∅. 3.2
Lower Bound
In the following we will denote the objective function value of a (partial) solution |t| t by f (t) := i=1 cti . Six different lower bounds for the VSBPP have been proposed in [7] in the context of a branch & bound algorithm. We implemented two of them. The first one, labeled L0 in [7], is a simple problem relaxation which is obtained by allowing items to be split. However, this relaxation itself is NP-hard and the corresponding integer program was solved with CPLEX. Given a partial solution t, let us denote the corresponding value by L0 (t). The second bound that we chose, labeled L3 in [7], is an NP-hard bound based on network flows. Also in this case the corresponding integer program was solved with CPLEX. With respect to a partial solution t, the corresponding value is denoted by L3 (t). 3.3
The Lower Bound Heuristic
The lower bound heuristic (LBH) is obtained as a variant of SSP3 as follows. Instead of the original definition of the greedy values, LBH uses the following redefinition. Each feasible extension tk of a partial solution t has the greedy value η(tk) := f (tk) + LB(tk), where LB(·) refers either to lower bound L0 or to lower bound L3 . 3.4
The BS Algorithm
The implemented BS algorithm, which is based on the previously described heuristics and the lower bounds, works as follows. At each step, the algorithm chooses at most μkbw feasible extensions of the partial solutions stored in a set B, known as the beam. Hereby, kbw is the so-called beam width that limits the size of B, and μ ≥ 1 is a parameter of the algorithm. The choice of feasible extensions is done deterministically based on the greedy function outlined in Section 3.1. At the end of each step, the algorithm creates a new beam B by selecting up to kbw partial solutions from the set of chosen feasible extensions. For this purpose, each chosen extension is evaluated on the basis of its lower bound value. Only the maximally kbw best extensions—with respect to this evaluation—are chosen for the new beam B. Finally, the best found complete solution is returned. We next explain the functions of Algorithm 1 in detail. The algorithm uses four different functions. Hereby, function LowerBoundHeuristic() executes heuristic LBH and stores the result in variable tbsf . Given the current beam B as input,
20
C. Blum et al.
Algorithm 1. Beam search (BS) for the VSBPP 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
input: a problem instance Bcompl := ∅, B := {∅} tbsf := LowerBoundHeuristic() while B = ∅ do C := Produce Extensions(B) B := ∅ for k = 1, . . . , min{μkbw , |C|} do tk := Choose Best Extension(C) if S tk = ∅ then Bcompl := Bcompl ∪ {tk} if f (tk) < f (tbsf ) then tbsf := tk end if else if f (t) + UB(tk) ≤ f (tbsf ) then B := B ∪ {tk} end if end if C := C \ {tk} end for B := Reduce(B, kbw ) end while output: argmin {f (t) | t ∈ Bcompl }
function Produce Extensions(B) produces the set C of feasible extensions of all sequences in B. More specifically, C is the set of sequences tk, where t ∈ B and k ∈ {kmin , . . . , m}. The third function, Choose Best Extension(C), is used for choosing extensions from C. In this context note that for the comparison of two extensions tk and t k from C the greedy function is only useful in case t = t , while it might be misleading in case t = t . We solved this problem as follows. First, instead of the greedy weights η(), we use the corresponding ranks. More specifically, given all feasible extensions {tk | k ∈ {kmin , . . . , m}} of a sequence t, the extension tk with η(tk ) ≤ η(tk) for all k ∈ {kmin , . . . , m} receives rank 1, denoted by r(tk ) = 1. The extension with the second smallest greedy weight receives rank 2, etc. For evaluating an extension tk we then use the sum of the ranks of the greedy weights that correspond to the well-defined sequence of construction steps that were performed to construct sequence tk, that is ⎛ ⎞ |t|−1 r(t1 · · · ti ti+1 )⎠ + r(tk) (10) ν(tk) := r(t1 ) + ⎝ i=1
where t1 · · · ti denotes the subsequence of t from position 1 to position i, and ti+1 denotes the bin type at position i + 1 of sequence t. In contrast to the greedy function weights, these newly defined ν()-values can be used to compare extensions of different sequences. In fact, a call of function Choose Best Extension(C) returns the extension from C with minimal ν() value. Finally, the last function used by the BS algorithm is Reduce(B, kbw ). This function reduces B to the best kbw sequences with respect to an evaluation measure based on one of the two lower bound functions outlined in Section 3.2.
Hybrid Algorithms for the Variable Sized Bin Packing Problem
21
For any sequence t ∈ B the evaluation measure is defined as f (t) + LB(t), where f (t) refers to the objective function value of the partial solution t, and LB(t) either refers to the lower bound value L0 (t) or L3 (t), depending on which of the two lower bounds is used by BS. 3.5
Experimental Evaluation of LBH and BS
Both the LBH and BS were implemented in C++ and experimentally evaluated on a cluster of PCs equipped with Pentium D processors with 3.2 GHz. For computing the lower bounds L0 and L3 we used CPLEX 12.1. Two benchmark sets from the literature were used for testing. Set1 consists of ten instances for each n ∈ {25, 50, 100, 200, 500}, where n is the number of items. Moreover, these instances are linear-cost instances, that is, Wi = ci for all i ∈ {1, . . . , m}, where m = 3 for all instances. The capacities, respectively costs, were chosen to be W1 = 100, W2 = 120 and W3 = 150. Item weights were randomly drawn from [1, 100]. These 50 instances were originally proposed in [11]. The second instance set, henceforth denoted by Set2, was proposed in [6]. For all the instances from Set2, the number of bin types (m) was set to 7 and capacities were defined as W1 = 70, W2 = 100, W3 = 130, W4 = 160, W5 = 190, W6 = 220 and W7 = 250. Moreover, item weights were randomly drawn from [1, 250]. Finally, these instances split into three different classes, where class B1 is characterized by a linear cost function ci = Wi (i = 1, . . . , 7), class B2 has a concave cost √ function ci = 10 Wi (i = 1, . . . , 7), and class B3 has a convex cost function ci = 0.1Wi 3/2 (i = 1, . . . , 7). Set2 consists of 10 instances for each combination of n (number of items) and class. This makes a total of 150 problem instances. The following five algorithm versions were applied to Set1 and Set2: LBH(L0 ), respectively LBH(L3 ), denotes the lower bound heuristic using L0 , respectively L3 , as bounding technique. Furthermore, BS(L0 ), respectively BS(L3 ), denotes beam search using L0 , respectively L3 , as lower bound. Note that parameter settings kbw = 10 and μ = 4.0 were used for these versions of BS. Finally, we also tested algorithm BS(L0 , kbw = 100), that is, BS using L0 as lower bound and using a beam width of 100. These five algorithm versions were compared to the two best algorithms proposed in [6]: Algorithm SC is a heuristic based on set covering, and GEN denotes a genetic algorithm. While GEN is superior to SC for what concerns the instances of Set1, SC is notably better than GEN for the instances of Set2. The results of our algorithms for the instances of Set1 are presented in comparison to SC and GEN in Table 1. The results are presented in the same way as in [6]. Column Gap presents the average percentage deviation (over 10 instances) with respect to the value of the optimal solutions (as computed by a branch & bound approach from [7]). Column M Gap contains the maximal one of these gaps (over 10 instances). Furthermore, column Opt provides the number of instances (out of 10) that were solved to optimality, and column Time (s) presents the average computation times (over 10 instances) in seconds. For each algorithm the row labeled Summary provides the averages of the values
22
C. Blum et al.
in the columns (for columns Gap and Time (s)), respectively the maxium of the values in column M Gap and the sum of the values in column Opt. First—and surprisingly—in addition to being faster, the algorithm versions using lower bound L0 achieve higher solution qualities than the algorithm versions using L3 . This is despite the fact that L3 is a tighter lower bound than L0 (see [7]). Concerning the comparison between LBH and BS, we can state that BS improves—in terms of solution quality—over the corresponding versions of LBH. For example, while LBH(L0 ) can solve 40 (out of 50) instances to optimality, BS(L0 ) can solve 45 instances to optimality. However, this comes at the cost of significantly higher computation times. Moreover, increasing the beam width (kbw ) in BS does not seem to be very beneficial. Even though the algorithm slightly improves in terms of solution quality, this is not justified by the increase in computation time requirements. For what concerns the comparison to SC and GEN, we note that both LBH(L0 ) and BS(L0 ) are superior to SC in terms of solution quality. However, while the performance of BS(L0 ) is comparable, in terms of solution quality, to the one of GEN, LBH(L0 ) is clearly inferior to GEN. The great advantage of GEN in comparison to both LBH(L0 ) and BS(L0 ) are the low computation time requirements. In this context, note that both SC and GEN were executed on a PC with a Pentium IV (3.2 GHz) processor and 2 GB of RAM, which should be comparable in speed to the machines that we used. The computational results for Set2 are presented in Table 2. As the comparison between our five algorithm versions was basically the same as for Set1, we only show the results of LBH(L0 ) and BS(L0 ). Moreover, these two algorithm versions are henceforth simply denoted by LBH and BS. Note also that the format of Table 2 is slightly different to the one of Table 1. First, optimal solutions are not known for the instances of Set2. Therefore, instead of referring to optimal solutions, columns Gap and M Gap now refer to the relative percentage deviation from a lower bound value derived in [7]. Moreover, for the same reason column Opt does not exist in Table 2. For what concerns the comparison of LBH and BS to SC and GEN, we must note that both LBH and BS are generally inferior to both SC and GEN. Hereby, this is more pronounced for what concerns instances with a concave and a convex cost function. However, also for the instances with linear cost function LBH and BS are now inferior to SC, which might be related to the increase in the number of bin types as well as to the increase in the number of items.
4
Variable Neighborhood Search
Variable neighborhood search (VNS) is a metaheuristic which has originally been proposed in [10] and extended in [5]. It is an improvement heuristic based on local search and has already been successfully applied to a number of combinatorial optimization problems. In contrast to population-based approaches VNS works at each iteration on a single solution only. An efficient search within the solution space is usually achieved by the use of both diversification and intensification
Hybrid Algorithms for the Variable Sized Bin Packing Problem
23
Table 1. Results of the Lower Bound Heuristic (LBH) and Beam Search (BS) in comparison to SC and GEN for all instances from Set1 Alg. LBH(L0 )
LBH(L3 )
BS(L0 )
BS(L3 )
BS(L0 , kbw = 100)
SC
GEN
n 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary
Gap 0.68 0.19 0.07 0.00 0.00 0.19 0.84 0.48 0.29 0.01 0.02 0.33 0.08 0.07 0.07 0.00 0.00 0.05 0.08 0.11 0.11 0.01 0.02 0.07 0.08 0.07 0.02 0.00 0.00 0.03 0.54 0.25 0.10 0.06 0.10 0.21 0.00 0.07 0.02 0.01 0.00 0.02
M Gap 2.92 0.77 0.55 0.00 0.00 2.92 2.19 1.16 1.11 0.10 0.19 2.19 0.80 0.37 0.55 0.00 0.00 0.8 0.80 0.40 0.74 0.10 0.19 0.8 0.80 0.37 0.18 0.00 0.00 0.8 1.46 0.52 0.22 0.10 0.25 1.46 0.00 0.37 0.18 0.09 0.00 0.37
Opt 5 7 8 10 10 40 4 3 6 9 9 31 9 8 8 10 10 45 9 7 7 9 9 41 9 8 9 10 10 46 4 4 5 4 2 19 10 8 9 9 10 46
Time (s) 0.25 0.51 1.12 2.28 5.61 1.95 1.53 2.40 4.17 7.49 34.29 9.97 11.93 28.04 47.66 38.44 25.66 30.35 22.77 44.38 76.27 62.29 125.36 66.21 61.72 302.85 710.35 684.33 450.46 441.94 0.08 0.10 0.39 5.88 18.43 4.98 0.10 0.11 0.11 0.22 0.39 0.19
strategies. During shaking phases the current incumbent solution is perturbed by means of different neighborhood structures, allowing the solution process to explore various regions of the solution space and (hopefully) to escape from local optima. The subsequent use of local search intensifies the search. A sketch of the basic steps of a standard VNS can be found in Algorithm 2. After the generation of an initial solution, at each iteration the current solution x is systematically perturbed by means of κmax neighborhood structures Nκ , where 1 ≤ κ ≤ κmax . The perturbed solution x is then locally optimized during the local search phase, which results in a solution x . If the acceptance criterion
100 200 500 1000 2000 Summary 100 200 500 1000 2000 Summary 100 200 500 1000 2000 Summary 100 200 500 1000 2000 Summary
LBH
GEN
SC
BS
n
Alg.
Gap 1.11 1.12 0.60 0.48 0.36 0.73 0.96 1.07 0.56 0.44 0.34 0.68 0.85 0.98 0.46 0.37 0.32 0.60 0.82 0.95 0.49 0.41 0.33 0.60
Class B1 M Gap Time (s) 1.86 0.40 1.94 0.78 1.01 1.95 0.78 3.33 0.46 7.43 1.94 2.78 1.41 215.38 1.83 322.24 0.90 826.85 0.78 1817.60 0.43 4798.96 1.83 1596.21 1.41 0.23 1.64 0.22 0.80 3.85 0.72 5.95 0.41 12.89 1.64 4.63 1.41 0.85 1.64 1.96 0.79 4.38 0.76 10.92 0.43 29.88 1.64 9.60 Gap 1.35 1.55 0.91 0.76 0.53 1.02 1.30 1.48 0.89 0.70 0.52 0.98 1.03 1.27 0.71 0.62 0.44 0.81 1.08 1.32 0.77 0.66 0.47 0.86
Class B2 M Gap Time (s) 1.98 4.09 2.26 8.59 1.49 21.27 1.27 33.17 0.96 52.60 2.26 23.94 1.98 181.05 2.21 319.61 1.48 811.87 1.18 1869.34 0.88 4547.01 2.21 1545.78 1.83 3.77 2.21 8.69 1.21 12.47 1.03 19.78 0.82 21.41 2.21 13.22 1.83 1.11 2.21 1.99 1.32 5.05 1.13 12.07 0.86 37.12 2.21 11.47 Gap 2.55 2.81 2.93 2.86 2.86 2.80 2.40 2.75 2.92 2.86 2.86 2.76 2.22 2.43 2.56 2.51 2.50 2.44 2.23 2.57 2.71 2.61 2.56 2.54
Class B3 M Gap Time (s) 3.53 4.74 3.46 10.10 3.87 19.96 3.14 35.17 3.03 68.26 3.87 27.65 3.24 481.51 3.46 725.48 3.87 1095.43 3.14 2160.20 3.03 5589.34 3.87 2010.39 3.08 0.09 3.16 0.17 3.33 0.54 2.83 1.83 2.69 6.73 3.33 1.87 3.08 1.06 3.49 1.98 3.55 4.35 2.89 9.89 2.83 34.45 3.55 10.35
Table 2. Results of the Lower Bound Heuristic (LBH) and Beam Search (BS) in comparison to SC and GEN for all instances from Set2
24 C. Blum et al.
Hybrid Algorithms for the Variable Sized Bin Packing Problem
25
Algorithm 2. A Standard Version of VNS input: a problem instance x ← GenerateInitialSolution() while stopping criterion not met do κ←1 while κ ≤ κmax do x ← Shaking(x, κ) x ← LocalSearch(x ) if Accept(x , x) then x ← x κ←1 else κ←κ+1 end if end while end while output: best solution found
is met, x becomes the new incumbent solution and the search procedure starts over again with the first neighborhood structure. Otherwise the search continues with x as incumbent solution and uses the next neighborhood structure κ + 1. In the following we present our implementation of VNS for the VSBPP. In the context of VNS, a solution x is an explicit list of bins with their items and bin types. 4.1
Implementation of VNS for the VSBPP
In order to find a feasible initial solution a suitable bin is randomly chosen for each item. In fact, each item is packed into a separate bin. The selection probak bility is directly proportional to the ratio W ck , hence favoring the assignment of items to bins which have low cost with respect to their capacity. Shaking. For our shaking step we defined three neighborhood structures. The first one, henceforth denoted by N1 , changes the type of a given number of bins. The second one (N2 ) deletes bins and repacks the items, whereas the third one (N3 ) is based on dynamic programming. The way in which these three neighborhood structures (or operators) are used is slightly different to the way in which they would be used in the standard VNS that is shown in Algorithm 2. For each of the three operators we keep track of the number of successful applications. Then, whenever Shaking(x) is applied, the choice of the operator depends on the performance of the corresponding operator in previous steps. Hereby, the selection probability is directly proportional to the number of successful applications in the past. In the following we describe the three operators in more detail. Operator N1 (x) selects up to 15% of all bins currently used by solution x and changes their corresponding bin types randomly. In case this produces a bin b in which the assigned items do no longer fit (which may happen in case the new
26
C. Blum et al.
bin capacity ends up being too small) items are randomly removed until the capacity of the bin is sufficient. This may generate a set of currently un-packed items, which are sorted in a non-increasing manner with respect to their weight. Then one after the other is inserted into any of the currently open bins. We use a roulette-wheel approach based on the remaining bin capacities, where the selection probability for a bin to be chosen is inversely related to the remaining capacity of the bin. If an item does not fit into any of the bins currently in use, a new bin is added to the solution. The bin type is randomly chosen proportional to the ratio cost/capacity (a small ratio is favored). Operator N2 (x) chooses up to 5% of all bins of x and deletes them from x. All items previously assigned to these bins have to be repacked. This is done by assigning each of these items to a new bin whose bin type is randomly chosen among all bin types where the item would fit. Finally, operator N3 (x) uses a packing procedure based on dynamic programming proposed in [6]. This dynamic programming procedure provides the minimum-cost VSBPP solution for a given sequence of items. The given sequence imposes that for each item j that appears after an item i, item j must appear either in the same bin as i or in a later bin. In order to obtain such an item sequence, the items of the bins of x are appended in the order in which they appear in x. Hereby, the items of each bin are sorted according to their weight. The sorting is done either in a non-decreasing or non-increasing way, in an alternating fashion. Note that the maximal neighborhood sizes (15% of all bins in the case of N1 , respectively 5% of all bins in the case of N2 ) were determined after extensive experimentation. Local Search. Three different neighborhood structures were used for local search. The first two (N4 and N5 ) are based on the intuition that in a (near-)optimal solution all bins are probably quite densely packed. In other words, the remaining capacity of all bins used should be rather small. The goal of the operators N4 and N5 is therefore to obtain densely packed bins. Operator N4 tries to improve the capacity usage, that is, it tries to decrease the remaining capacity of each bin by moving an item from its current bin a to a different bin b. Such a move can only be executed if the resulting packing is feasible with respect to the corresponding capacities and if the remaining capacity of bin b after the move is smaller than the remaining capacity of bin a before the move. Hence we try to fill up bins whose utilization level is already high, while emptying others that are currently not fully utilized. With a similar intention, operator N5 tries to swap an item i currently packed in bin a with an item j currently packed into a different bin b. The swap is executed if and only if the remaining capacity of bin b after the swap is smaller than the remaining capacity of bin a before the swap and the resulting packing is feasible with respect to the bin capacities. As we are urging to obtain densley packed bins, furthermore a swap is only considered feasible if the remaining capacity of bin b decreases, i.e. if wi > wj . After this first phase there tend to be bins that are currently far from being densely packed. Hence, the goal should be to remove those bins. Therefore,
Hybrid Algorithms for the Variable Sized Bin Packing Problem
27
operator N6 selects the bin with the lowest load. All items currently assigned to this bin are tried to be inserted into other bins based on a best fit procedure. In case all items can be removed successfully, the corresponding bin can be deleted from the solution. In a final step, local search iterates through all bins currently in use and tries to change the corresponding bin types in order to use cheaper bins if possible. The neighborhoods are used sequentially and are executed in a first improvement fashion. Acceptance Criterion. After the original solution has been perturbed by the shaking operator and the local search phase has been executed, the resulting solution is compared to the original solution. It is only accepted as new incumbent solution if the objective function value has been improved. 4.2
Computational Results
We tested three versions of VNS, where different starting solutions have been used. Henceforth we refer to VNS using the simple starting solution (as described above) by VNS(si). Moreover, the version of VNS that uses the lower bound heuristic (as described in Section 3.3) as starting solution is denoted by VNS(lbh). Finally, the last version of VNS uses beam search (see Section 3.4) as starting solution and is denoted by VNS(bs). Due to the random nature of VNS, each instance was solved five times. The reported results are the average values obtained. The run time limit has been set to 10 seconds for instances of Set1 (small linear-cost instances), and to 100 seconds for the instances of Set2 (larger instances). Remember that the instance sets are described in Section 3.5. VNS was implemented using C++ and has been tested on the same cluster of PCs as LBH and BS. Tables 3 and 4 show the corresponding results for the instances of Set1 and Set2. Note that computation times are given in the form (X/Y ), where X refers to the time of computing the starting solution and Y to the time of VNS. Both times must be added in order to obtain the total time of the algorithm. As can be seen, VNS performs very well compared to the algorithms proposed in [6]. The best results obtained improve over – or are at least as good as – the results of GEN (in the case of Set1) and SC (in the case of Set2). Remember that the results of GEN and SC are given in Tables 1 and 2. As can be seen in Table 3, for the small, linear- cost instances (Set 1), all three versions of VNS find the optimal solutions to all 50 problem instances. Please note that the reported results are averaged values over 5 independent test runs for each instance and that we are able to find the optimal solution in every run. This proves that this algorithm is very stable and robust. Even when using the simple procedure for generating the starting solution, on average the optimal solution was found after 0.75 seconds. The algorithms SC (GEN) proposed in [6] need on average 4.98 (0.19) seconds for generating their best solution. Also note that SC (GEN) find the optimal solution in only 19 (46) out of 50 instances.
28
C. Blum et al.
Table 3. Results of VNS with different starting solutions for all instances from Set1 Alg. VNS(si)
VNS(lbh)
VNS(bs)
n 25 50 100 200 500 Summary 25 50 100 200 500 Summary 25 50 100 200 500 Summary
Gap 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
M Gap 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Opt 10 10 10 10 10 50 10 10 10 10 10 50 10 10 10 10 10 50
Time (s) (0.00/0.08) (0.00/0.57) (0.00/0.16) (0.00/0.33) (0.00/2.62) (0.00/0.75) (0.25/0.09) (0.51/0.72) (1.12/0.15) (2.28/0.00) (5.61/0.00) (1.95/0.19) (11.93/0.11) (28.04/0.73) (47.66/0.18) (38.44/0.00) (25.66/0.00) (30.35/0.20)
For the set of larger instances (Set2) our algorithm improves over the results of the so-far best algorithm SC for what concerns the linear and convex cost classes (class B1 and B3). Moreover, it produces comparable results for class B2. For class B1 the average (maximum) gap obtained by the algorithms of [6] is 0.6% (1.64%). The VNS using the simple initial solution (si) yields an average gap that is slightly worse (0.62%). When initializing the VNS with the more sophisticated initial solutions (provided by LBH and BS) the average gap can be reduced to 0.58%. However, only version VNS(lbh) is practical due to the high computation time requirements of beam search. Furthermore, notice that all proposed procedures obtain the same maximum gap. For class B2 we obtain the same results as in [6]. Again, starting from a more sophisticated initial solution is beneficial for the solution quality. For class B3, all three versions of VNS are able to improve the average as well as the maximum gap found by [6]. The average (maximum) gap of the VNS is 2.43% (3.29%), while the resulting gaps of the best algorithms from [6] amount to 2.44% (3.33%). Concerning computation times, note that our algorithms are generally slower than both SC and GEN. However, in absolute terms, the computation times of VNS(si) and VNS(lbh) are still quite low. Moreover, note that the authors of [6] have experimentally shown that GEN is not able to improve when given more computation time. Also remember that SC is a deterministic heuristic, which means that it can not benefit from additional computation time either. Summarizing, our best algorithm version is able to provide high quality solutions for both sets of instances, whereas the performance of the algorithms provided in [6] is instance-dependent. For Set1 GEN outperforms SC, whereas for Set2 the performance is vice versa.
100 200 500 1000 2000 Summary 100 200 500 1000 2000 Summary 100 200 500 1000 2000 Summary
VNS(si)
VNS(bs)
VNS(lbh)
n
Alg.
Gap 0.79 0.93 0.50 0.45 0.45 0.62 0.79 0.93 0.47 0.40 0.32 0.58 0.79 0.93 0.46 0.39 0.32 0.58
Class M Gap 1.41 1.64 0.79 0.79 0.60 1.64 1.41 1.64 0.77 0.73 0.41 1.64 1.41 1.64 0.76 0.73 0.41 1.64
B1 Time (s) (0.00/14.40) (0.00/13.59) (0.00/46.99) (0.00/61.17) (0.00/87.84) (0.00/44.80) (0.40/12.84) (0.78/7.24) (1.95/20.46) (3.33/14.31) (7.43/15.98) (2.78/14.17) (215.38/6.85) (322.24/11.01) (826.85/18.86) (1817.60/9.34) (4798.96/17.17) (1596.21/12.64) Gap 1.00 1.26 0.80 0.89 0.79 0.95 1.00 1.23 0.70 0.66 0.47 0.81 1.00 1.23 0.70 0.65 0.47 0.81
Class B2 M Gap Time (s) 1.83 (0.00/3.12) 2.21 (0.00/21.91) 1.40 (0.00/40.05) 1.45 (0.00/59.35) 1.12 (0.00/86.33) 2.21 (0.00/42.15) 1.83 (4.09/4.71) 2.21 (8.59/10.39) 1.25 (21.27/10.48) 1.18 (33.17/18.54) 0.81 (52.60/16.38) 2.21 (23.94/12.10) 1.83 (181.05/3.26) 2.21 (319.61/12.96) 1.25 (811.87/13.08) 1.18 (1869.34/9.00) 0.81 (4547.01/16.65) 2.21 (1545.78/10.99) Gap 2.21 2.40 2.54 2.49 2.49 2.43 2.21 2.40 2.54 2.49 2.49 2.43 2.21 2.40 2.54 2.49 2.49 2.43
Class B3 M Gap Time (s) 3.08 (0.00/0.37) 3.16 (0.00/7.59) 3.29 (0.00/49.11) 2.82 (0.00/76.60) 2.69 (0.00/89.69) 3.29 (0.00/44.67) 3.08 (4.74/0.22) 3.16 (10.10/14.09) 3.29 (19.96/45.69) 2.82 (35.17/79.00) 2.69 (68.26/88.70) 3.29 (27.65/45.54) 3.08 (481.51/0.22) 3.16 (725.48/11.14) 3.29 (1095.43/41.67) 2.82 (2160.20/79.92) 2.69 (5589.34/87.45) 3.29 (2010.39/44.08)
Table 4. Results of VNS with different starting solutions for all instances from Set2
Hybrid Algorithms for the Variable Sized Bin Packing Problem 29
30
5
C. Blum et al.
Conclusions and Outlook
In this work we proposed hybrid algorithms based on dynamic and linear programming techniques for the variable sized bin packing problem. First, we presented a heuristic and a beam search approach. Then we developed a version of variable neighborhood search, which made use of the aforementioned heuristic and beam search algorithms for providing high-quality starting solutions. The best-performing algorithm—for what concerns the balance between solution quality and computation time—was variable neighborhood search using the heuristic starting solution. The results achieved by this algorithm version were for each set of problem instances at least as good as the results of the so-far best algorithm from the literature. In the future we plan to re-implement the best algorithms from [6] in order to be able to provide a more detailed analysis of the results that will be based on absolute solution qualities rather than being restricted to deviations (in percent) from optimal solutions, respectively from lower bound values. We are convinced that such an analysis will help to even better point out the advantages of our best algorithms over the state-of-the-art methods from the literature.
References 1. Alves, C., Val´erio de Carvalho, J.M.: Accelerating column generation for variable sized bin packing problems. European Journal of Operational Research 183, 1333– 1352 (2007) 2. Belov, G., Scheithauer, G.: A cutting plane algorithm for the one-dimensional cutting stock problem with multiple stock lengths. European Journal of Operational Research 141, 274–294 (2002) 3. Chu, C., La, R.: Variable-sized bin packing: tight absolute worst-case performance ratios for four approximation algorithms. SIAM Journal on Computing 30, 2069– 2083 (2001) 4. Friesen, D.K., Langston, M.A.: Variable sized bin packing. SIAM Journal on Computing 15, 222–230 (1986) 5. Hansen, P., Mladenovi´c, N.: Variable neighborhood search: Principles and applications. European Journal of Operational Research 130(3), 449–467 (2001) 6. Haouari, M., Serairi, M.: Heuristics for the variable sized bin-packing problem. Computers & Operations Research 36(10), 2877–2884 (2009) 7. Haouari, M., Serairi, M.: Relaxations and exact solution of the variable sized bin packing problem. Computational Optimization and Applications (2009) (in press) 8. Kang, J., Park, J.: Algorithms for the variable sized bin packing problem. European Journal of Operational Research 147, 365–372 (2003) 9. Kellerer, H., Pferschy, U., Pisinger, D.: Knapsack problems. Springer, Berlin (2004) 10. Mladenovi´c, N., Hansen, P.: Variable neighborhood search. Computers & Operations Research 24(11), 1097–1100 (1997) 11. Monaci, M.: Algorithms for packing and scheduling problems. Ph.D. thesis, University of Bologna (2002) 12. Ow, P.S., Morton, T.E.: Filtered beam search in scheduling. International Journal of Production Research 26, 297–307 (1988)
A Hybrid Tabu Search Heuristic for a Bilevel Competitive Facility Location Model ˙ Kuban Altınel Hande K¨ uc¸u ¨ kaydın, Necati Aras, and I. ˙ Dept. of Industrial Eng., Bo˘ gazi¸ci University, Istanbul, Turkey
Abstract. We consider a problem in which a firm or franchise enters a market by locating new facilities where there are existing facilities belonging to a competitor. The firm aims at finding the location and attractiveness of each facility to be opened so as to maximize its profit. The competitor, on the other hand, can react by adjusting the attractiveness of its existing facilities, opening new facilities and/or closing existing ones with the objective of maximizing its own profit. The demand is assumed to be aggregated at certain points in the plane and the facilities of the firm can be located at prespecified candidate sites. We employ Huff’s gravity-based rule in modeling the behavior of the customers where the fraction of customers at a demand point that visit a certain facility is proportional to the facility attractiveness and inversely proportional to the distance between the facility site and demand point. We formulate a bilevel mixed-integer nonlinear programming model where the firm entering the market is the leader and the competitor is the follower. In order to find a feasible solution of this model, we develop a hybrid tabu search heuristic which makes use of two exact methods as subroutines: a gradient ascent method and a branch-and-bound algorithm with nonlinear programming relaxation. Keywords: Tabu search, competitive facility location, bilevel programming, mixed-integer nonlinear programming.
1
Introduction
Competitive facility location (CFL) is a subclass of facility location problems in which a firm or franchise wishes to locate new facilities in a market, where there are already existing facilities belonging to one or many competitors. The locations and attractiveness levels of these existing facilities are known a priori. All the new and existing facilities compete for customers to maximize their profit or market share. The CFL problems take into account the attractiveness levels of the facilities defined as a function of some facility characteristics (attributes) in addition to the proximity between a customer location and the nearest facility site. In his seminal work, Hotelling (1929) developed a model which involves two equally attractive ice-cream sellers along a beach strip where customers patronize the closest one. This very first model was extended later for unequally attractive facilities, which is a more realistic assumption given the current situation of today’s diversified market. M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 31–45, 2010. c Springer-Verlag Berlin Heidelberg 2010
32
˙ H. K¨ u¸cu ¨kaydın, N. Aras, and I.K. Altınel
In deterministic utility models it is assumed that customers visit a single facility that gives the highest utility for them. In random utility models, on the other hand, customers can visit any facility with respect to some probability. The gravity-based model proposed by Huff (1964, 1966) has become the most utilized random utility model in the CFL literature. In this model, the probability that a customer patronizes a facility is proportional to the attractiveness of the facility and inversely proportional to a function of the distance between the customer and the facility. After the launch of new facilities by the market entrant firm, the competitor having existing facilities in the market may react to the entrant firm. This action-reaction behavior brings us to the area of two-level or bilevel optimization problems in which a sequential game is played between two autonomous players called the leader and the follower. Both players try to optimize their individual objective functions that are in general in contradiction with each other as pointed out by Moore and Bard (1990). First, the leader decides on a strategy to optimize its objective function. Then, given the strategy of the leader the follower chooses a strategy to optimize its own objective function. The bilevel programming (BP) formulations in optimization correspond to static Stackelberg games in the context of game theory (Bard, 1998). When we review the literature on the game-theoretic formulations in CFL problems, we come across to eight studies. Some of them consider BP models, while others solve Stackelberg equilibrium problems. Fischer (2002) is concerned with a discrete CFL problem with two competitors selling the same product to customers that are aggregated at discrete points in two-dimensional space called markets. The aim of both players is to find out the location of a given number of new facilities and the price of the product for each market. Two bilevel models are suggested by Fischer (2002): a mixed-integer nonlinear bilevel model in which both players fix their locations and prices, and a mixed-integer linear bilevel model where prices can be modified. A heuristic solution procedure is developed to solve the linear bilevel model, but no computational results are provided. Bhadury et al. (2003) consider a centroid model in the continuous space, where the follower locates additional facilities as a reaction to the leader’s decision. Two problems are proposed in Drezner (1982), where in the first one a new facility capturing the largest portion of the buying power from the demand points is to be located in a market solely controlled by one existing facility. The second problem is also concerned with the location of a new facility with the same target. However, the competitor may react by opening a prospective facility. Plastria and Vanhaverbeke (2008) consider the maximal covering model by taking into account that a follower will open a new facility later. The leader aims at opening facilities within a budget limit that maximize the market share following the entry of the competitor. Three models are formulated according to three strategies: worst-case analysis (maximin strategy), the minimum regret strategy, and the Stackelberg strategy, which implies taking the objective function of the competitor into consideration. Serra and ReVelle (1993) formulate
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
33
a model in which the same number of facilities are to be located by the leader and the follower, where the leader wants to minimize the market share of the follower. However, customers patronize only the closest facility. Another Stackelberg equilibrium problem is addressed by P´erez and Pelegr´ın (2003), whose objective is to determine all Stackelberg equilibria where both the leader and follower locate a single facility at any point in the tree. They develop the entire set of Stackelberg solutions to this competition model. S´ aiz et al. (2009) propose a nonlinear BP model in the continuous space in which both the leader and the follower locate a single facility where their market share is maximized. A gravity-based model is utilized to formulate the problem, but the attractiveness levels of facilities are given a priori. They develop a branch-andbound method that guarantees the global optimum within a specified accuracy. Drezner and Drezner (1998) suggest a very similar model to that of S´aiz et al. (2009) and develop three heuristic methods for its solution. We address a bilevel CFL problem in the discrete space with the objective of maximizing the profit of the new market entrant firm, which is the leader of a sequential game. The leader determines the optimal location and attractivenesses for the new facilities. Given the new facilities of the leader, the competitor firm that becomes the follower in the game, reacts to the leader by adjusting the attractiveness levels of its existing facilities, opening new facilities and/or closing existing ones in order to optimize its own profit. To the best of the authors’ knowledge, the bilevel CFL problem with a discrete set of candidate facility sites of the leader and continuous attractiveness of the leader’s facilities, where the follower has the options of opening new facilities, closing as well as restructuring existing ones, has not been addressed in the literature before. The developed model is based on a mixed-integer nonlinear BP formulation for whose solution a hybrid tabu search heuristic is proposed.
2
Model Description
In this section, first the situation encountered by the new entrant firm is introduced, and then the BP model with its features is presented. The market entrant firm (referred to as the firm in the sequel) is the leader and the competing firm (referred to as the competitor) already existing in the market is the follower. The firm wishes to decide the optimal location and attractiveness for its new facilities such that the profit obtained from the customers is maximized given that the competitor has r1 existing facilities and r2 candidate facility sites to open new facilities. We assume that the competitor reacts to the firm by adjusting (increasing or decreasing) the attractiveness of its existing facilities, opening new facilities and/or closing existing ones with the aim of maximizing its own profit. Note that reducing the attractiveness of facility to zero means its closure. Under the conditions that the customers are aggregated at n demand points and the number of candidate facility sites of the leader is m, we define the parameters and decision variables of our problem as follows by indexing the (demand) points by j = 1, 2, ..., n, the candidate facility sites of the leader by i = 1, 2, ..., m, the
˙ H. K¨ uc¸u ¨kaydın, N. Aras, and I.K. Altınel
34
existing facilities of the competitor by k = 1, 2, ..., r1 , and its candidate facility sites by = 1, 2, ..., r2 . Parameters: hj : ci : fi : ui :
annual buying power at point j, unit attractiveness cost of the firm’s facility at candidate site i, annualized fixed cost of opening a facility by the firm at site i, maximum attractiveness level of the firm’s facility to be opened at site i, dij : Euclidean distance between firm’s candidate site i and point j, dkj : Euclidean distance between competitor’s existing facility at site k and point j, dj : Euclidean distance between competitor’s candidate site and point j, Ak : current attractiveness level of competitor’s facility at site k, bk : unit cost of increasing or unit revenue of decreasing the attractiveness level of competitor’s existing facility at site k Ak : maximum attractiveness level of competitor’s existing facility at site k, sk : revenue of closing an existing facility at site k, M : maximum attractiveness level of competitor’s facility to be opened at site , e : unit attractiveness cost of competitor’s new facility at site , f : annualized fixed cost of opening a facility at site . Decision variables: Qi : attractiveness of the facility opened by the firm at site i, Xi : binary variable which is equal to one if a facility is opened by the firm at site i, and zero otherwise, Ak : new attractiveness level of competitor’s existing facility at site k, M : attractiveness level of competitor’s new facility at site , Zk : binary variable which is equal to one if the competitor’s existing facility at site k is kept open, and zero if it is closed, Y : binary variable which is equal to one if a new facility is opened by the competitor at site , and zero otherwise. When a facility is opened by the firm at site i with attractiveness Qi , the utility of this facility for customers at point j is given by Qi /d2ij using Huff’s gravity-based rule. The total utility of competitor’s existing and new facilities r1 r2 for customers at point j is given by k=1 Ak /d2kj + =1 M /d2j . As a result, the probability Pij that customers at point j visits a new facility of the firm at site i is expressed as Qi /d2ij (1) Pij = . r1 r2 m Qi /d2ij + Ak /d2kj + M /d2j i=1
k=1
=1
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
35
n Note that of the firm’s facility at site i. j=1 Pij provides the market share n Hence, the revenue of this facility is given as j=1 hj Pij , and the total revenue captured by the new facilities is given as m n
hj Pij =
i=1 j=1
n
hj
j=1
=
n j=1
m
Pij
i=1
hj
m Qi /d2ij
i=1
. r1 r2 m Qi /d2ij + Ak /d2kj + M /d2j
i=1
k=1
(2)
=1
Similarly, the total revenue captured by the existing and new facilities of the competitor can be computed as
n
r1
hj
j=1
k=1
r2 Ak /d2kj + M /d2j =1
. r1 r2 m Qi /d2ij + Ak /d2kj + M /d2j
i=1
k=1
(3)
=1
Now, we can formulate our model as the following bilevel mixed-integer nonlinear programming problem called BCFLP (Bilevel Competitive Facility Location Problem):
max Π = X,Q
n
m Qi /d2ij
hj
j=1
m i=1
i=1
Qi /d2ij +
r1 k=1
r2 Ak /d2kj + M /d2j =1
+
m
ci Q i −
i=1
m
fi Xi
(4)
i=1
subject to Qi ≤ u i Xi
i = 1, . . . , m
(5)
Qi ≥ 0 Xi ∈ {0, 1}
i = 1, . . . , m i = 1, . . . , m
(6) (7)
where Y, Z, M, and A solve
max
Y,Z,M,A
n j=1
r2 r1 Ak /d2kj + M /d2j
hj
k=1
i=1
+
r1 k=1
=1
r1 r2 m Qi /d2ij + Ak /d2kj + M /d2j
sk (1 − Zk ) −
r1 k=1
k=1
bk (Ak − Ak Zk ) −
r2 =1
=1
e M −
r2 =1
f Y
(8)
36
˙ H. K¨ uc¸u ¨kaydın, N. Aras, and I.K. Altınel
subject to Ak ≤ Ak Zk Ak ≥ 0
k = 1, . . . , r1 k = 1, . . . , r1
(9) (10)
M ≤ M Y M ≥ 0
= 1, . . . , r2 = 1, . . . , r2
(11) (12)
Zk ∈ {0, 1} Y ∈ {0, 1}
k = 1, . . . , r1 = 1, . . . , r2
(13) (14)
The objective function (4) of the firm is composed of three terms. The first one represents the revenue collected by the new facilities that are opened, while the second and third components represent, respectively, the fixed cost and attractiveness cost associated with opening the new facilities. Constraints (5) along with the binary restrictions (7) on the location variables Xi and nonnegativity restrictions (6) on attractiveness variables Qi ensure that if no facility is opened at site i, then the corresponding attractiveness Qi of the facility is zero. On the other hand, if a facility is opened at site i, then its attractiveness Qi cannot exceed the maximum level ui . We note that the number of facilities to be located is not fixed; its value is determined by the solution of the model. The objective function of the competitor (8) is comprised of five terms: the first term represents the revenue collected by the existing and new facilities of the follower, the second term shows the revenue which occurs when existing facilities are closed, the third term represents the cost or revenue associated with adjusting the attractiveness levels of existing facilities, the fourth and last terms indicate, respectively, the fixed and variable attractiveness costs associated with opening new facilities. Constraints (9) and (10) ensure that the new attractiveness level Ak of an existing facility at site k will be between zero and an upper bound Ak . If Ak is equal to Ak in a solution of the model, then it means that the attractiveness level of the facility at site k is not adjusted, but it is kept open. In such a case, no attractiveness cost is incurred since Ak − Ak Zk = 0. On the other hand, if Ak < Ak ≤ Ak , a cost of magnitude bk (Ak − Ak ) arises. Finally, if 0 ≤ Ak ≤ Ak , a revenue of bk (Ak − Ak ) is incurred. If an existing facility at site k is closed, both of the variables Ak and Zk are equal to zero with no attractiveness cost incurring. Constraints (11) along with constraints (12) ensure that if no facility is opened at site , then the corresponding attractiveness M of the facility is zero. Conversely, if a facility is opened at site , then its attractiveness M cannot exceed the maximum level M . Finally, constraints (13) and (14) are the binary restrictions on location variables of the competitor, while constraints (10) and (12) are the nonnegativity restrictions on attractiveness variables Ak and M . Before proposing the solution method for BCFLP in the next section, we state two important properties of the objective functions of both the firm and the competitor. The firm’s objective function is concave in Q ≥ 0 when A = (A1 , A2 , ..., Ar1 ) and M = (M1 , M2 , ..., Mr2 ) are fixed. Similarly, the competitor’s objective function is concave in (A, M) ≥ 0 when Q = (Q1 , Q2 , ..., Qm ) is fixed.
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
37
These properties can be shown by generalizing the arguments in K¨ uc¸u ¨ kaydın et al. (2009) and K¨ uc¸u ¨ kaydın et al. (2010).
3
Solution Method
In this section, we first propose a hybrid tabu search (HTS) heuristic to solve the BCFLP. Then, we outline an exact solution procedure that can be employed to assess the quality of the solutions of small problem instances produced by the HTS heuristic. 3.1
HTS Heuristic
The proposed HTS heuristic performs a search in the upper level problem (ULP) over the location variables X of the firm. Tabu search is an iterative metaheuristic algorithm that conducts the local search to keep it from getting trapped in a local optimum (Glover and Laguna, 1997). This is achieved in our algorithm by preventing the locations of the firm from opening facilities that cause to return to previously visited solutions. The profit of the firm corresponding to a given set of opened facilities and their attractiveness levels can only be found by determining the optimal response of the competitor. This is accomplished by solving the competitor’s lower level problem (LLP) to find the optimal values of Y∗ (the location variables of competitor’s new facilities), Z∗ (the open/close status variables of competitor’s existing facilities), M∗ (attractiveness variables of competitor’s new facilities), and A∗ (attractiveness variables of competitor’s existing facilities). HTS begins with an initial solution consisting of a single facility belonging to the firm. This is achieved by first computing for each candidate facility site the average distance between this site and all demand points. Then, a facility is opened at candidate site i∗ for which the average distance is minimum, i.e., Xi∗ = 1 and Xi = 0 for i = i∗ . The other components of the initial solution is found as follows. The attractiveness Qi∗ of this facility is set arbitrarily to the maximum attractiveness level ui . Recall from the previous section that the objective function of the LLP (competitor’s profit) is concave in terms of the variables A and M when variable Q is fixed. Hence, the LLP can be solved by relaxing binary location variables Y and Z and applying a branch-and-bound algorithm (BB). That is, at each node of the BB tree, the binary restrictions on the variables Yk and Z are relaxed, and a continuous nonlinear program (NLP) is obtained whose solution provides an upper bound on the LLP. When the relaxed solution yields all Yk and Z variables as zero or one, then we get a feasible solution for the original LLP, which is also a lower bound on the optimal objective value of the competitor. We employ the callable library of commercial NLP solver Knitro 6.0 (Waltz and Plantenga, 2009). Branching at a node is performed by considering the solution at that node and selecting one of the Yk or Z variables with the nearest value to 0.5 as the branching variable. Pruning of the nodes is based on the infeasibility and the value dominance.
38
˙ H. K¨ uc¸u ¨kaydın, N. Aras, and I.K. Altınel
Once the attractiveness levels A and M of the competitor’s facilities and their locations Y and Z are obtained, these values along with the Xi and Qi values are substituted in the firm’s objective function in the ULP to compute the profit of the starting solution. At each iteration of HTS, neighboring solutions are generated from the current solution by executing different types of moves. These moves are 1-Add, 1-Drop, and 1-Swap moves that are applied to the location variables X of the firm. A 1-Add move opens a facility at a candidate site without a facility. A 1-Drop move closes an open facility, whereas a 1-Swap move closes a facility and opens a new one at a candidate site without a facility. To compute the firm’s profit corresponding to a neighboring solution with known X we need to assign values to attractiveness variables Q in the ULP, and then solve the LLP to global optimality using the aforementioned BB algorithm with NLP relaxation so that the optimal response of the competitor is determined. Finding values for Q is realized by solving the ULP in which the values of the location variables X are already known due to the selected move and the values of the attractiveness variables A and M of the competitor are provided by the current solution. This, however, is a concave maximization problem subject to the constraints 0 ≤ Qi ≤ ui , the solution of which can be obtained using the following optimality conditions: Q∗ is a global optimal solution if and only if
∗ i) ∂Π(Q) ∂Qi ∗ ≤ 0 when Qi = 0,
Q
ii) ∂Π(Q) ≥ 0 when Q∗i = ui , ∂Qi Q∗
iii) ∂Π(Q) = 0 when 0 < Q∗i < ui . ∂Qi
Q∗
These conditions are given in Bertsekas (1995) for the optimality of a minimization problem in convex programming. They give rise to a gradient ascent procedure used to determine a global maximum of Π(Q). Starting from arbitrarily assigned initial values Q(0) , a direction e(t) and a step size α(t) = arg maxα Π(Q(t) + αe(t) ) are determined in each iteration of the procedure. These are used to update the value of variable Q at the next iteration: Q(t+1) = (t) (t) (t) Q (t)+ α e . The procedure is continued until the norm of the direction vector e is smaller than a user-specified parameter. In finding the optimal step size, we apply the golden section search (Press et al., 1986) with the initial interval [0, αmax ], where αmax is the maximum possible value for the step size α to maintain the feasibility of vector Q with respect to its lower and upper bounds. By applying the gradient ascent procedure explained above, we get the values for Q corresponding to a neighboring solution. To prevent cycling in our HTS heuristic, we make use of a tabu list where the location variables X of the firm and the attractiveness variables A and M of the competitor corresponding to previously generated neighboring solutions at earlier iterations are maintained. If the values of X of a newly generated neighboring solution match with those of a solution in the tabu list and the values of A and M are within a hypercube of side length 100 whose center is the point defined by the A and M values of the same solution in the tabu list, then this neighboring solution is tabu active. The
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
39
motivation in this tabu list structure is not to generate solutions in the ULP which have the same X values and very similar Q values. It is clear that such solutions will lead to more or less the same optimal response of the competitor. At each iteration of HTS, the best neighboring solution is chosen as the next current solution. If its objective value (firm’s profit) is higher than that of the incumbent, the latter is also updated. We use two criteria for the termination of the iterations: the maximum number of iterations performed (max iter ) and the maximum number of iterations without an improvement in the incumbent (max nonimp iter ). 3.2
An Exact Solution Procedure
To assess the quality of the solutions obtained by the proposed HTS heuristic we need another approach. To this end, we develop an exact procedure that is based on a global optimization algorithm called GMIN-αBB. GMIN-αBB algorithm which can solve pure-integer nonlinear or mixed-integer nonlinear problems to -optimality was first proposed in Adjiman et al. (1997) and later improved by Adjiman et al. (2000). Unfortunately, it is a computationally intensive procedure and can only be utilized in solving small problem instances. To apply the GMIN-αBB algorithm for the BCFLP considered in this paper we fix all the binary variables Zk and Y of the competitor and obtain a BP formulation with a mixed-integer upper level problem and a continuous nonlinear lower level problem. Since the (competitor’s) objective function of the lower level problem is concave in (A, M) ≥ 0 when Q = (Q1 , Q2 , ..., Qm ), Z = (Z1 , Z2 , ..., Zr1 ), and Y = (Y1 , Y2 , ..., Yr2 ) are fixed, the lower problem can be replaced by its equivalent Karush-Kuhn-Tucker optimality conditions. As a result, the BP formulation with fixed Zk and Y variables can be converted to a single-level mixed-integer nonlinear programming problem that can be solved to -optimality using the GMINαBB algorithm. The details of the conversion to a single-level problem and the implementation of the GMIN-αBB algorithm can be found in K¨ uc¸u ¨ kaydın et al. (2010) for a more restrictive bilevel competitive facility location problem where the competitor can only react by increasing the attractiveness levels of its existing facilities, but does not have the option of opening new facilities and closing existing ones. Since competitor’s binary variables Zk and Y are binary, there are 2r1 +r2 possible combinations for fixing these variables in the lower level problem. This means that as many as 2r1 +r2 single-level formulations can be obtained, and the best bilevel feasible solution z ∗ among all the combinations will be the -optimal solution for the problem instance considered.
4
Computational Analysis
Since there is no benchmark instance in the literature for CFL problems, we randomly generate test instances. The first part of our experiments consists of the assessment of the performance of the proposed HTS heuristic. To this end,
40
˙ H. K¨ uc¸u ¨kaydın, N. Aras, and I.K. Altınel
we generate eight datasets where the number of demand points (n) is set to two different values from the set {10, 20} and the number of existing facilities of the competitor (r1 ) takes on two values from the set {1, 2}. The number of the candidate facility sites of the competitor (r2 ) is also set to one and two, while the number of candidate facility sites of the firm (m) is equal to five. The first r1 + r2 candidate sites of the firm coincide with the candidate and existing facility sites of the competitor. This enables us to capture the possibility of the firm to co-locate its facilities with those of the competitor if it is profitable to do so. Three different instances are generated for each dataset, which makes a total of 24 problem instances in total. The reason why we choose relatively small values for m and n is due to the fact that the GMIN-αBB algorithm can only handle instances of this size within reasonable computation times. The x and y-coordinates of the demand points, the candidate facility sites of both parties, and the existing facility sites of the competitor are integers generated from a discrete uniform distribution having support in the interval [0, 100]. The annual buying power hj of customers at point j, the unit attractiveness cost ci of the leader’s potential facility at site i, unit attractiveness cost e of competitor’s new facility at site , unit cost of increasing or unit revenue of decreasing the attractiveness of competitor’s existing facility (bk ), and the current attractiveness Ak of competitor’s existing facility at site k are integer-valued parameters generated from the following uniform distributions: hj ∼ U (100, 100000), ci ∼ U (1, 10), e ∼ U (1, 10), bk ∼ U (1, 10), and Ak ∼ U (100, 1000). The fixed costs fi and f are set 1000 times as large as the attractiveness costs, i.e., fi = 1000ci and f = 1000e. The upper bounds ui , Ak , and M on the attractiveness of a new or existing facility are taken as ui = 10000ci, Ak = 10000bk , and M = 10000e, respectively. Finally, the revenue sk that incurs to the competitor by closing an existing facility at site k is set to 500 times as large as the attractiveness cost bk , i.e. sk = 500bk . The two main parameters of the HTS heuristic, the maximum number of iterations performed (max iter ) and the maximum number of iterations without an improvement in the incumbent (max nonimp iter ) are set to 1000 and 100, respectively. The HTS heuristic was coded in C# and the computations were performed on a workstation with Intel Xeon 3.16 GHz processor with 16 GB of RAM working under the Windows 2003 Server operating system. Table 1 includes the results where we report the -optimal objective value z ∗ (firm’s profit) obtained by the exact method, its CPU time, the objective value of the best feasible solution provided by the HTS heuristic, the corresponding CPU time, and the accuracy of the heuristic solution measured as a percent deviation (PD). The latter is computed by the formula 100 × (z ∗ − z)/z ∗ . As can be observed, the average percent deviation is 1.87%, and the average CPU times are 7286.4 seconds for the exact method and 70.8 seconds for the HTS heuristic. This shows that on the considered set of small problem instances the accuracy and efficiency of the proposed HTS heuristic turns out to be quite satisfactory. To give an idea about the characteristics of an -optimal solution of the BCFLP, we choose the third instance of the dataset (5, 10, 2, 2) where m = 5,
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
41
Table 1. Performance of the HTS Heuristic wrt the Exact Method Dataset Exact Method (m, n, r1 , r2 ) Profit (z ∗ ) CPU (sec.) 205,592.2 638.7 (5,10,1,1) 133,326.9 874.8 256,934.6 1777.3 114,496.0 1718.0 (5,10,1,2) 325,562.0 3443.3 170,216.5 2972.7 270,919.7 1576.5 (5,10,2,1) 209,598.4 2206.5 149,747.5 6334.6 238,018.1 14,532.2 (5,10,2,2) 133,056.3 5401.9 155,957.3 9180.3 492,114.7 3941.8 (5,20,1,1) 488,628.2 942.4 511,244.0 1595.8 358,829.3 8737.5 (5,20,1,2) 316,072.2 5667.2 276,636.3 3482.4 384,687.9 10,303.0 (5,20,2,1) 593,588.8 2071.5 270,621.5 5106.7 492,045.9 32,863.9 (5,20,2,2) 472,052.5 25,205.8 313,793.8 24,299.1 Average 7286.4
HTS Heuristic Profit (z) CPU (sec.) 205,592.2 2.0 133,320.9 1.2 246,911.8 230.4 110,215.5 1.6 290,724.9 2.2 170,216.5 2.5 261,036.0 57.7 204,155.3 50.4 149,323.0 5.8 235,589.6 2.3 133,056.3 1.7 155,957.3 163.6 459,361.0 64.3 481,104.0 1.8 511,244.0 2.2 357,332.4 3.6 313,803.2 54.6 276,636.3 1.7 383,613.9 279.0 593,588.8 56.0 270,596.1 60.0 478,382.5 272.2 455,557.5 216.60 304,380.1 164.89 70.8
PD (%) 0.00 0.00 3.90 3.74 10.70 0.00 3.65 2.60 0.28 1.02 0.00 0.00 6.66 1.54 0.00 0.42 0.72 0.00 0.28 0.00 0.01 2.78 3.49 3.00 1.87
n = 10, r1 = r2 = 2. In this case, the HTS heuristic can find the -optimal solution, i.e., z = z ∗ . Figure 1 illustrates the demand points, the locations of the candidate facility sites for the firm as well as the competitor, and the competitor’s existing facilities. Note that the locations of the competitor’s existing facilities and its candidate sites are also candidate sites for the firm’s facilities to be opened. Figure 2 displays the solution for this problem instance. We see that the firm opens three new facilities at its second, fourth, and fifth candidate sites with attractiveness levels 21931.98, 10000, and 10000, respectively. Since one of the firm’s new facilities (the solid triangle in the upper right part of Figure 2) coincides with one of the competitor’s existing facilities (the square in the upper right part of Figure 1), the competitor’s reaction turns out to be closing this facility on one side, and increasing the attractiveness level of its other existing facility (solid square in the middle of Figure 2) from 590 to 30,000. Besides, one of its three new facilities of the firm is opened at a candidate site of the competitor where the latter also opens its new facility with an attractiveness level 20000 (solid triangle and circle in the lower part of Figure 2).
˙ H. K¨ u¸cu ¨kaydın, N. Aras, and I.K. Altınel
42
80 70 60 Demand Points
50 40
Competitor's Existing Facilities
30
Competitor's Candidate Sites
20
Firm's Candidate Sites
10 0 0
50
100
150
Fig. 1. Demand Points, Existing Facilities, and Candidate Sites in the Example
80 70 60
Demand Points
50
Q2=21931.98
Competitor's Existing Facilities
40 Q5=10000
30
Competitor's New Facilities
A1=30000
20
Firm's New Facilities
10
M2=20000 Q4=10000
0 0
50
100
150
Fig. 2. The Locations of New and Existing Facilities in the Example
Being satisfied with the performance of the HTS heuristic, we generate and solve larger BCFLP instances. For this purpose, we use 18 datasets where n ∈ {50, 60, 70, 80, 90, 100}, r1 ∈ {3, 4, 5}, r2 = r1 , and m = 2(r1 + r2 ). For example, an instance with r1 = r2 = 3 has 12 candidate facility sites for the firm, i.e., m = 12. Since five different instances are generated for each dataset, we obtain a total of 90 problem instances. The distributions from which the parameter values are generated are the same as before. The results are presented in Table 2,
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model Table 2. Results of the HTS Heuristic on Large Instances Dataset (m, n, r1 , r2 )
(12,50,3,3)
(12,60,3,3)
(12,70,3,3)
(12,80,3,3)
(12,90,3,3)
(12,100,3,3)
(16,50,4,4)
(16,60,4,4)
(16,70,4,4)
Profit 1,202,746.0 99,5525.1 922,530.2 1,285,707.0 950,105.6 1,411,604.0 968,010.8 1,015,085.7 1,386,021.3 1,354,679.3 1,348,284.2 1,226,156.9 1,284,975.6 1,733,072.7 1,517,700.3 1,807,982.8 1,966,959.0 1,210,034.7 1,861,643.7 1,691,014.3 1,631,391.7 1,407,237.5 1,602,355.3 1,692,652.6 1,973,023.8 2,113,551.3 2,416,126.0 2,190,723.0 1,907,006.4 1,738,030.6 831,941.3 1,075,374.0 1,228,906.2 889,945.0 1,388,153.4 1,188,730.1 1,350,667.2 1,304,864.6 1,125,113.0 1,484,921.4 1,046,319.9 1,340,241.8 1,572,186.9 1,777,202.2 1,403,871.5
CPU Time (sec.) 415.7 2928.8 5377.4 330.2 1801.1 323.0 357.0 2159.4 6298.1 441.2 4795.9 7626.5 491.1 6305.8 2663.1 451.2 742.3 2370.5 902.2 1072.8 487.2 389.4 851.7 4777.7 5964.6 9656.6 2475.7 19,139.8 637.2 12,127.1 10,846.0 2216.1 1148.7 25,614.5 3360.4 1518.3 1965.4 1291.2 3492.0 17,283.4 2306.5 749.7 2531.7 5898.4 37,158.8
Dataset (m, n, r1 , r2 )
(16,80,4,4)
(16,90,4,4)
(16,100,4,4)
(20,50,5,5)
(20,60,5,5)
(20,70,5,5)
(20,80,5,5)
(20,90,5,5)
(20,100,5,5)
Profit 1,523,885.7 1,852,580.4 2,361,338.3 1,692,032.3 1,533,233.6 1,689,441.3 1,674,399.7 1,715,332.0 1,740,497.3 1,829,994.1 2,279,358.9 1,927,504.9 2,283,729.3 2,562,060.3 2,195,552.5 977,402.4 1,092,555.5 817,650.6 1,216,890.9 1,244,768.7 1,367,375.9 915,316.5 1,129,866.3 1,100,346.4 1,026,380.6 1,272,270.7 1,514,479.6 1,243,061.5 1,749,160.5 1,556,155.9 1,839,637.5 1,946,758.6 1,860,689.3 1,799,238.0 1,186,956.1 1,716,188.3 1,868,359.5 1,603,005.0 1,973,197.0 1,825,453.6 1,961,583.8 1,991,874.7 2,376,781.0 1,929,114.3 2,013,341.7
CPU Time (sec.) 50,852.5 2218.8 18,685.7 42,632.0 15,262.9 5919.2 26,362.3 28,304.9 3037.4 2033.8 41,045.9 28,553.8 20,213.3 21,592.5 5386.0 4249.3 18,590.6 5056.0 5651.6 9268.9 122,420.7 21,740.2 19,441.3 83,907.0 37,122.2 31,748.4 62,435.3 5413.4 12,399.1 61,806.0 6765.0 10,585.6 23,542.8 89,442.2 7626.7 95,273.9 15,959.1 11,734.9 94,007.4 16,346.6 44,263.1 5420.4 11,210.3 138,802.1 136,462.3
43
44
˙ H. K¨ u¸cu ¨kaydın, N. Aras, and I.K. Altınel
where z indicates the best feasible solution obtained by the HTS heuristic. The average CPU time of all the instances is 19,361.5 seconds.
5
Conclusion
In this paper, a competitive facility location problem referred to as the BCFLP is considered in which there is a sequential game between a market entrant firm and its competitor existing in the market. The firm wants to determine the locations and the attractiveness levels of its new facilities to maximize its profit by taking into account the reaction of the competitor. The competitor’s reaction to the firm consists of adjusting the attractiveness levels of its existing facilities, closing them altogether and opening new facilities with the objective of maximizing its own profit. For this problem, we formulate a bilevel mixedinteger nonlinear programming model and solve it using a hybrid tabu search (HTS) heuristic. The performance of the HTS heuristic is first evaluated on a set of randomly generated small-sized problem instances by making use of an exact solution method called GMIN-αBB algorithm. To apply this algorithm, we convert the BCFLP into a single-level mixed-integer nonlinear programming model by fixing the binary variables in the lower level problem of the BCFLP. The results indicate that the HTS heuristic is quite accurate as it finds solutions whose objective values are on the average 1.87% away from the -optimal objective value given by the exact method. After being convinced by the performance of the HTS heuristic, we implement it on a second test set consisting of 90 larger problem instances. As a future research direction, we are planning to improve the HTS heuristic. One possibility is to change the neighborhood structure used in the tabu search. Namely, instead of using a gradient ascent algorithm to find the attractiveness levels, our aim is to include the attractiveness levels in the definition of the neighboring solutions. Since the attractiveness values are continuous, this forces us to incorporate the application of tabu search concepts for the continuous optimization problems. In such a setting, the tabu list will contain both the locations and the attractiveness levels of the firm. Acknowledgements. This work was partially supported by Bo˘ gazi¸ci Research Fund Grant No: 08HA301D.
References 1. Adjiman, C.S., Androulakis, I.P., Floudas, C.A.: Global Optimization of MINLP Problems in Process Synthesis and Design. Computers and Chemical Engineering 21, 445–450 (1997) 2. Adjiman, C.S., Androulakis, I.P., Floudas, C.A.: Global Optimization of MixedInteger Nonlinear Problems. AIChE 46, 176–248 (2000) 3. Bard, J.F.: Practical Bilevel Optimization Algorithms and Applications. Kluwer Academic Publishers, Dordrecht (1998)
A Hybrid Tabu Search Heuristic for a Bilevel CFL Model
45
4. Bhadury, J., Eiselt, H.A., Jaramillo, J.H.: An Alternating Heuristic For Medianoid and Centroid Problems in the Plane. Computers and Operations Research 30, 553– 565 (2003) 5. Bertsekas, D.P.: Nonlinear Programming. Athena Scientific, Boston (1995) 6. Drezner, Z.: Competitive Location Strategies for Two Facilities. Regional Science and Urban Economics 12, 485–493 (1982) 7. Drezner, T., Drezner, Z.: Facility Location in Anticipation of Future Competition. Location Science 6, 155–173 (1998) 8. Fischer, K.: Sequential Discrete p-facility Models for Competitive Location Planning. Annals of Operations Research 111(1-4), 253–270 (2002) 9. Glover, F., Laguna, M.: Tabu Search. Kluwer Academic Publishers, Dordrecht (1997) 10. Hotelling, H.: Stability in Competition. Economic Journal 39, 41–57 (1929) 11. Huff, D.L.: Defining and Estimating a Trade Area. Journal of Marketing 28, 34–38 (1964) 12. Huff, D.L.: A Programmed Solution for Approximating an Optimum Retail Location. Land Economics 42, 293–303 (1966) ˙ 13. K¨ u¸cu ¨kaydın, H., Aras, N., Altınel, I.K.: A Discrete Competitive Facility Location Model with Variable Attractiveness. Bo˘ gazi¸ci University Research Paper, FBE-IE01/2009-01 (2009) ˙ 14. K¨ u¸cu ¨kaydın, H., Aras, N., Altınel, I.K.: A Bilevel Competitive Facility Location Model with Competitor’s Response. Bo˘ gazi¸ci University Research Paper, FBE-IE01/2010-01 (2010) 15. Moore, J.T., Bard, J.F.: The Mixed-integer Linear Bilevel Programming Problem. Operations Research 38, 911–921 (1990) 16. P´erez, M.D.G., Pelegr´ın, B.: All Stackelberg Location Equilibria in the Hotelling’s Duopoly Model on a Tree with Parametric Prices. Annals of Operations Research 122(1-4), 177–192 (2003) 17. Plastria, F., Vanhaverbeke, L.: Discrete Models for Competitive Location with Foresight. Computers and Operations Research 35(3), 683–700 (2008) 18. Press, W.H., Flannery, B.P., Teukolsky, S.A., Vetterling, W.T.: Numerical Recipes: The Art of Scientific Computing. Cambridge University Press, New York (1986) 19. S´ aiz, M.E., Hendrix, E.M.T., Fern´ andez, J., Pelegr´ın, B.: On a Branch-and-bound Approach for a Huff-like Stackelberg Location Problem. OR Spectrum 31(3), 679– 705 (2009) 20. Serra, D., ReVelle, C.: Market Capture by Two Competitors: The Pre-emptive Location Problem. Economics Working Paper Series 39 (1993) 21. Waltz, R.A., Plantenga, T.D.: Knitro User’s Manual Version 6.0. Ziena Optimization Inc. (2009)
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem Luca Di Gaspero1 , Johannes G¨ artner2 , Nysret Musliu3 , 1 Andrea Schaerf , Werner Schafhauser3 , and Wolfgang Slany4 1
DIEGM, Universit` a degli Studi di Udine, Italy {l.digaspero,schaerf}@uniud.it 2 Ximes Inc., Austria
[email protected] 3 DBAI, Technische Universit¨ at Wien, Austria {musliu,schafha}@dbai.tuwien.ac.at 4 IST, Technische Universit¨ at Graz, Austria
[email protected]
Abstract. The problem of designing workforce shifts and break patterns is a relevant employee scheduling problem that arises in many contexts, especially in service industries. The issue is to find a minimum number of shifts, the number of workers assigned to them, and a suitable number of breaks so that the deviation from predetermined workforce requirements is minimized. We tackle this problem by means of a hybrid strategy in the spirit of Large Neighborhood Search, which exploits a set of Local Search operators that resort to a Constraint Programming model for assigning breaks. We test this strategy on a set of random and real life instances employed in the literature.
1
Introduction
The typical process for scheduling of employees in an organization consists of several stages. Usually the first phase is to find the temporal requirements, which determine the needed number of employees for each day and time interval during the planning period. For example in the staffing requirements given in Fig. 1a there should be 6 employees at work every Monday between 08:00-11:00. After the temporal requirements are defined, the shifts can be designed. In this stage the number of employees for each shift and day has to be determined. Moreover, for each employee assigned to a shift, a set of breaks that fulfill different constraints about their location and lengths should be scheduled (Fig. 1b). Fig. 2 presents possible shifts and scheduled breaks for the instance in Fig. 1. Shift and break assignment problems may differ in constraints and objectives and are referred in the literature with different names as shift design [9,13], shift scheduling [3,4,17,19], and break scheduling [5,14,20]. Such problems arise in airports, call centers, and service industry in general and have been extensively investigated in Operations Research and recently have been also tackled with M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 46–61, 2010. c Springer-Verlag Berlin Heidelberg 2010
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
47
AI techniques. Obtaining good solutions for shift design and break scheduling is of vital relevance due to legal issues considering the working time of employees, well-being of employees, and the importance of reducing costs while satisfying staffing requirements. In some working environments it is imperative to obtain good solutions, e.g., assigning inadequate breaks to air traffic controllers can lead to loss of concentration which can cause serious problems. Both shift design and break scheduling are characterized with a huge search space and many conflicting constraints that have to be satisfied. Due to the complexity of these problems, two approaches have been followed in the literature. If the number of breaks to be scheduled is not large (2-3 breaks) the design of shifts and break assignment is performed simultaneously. In cases when the number of breaks to be assigned per shift is large (up to ten breaks) the shift design and break scheduling problems are solved separately, i.e. break assignment is performed only after shifts are generated. Decomposing the general problem (shift design and break scheduling) into two sub-problems makes it easier to solve, but it is hard to predict which shift plan will produce good solutions after break assignments. Therefore, this approach usually requires the knowledge of domain experts when the shift plan is generated. The solution of the entire problem when the number of breaks to be assigned is large is a challenging task due to much larger search space of possible solutions. We investigate a solution procedure of the whole problem (shift design and break scheduling) with a large number of breaks. Our contribution lies on automating the whole process of shift design and break assignment, and therefore minimizing the need for a domain expert in this phase of staff scheduling. To the best of our knowledge the whole shift design and break scheduling problem we consider in this paper has not been yet investigated in the literature. To this aim, we propose a new hybrid Local Search-Constraint Programming (LS-CP) method to solve the problem. The method have been applied and experimentally evaluated on a set of real life and randomly generated instances.
2
Problem Definition
It is useful to define an interval as a structure composed of two attributes, start and length, which describe the temporal interval [start, start + length). In the following, interval variables will be denoted by greek letters. We also use basic interval arithmetic operations such as the sum of a value to the interval, i.e., a ⊕ [b, c) = [a + b, a + c). For the shift and break design problem we are given a set D of days, which are subdivided into a set of n equally long consecutive timeslots T = {τ1 = [a1 , a2 ), τ2 = [a2 , a3 ), . . . , τn = [an , an+1 )}, at a given time granularity. Each timeslot τt belongs (entirely) to day t/g, where g is the time granularity measured as the number of timeslots per day. Moreover, for each timeslot τt ∈ T , we are given a staffing requirement rt , which indicates the number of employees that should be working during that timeslot (see Fig. 1a for an example).
L. Di Gaspero et al.
10
Required
0
5
Employees
15
48
05:00
07:00
09:00
11:00
13:00
15:00
17:00
19:00
21:00
Timeslot
(a) Workforce requirements Name
Earliest Latest Minimum Maximum start start length length
Morning Shift Day Shift Evening Shift
05:00 09:00 13:00
08:00 12:00 15:00
07:00 07:00 07:00
09:00 09:00 09:00
(b) Shift types Fig. 1. An example instance
There are given also a set of p shift types {v1 , . . . , vp }. Each shift type vj constrains the earliest and the latest start (vj .min start and vj .max start) and the minimum and maximum length (vj .min length and vj .max length) for the shifts belonging to that type (see Fig. 1b for an example). The problem consists in designing the shifts and deciding the break patterns, i.e., determining the values of the following decision variables for each shift si : (V1 ) The shift type yi ∈ {v1 , . . . , vp }. (V2 ) The shift interval σi . On the basis of its shift type, the allowed values for σi are as follows: σi .start ∈ [yi .min start, yi .max start], σi .length ∈ [yi .min length, yi .max length]. It is important to observe that the determined σi interval will be the same throughout the time horizon, i.e., each shift is constrained to have precisely the same start time (e.g., 05:00) and length (e.g., 08:00) on all the days. (V3 ) The number of employees wid assigned to shift si on day d. (V4 ) For each employee e working on day d, the set of break intervals Bide = 1 2 , βide , . . .}; for each b = 1, . . . , |Bide |, the interval variables have the {βide b b following domains βide .start ∈ (d·g)⊕σi and βide .length ∈ [1, σi .length]. It is worth noticing that, according to the formulation, also the number of breaks |Bide | for each shift/day/employee has to be determined (although its value is constrained between lower and upper bounds that can be computed by reasoning on break patterns). This is because the legal working/break patterns do depend also on the number of breaks, and together they do affect the objective function of the problem.
49
10
Working Required
0
5
Employees
15
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
05:00
07:00
09:00
11:00
13:00
15:00
17:00
19:00
21:00
Timeslot
Fig. 2. A possible solution of the problem in Fig. 1
An employee is considered to be working during the timeslots comprised in the shift but not in any of his/her breaks in that shift. More formally, an employee e works on timeslot τt ∈ T on day d = t/g, if the following condition holds: |Bide | b t ∈ (d · g) ⊕ σi \ b=1 βide . This condition can also be employed to define the so b called working periods ωide , b = 1, . . . , |Bide | + 1, which are the complementary intervals of the shift w.r.t. the breaks. The following constraints on the break patterns must hold: HC1 : A fixed total amount of break time, depending on the length of the |Bide | b shift, must be granted to every worker, i.e., b=1 βide .length = totalbreak timei , for d ∈ D, e = 1, . . . , wid . HC2 : The break length must be included within two bounds, i.e., break minimumb length ≤ βide .length ≤ break maximum length. HC3 : If the working period preceding a break is too long, the break minimum b−1 b ≥ long working period ⇒ βide .length ≥ length is altered, i.e., ωide long break minimum length; obviously, break minimum length ≤ longbreak minimum length ≤ break maximum length. HC4 : The length of the working periods must be included within two bounds, b i.e., working period minimum length ≤ ωide .length ≤ working periodmaximum length. HC5 : The first and the last break have to start at a given distance from the shift |B | 1 extremes, i.e., βide .start ≥ earliest break start and βideide .start ≤ latest break start. HC6 : If a shift exceeds the length min length for lunch, it must include a lunch break λide , whose length is fixed (i.e., λide .length = lunch breaklength) and its start must lay at a given distance from the shift extremes, that is, λide .start ≥ earliest lunch break start and λide .start ≤ latest lunch break start. The objective for the shift design and break scheduling problem is to generate a feasible solution that minimizes the violation of soft constraints given below: SC1 : Sum of the excesses of workers in each time slot of the planning horizon. SC2 : Sum of the shortages of workers in each time slot of the planning horizon. SC3 : Number of shifts employed.
50
L. Di Gaspero et al.
The soft constraints have different importance depending from the problem. The objective function is the weighted sum of the three components, where the weights depend on the instance. Notice that we consider designing shifts for a week and assume that the schedule is cyclic, i.e. the shifts that start on the last day of the planning period and stretch over midnight will have their end in the first day of the planning period. The cyclicity must be considered in applications where the night shifts interleave in some time slots with the morning shifts of the next day. Decomposing of problem in a daily basis would make the problem simpler to solve. However, if the days can have different staffing requirements during the week like in our case, the cyclicity of days can not be taken into consideration. Therefore, in such cases the time slots, where the night shifts interleave with the morning shifts, must be either covered only by night or by morning shifts, which may lead to worse solutions regarding the cover of staffing requirements.
3
Previous Work
To the best of our knowledge the whole problem we consider in this paper has not yet been investigated in the literature. However, several related problems have been previously extensively studied. Dantzig developed the original set-covering formulation [7] for the shift scheduling problem, in which feasible shifts are enumerated based on possible shift starts, shift durations, breaks, and time windows for breaks. Aykin [2] introduced an implicit integer programming model for the shift scheduling problem in 1996 and later he compared an extended version [3] of his previous model with a similarly extended formulation introduced by Bechtold and Jacobs [4]. He observed Bechtold and Jacobs’ approach needed fewer variables whereas his approach needed fewer constraints. Several problems were solved using both models with the integer programming software LINDO. The model proposed by Aykin was shown to be superior. Rekik et al. [17] developed two other implicit models and managed to improve upon previous approaches among them Aykin’s original model. Tellier and White [19] developed a tabu search algorithm to solve a shift scheduling problem originating in contact centers which is integrated into the workforce scheduling system Contact Center Scheduling 5.5 from PrairieFyre Soft Inc. (http://www.prairiefyre.com). The solution of a shift scheduling problem with a planning period of one day, and at most three breaks (two 15 minutes breaks and a lunch break of 1 hour) has been considered in [6] and [16]. In [6] the authors make use of automata and context-free grammars to formulate constraints on sequences of decision variables. Quimper and Rousseau [16] investigate modeling of the regulations for the shift scheduling problem by using regular and context-free languages and solved the overall problem with Large Neighborhood Search. In addition to the previous model, the authors applied their methods in single and multiple activity shift scheduling problems.
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
51
We note that our problem has several differences to the shift scheduling problems considered in the literature. We allow much larger number of breaks per shift (up to 10 breaks), the planning period is one week and we take into consideration the cyclicity. Moreover, our problem definition imposes some other constraints on shifts and breaks. Therefore, we can not make a direct comparison with the mentioned approaches in the literature. Our problem can be divided in two sub-problems (shift design and break scheduling) which were considered separately in previous literature. Shift design problem regards generation of shifts without breaks for a week and has been considered in [13] and [9]. Musliu at al. [13] proposed a tabu search based algorithm to solve this problem. Additionally, their method orders moves and applies these first to regions with larger conflicts (larger over/under-staffing). The proposed solution methods have been used since several years in the commercial software package OPA of Ximes Inc. Di Gaspero et al. [9] proposed the application of hybrid approaches based on local search and min-cost max-flow techniques. The hybrid algorithm improved results reported in [13] on benchmark examples. The break scheduling problem that imposes same constraints for breaks defined in this paper has been investigated in [5,20,14]. Beer et al. [5] applied a min-conflict based heuristic to solve this problem. This method has been applied in a real-life application for the supervision personnel. Results presented in [5] has been further imporved by memetic algorithms proposed in [14,20]. Note that a simplified break scheduling problem can be formulated as temporal constraint satisfaction problem (STP) [8] therefore it can be solved in polynomial time. This algorithm can be applied to find legal position of breaks, but without taking into consideration over-staffing and under-staffing that are very important criteria when solving shift design and break scheduling problems.
4
The Hybrid LS-CP Solver
We devise a hybrid strategy for tackling this problem that combines a Local Search (LS) method for determining the shifts with a Constraint Programming (CP) model for assigning breaks. In the following we outline some basic aspects of LS and CP, and we detail how we blend them in the hybrid solver. 4.1
LS and CP Basics
Local Search [11] is a family of methods to solve combinatorial optimization problems based on the definition of proximity (or neighborhood ): a LS algorithm typically moves from a solution to a near one, trying to improve an objective function, iterating this process. LS algorithms generally focus the search only in specific areas of the search space, so they are incomplete methods, in the sense that they do not guarantee to find a feasible (or optimal) solution, but they search non-systematically until a specific stop criterion is satisfied.
52
L. Di Gaspero et al.
In order to apply LS to the problem, we have to specify three main elements: the search space S, the neighborhood relation N (s) and the cost function f . The search space consists of the set of potential solutions of a problem, expressed in accordance to a given problem model. A LS algorithm starts from an initial state s0 (which can be obtained with some other technique or generated randomly) and enters a loop that navigates the search space, stepping from a state si to one of its neighbors si+1 ∈ N (si ). The search is controlled by a strategy driven by the cost function f , that estimates the quality of each state and, without loss of generality, it has to be minimized. One of the most common LS techniques is Hill Climbing. This technique has many variants, however in all cases the basic idea is to perform only moves that improve or leave unchanged (i.e. sideways moves) the value of the cost function. The way a move is selected characterize the different Hill Climbing strategies. The so-called Randomized Hill Climbing (RHC), which has been employed in this work, draws a random move at each step of the search and accepts it only if it is a non-worsening move. A widely adopted stop criterion for RHC is based on stagnation detection: the search is stopped after a number of non-improving moves have been drawn (also called idle iterations). Constraint Programming [1] is a declarative programming paradigm, in which combinatorial optimization problems are encoded using a language consisting in variables and constraints and solved by a CP solver. This paradigm is based on complete methods that analyze the search space alternating deterministic (constraint propagation, that is, the removal of values that cannot be assigned to any solution) and non-deterministic (variable assignment) phases. This process is iterated until a solution is found or unsatisfiability is reached; in the latter case the process backtracks to the last choice point (i.e., the last variable assignment) and tries other assignments. In order to apply CP to a given problem it is necessary to model the problem in terms of variables and constraints that must hold. The solving procedure is then implemented in the CP solver and it resorts to some sort of tree search. 4.2
LS for Shift and Break Design
In the Shift and Break Design settings, LS deals with a search space composed of a set of shifts S, each of them determined by its interval, and for each day of the time horizon the number of workers assigned and the size of the set of breaks. Notice that LS works on a partial representation of the solution, since the breaks are only specified in their number but not in the intervals they span. To complete this representation to a full solution we resort to a CP model (described below) whose purpose is to determine the interval variables of each break. The set of shifts, S, includes a number of inactive shifts, which have been assigned no worker on all days. These shifts are useful since, even though they do not contribute to the solution quality in their state, they can be possibly assigned workers during the search (i.e., become active) if their use leads to a solution improvement. Conversely, the shifts having at least a worker assigned in one day are called active.
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
53
Concerning the procedure for generating a random initial solution, we create a fixed number of random distinct active and inactive shifts for each shift type (for these instances a number of four active and two inactive shifts has proven to be adequate). Afterwards, for the active shifts, we assign a random number of employees for each day. The neighborhood relations are similar to those considered in [9]. The moves have been modified to deal with the addition of the number of breaks. Moreover, a move dealing directly with the break component and a move for solution perturbation (which aims in decreasing the number of shifts) have been added. In detail the moves employed are the following: N1 ChangeStaff(i, d, m ∈ {↑, ↓}): the staff of shift si on day d is increased (↑) or decreased (↓) by one employee. N2 ResizeShift(i, m ∈ {↑, ↓}, q ∈ {←, →}): the length of shift si is increased or decreased by one timeslot, on the left- (←) or on the right-hand (→) side. This move is applied in a shift only if the modified shift does not violate hard constraints regarding its length and start. N3 ChangeBreaks(i, d, m ∈ {↑, ↓}): the number of breaks of shift si on day d is increased or decreased by one. N4 MergeShifts(i, j): the two shifts si and sj are merged together; the employees assigned to them are added and the interval of the resulting shift and the number of breaks for each day are averaged. All the moves but ChangeStaff are meaningful on active shifts only, therefore they will be applied only on them. The ChangeStaff move, instead, is used also to change the state of a shift from active to inactive or vice versa. The cost function is the weighted sum of the deviation (excess and shortage, with different weights) from the working requirements at each timeslot plus an additional weighted component that accounts for the number of active shifts employed in the solution. Notice that to allow an accurate computation of the deviation from the requirements a full solution is needed, therefore the cost function has to be computed only after a full solution has been determined by solving the CP model by means of a CP solver. The neighborhood relations are intermingled in an Iterated Local Search (ILS) strategy [12], which exploits the set union of ChangeStaff, ResizeShift and ChangeBreaks neighborhoods —driven by RHC— followed by a solution perturbation obtained by applying a few random MergeShifts moves. The pseudocode of this procedure is shown in Fig. 3. The procedure is repeated as long as an overall timeout is not expired. The Local Search procedure has been implemented using EasyLocal++ [10], and the software has been compiled with the GNU C++ compiler (v. 4.1.2). 4.3
The CP-Based Break Assignment
The breaks are determined by the solution of a CP model that considers all the shift variables (V1 )–(V3 ) as fixed and searches for a suitable assignment of breaks
54 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23:
L. Di Gaspero et al. draw a random initial solution for the shift decision variables and store it in sc determine break assignment on sc by means of the CP model s∗ := sc while ¬timeout expired do ι := 0 repeat /* Apply RHC first */ j := RandomInt(1, 3) m := RandomMove(Nj ) sc := sc m determine break assignment on (a subset of) sc by means of the CP model if f (sc ) < f (sc ) then sc := sc ι := 0 else ι := ι + 1 end if until ι > maxι if f (sc ) < f (s∗ ) then s∗ := sc end if /* Then perturb solution trying to merge k shift pairs */ m := RandomMove(N4 × . . . × N4 )
24: sc := sc m 25: end while
k
Fig. 3. The Iterated Local Search strategy for determining shift decision variables 1: Input: the workforce requirements rt , and a partial solution s, consisting in the determination of (active) shifts, workers, and number of breaks Bid b 2: set up variables {βide |b = 1, . . . , Bid , i = 1, . . . , |S|, d = 1, . . . , D, e = 1, . . . , wid } b 3: post break constraints on variables βide 4: if inconsistent state then 5: return ∅, +∞ 6: end if b variables and modify rt accordingly 7: optional: fix some of the βide b variables as branching variables 8: set free βide 9: set variable fobj as the weighted deviation from the (possibly modified) workforce requirements rt on all timeslots t ∈ T 10: while ¬ timeout do b 11: branch and bound on βide , as driven by the values of fobj 12: end while b variables are assigned then 13: if all βide b 14: return {βide }, fobj 15: else 16: return ∅, +∞ 17: end if Fig. 4. The CP-based procedure for determining the break decision variables
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
55
(V4 ) accordingly. More in detail, since the size of the breaks set on each day has been already determined by the LS solver, the decision variables considered in the CP break assignment model are only the starts and lengths of the breaks, which are also subject to the set of constraints described in Section 2 (including the ones on the complementary working periods variables). Furthermore, the (weighted) deviation from the workforce requirements is computed for all the timeslots involved in the break assignment and it is used as the cost measure for the underlying Constrained Optimization Problem. The CP model has been coded in Gecode [18] and solved by the standard Branch & Bound procedure implemented in that system. The CP-based procedure is shown in Fig. 4. It is worth noticing that this model can be easily applied also to break assignment subproblems that involve only a subset S ⊆ S of the shifts employed in the current solution. To this aim, it is sufficient to consider a set of modified workforce requirements rt , which can be obtained from rt by subtracting all the employees working in the shifts s ∈ S \ S (line 7 in Fig. 4). Such an approach is similar to the Large Neighborhood Search (LNS) [15], in which a subset of the decision variables of the current solution are left free and the neighborhood induced by their possible combinations of values is explored by CP. From Fig. 3, it is possible to observe that the CP model is employed in two stages of the Iterated Local Search procedure. At first (line 2), the model is used to assign breaks to a randomly generated initial solution. In this context, the whole set of shifts is passed to the CP-based procedure and the best solution computed by the procedure within a timeout of 25 seconds is retrieved. For most of the instances we tested, this time is enough to allow the CP solver to find a complete solution, however for a few instances the CP solver will not be able to find an initial solution. In the latter cases we overcome this problem by determining the break assignment of each shift taken in isolation. That is, we establish an order on the shifts and start determining the breaks for the first shift, then we fix these values and proceed with the second shift, further we fix the values of the first two shifts and proceed with the third shift, and so on. The second use of the CP model (line 11 of Fig. 3) is in the determination of the breaks after performing a move. In this context, we decided to fix the break decision variables of all the shifts not involved in the move. That is, after a shift have been modified by a move all its breaks are optimized again by the CP-based procedure. Since in this case the size of the search space is much smaller than those of the whole problem, we let the CP solver to search for the best solution imposing a timeout of 0.5 seconds. In preliminary experiments we found out that this value allows to explore a satisfactory portion of the search tree.
5
Experimental Evaluation
To evaluate our algorithms we use existing benchmark instances in the literature for shift design and break scheduling. A set of real-life instances were provided
56
L. Di Gaspero et al.
from the authors of [5]. In addition, we apply our algorithms to randomly generated benchmarks. All instances are publicly available at http://www.dbai. tuwien.ac.at/proj/SoftNet/Supervision/Benchmarks. All instances have been solved at a time granularity of 5 minutes. In each instance are given staffing requirements for one week. The number of required employees in each time slot depends from the particular instance. For the real life instances up to 11 employees are required in one time slot, whereas for randomly generated instances the number of needed employees is up to around 27 for each time slot. The weight for shifts is 60, and the weights for shortage and excess are 10 and 2, respectively. These weights were selected based on experience with solving problems in real life applications. Since, this is the first attempt to solve the whole shift design and break assignment problem, there are no previous results to compare with. Therefore, the aim of the experimental evaluation is to analyze the behavior of the hybrid algorithm on the basis of its components. We mainly evaluate the different combinations of variable selection heuristics in the CP framework. The purpose of these heuristics is to guide the CP search toward the most promising regions of the search tree by an early detection of failing assignments (according to the fail first principle). In this work we tested the following 6 strategies: Random, Maximum Degree, Maximum Accumulated Failure Count, Minimum Size, Minimum Size/AFC, Minimum Size/Degree. Another design choice would have been the value selection heuristic for CP. However, in a preliminary experimental phase we found out that this choice was rather irrelevant. Therefore, in the following we apply always the selection of values to be assigned in increasing order. All the experiments were allowed 1 hour of computing time on an Intel QuadCore PC running Debian Linux 4.0. In Fig. 5 we plot the progress of the hybrid algorithm equipped with different strategies for variable selection on two instances of the benchmark set (a real life and a randomly generated one). The qualitative behavior of the different strategies is consistent across all the instances and they show a slight dominance of the AFC MAX heuristic w.r.t. the other heuristics tested. For the purpose of investigating the reasons of the dominance of AFC MAX, we analyze the exploration capabilities of the different variable selection heuristics. In Fig. 6 we plot the distribution of the improvements attained by CP during the exploration of the search tree. Data have been collected along the full executions of the algorithm on the whole benchmark set. The improvements are measured as the difference between the cost of the first and the last solution found by CP within the time granted. In the picture, the rightmost bar marked with a P, refers to the frequency of solutions directly found by applying constraint propagation only. Those solutions are quite valuable, since they are proven to be optimal without the need of additional tree search. Is it possible to observe that, differently from other heuristics, AFC MAX features a long left tail, leading to cost improvements up to 400 cost units. The
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
25000
30000
AFC_MAX DEGREE_MAX RND SIZE_AFC_MIN SIZE_DEGREE_MIN SIZE_MIN
10000
15000
15000
Cost
20000
AFC_MAX DEGREE_MAX RND SIZE_AFC_MIN SIZE_DEGREE_MIN SIZE_MIN
10000
Cost
Random1−01.txt
20000
25000
2fc04a03.txt
57
0
2000
4000
6000
8000
0
2000
Iteration
4000
6000
Iteration
Fig. 5. Behavior of the algorithm on a real life and a random instance
Table 1. Statistics on the improvement attained by CP Variable Selection ρ(impr, #nodes) ρ(impr, #nodes ) #nodes #f ails #sols #f ail RND AFC MAX DEGREE MAX SIZE MIN SIZE AFC MIN SIZE DEGREE MIN
-0.286∗∗∗ -0.228∗∗∗ -0.311∗∗∗ -0.374∗∗∗ -0.261∗∗∗ -0.232∗∗∗
-0.434∗∗∗ -0.343∗∗∗ -0.373∗∗∗ -0.448∗∗∗ -0.375∗∗∗ -0.365∗∗∗
9692 7011 8180 6682 9113 7263
4822 3490 4075 3318 4535 3611
4.13 5.53 4.83 5.49 5.35 5.12
superiority of AFC MAX is also confirmed by the number of improving solutions explored by CP, reported in the last column of Table 1. In this table, we also compute other statistics for further analyzing the behavior of the heuristics in relation to the improvements attained. The first two columns show the correlation between the improvement and the number of nodes explored, and the ratio between the number of nodes explored and the number of failures, respectively. We expected these two measures to be related to improvements, and actually we found out that all the correlations are statistically significant (p < 0.01). However, unfortunately, these measures cannot be used to discriminate between the different heuristics. The same applies to the remaining columns, that contain the averages of the number of nodes explored, the average number of failures and the average number of (improving) solutions found. Unfortunately they also do not show any regularity that allows to discriminate. Finally, in Table 2 we report the best results found by the different versions of our algorithm on the benchmark instances.
58
L. Di Gaspero et al.
0.012 0.010 0.008
Relative Frequency
P
0.002 0.000
0.000
0.002
0.004
0.006
0.008 0.006
P
0.004
Relative Frequency
0.010
0.012
0.014
AFC_MAX
0.014
RND
−200
−150
−100
−50
0
−400
−300
CP improvement
0
0.014 0.012
0.012
0.010 0.008 0.006
P
0.002 0.000
0.000
0.002
0.004
0.006
0.008
Relative Frequency
0.010
P
0.004
−150
−100
−50
0
−300
−250
−200
−150
−100
CP improvement
CP improvement
SIZE_DEGREE_MIN
SIZE_MIN
−50
0
0.012 0.010 0.008
P
0.004 0.002 0.000
0.000
0.002
0.004
0.006
P
Relative Frequency
0.008
0.010
0.012
0.014
−200
0.014
−250
0.006
Relative Frequency
−100
SIZE_AFC_MIN
0.014
DEGREE_MAX
Relative Frequency
−200
CP improvement
−250
−200
−150
−100
CP improvement
−50
0
−250
−200
−150
−100
−50
0
CP improvement
Fig. 6. Distribution of the improvements attained by CP on break assignment
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
59
Table 2. Best results found by the hybrid algorithms on the benchmark instances Instance Shortage Excess # Shifts 2fc04a03 173 2636 23 2fc04a 182 2750 25 2fc04b 181 2892 21 3fc04a03 733 3168 20 3fc04a04 130 2732 21 3fc04a 256 3084 24 3si2ji2 137 2909 24 4fc04a03 94 2710 21 4fc04a 526 3064 19 4fc04b 200 2690 24 50fc04a03 175 2809 26 50fc04a04 180 2636 29 50fc04a 169 3150 20 50fc04b 200 2730 30 51fc04a03 410 2653 25 51fc04a04 209 2890 23 51fc04a 189 3051 25 51fc04b 250 3046 23 Random1-01 215 3355 28 Random1-02 405 4557 29 Random1-03 369 4800 34 Random1-04 421 5901 44 Random1-05 285 3713 23 Random1-06 246 2638 17 Random1-07 227 3046 28 Random1-08 330 4465 33 Random1-09 276 3930 25 Random1-10 389 4997 32 Random1-12 164 2850 17 Random1-13 303 3888 25 Random1-14 380 5763 47 Random1-15 179 1282 7 Random1-16 426 4610 39 Random1-17 373 5746 53 Random1-18 530 4724 32 Random1-19 368 3961 33 Random1-20 438 5247 32 Random1-21 242 3164 24
Instance Shortage Excess # Shifts Random1-22 186 3288 23 Random1-23 265 4468 34 Random1-24 330 3585 21 Random1-25 452 5608 45 Random1-26 698 3723 31 Random1-27 718 4602 35 Random1-28 258 3086 20 Random1-29 336 3973 39 Random1-30 250 2512 18 Random2-01 375 4376 25 Random2-02 289 3968 34 Random2-03 288 4319 39 Random2-04 311 3935 30 Random2-05 260 4161 34 Random2-06 330 5197 42 Random2-07 427 5187 40 Random2-08 323 4357 29 Random2-09 391 4461 35 Random2-10 432 5566 42 Random2-12 365 4929 42 Random2-13 421 5148 49 Random2-14 410 5678 53 Random2-15 518 5696 41 Random2-16 350 6255 49 Random2-17 452 4537 36 Random2-18 557 5413 37 Random2-19 604 5418 43 Random2-20 475 5769 40 Random2-21 371 6150 48 Random2-22 430 6312 48 Random2-23 402 5288 44 Random2-24 427 5634 44 Random2-25 487 5754 47 Random2-26 517 5836 47 Random2-27 529 5835 54 Random2-28 340 5157 45 Random2-29 506 5407 45 Random2-30 678 7041 60
60
6
L. Di Gaspero et al.
Conclusions
We have investigated a real life shift design and break scheduling problem that arises in different areas of industry. In the literature design of shifts and break assignment have been solved in two separated phases, because of their high complexity. This required the application of an iterative process that usually could be performed only by the staff scheduling experts. To automate the solution of the whole problem and to minimize the need for domain experts, we proposed an innovative hybrid method that combines features of LS and CP techniques. This paper investigates for the first time the solution of the complete shift design and break scheduling problem and the application of CP to the break assignment subproblem. The CP model has shown to be very practical for the local search to find legal break assignments that optimize over/under staffing. Our solver has been applied successfully on the existing real life and random instances in the literature. Obtained solutions fulfill all hard constraints and the solver gives promising results considering the level of fulfillment of soft constraints. For the future, we plan to further study the hybridization of the LS and CP paradigms. In particular, we plan to investigate application of CP techniques for design of shifts and local search for break scheduling within the hybrid algorithm. Acknowledgments. This research is partially conducted within the competence network Softnet Austria (http://www.soft-net.at/) and funded by the Austrian Federal Ministry of Economics (bm:wa), the province of Styria, the Steirische Wirtschaftsf¨ orderungsgesellschaft mbH. (SFG), and the city of Vienna in terms of the center for innovation and technology (ZIT).
References 1. Apt, K.R.: Principles of Constraint Programming. Cambridge University Press, Cambridge (2003) 2. Aykin, T.: Optimal shift scheduling with multiple break windows. Management Science 42(4), 591–602 (1996) 3. Aykin, T.: A comparative evaluation of modeling approaches to the labor shift scheduling problem. European J. of Operational Research 125, 381–397 (2000) 4. Bechtold, S.E., Jacobs, L.W.: Implicit modeling of flexible break assignments in optimal shift scheduling. Management Science 36(11), 1339–1351 (1990) 5. Beer, A., G¨ artner, J., Musliu, N., Schafhauser, W., Slany, W.: An AI-based breakscheduling system for supervisory personnel. IEEE Intelligent Systems 25(2), 60–73 (2010) 6. Cˆ ot´e, M.-C., Gendron, B., Quimper, C.-G., Rousseau, L.-M.: Formal languages for integer programming modeling of shift scheduling problems. Constraints (2009) 7. Dantzig, G.B.: A comment on eddie’s traffic delays at toll booths. Operations Research 2, 339–341 (1954) 8. Dechter, R., Meiri, I., Pearl, J.: Temporal constraint networks. Artificial Intelligence 490(1-3), 61–95 (1991)
A Hybrid LS-CP Solver for the Shifts and Breaks Design Problem
61
9. Di Gaspero, L., G¨ artner, J., Kortsarz, G., Musliu, N., Schaerf, A., Slany, W.: The minimum shift design problem. Annals of Operations Research 155, 79–105 (2007) 10. Di Gaspero, L., Schaerf, A.: EASYLOCAL++: An object-oriented framework for flexible design of local search algorithms. Software — Practice & Experience 33(8), 733–765 (2003) 11. Hoos, H.H., St¨ utzle, T.: Stochastic Local Search Foundations and Applications. Morgan Kaufmann Publishers, San Francisco (2005) 12. Louren¸co, H.R., Martin, O., St¨ utzle, T.: Iterated local search. In: Glover, G., Kochenberger, F. (eds.) Handbook of Metaheuristics, pp. 321–353. Kluwer Academic Publishers, Norwell (2002) 13. Musliu, N., Schaerf, A., Slany, W.: Local search for shift design. European J. of Operational Research 153(1), 51–64 (2004) 14. Musliu, N., Schafhauser, W., Widl, M.: A memetic algorithm for a break scheduling problem. In: Proceedings of the VIII Metaheuristic International Conference (MIC 2009), Hamburg, Germany, July 13-16 (2009) 15. Perron, L., Shaw, P., Furnon, V.: Propagation guided large neighborhood search. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 468–481. Springer, Heidelberg (2004) 16. Quimper, C.-G., Rousseau, L.-M.: A large neighbourhood search approach to the multi-activity shift scheduling problem. J. of Heuristics 16(3), 373–391 (2010) 17. Rekik, M., Cordeau, J.-F., Soumis, F.: Implicit shift scheduling with multiple breaks and work stretch duration restrictions. J. of Scheduling 13(1), 49–75 (2010) 18. Gecode Team. Gecode: Generic constraint development environment, http://www. gecode.org 19. Tellier, P., White, G.: Generating personnel schedules in an industrial setting using a tabu search algorithm. In: Burke, E.K., Rudov´ a, H. (eds.) PATAT 2007. LNCS, vol. 3867, pp. 293–302. Springer, Heidelberg (2006) 20. Widl, M., Musliu, N.: An improved memetic algorithm for break scheduling. In: Proceedings of the 7th International Workshop on Hybrid Metaheuristics (HM 2010). LNCS, Springer, Heidelberg (2010)
A New Approach for Solving the Generalized Traveling Salesman Problem P.C. Pop1 , O. Matei2 , and C. Sabo1 1
Dept. of Mathematics and Computer Science, North University of Baia Mare, Str. Victoriei, 430122, Baia Mare, Romania
[email protected], cosmin
[email protected] 2 Dept. of Electrical Engineering, North University of Baia Mare, Str. V. Babes, 430083, Baia Mare, Romania
[email protected]
Abstract. The generalized traveling problem (GTSP) is an extension of the classical traveling salesman problem. The GTSP is known to be an NP-hard problem and has many interesting applications. In this paper we present a local-global approach for the generalized traveling salesman problem. Based on this approach we describe a novel hybrid metaheuristic algorithm for solving the problem using genetic algorithms. Computational results are reported for Euclidean TSPlib instances and compared with the existing ones. The obtained results point out that our hybrid algorithm is an appropriate method to explore the search space of this complex problem and leads to good solutions in a reasonable amount of time. Keywords: generalized traveling salesman problem, hybrid algorithms, genetic algorithms.
1
Introduction
The classical traveling salesman problem can be generalized in a natural way by considering a related problem relative to a given partition of the nodes of the graph into node sets (clusters), while the feasibility constraints are expressed in terms of the clusters, i.e. each of the clusters has to be visited once and only once (i.e. exactly once). In the literature, there are considered two versions of the problem: – one in which we are interested in finding the shortest closed tour visiting exactly one node from each cluster. This problem is called the generalized traveling salesman problem (GTSP) and has been introduced independently by Henry-Labordere [6], Srivastava et al. [21] and Saskena [18]; – the second one is the problem of finding the shortest closed tour including at least one vertex from each cluster. This version of the problem was introduced by Laporte and Nobert [8] and by Noon and Bean [11]. M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 62–72, 2010. c Springer-Verlag Berlin Heidelberg 2010
A New Approach for Solving the Generalized Traveling Salesman Problem
63
In the present paper we confine ourselves to the problem of choosing exactly one node from each of the clusters. The TSP is a special case of the GTSP where each cluster consists of exactly one node. The GTSP is NP-hard, as it reduces when each cluster consists of exactly one node to the traveling salesman problem which is known to be an NP-hard problem. The GTSP has several applications to location problems, planning, postal routing, logistics, manufacture of microchips, telecommunication problems, railway optimization, etc. More information on the problem and its applications can be found in Fischetti, Salazar and Toth [3,4], Laporte, Asef-Vaziri and Sriskandarajah [9], etc. A lot of attention was payed by the researchers for solving the GTSP: there have been proposed several transformations of the GTSP into TSP, an efficient exact algorithm has been proposed by Fischetti, Salazar and Toth [4] based on a branch-and-bound algorithm that solved the problem to optimality for instances with up to 89 clusters and 442 nodes, etc. The difficulty of obtaining optimal solutions for the GTSP has led to the development of several heuristic and metaheuristic algorithms: an efficient composite heuristic [17], reinforcing ant colony system [12], a random key genetic algorithm [20], variable neighborhood search [7], memetic algorithms [5,2], ant colony algorithms [22], etc. Recently, several hybrid algorithms have been introduced to solve efficiently combinatorial optimization problems based mainly on combination of metaheuristic algorithms or combination of exact methods with metaheuristic algorithms. Hybrid algorithms exploit the good properties of different methods by applying them to optimization problems they can efficiently solve. For example, searching the solution space of an optimization problem is efficient when the problem has many solutions. In the case of combinatorial optimization problems the hybrid algorithms are designed to achieve a vast exploration of the search space, by escaping from local optima and intensifying at promising solutions regions. The aim of this paper is to describe an approach to the GTSP based on distinguishing between global connections (connections between clusters) and local connections (connections between nodes from different clusters). This approach leads in combination with a genetic algorithm to an efficient hybrid algorithm for solving the GTSP, which is competitive with the other modern heuristics in terms of computing time and quality solution. Computational results for benchmarks problems are reported.
2
Definition of the GTSP
Let G = (V, E) be an n-node undirected graph whose edges are associated with non-negative costs. We will assume without loss of generality that the graph G is a complete graph (if there is no edge between two nodes, we can add it with an infinite cost).
64
P.C. Pop, O. Matei, and C. Sabo
Let V1 , ..., Vm be a partitioning of V into p subsets called clusters (i.e. V = V1 ∪ V2 ∪ ... ∪ Vm and Vl ∩ Vk = ∅ for all l, k ∈ {1, ..., m}). We denote the cost of an edge e = {i, j} ∈ E by cij . The generalized traveling salesman problem asks for finding a minimum-cost tour H spanning a subset of nodes such that H contains exactly one node from each cluster Vi , i ∈ {1, ..., m}. Therefore the GTSP involves the following two related decisions: – choosing a node subset S ⊆ V , such that |S ∩ Vk | = 1, for all k = 1, ..., m. – finding a minimum cost Hamiltonian cycle in the subgraph of G induced by S. We will call such a cycle a generalized Hamiltonian tour. An example of a generalized Hamiltonian tour for a graph with the nodes partitioned into 6 clusters is presented in the next figure.
Fig. 1. Example showing a generalized Hamiltonian in the graph G = (V, E)
The GTSP is NP-hard, as it reduces when each cluster consists of exactly one node (|Vi | = 1, ∀ i = 1, ..., m) to the traveling salesman problem which is known to be an NP-hard problem.
3
The Local-Global Approach to the Generalized Traveling Salesman Problem
The local-global approach was introduced by Pop [13] in the case of the generalized minimum spanning tree problem. Since then this approach was successfully applied in the case of generalized combinatorial optimization problems in order to obtain exact algorithms, strong mixed-integer programming formulations, heuristic and metaheuristic algorithms for several generalized network design problems, see [14,15,7]. In the case of the GTSP, the local-global approach aims at distinguishing between global connections (connections between clusters) and local connections (connections between nodes from different clusters). This approach was already pointed pointed out and exploited by Hu et al. in [7].
A New Approach for Solving the Generalized Traveling Salesman Problem
65
As we will see, given a sequence in which the clusters are visited (global Hamiltonian tour) it is rather easy to find the corresponding best (w.r.t. cost minimization) generalized Hamiltonian tour. Let G be the graph obtained from G after replacing all nodes of a cluster Vi with a supernode representing Vi . We will call the graph G the global graph. For convenience, we identify Vi with the supernode representing it. Edges of the graph G are defined between each pair of the graph vertices V1 , . . . , Vm . There are several generalized Hamiltonian corresponding to a global Hamiltonian tour. Between these generalized Hamiltonian tours there exists one called the best generalized Hamiltonian tour (w.r.t. cost minimization) that can be determined using one of the methods that we are going to describe next. Given a sequence (Vk1 , ..., Vkm ) in which the clusters are visited, we want to find the best feasible Hamiltonian tour H ∗ (w.r.t cost minimization), visiting the clusters according to the given sequence. This can be done in polynomial time, by solving |Vk1 | shortest path problems as we will describe below. We construct a layered network, denoted by LN, having m + 1 layers corresponding to the clusters Vk1 , ..., Vkm and in addition we duplicate the cluster Vk1 . The layered network contains all the nodes of G plus some extra nodes v for each v ∈ Vk1 . There is an arc (i, j) for each i ∈ Vkl and j ∈ Vkl+1 (l = 1, ..., m − 1), having the cost cij and an arc (i, h), i, h ∈ Vkl , (l = 2, ..., m) having cost cih . Moreover, there is an arc (i, j ) for each i ∈ Vkm and j ∈ Vk1 having cost cij . v’
v
... Vk1
Vk 2
Vk 3
Vkp
Vk 1
Fig. 2. Example showing a Hamiltonian tour in the constructed layered network LN
For any given v ∈ Vk1 , we consider paths from v to v , v ∈ Vk1 , that visits exactly one node from each cluster Vk2 , ..., Vkm , hence it gives a feasible Hamiltonian tour. Conversely, every Hamiltonian tour visiting the clusters according to the sequence (Vk1 , ..., Vkm ) corresponds to a path in the layered network from a certain node v ∈ Vk1 to v ∈ Vk1 . Therefore, it follows that the best (w.r.t cost minimization) Hamiltonian tour H ∗ visiting the clusters in a given sequence can be found by determining all the shortest paths from each v ∈ Vk1 to the corresponding v ∈ Vk1 with the property that visits exactly one node from each of the clusters (Vk2 , ..., Vkm ). The overall time complexity is then |Vk1 |O(|E| + log n), i.e. O(n|E| + nlogn) in the worst case, where by |E| we denoted the number of edges. We can reduce the time by choosing |Vk1 | as the cluster with minimum cardinality.
66
P.C. Pop, O. Matei, and C. Sabo
Notice that the above procedure leads to an O((m − 1)!(n|E| + nlogn)) time exact algorithm for the GTSP, obtained by trying all the (m−1)! possible cluster sequences. So, we have established the following result: Theorem 1. The above procedure provides an exact solution to the generalized traveling salesman problem in O((m − 1)!(n|E| + nlogn)) time, where n is the number of nodes, |E| is the number of edges and m is the number of clusters in the input graph. Clearly, the algorithm presented, is an exponential time algorithm unless the number of clusters m is fixed.
4
The Hybrid Algorithm for Solving GTSP
We present in this section a hybrid algorithm for solving the GTSP obtained by combining the local-global method described in the previous section with a genetic algorithm. The proposed computational model to approach the problem is a genetic algorithm applied with respect to the global graph. In this way we reduce substantially the size of the solution space. 4.1
Representation
Concerning the representation we use a fixed size chromosome: an individual is represented as a list of clusters (Vk1 , Vk2 , ..., Vkm ), representing the global Hamiltonian cycle Vk1 − Vk2 − ... − Vkm . Given a global tour (Vk1 , Vk2 , ..., Vkm ), the best corresponding generalized tour (w.r.t. cost minimization) can be determined by solving |Vk1 | shortest path problems as described in the previous section. Therefore, the best corresponding solution can be represented as list of nodes (vk1 , vk2 , ..., vkm ) with the property that vki ∈ Vki , for all i ∈ {1, ..., m}. For example, the individual (1, 5, 3, 4, 2, 6) represents the global tour which passes the clusters in the following order: V1 − V5 − V3 − V4 − V2 − V6 − V1 4.2
Initial Population
We carried out experiments with the initial population generated randomly and with an initial population generated using a Monte Carlo based technique. In the first case the order of the cluster is generated randomly and based on the Monte Carlo technique the initial population is generated as follows: the first cluster Vki is chosen randomly from the set of clusters. Each further cluster Vkj , with kj ∈ {1, 2, ..., m}, i = j is selected randomly inverse proportionally with the distance (cost) from its predecessor cluster. Here by the distance between any two clusters we understand the distance between the mass center of the clusters. However, from the experiments carried out it turned out that the Monte Carlo method of generating the initial population has not brought any improvements. The reason lies in the way the clusters were constituted: they are not compact and are interfering with each other.
A New Approach for Solving the Generalized Traveling Salesman Problem
4.3
67
The Fitness Value
Every solution has a fitness value assigned to it, which measures its quality. In our case, the fitness value of a feasible solution, i.e. global Hamiltonian tour, is given by the cost of the best corresponding generalized Hamiltonian tour (w.r.t cost minimization). The aim is to find the minimum cost global Hamiltonian tour which leads to the best generalized Hamiltonian tour with respect to cost minimization. 4.4
Genetic Operators
Crossover operator Two parents are selected from the population by the binary tournament method, i.e. the individuals are chosen from the population at random. Offspring are produced from two parent solutions using the following crossover procedure described by Matei in [10]: it creates offspring which preserve the order and position of symbols in a subsequence of one parent while preserving the relative order of the remaining symbols from the other parent. It is implemented by selecting a random cut point. The recombination of two Hamiltonian tours require some further explanations. First, the symbols before the cut points copied from the first parent into the offspring. Then, starting just after the cut-point, the symbols are copied from the second parent into the offspring, omitting any symbols that were copied from the first parent. The second offspring is produced by swapping round the parents and then using the same procedure. Next we illustrate the application of the proposed crossover operator to a problem with 10 clusters. We assume two well-structured parents chosen randomly, with the cutting point between 4 and 5: P1 = 1 4 8 7 | 9 10 5 2 3 6 P2 = 2 6 9 4 | 10 8 1 7 5 3 The sequences before the cutting-point are copied into the two offspring: O1 = 1 4 8 7 | x x x x x x O2 = 2 6 9 4 | x x x x x x The clusters of the parent P1 are copied into the offspring O2 if O2 does not contain clusters already represented in P1 . Note that the clusters 9 and 2 are already represented in O2 . And the same holds for O1 and P2 : O1 = 1 4 8 7 | 10 x 1 x 5 3 O2 = 2 6 9 4 | x 10 5 x 3 6 The already existing clusters are replaced at random by other clusters which are not already selected: O1 = 1 4 8 7 | 10 2 1 9 5 3 O2 = 2 6 9 4 | 8 10 5 1 3 6
68
P.C. Pop, O. Matei, and C. Sabo
Mutation operator We use in our genetic algorithm the following random mutation operator called the inter-route mutation operator which is a swap operator: it picks two random locations in the solution vector and swaps their values. Selection The selection process is deterministic. The first selection is (μ + λ), where μ parents produce λ offspring. The new population of (μ + λ) is reduced again to μ individuals by a selection based on the ”survival of the fittest” principle. In other words, parents survive until they are suppressed by better offspring. It might be possible for very well adapted individuals to survive forever. This feature yields some deficiencies of the method[1]: 1. In problems with an optimum moving over time, a (μ + λ) selection may get stuck at an outdated good location if the internal parameter setting becomes unsuitable to jump to the new field of possible improvements. 2. The same happens if the measurement of the fitness or the adjustment of the object variables are subject to noise, e.g. in experimental settings. In order to avoid these effects, Schwefel investigated the properties of (μ, λ), selection, where μ parent produce λ (λ μ) and only the offspring undergo selection. In other words, the lifetime of every individual is limited to only one generation. The limited life span allows to forget the inappropriate internal parameter settings. This may lead to short periods of recession, but it avoids long stagnation phases due to unadapted strategy parameters [19]. The (μ + λ) and (μ, λ) selection fit into the same formal framework with the only difference being the limited life time of individuals in (μ, λ) method. As the population is quite large and the length of the individuals significantly shorter, the (μ + λ) selection has a greater chance of selecting more identical individuals for the next generation and of getting stuck in local optima. The (μ, λ) selection avoids local optima, but on the other hand may generate a worse population of offspring. That is why we propose an improved (μ + λ) process, which makes sure to select only one individual out of more identical ones. This assures the variety of the population. In figure 3 we illustrate the variation of the fitness for the best, respectively for the worst individual in each generation, along with the average fitness of the population. The best and the worst fitness get closer as the epochs pass, but do not overlap. That is because the variety of the population. Applying merely (μ + λ) or (μ, λ) selection, the lines representing the three fitness values would overlap, which means that eventually the whole population consists of the same individual. We can see that there is no drawback regarding the fitness of each generation. Moreover, the fitness of the best individuals decreases steeper than the average fitness of the population. 4.5
Genetic Parameters
The genetic parameters are very important for the success of a GA, equally important as the other aspects, such as the representation of the individuals,
A New Approach for Solving the Generalized Traveling Salesman Problem
69
Fig. 3. The variation of the fitness for the best and for the worst individual of each generation, along with the average fitness of the population
the initial population and the genetic operators. The most important parameters are: – the population size μ has been set to twice the number of clusters. A smaller population does not cover the solution space exhaustively enough, whereas a larger one generates quite similar cycles and increases the computation time without significant added value. – the intermediate population size λ was chosen twice the size of the population: λ = 2 · μ. – mutation probability was set at 5%.
5
Computational Results
The performance of the proposed hybrid algorithm for solving the GTSP was tested on fourteen benchmark problems drawn from TSP library test problems. These problems contain between 198 and 442 nodes, which are partitioned into a given number of clusters. Originally the set of nodes in these problems are not divided into clusters. The CLUSTERING procedure proposed by Fischetti et al. [4] divide data into nodesets. This procedure sets the number of clusters s = [ n5 ], identifies the s farthest nodes from each other and assigns each remaining node to its nearest center. The solution proposed in this paper is able to handle any cluster structure. The testing machine was an Intel Dual-Core 1,6 GHz and 1 GB RAM with operating system Windows XP Professional. The computer languages used for our hybrid heuristic, the Snyder-Daskin heuristic [20] and the Gutin-Karapetyan memetic algorithm [5] are different: while they used C++ respectively C#, we coded our algorithm in Java, JDK 1.6. According to several works see e.g. [24], Java programs is usually 2 to 8 times slower than a correspondent program developed in C/C++.
70
P.C. Pop, O. Matei, and C. Sabo
In the next table we summarize the computational results achieved for solving the GTSP using our proposed hybrid algorithm comparing with two of the best algorithms proposed in the literature: the random key genetic algorithm (RKGA) developed by Snyder and Daskin [20] and the memetic algorithm (MA) proposed by Gutin and Karapetyan [5]. For each problem, we ran the hybrid algorithm five times to examine the algorithm’s performance and its variation from trial to trial. Table 1. Best Values - MA, RK-GA and HYBRID algorithms for GTSP
Problem 40d198 40kroa200 40krob200 46gr229 46pr226 53gil262 53pr264 60pr299 64lin318 80rd400 84fl417 87gr431 88pr439 89pcb442
m 40 40 40 46 46 53 53 60 64 80 84 87 88 89
n
MA
198 10557 200 13406 200 13111 229 71641 226 64007 262 1013 264 1016.2 299 22615 318 20765 400 6361 417 9651 431 102404 439 60178 442 21657
RK-GA 10557 13406 13111 71641 64007 1013 1021 22615 20894 6361 9651 60258 21657
Min 10557 13406 13111 71984 64007 1016 1026 22682 21002 6450 9658 103024 60213 22198
HYBRID Mean 10557 13406 13111 72002 64007 1019 1032 22692 21084 6472 9624 103144 60254 22198
Max 10557 13406 13111 72012 64007 1023 1042 22708 21146 6488 9668 103220 60272 22198
Avg Time (sec.) 201 198 195 223 146 242 197 259 318 468 542 624 634 640
The first column in the table represent the problem and the next two columns give the size of the problem: the number of clusters (m) and the number of nodes (n). The next columns contain the values of the objective function (cost of the sub-optimal solution) obtained using the memetic algorithm, the random key genetic algorithm and our hybrid algorithm. In the case of our algorithm we presented the minimum, average and maximum solution lengths. The last column contains the average computational times in seconds of our hybrid algorithm. The number of epochs used in our algorithm were between 500 and 1500. Analyzing the computational results, it can be observed that overall the proposed hybrid algorithm performs well in comparison to the random key genetic algorithm (RK-GA) developed by Snyder and Daskin [20] and the memetic algorithm (MA) proposed by Gutin and Karapetyan [5] in terms of solution quality and computatione time. The results obtained using our hybrid algorithm are facilitated by reducing considerably the solutions space and a better exploration of the search space.
A New Approach for Solving the Generalized Traveling Salesman Problem
6
71
Conclusions
The Generalized Traveling Salesman Problem is an extension of the Traveling Salesman Problem (TSP) and consists in finding the minimum cost Hamiltonian tour containing exactly one node from a given number of predefined, mutually exclusive and exhaustive clusters. We described an approach to the GTSP based on distinguishing between global connections (connections between clusters) and local connections (connections between nodes from different clusters). Based on this approach to the problem we present a novel efficient hybrid algorithm. The proposed computational model to approach the problem is genetic algorithm applied with respect to the global graph, reducing in this way substantially the size of the solutions space. The proposed algorithm performs well in terms of solution quality and computation time in comparison with two of the best algorithms proposed in the literature for solving the GTSP: the random key genetic algorithm (RK-GA) developed by Snyder and Daskin [20] and the memetic algorithm (MA) proposed by Gutin and Karapetyan [5]. Therefore, it has been demonstrated that our hybrid algorithm is an effective approach for solving the GTSP.
References 1. B¨ ack, T., Hoffmeister, F., Schwefel, H.: A survey of evolution strategies. In: Proc. of the 4th International Conference on Genetic Algorithms, San Diego, CA (July 1991) 2. Bontoux, B., Artigues, C., Feillet, D.: A Memetic Algorithm with a Large Neighborhood Crossover Operator for the Generalized Traveling Salesman Problem. Computers & Operations Research (2009) (in press) 3. Fischetti, M., Salazar, J.J., Toth, P.: The symmetric generalized traveling salesman polytope. Networks 26, 113–123 (1995) 4. Fischetti, M., Salazar, J.J., Toth, P.: A branch-and-cut algorithm for the symmetric generalized traveling salesman problem. Operations Research 45, 378–394 (1997) 5. Gutin, G., Karapetyan, D.: A memetic algorithm for the generalized traveling salesman problem. Natural Computing 9, 47–60 (2009) 6. Henry-Labordere: The record balancing problem: A dynamic programming solution of a generalized traveling salesman problem. RAIRO Operations Research B2, 4349 (1969) 7. Hu, B., Raidl, G.: Effective neighborhood structures for the generalized traveling salesman problem. In: van Hemert, J., Cotta, C. (eds.) EvoCOP 2008. LNCS, vol. 4972, pp. 36–47. Springer, Heidelberg (2008) 8. Laporte, G., Nobert, Y.: Generalized Traveling Salesman through n sets of nodes: an integer programming approach. INFOR 21, 61–75 (1983) 9. Laporte, G., Asef-Vaziri, A., Sriskandarajah, C.: Some applications of the generalized traveling salesman problem. Journal of Operational Research Society 47, 1461–1467 (1996) 10. Matei, O.: Evolutionary Computation: Principles and Practices, Risoprint (2008) 11. Noon, C.E., Bean, J.C.: A Lagrangian based approach for the asymmetric generalized traveling salesman problem. Operations Research 39, 623–632 (1991)
72
P.C. Pop, O. Matei, and C. Sabo
12. Pintea, C., Pop, P.C., Chira, C.: Reinforcing Ant Colony System for the Generalized Traveling Salesman Problem. In: Proc. of International Conference BioInspired Computing-Theory and Applications (BIC-TA), Wuhan, China. Evolutionary Computing Section, pp. 245–252 (2006) 13. Pop, P.C.: The generalized minimum spanning tree problem. Twente University Press, The Netherlands (2002) 14. Pop, P.C., Kern, W., Still, G.J.: A new relaxation method for the generalized minimum spanning tree problem. European Journal of Operational Research 170, 900–908 (2006) 15. Pop, P.C.: A survey of different integer programming formulations of the generalized minimum spanning tree problem. Carpathian J. of Math. 25(1), 104–118 (2009) 16. Pop, P.C., Matei, O., Pop Sitar, C., Chira, C.: A Genetic Algorithm for Solving the Generalized Vehicle Routing Problem. In: Corchado, E., Gra˜ na Romay, M., Manhaes Savio, A. (eds.) HAIS 2010, Part II. LNCS, vol. 6077, pp. 119–126. Springer, Heidelberg (2010) 17. Renaud, J., Boctor, F.F.: An efficient composite heuristic for the Symmetric Generalized Traveling Salesman Problem. European Journal of Operational Research 108(3), 571–584 (1998) 18. Saskena, J.P.: Mathematical model of scheduling clients through welfare agencies. Journal of the Canadian Operational Research Society 8, 185–200 (1970) 19. Schwefel, H.P.: Collective phenomena in evolutionary systems. In: Proc. of 31st Annual Meetting of the International Society for General System Research, pp. 1025–1033 (1987) 20. Snyder, L.V., Daskin, M.S.: A random-key genetic algorithm for the generalized traveling salesman problem. European Journal of Operations Research 174, 38–53 (2006) 21. Srivastava, S.S., Kumar, S., Garg, R.C., Sen, P.: Generalized traveling salesman problem through n sets of nodes. CORS Journal 7, 97–101 (1969) 22. Yanga, J., Shi, X., Marchese, M., Liang, Y.: An ant colony optimization method for generalized TSP problem. Progress in Natural Science 18(11), 1417–1422 (2008) 23. http://www.iwr.uni-heidelberg.de/groups/comopt/software/ TSPLIB95/vrp/ 24. http://verify.stanford.edu/uli/java_cpp.html
Hybrid Heuristics for Dynamic Resource-Constrained Project Scheduling Problem Andr´e Renato Villela da Silva and Luiz Satoru Ochi Universidade Federal Fluminense, Departamento de Ciˆencia da Computa¸ca ˜o Rua Passo da P´ atria, 156 – Bloco E – 3o andar – Boa Viagem 24210-240, Niter´ oi, Rio de Janeiro, Brazil {avillela,satoru}@ic.uff.br Abstract. Dynamic Resource-Constrained Project Scheduling Problem (DRCPSP) is a scheduling problem that works with an uncommon kind of resources: the Dynamic Resources. They increase and decrease in quantity according to the activated tasks and are not bounded like other project scheduling problems. This paper presents a new mathematical formulation for DRCPSP as well as two hybrid heuristics merging an evolutionary algorithm with an exact approach. Computational results show that both hybrid heuristics present better results than the stateof-the-art algorithm for DRCPSP does. The proposed formulation also provides better bounds. Keywords: mathematical formulation, scheduling problems, dynamic resources.
1
hybrid
heuristics,
project
Introduction
The Dynamic Resource-Constrained Project Scheduling Problem deals with an uncommon kind of resource called Dynamic Resource. Unlike classical project scheduling problems [1,2,6] where resources may be renewable or nonrenewable (both with a bounded quantity), the DRCPSP allows an unbounded amount of these resources because they are consumed when a task is executed, but are produced by tasks after their activations. DRCPSP can be described as follows. Let G = (V, A) be a directed acyclic graph (DAG), where V is the set of vertices and A is the set of arcs that represent the tasks (activities) and their precedences, respectively. There are an activation cost ci and a profit pi (positive integer values) associated to each task i . There are also a planning horizon represented by a time interval composed of H time units, an amount of initial resources Q0 and an initial accumulated profit P0 = 0. Variables Qt and Pt represent the available resources and the accumulated profit at time t. When a task i is activated at time t, it is necessary to pay its cost retrieving ci from Qt . From the end of time t to the end of time H (planning horizon size), pi
This work was partially supported by CNPq - grant 141074/2007-8.
M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 73–87, 2010. c Springer-Verlag Berlin Heidelberg 2010
74
A.R.V. da Silva and L.S. Ochi
units of resources are generated by activated task i at each of these time units. In other words, pi units are added to the accumulated profits from t to H. When the scheduling moves to the next time unit, all accumulated profit becomes available resources and can be used to activate more tasks. The objective of DRCPSP is to maximize the resources (QH + PH ) at the end of time H. Basically, two constraints are imposed to activate a task i at time t: (i) there must be enough available resources Qt to activate the task and (ii) a task may be activated only if all predecessors of i are activated before t. Fig. 1 shows an example of a scheduling, supposing H = 3, Q0 = 4, P0 = 0. For the sake of convenience, we will use a simplified notation of Q and P . At the start of time t = 1 there are two available tasks 1 and 2 (in gray). Task 2 is scheduled first. We need to retrieve 3 units of resource from Q (available resources) and add 2 units to P (profits earned so far). Moving to the next time t = 2, profit P is added to available resources Q. Task 2 is already scheduled (in white) and tasks 1 and 4 are available and will be scheduled. We finish this time unit without any resources (Q = 0), but profit P = 5. Moving to the next time, we have Q = 5, P = 5 and only task 3 is available. We schedule it and finish time unit t = 3 with Q = 1 and P = 9. Our scheduling finishes and the value of the final solution is given by the sum of Q = 1 and P = 9 (10 units of resource).
Fig. 1. Example of a scheduling in DRCPSP
DRCPSP is a NP-hard problem and has application in commercial and industrial environments where expansion plans might take place. Suppose a company wishes to open new branches in order to increase its financial gains. Each candidate city or place has a building cost related and it is supposed to obtain some sustained profit after its opening. Due to logistic issues (warehouses capacity, transport services or other management issues) it is not possible to open branches anywhere, anytime, therefore branches must be opened with some precedences. In general, a fixed budget is available to the expansion plan and all other monetary resources must be acquired by the business profits. Expansion plans like this have a time period to be projected and executed and the main objective is to obtain the maximum amount of monetary resources as possible at the end of the planning horizon.
Hybrid Heuristics for DRCPSP
75
The remainder of this paper is organized as follows. Section 2 provides a brief description of literature algorithms and their benefits. Section 3 presents a new mathematical formulation for DRCPSP as a Mixed Integer Program (MIP) as well as two new hybrid heuristics. Section 4 shows the computational results. Finally, the conclusion remarks are presented in Section 5.
2
Literature Review
DRPSP was originally proposed in [10]. Two Evolutionary Algorithms (EA1 and EA2) and a mathematical formulation were developed in this work. The formulation consists in a MIP that will be explained in the next section. This first formulation will be called F1 from now on. A better Evolutionary Algorithm (EA3) proposed in [11] could overcome the problems of EA1 and EA2 using a reconstruction scheme that tries to avoid premature convergence. In the same paper a first hybrid heuristic using CPLEX and EA3 was also proposed. It divided the planning horizon in two halves. CPLEX was used in the first half and the partial solution was given to EA3 to finish the second half. This hybrid heuristic achieved good results when planning horizon was short, but consumed very long time when a larger horizon was considered CPLEX’s half scheduling took too much time to finish. A new representation for DRCPSP solutions have been adopted since then [12,13]. This representation handles priorities for the scheduling of tasks in a similar way as the random-keys approach [5] does. A task with higher priority should be scheduled first if no constraints are violated. A new scheduling algorithm in conjunction with the representation allows that any priority list produces a feasible scheduling solution. New EA versions were proposed exploiting this feature. The first EA that uses this indirect representation is called EA priority. The initial population is computed giving to each task of each individual a priority based on the profit pi and the cost ci . The population is ranked according to the fitness of individuals and the population is divided into three classes: A (best individuals), B and C (worst individuals). A parent from class A and another one from class B are randomly chosen and the average of parents priorities are computed and given to the offspring. A mutation operator might be applied to each individual, then, the best individuals are chosen to remaining alive in the next generation. The second Evolutionary Algorithm which uses the indirect representation is called EA ages and was proposed in [13]. EA ages is the best heuristic known for DRCPSP and its features are going to be reviewed in Subsection 3.1.
3
New Mathematical Formulation for DRCPSP
The first mathematical formulation proposed for DRCPSP was presented in [10]. This formulation will be called F1 and is presented in a more simplified way as follows.
76
A.R.V. da Silva and L.S. Ochi
(F1) Max QH + PH Subject to t−1 xjt ∀i = 1, ..., n ∀t = 1, ..., H ∀j ∈ P red(i) xit ≤
(1)
(2)
t =1
xi0 = 0 ∀i = 1, ..., n Qt = Qt−1 + Pt−1 − Pt = Pt−1 +
n
(3) n
ci xit ∀t = 1, ..., H
(4)
i=1
pi xit ∀t = 1, ..., H
(5)
i=1 H
xit ≤ 1 ∀i = 1, ..., n
(6)
t=1
xit ∈ {0, 1} ∀i = 1, ..., n ∀t = 1, ..., H Qt , Pt ∈ IN ∀t = 0, ..., H
(7) (8)
If a task i is activated at time t, variable xit is equal to one; otherwise, it is zero. The objective function (1) seeks to maximize the resources at the end of time H. Constraints (2) ensure that a task i can be activated only if all its predecessor tasks are activated previously. All tasks are inactive at the start of scheduling (3). Constraints (4) show the available resources at time t. Constraints (5) state that the accumulated profit at time t is equal to the accumulated profit at prior time plus the profit of all activated tasks at this time. Constraints (6) ensure that a task i is activated once, at most. Constraints (7) and (8) define the domain of all variables. In medium-size instances (more than 300 tasks), F1 takes a very long time to obtain an optimal solution. In hard instances, a feasible solution was not found after more than 40 hours. The main drawback is in the relationship among the variables related to the same task. The variable xit , for instance, does not provide any information about what happened to task i at time t − 1 or earlier. So, a variable only indicates what happened in its time and no more. To know if a task was activated or not, we need to compute the sum of all variables related to this task. In order to strengthen the relationship among the variables we propose to define a different meaning for the variables. In the second formulation, called F2, variables yit indicate whether a task i was activated at time t or before that. A zero value means that the task was still not activated and an one value means that the task was already activated at that time. So, when a task is activated at time t, all variables related to that task, from time t to time H, have to be set to value one. This relationship is stronger because, now, we can look at a variable and know about an eventual past activation. Since the problem allows only one activation at most, we can know if a task was activated earlier looking at only one variable. The proposed formulation is presented and described next.
Hybrid Heuristics for DRCPSP
77
(F2) Max (1) Subject to yit ≤ yit+1 ∀i = 1, .., n ∀t = 1, ..., H − 1 yit ≤ yjt−1 ∀i = 1, .., n ∀t = 2, ..., H ∀j ∈ P red(i) n Qt = Qt−1 + Pt−1 − ci (yit − yit−1 ) ∀t = 1, ..., H Pt =
n
(9) (10) (11)
i=1
pi yit ∀t = 0, ..., H
(12)
i=1
yi0 = 0 ∀i = 1, .., n
(13)
yit ∈ {0, 1} ∀i = 1, .., n ∀t = 1, .., H (8)
(14)
Variables Qt and Pt have the same meaning of F1 as well as the objective function (1). Constraints (13) and (14) define the mentioned relationship among variables and the precedence constraints, respectively. Constraints (15) and (16) have equivalent meaning of constraints (4) and (5), respectively. 3.1
Hybrid Heuristics
Both hybrid heuristics proposed in this paper make use of the best heuristic known for DRCPSP. This heuristic (EA ages) is an evolutionary algorithm version with several operators and features. This algorithm was proposed in [13]. An individual is composed of a list of priorities. Tasks with higher priorities will be scheduled first if precedence and resource constraints are respected. The initial population is created giving to each individual a priority list. The priorities take into account the cost, the profit and the number of successors of each task. The population is sorted and divided into three classes. Two parents from the two highest classes are chosen and recombined through the computation of the priorities average. The mutation operator tries to improve an individual by increasing or decreasing some of its priorities. At the end of the current generation, a natural selection takes place. The best individuals remain alive to the next generation while the other individuals are discarded. If the algorithm meets the stopping criterion, the best solution found so far will be shown. Otherwise, three cases are analyzed: (i) if the best solution was improved in the current generation, the algorithm goes back to the parent selection operator and continues; (ii) if there are 30 generations without improving the best solution, a large exploration is done. This operator consists in executing a local search around the best individuals of the current population. (iii) The third case is triggered when 4 consecutive large explorations do not improve the best solution. The whole population is discarded and a new one is created taking the best solution found so far as a seed. This reconstruction is an attempt to intensify the search near to that best solution. A framework of this
78
A.R.V. da Silva and L.S. Ochi
evolutionary algorithm is shown in Fig. 2. All the algorithms parameters were defined after preliminary tests.
Fig. 2. The EA ages’ scheme
A parallel version was also proposed. In this version, some operators as Recombination and Mutation have their workload divided among the processing cores of a multi-core processor. Nowadays, these processors are very common, but a standard sequential approach uses only a part of the total processing power. The results from the parallel version shown that better solutions are found faster than the sequential version does. Hybrid heuristics combining EAs and solvers like CPLEX have been used to obtain results closer to the optimal one or to solve NP-hard problems in a smaller amount of time. The way these approaches are combined may vary from problem to problem as can be seen in [14,9,7]. The first hybrid heuristic proposed in this paper merges the exact CPLEX optimizer with the evolutionary algorithm in a very common way. The evolutionary heuristic provides a solution and uses CPLEX as a local search tool in order to improve such solution. This local search, called LS cplex, traverses the neighborhood of a solution S similarly to the local branching technique [3,4]. Suppose that Si is the time when task i is activated in solution S. A positive integer parameter Z works as a radius for the neighborhood. During the search, each task i may be activated between times Si − Z and Si + Z. So, the larger the value of Z the larger the size of neighborhood and the longer the search might take. In practice, Z = 4 is large enough to find a better neighbor if it exists, but this parameter might need to be better calibrated according to the instance used. A time limit may be given to the local search procedure because,
Hybrid Heuristics for DRCPSP
79
in hard instances, to look into the whole neighborhood might take a very long computational time. yit = 0 ∀i = 1, ..., n ∀t = 1, ..., Si − Z − 1
(15)
yit = 1 ∀i = 1, ..., n ∀t = Si + Z, ..., H
(16)
This first hybrid heuristic is called EA ages+LS cplex because the LS cplex is used as an improving tool when a new best solution is found or a large exploration is done. At these times, Eq. (15) and Eq. (16) are added to the formulation F2, according to the values of Z and the solution S passed to LS cplex. If LS cplex finds a better neighbor, the algorithm not only records the solution value but also makes this neighbor an alive individual which is inserted into the current population. By this way, the individual can disseminate its genes through future recombinations, contributing to the composition of better future generations. The conversion from a CPLEX feasible solution back to an individual is done by giving higher priorities to tasks activated earlier in the CPLEX solution. It can be dome by multiplying H − Si by K where Si is the time when task i was activated in the neighbor S and K is a positive real. Several values for K were tested, but no significant difference could be perceived among these values, at the end of the algorithm execution. The second hybrid heuristic proposed in this paper is called EA ages+CPLEX. It consists of a simultaneously cooperative execution of both EA ages and CPLEX. EA ages creates the initial population and calls CPLEX giving to it two information: the best schedule found so far and a list with one positive value for each binary variable of the formulation F2. These values mean the branching order which CPLEX must follow when choosing a binary variable to branch. According to the CPLEX documentation, this kind of list is used when the branch-and-cut algorithm has to choose a binary variable to fix its value if there are two or more variables with fractional values. So, the already fixed variables are skipped during the list traversal. The values are computed according to the time unit related. A variable related to the first time unit must be fixed earlier than a variable from the last time unit. Eq. (17) shows how the values were computed. The higher the value the earlier a variable must be fixed during the branch-and-cut algorithm. V alue(yit ) = H − t + 1 ∀i = 1, ..., n ∀t = 1, ..., H
(17)
Giving the CPLEX such list allows it to fix the variables in a more intelligent way because every earlier time unit has been fully done. Obviously, a better and faster sequence of variables branching might exists, but we expect that the proposed list (sequence of variables branching) works well in a general way. After the CPLEX initialization, both EA ages and CPLEX are running. They exchange information every time one of them finds a new best solution. EA ages always give to CPLEX the new best schedule generated by it as the CPLEX initialization call did. This schedule is utilized by CPLEX to improve its primal bound. When a primal bound is improved in a branch-and-cut algorithm, several nodes may be removed from the tree. Thus, a better primal bound helps
80
A.R.V. da Silva and L.S. Ochi
the optimization process by reducing the number of nodes and the memory utilization. If CPLEX finds a better primal bound by its own optimization process, it gives the EA ages this information as the LS cplex does, i.e., converting the CPLEX solution into a priority list that is inserted into the current EA ages population. The stopping criterion of EA ages+CPLEX is the end of the optimization process. When CPLEX proves the optimality of a certain solution it finishes the EA ages and itself. Therefore, EA ages+CPLEX may be considered an exact method while the EA ages+LS cplex is a heuristic method. Of course, when we give EA ages a time limit it will behave as a heuristic method because no optimality might be ensured.
4
Computational Results
All tests were made with an Intel Quad-core Q9550 with 8 GB of RAM, running Linux (Ubuntu 8.10) an CPLEX 11.2 (parallel version up to 4 threads). Instances have been retrieved from LABIC project (http://www.ic.uff.br/~labic) and all have non-trivial solutions. Graphs are composed of 10% of tasks without precedence, other tasks have up to 5 predecessors. Costs and profits are randomly chosen in the range [1;50] and [1;10], respectively, in order to produce interesting instances. Higher costs would make only few tasks to be activated; lower values would provide very easy instances where all tasks could be activated. Planning horizon size was defined as square root of n (number of tasks) and the initial amount of resources Q0 is enough to activate at least one task without precedence. P0 is always equal to zero. These instances have been used by all papers about DRCPSP. Instances from other project scheduling problems are not suitable for the DRCPSP because they do not have profit values. Introducing artificial values in those instances and using them to compare the proposed formulation are not the objective of this paper. Table 1 shows the primal and dual bounds found by CPLEX itself for each instance. A time limit of 50000 seconds was given to each execution. The best generated bounds (between the two formulations) are in bold. In small instances both formulations could find an optimal solution and prove its optimality. However, as the instances size increases, the gap between the bounds provided by F2 becomes much smaller than results obtained by F1. In many instances, even a single feasible solution was not generated by F1. The inequalities of the second formulation are better exploited during the simplex algorithm because to find a valid basis is easier when the constraints are simpler. Moreover, the coefficient matrix of F2 is much more sparse than F1. The better performance of F2 is also shown in Table 2. In this table, the times need to prove the optimality of a solution are presented. Again, F2 had better results taking less than half of the time spent by F1. Unfortunately, in instances with more than 500 tasks none of the formulation could prove the optimality of any solutions. The linear relaxation values provided by F2 are closer to primal bound than the values provided by F1. Table 3 shows a comparison among the formulations and the best known heuristic for DRCPSP. A time limit was given to each execution. It was computed
Hybrid Heuristics for DRCPSP
81
Table 1. Primal and dual bounds obtained by mathematical formulations
Inst. 50a 100a 150a 200a 250a 300a 350a 400a 450a 500a 550a 600a 650a 700a 750a 800a 850a 900a 950a 1000a
Primal bound F1 F2 47 47 304 304 576 576 636 636 1030 1030 2073 2073 2571 2571 7265 7271 9633 9705 14222 14336 - 11087 - 10157 - 16332 - 31820 - 36216 - 38351 45240 46840 - 38733 - 67903 - 71864
Dual bound F1 F2 47.0 47.0 304.0 304.0 576.0 576.0 636.0 636.0 1030.0 1030.0 2073.0 2073.0 2585.3 2571.0 7304.9 7271.0 10061.6 9705.0 15925.2 14336.0 15401.4 11136.5 14968.1 10199.6 21800.2 16355.8 36406.8 31836.2 42069.0 36296.9 45307.0 38729.8 53206.7 46898.0 47904.1 38834.8 75063.0 67927.4 79287.9 71911.8
as the time needed by F2 to finish. In hard instances, this time was replaced by 7200 seconds. The heuristic results are the average of 30 independent executions. Even the formulation F2 being considered an exact method, it generated better results than the heuristic method did in a difficult situation where a very small amount of time was given. For most of the optimization problems, the limit of two hours is very tight in order to prove the optimality of a solution. This statement can be seen in instance 800a, where even a single feasible solution could not be found by the formulations. Comparing both formulations, we can see that F2 was again much better than F1. Thereby, the formulation F2 can be considered empirically better than the formulation F1 and will be used in hybrid heuristics instead of F1. The EA ages parallel results, not as good as F2 results, are largely because the heuristic nature of the algorithm. Even giving more hours to EA ages, it could not keep improving the solution. This behavior may be considered a kind of “natural limitation” of that algorithm. In other words, these results represents the expected solution value if given a large amount of time to EA ages. In fact, a experiment was done giving about 20 hours to the parallel version and the obtained results were quite similar to those shown in Table 3. Unlike heuristic methods, the formulation executed by CPLEX can keep improving the solution until reaching an optimal one, if enough time is given. Table 4 shows the results of a test very similar to that presented by Table 3. Now, parallel EA ages was compared to the hybrid versions EA ages+CPLEX and EA ages+LS cplex. The same time limit criterion was applied. The hybrid
82
A.R.V. da Silva and L.S. Ochi
Table 2. Time spent (sec) by each formulation - the time limit is 50000 seconds for each execution Inst. 50a 100a 150a 200a 250a 300a 350a 400a 450a 500a 550a-1000a
F1 0.0 0.2 0.5 12.3 88.2 5674.3 50000.0 50000.0 50000.0 50000.0 50000.0
F2 0.0 0.1 0.3 6.5 25.3 196.3 211.3 467.8 9843.2 6688.7 50000.0
Table 3. Comparison among formulations and EA ages parallel (heuristic approach) - the limits are the times F2 took to prove the solution optimality or 7200 second Inst. Limit(sec) F1 F2 EA ages Paral. 200a 6.4 602 636 636.0 300a 155.4 2052 2073 2002.6 400a 440.7 7167 7271 7062.1 500a 896.8 - 14436 13933.1 600a 7200.0 - 10157 9922.9 700a 7200.0 - 31820 30408.2 800a 7200.0 37324.3 900a 7200.0 - 38683 37045.5 1000a 7200.0 - 71851 69602.2 Table 4. Results from hybrid heuristics compared to EA ages parallel version - the limits are the times F2 took to prove the solution optimality or 7200 second - “Improv.” column shows how much a hybrid heuristic was better than “EA ages Paral.” Inst. Time Limit(sec) EA ages Paral. +LS cplex 200a 6.4 636.0 636.0 300a 155.4 2002.6 2038.2 400a 440.7 7062.1 7217.2 500a 896.8 13933.1 14319.7 600a 7200.0 9922.9 10107.0 700a 7200.0 30408.2 31819.6 800a 7200.0 37324.3 38626.1 900a 7200.0 37045.5 38766.6 1000a 7200.0 69602.2 71855.8
+CPLEX Improv.(%) 636.0 0.0 2072.5 3.5 7271.0 3.0 14335.9 2.9 10157.6 2.4 31823.9 4.7 38637.0 3.5 38768.6 4.7 71843.0 3.2
results are average of 30 executions. EA ages+CPLEX had slightly better results than EA ages+LS cplex in almost all instances. Results from both hybrid versions exceeded the heuristic ones in all tested instances, except 200a. As said
Hybrid Heuristics for DRCPSP
83
before, the hybrid heuristic may be considered heuristic version when a time limit is given because they will not be allowed to run up to the optimality state. Fig. 3 present a probabilistic analysis. To plot the empirical distribution, we fixed a solution target and run each algorithm 100 times, recording the time when a solution with value greater than or equal to the target is found. For each algorithm, we associated a probability pi = i/100 with the i-the sorted running time ti and plotted the points zi = (pi , ti ) for i = 1, ..., 100. This kind of plot is called time-to-target [8] and is used to show the empirical behavior of heuristic methods. The target chosen was the EA ages average results presented in Tables 3 and 4. A time limit of 300 seconds was also given. If an execution does not reach the target, its results are not plotted. The results of EA ages+LS cplex were not as good as EA ages+CPLEX results. The problem is in the neighborhood traversal. Even when the best neighbor is found, the traversal does not finishes until it looks into the whole neighborhood. LS cplex does not have a mechanism to know that there is no better solution in the remainder of the neighborhood. This waste of time made the algorithm to improve the best solution only a few times. In the easiest of the three instances tested (instance 550a - Fig. 3(a)) the behavior of both hybrid heuristic was very similar, but in harder instances the small amount of time was crucial to determine the performance of the methods. EA ages+LS cplex cannot be considered an ineffective algorithm. It indeed obtained results better than EA ages heuristic, which is the best known algorithm so far. In the last test, EA ages+CPLEX will be directly compared to CPLEX by itself. Tables 5 and 6 present the results of these tests. Throughout all tests, a CPLEX parameter was adjusted in order to improve the hybrid results. This parameter is called “MIP Emphasis” by the CPLEX documentation. The objective of the emphasis is to intensify the search for an optimal solution in some way. The default is 0 which means no specific emphasis. Hybrid version obtained better results when the parameter was adjusted to value 4 which means an intensification in searching for “hidden feasible solution”. Unfortunately, the documentation does not give more details about how it is done. We believe that when a node of the branch-and-cut is analyzed, the CPLEX makes a “more accurate guess” about the variable values that might produce a feasible solution. Other trouble we had when implementing the EA ages+CPLEX algorithm is about the CPLEX execution mode. According to the documentation, CPLEX has two modes: dynamic search and traditional branch-and-bound. Again, no detailed information is given about the difference between these two modes. EA ages+CPLEX was implemented with traditional branch-and-bound mode because the log of the CPLEX tells that the utilization of any callback automatically changes the default mode from “dynamic search” to “traditional branch-and-bound”. In any case, our hybrid version was compared to both modes. A first configuration was defined using the CPLEX defaults like in the first experiment (Table 1). No parameter except the time limit was changed. This configuration will be
84
A.R.V. da Silva and L.S. Ochi
(a)
(b)
(c) Fig. 3. Probabilistic analysis of EA ages+CPLEX and EA ages+LS cplex versions the targets are the average results of EA ages after 300 seconds
Hybrid Heuristics for DRCPSP
85
Table 5. Time spent(sec) and best solution found by EA ages+CPLEX and CPLEX (two configurations)
Inst. 300a 350a 400a 450a 500a 550a 600a 650a 700a 750a 800a 850a 900a 950a 1000a
Total time(sec) Solution DS0 BB4 Hybrid DS0 BB4 Hybrid 196.3 178.9 2460.4 2073 2073 2073.0 211.3 408.6 155.0 2571 2571 2571.0 467.8 1609.2 163.7 7271 7271 7271.0 9843.2 7570.0 1143.7 9705 9705 9705.0 6688.7 7228.1 822.6 14336 14336 14336.0 25000.0 25000.0 25000.0 11081 11054 11054.7 25000.0 25000.0 25000.0 10157 10155 10159.2 25000.0 25000.0 25000.0 16332 16308 16331.3 25000.0 25000.0 15061.2 31820 31818 31826.0 25000.0 25000.0 25000.0 36216 36220 36225.7 25000.0 25000.0 25000.0 - 38641.1 25000.0 25000.0 25000.0 46835 - 46837.2 25000.0 25000.0 25000.0 38723 38650 38787.9 25000.0 25000.0 25000.0 67902 67854 67909.0 25000.0 25000.0 25000.0 71851 71844 71838.6
Table 6. Dual bounds and best solution times from EA ages+CPLEX and CPLEX (two configurations) - a dash means that the dual bound is equal to the solution found
Inst. 300a 350a 400a 450a 500a 550a 600a 650a 700a 750a 800a 850a 900a 950a 1000a
Dual bound Best solution time(sec) DS0 BB4 Hybrid DS0 BB4 Hybrid 155.3 176.3 1266.8 70.1 191.0 104.0 440.6 1209.7 120.4 - 9693.3 7544.5 1113.9 896.8 851.2 466.1 11140.6 11152.9 11162.2 9221.6 22826.2 6802.0 10205.1 10239.8 10197.9 4234.9 18181.5 8845.4 16363.4 16446.6 16351.1 5878.1 24931.1 14068.8 31843.8 31854.0 - 6966.7 19862.4 14541.9 36302.0 36316.9 36291.1 23388.6 20855.4 19751.1 38736.3 38757.8 38686.0 25000.0 25000.0 12336.2 46912.9 46968.6 46920.5 21658.4 25000.0 23233.0 38837.0 38845.1 38823.9 14641.6 24919.5 15187.5 67931.1 67943.7 67916.8 24982.8 17380.7 14811.1 71914.1 71920.1 71930.2 4326.4 24372.2 18270.8
denoted by DS0. A second configuration is more similar to our hybrid heuristic. It uses “traditional branch-and-bound” and emphasis 4. This configuration will be denoted by BB4. The hybrid EA ages+CPLEX was executed 10 times and the average results were taken. A time limit of 25000 seconds was given to each algorithm.
86
A.R.V. da Silva and L.S. Ochi
Table 5 presents the total time taken by each version and the best solution generated by them. DS0 produced better solution than BB4 did. Due to the lack of an appropriate documentation, to affirm which algorithm component was the responsible for the results is not possible. EA ages+CPLEX performed very well compared to CPLEX by itself; both solution and total time averages of the hybrid heuristic were better. Instance 700a is a very interesting case. This instance is a hard one - none of the formulations found an optimal solution even with 50000 seconds (Table 1). However, the hybrid heuristic found an optimal solution (with value 31826) and proved it. Moreover, the algorithm spent about only 15000 seconds to do this. Comparing to the first test, the algorithm took less than one third of the time spent by CPLEX by itself to produce a better solution. CPLEX is a software very well recognized commercial and academically, but it can be improved a lot by inserting some specific problem knowledge into it. The solutions (primal bounds) and the branching order are examples of knowledge that CPLEX can make good use of. Table 6 exhibits additional results: the dual bounds and the time when the final solution was found. These last results are not so conclusive because a solution can be found very quickly but it may also have a poor quality. In any case, the hybrid times were lower in some instances and higher in others. EA ages+CLPEX improved the dual bounds of many instances when compared to DS0. The main responsible for these results is the list of branching order. The branch-and-bound nodes were traversed in a more intelligent way making the dual bound decrease a little faster. The dual bounds from the hybrid heuristic are lower even than the bounds presented in Table 1, where CPLEX run for 50000 seconds.
5
Conclusion
This paper deals with a scheduling problem which uses an uncommon kind of resource: the Dynamic Resources. The Dynamic Resource-Constrained Project Scheduling Problem (DRCPSP) has application in industrial and commercial environments. A new mathematical formulation (F2) is proposed for the problem. The binary variables of F2 have a different meaning from the previous formulation F1. Variables now provide information about the past of the task they are related to. To know if a task is activated becomes easier. Empirical tests shown that F2 can produce better solution in a smaller amount of time. Formulation F2 was applied into a hybrid scheme with the best known heuristic (EA ages) for DRCPSP. Two hybrid heuristics were proposed in this way. The first one (EA ages+LS cplex) used the formulation (and the CPLEX optimizer) as a local search tool. At some times, the search was executed and the best neighbor found might be inserted into the current population of the evolutionary algorithm. The second hybrid heuristic (EA ages+CPLEX) executed both EA ages and CPLEX simultaneously. They exchange information at the beginning of the running and when one of them finds a new best solution.
Hybrid Heuristics for DRCPSP
87
Some tests demonstrated the potential of the second hybrid heuristic in finding better solution and producing lower dual bounds. This algorithm is slightly better than the EA ages+LS CPLEX. Some comparisons with the second hybrid heuristic and CPLEX alone were done. CPLEX results were not as good as the hybrid ones. Even if we let the CPLEX run twice as long the hybrid heuristic does, the CPLEX results were worse. EA ages+CPLEX presented the best primal and dual bounds for DRCPSP and it can be considered the best heuristic for this problem.
References 1. Chen, P.-H., Shahandashti, S.M.: Hybrid of genetic algorithm and simulated annealing for multiple project scheduling with multiple resource constraints. Autom. in Constr. 18, 434–443 (2009) 2. Damak, N., Jarboui, B., Siarry, P., Loukil, T.: Differential evolution for solving multi-mode resource-constrained project scheduling problems. Comput. & Oper. Res. 36, 2653–2659 (2009) 3. Fischetti, M., Lodi, A.: Local Branching. Mat. Prog. 98, 23–47 (2003) 4. Fischetti, M., Lodi, A.: Repairing MIP infeasibility through local branching. Comp. & Oper. Res. 35, 1436–1445 (2008) 5. Gon¸calves, J., Mendes, J., Resende, M.: A random key based genetic algorithm for the resource constrained project scheduling problems. Int. J. of Prod. Res. 36, 92–109 (2009) 6. Homberger, J.: A multi-agent system for the decentralized resource-constrained multi-project scheduling problem. Int. Trans. in Oper. Res. 14, 565–589 (2007) 7. Puchinger, J., Raidl, G.R.: An Evolutionary Algorithm for Column Generation in Integer Programming: an Effective. In: Yao, X., Burke, E.K., Lozano, J.A., Smith, J., Merelo-Guerv´ os, J.J., Bullinaria, J.A., Rowe, J.E., Tiˇ no, P., Kab´ an, A., Schwefel, H.-P. (eds.) PPSN 2004. LNCS, vol. 3242, pp. 642–651. Springer, Heidelberg (2004) 8. Ribeiro, C.C., Rosseti, I.: Efficient Parallel Cooperative Implementations of GRASP Heuristics. Paral. Comp. 33, 21–35 (2007) 9. Semet, Y., Schoenauer, M.: An efficient memetic, permutation-based evolutionary algorithm for real-world train timetabling. In: Congress on Evolutionary Computation. IEEE Press, Los Alamitos (2005) 10. Silva, A.R.V., Ochi, L.S.: A dynamic resource constrained task scheduling problem. In: Proc. of Lat.-Ibero-Am. Congr. on Oper. Res. (CLAIO), Montevideo, Uruguay (November 2006) 11. Silva, A.R.V., Ochi, L.S.: A hybrid evolutionary algorithm for the dynamic resource constrained task scheduling problem. In: Proc. of the Int. Workshop on Nat. Inspired Distributed Comput. (NIDISC 2007), LongBeach, EUA (March 2007) 12. Silva, A.R.V., Ochi, L.S., Santos, H.G.: New effective algorithm for dynamic resource constrained project scheduling problem. In: Proc. of Int. Conf. on Eng. Optim. (ENGOPT), Rio de Janeiro, Brazil (June 2008) 13. Silva, A.R.V., Ochi, L.S.: New sequential and parallel algorithm for dynamic resource constrained project scheduling problem. In: Proc. of Int. Workshop on Nat. Inspired Distributed Comput. (NIDISC 2009), Rome, Italy (May 2009) 14. Till, J., Sand, G., Urselmann, M., Engell, S.: A hybrid evolutionary algorithm for solving two-stage stochastic integer programs in chemical batch scheduling. Computers & Chemical Engineering 5, 630–647 (2007)
A Multi-Start Evolutionary Local Search for the Two-Echelon Location Routing Problem Viet-Phuong Nguyen, Christian Prins, and Caroline Prodhon Universit´e de Technologie de Troyes (UTT), ICD-LOSI (UMR CNRS 6279) BP 2060, 10010 Troyes Cedex, France {viet_phuong.nguyen,christian.prins,caroline.prodhon}@utt.fr
Abstract. This paper presents a new hybrid metaheuristic between a greedy randomized adaptive search procedure (GRASP) and an evolutionary/iterated local search (ELS/ILS), using Tabu list to solve the two-echelon location routing problem (LRP-2E). The GRASP uses in turn three constructive heuristics followed by local search to generate the initial solutions. From a solution of GRASP, an intensification strategy is carried out by a dynamic alternation between ELS and ILS. In this phase, each child is obtained by mutation and evaluated through a splitting procedure of giant tour followed by a local search. The tabu list, defined by two characteristics of solution (total cost and number of trips), is used to avoid searching a space already explored. The results show that our metaheuristic clearly outperforms all previously published methods on LRP-2E benchmark instances. Furthermore, it is competitive with the best meta-heuristic published for the single-echelon LRP. Keywords: GRASP, evolutionary local search, iterated local search, tabu list, two-echelon location routing problem, vehicle routing, facility location.
1
Introduction
In this paper we address a problem still rarely studied, the two-echelon location routing problem (LRP-2E) using a hybrid multi-start evolutionary local search (MS-ELS). This problem is raised by distribution or collection networks involving two sets of vehicle trips: first-level trips serve from a main depot a set of satellite depots, which must be located, while second-level trips visit customers from these satellites. In the context of city logistics, the location of intermediate depots (satellites) near large cities allows considerable savings compared to direct deliveries from one main depot. Thus, more and more municipalities wish to have an efficient solution to keep big trucks out of their city centre, by creating peripheral logistic platforms, from which smaller, environment-friendly vehicles are allowed to go downtown. Taniguchi et al. (2002) [21] and Crainic et al. (2004) [1] introduced multi-level distribution systems as a tool to reduce urban congestion and increase mobility, while Crainic et al. (2007) [2] proposed general models for multi-level urban logistics. M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 88–102, 2010. c Springer-Verlag Berlin Heidelberg 2010
MS-ELS for LRP-2E
89
The LRP-2E is easily seen to be NP-hard since it includes NP-hard problems like the VRP and the LRP [11]. The LRP-2E is closely related to several important problems, especially in multi-echelon transportation domain. These relations were analyzed by Nguyen et al [11] and may be summarized as follows: The two-echelon vehicle routing problem (VRP-2E) is a special case of LRP2E in which all satellites are already opened without any opening cost. Feliu et al. (2008) [8] proposed a MIP formulation and an exact column generation approach using Xpress linear programming solver for VRP-2E in which there is no fixed cost for using a satellite depot. Optimal solutions are found for small instances of 20 customers. Recently, more lower bounds for VRP-2E were envisaged by Mancini et al. (2009) [4]. A global value is computed by addition of two lower bounds for each level without considering the interactions between both levels. Crainic et al. (2008) [3] designed a two-phase heuristic: “clustering first routing second”. This method was used to execute a satellite location analysis [5]. The truck and trailer routing problem (TTRP) [19,18,23] is considered as a variant of VRP-2E with certain specific features. Each vehicle “road-train” is composed by a truck and a trailer. Some customers can be served directly by a 1st level trip. In areas having limited accessibility, the trailer must be detached at satellites, and second level trips are performed by the truck alone to reach customers. We can also see the two-echelon capacitated facility location problem (CFLP-2E) [9,22], other case of LRP-2E where each customer is served by a direct route (no tour). In vehicle routing problem with satellite facilities (VRPSF) [6], each vehicle must start and end its route at the same depot, like in the multi-depots VRP, but it may refill at any depot. Finally, a mention to the location routing problem (LRP or LRP-1E) [14,15,16] must be done as a particular case of LRP-2E where the costs of edges linking two satellites or a satellite and the main depot are null. Literature on LRP-2E is still moderate. To our knowledge, the first works on the LRP-2E can be credited to Jacobsen and Madsen (1980) [10]. In these early studies, a satellite depot may be located at any customer, no local search is used, and three fast heuristics are tested on a single real instance. Recently, heuristic approaches were proposed by the authors of this paper: four constructive heuristics and a metaheuristic of GRASP with Learning Process [11]; a hybrid GRASP x Path Relinking [12]. This paper aims at solving the LRP-2E on instances having up to 200 customers. The problem is presented in the next Section. The general structure and the main components of this meta-heuristic are explained in the 3rd Section. The computational evaluation and the conclusion follow in the last Sections.
2
Problem
The LRP-2E can be defined on a complete, weighted, and undirected network G = {V, E, C}. V is a set of nodes comprised of three subsets: Vo = {0} representing the main depot, Vs = {1, 2, . . . , m} of m possible satellite locations, Vc = {m + 1, m + 2, . . . , m + n} of n customers. The set E contains edges (ij)
90
V.-P. Nguyen, C. Prins, and C. Prodhon
with cost cij in set C. A capacity Wi and an opening cost Oi are associated with each depot satellite i ∈ Vs . Each customer j ∈ Vc has a demand dj . A set K1 of identical vehicles of capacity k1 is available at main depot. A set K2 of identical vehicles of capacity k2 is available at satellites (and at main depot eventually in a particular case). Each vehicle used in each echelon respectively induces a fixed cost F1 , F2 . The number of trips made is a decision to define. In this work, the following constraints must hold: each trip must begin and end at the same satellite; each customer must be served by one single vehicle. In the particular cases, customers may be delivered directly by the main depot and satellites can also play the role of customers. Figure 1 depicts one example of feasible solutions of the LRP-2E in the normal case and the particular case.
Fig. 1. LRP-2E feasible solutions
We can formulate the LRP-2E as a mathematical model of three indexes. All variables are binary. xij equals 1 if a vehicle of type 1 uses the edge (ij). k equals 1 if a trip of 2nd level is belong to satellite k, crosses the edge yij (ij) and 0 otherwise. zi equals 1 if the satellite i is opened. The objective is to minimize the total cost by selecting which satellites should be opened and by constructing two sets of trips in the two levels of systems. The total cost includes three terms: the cost of satellite opening i∈Vs Oi .zi , the fixed k cost i∈Vs j∈Vc k∈K2 F2 .yij + i∈Vs F1 .x0i and the costs of traversed edges k k∈K2 i,j∈Vs Vc cij .yij + i,j∈Vo Vs cij .xij . As the paper number is limited, the detail of the mathematical model is not presented here.
3
MS-ELS Using Tabu List for LRP-2E
The MS-ELS for LRP-2E is a new complex meta-heuristic of two components: the GRASP (greedy randomized adaptive search procedure), which is a multi start
MS-ELS for LRP-2E
91
algorithm generating np initial solutions improved by local searches; ELS/ILS (evolutionary / iterated local search), which builds nc∗ni child-solutions during an evolutionary scheme. The tabu list is used in each component. Our meta-heuristic has a more involved structure depicted in Fig. 2. Elements of the proposed metaheuristic are described in the following sections. 3.1
GRASP
GRASP is a memory-less multi-start method. Each iteration is composed of two phases: i) construction of an initial solution using a greedy randomized heuristic, and ii) improvement of this solution by local search. Here, three greedy randomized heuristics are used in turn to generate the np initial solutions: a heuristic based on Clarke and Wright’s algorithm, a nearest neighbor heuristic, a heuristic of “build subtours and insert best satellite”.
Fig. 2. General structure of MS-ELS
Heuristic H1. The Extended Clarke and Wright algorithm (ECWA) [14] is applied here for the second level routing of LRP-2E. It generalizes the famous merge heuristic originally designed by Clarke and Wright for the VRP. Roughly speaking, each customer is assigned in decreasing order of demand to the closest satellite with enough residual capacity, and served via one direct trip. For a randomized version, a Restricted Candidate List (RCL) of k closest satellites is created for each customer, and one is randomly selected. Once all customers are
92
V.-P. Nguyen, C. Prins, and C. Prodhon
assigned, satellites without customers are closed and pairs of trips are merged to reduce total cost. When two trips R and S are merged (concatenated), each trip can be inverted or not and the resulting trip T may be assigned to the satellite r of R, to the satellite s of S, or to another satellite t, open or not. Consequently, 4m mergers must be evaluated for each pair of routes. The resulting saving takes into account the satellites which can be opened or closed by the merger. The merger with the largest positive saving is executed. This process is repeated until no merger with a positive saving is found. Once the ECWA is finished for the 2nd level, the open satellites take the role of clients and the classical Clarke and Wright algorithm is applied for the 1st level routes (one main depot). Heuristic H2. The extended nearest neighbour heuristic is inspired by the nearest neighbour heuristic for the TSP. One satellite is opened at random and a set of routes is constructed for this satellite. Each route starts at the depot and is extended by joining the closest customer not yet visited. The route returns to the depot when no additional customer can be added. Successive routes are built in this way, until satellite capacity is exhausted. The algorithm stops when all customers are inserted in 2nd level routes. The nearest neighbour heuristic is finally applied to the 1st level, to build a set of routes supplying the open satellites from the main depot. Heuristic H3. A heuristic of “build subtours and insert best satellite” creates the 2nd level routes one by one, from one randomly selected satellite using an adaptation of the VRP heuristic of Mole and Jameson. When a route is ready, its satellite is removed giving a subtour in which the best possible satellite is inserted. Like in H1, the insertion cost includes the edges added or deleted and the satellite costs. Finally, the open satellites are linked using the nearest neighbour heuristic to build the 1st level routes. 3.2
Local Search
Our method uses two different local searches LS1 and LS2, each is structured by a Variable Neighborhood Descent (VND) as shown in Algorithm 1. LS1 includes the neighborhoods Move, Exchange, 2-Opt, 3-Opt, Or-Opt, Best position of satellite/depot. It improves only the routing part, the status open/closed of satellites depot is not modified. There is however one exception: a satellite depot may be obviously closed when its last customer is transferred to another depot. LS2 is based on the neighborhoods of LS1 and two other neighborhoods that can take heavier decisions like “Opening/closing a satellite depot” and “Best location of trips”. In order to reduce CPU time, in the ELS/ILS phase, LS2 is only called if Cost(S) < (1 + a) ∗ Cost(S ∗ ) (with Cost(S) the cost of the current solution S and Cost(S∗) the cost of the best solution found S ∗ until now). Parameter a is selected by an analyses of LS2 impact on the total cost in [11]. It follows that we can use a = 0.2.
MS-ELS for LRP-2E
93
Algorithm 1. VND Procedure for the Local Searches begin define the neighborhood Nh =Move,Exchange,2-Opt,3-Opt,. . . repeat improve f lag ← f alse h←1 while h ≤ hmax do S ← LocalSearch(S, Nh ) if Cost(S) < Cost(S ∗ ) then improve f lag ← true S∗ ← S h←h+1 until improve f lag = f alse end
3.3
Tabu List
Instead of searching the entire solution space, a tabu list (cf. Algorithm 2) is used to guide the search and reduce the number of iterations. This process installed both in GRASP and ELSxILS phases with a size SizeOf List = 6 allows reducing about 55% total number of generated solutions. An element L[i] of the list is defined by two solution characteristics (total cost Cost(L[i]) and number of trips N bT rip(L[i])). If both characteristics of the current solution (Cost(S), N bT rip(S)) are in an element of the list, we envisage the two following situations. In the GRASP phase, a new initial solution must immediately be generated. In the ELS/ILS phase, the index of iteration ite is increased by ni∗nc/2 as a penalty (cf. Algorithm 3). This possibly leads to a return to a new GRASP iteration. Otherwise, the tabu list is updated by the current solution. Algorithm 2. Tabu List begin i ← 1 and tabu f lag ← f alse for i ← 1 to SizeOf List do if Cost(S) = Cost(L[i]) and NbTrip(S)=NbTrip(L[i]) then return tabu f lag ← true ; // S ∈ Tabu List if tabu f lag = f alse then // S ∈ / Tabu List => add S in the Tabu List j ← IndexOf Iteration % SizeOf List + 1 // select L[j]∈Tabu List N bT rip(L[j]) ← N bT rip(S) ; // replace L[j] by S Cost(L[j]) ← Cost(S) else // S ∈ Tabu List => envisage two situations if Tabu List in GRASP phase then build a new solution if Tabu List in ELS/ILS phase then give a penalty end
94
3.4
V.-P. Nguyen, C. Prins, and C. Prodhon
A Dynamic ELS/ILS
A classical ILS iterates during ni iterations, each one building a single childsolution thanks to mutations a giant tour GT and a local search. ELS is similar but generates nc > 1 child-solutions by iteration and selects the best one. ELS takes advantages of both neighborhood methods and population approaches. It is fast since it works on a single solution and efficient thanks to the generation of several child-solutions. However, a variant is implemented here, leading to a dynamic ELS/ILS scheme. The number of iterations in ELS/ILS phase is not implemented as usual. A total of ni ∗ nc child-solutions is still generated but during one iteration, the number of children is dynamically adjusted by a threshold on the solution quality. If Cost(S) < (1 + b) ∗ Cost(S ∗ ) (with Cost(S) the cost of the current solution and Cost(S ∗ ) the cost of the best solution found until now), the child is considered as a good one, so it will be concatenated to replace the current giant tour (no more child is generated on the current iteration). Computational results with b = 0.05 show that approximately 75% of generations are performed with only one child (ILS behaviour). As already said, in ELS/ILS phase, each child is obtained by mutation and evaluated through a splitting procedure of giant tour followed by a local search. More precisely, the search alternates between LRP-2E solution S and giant tour GT . To generate a child from a solution S, the latter is converted into a giant tour thanks to a “concatenation” procedure: concat(S, GT ). It creates chains of customers by concatenating in turn the second level trips. The best position of each trip within the giant tour is evaluated to have the best insertion. Then, we use mutation on satellites and mutation on giant tour. Toward the first mutation, the list of available satellites SS for the “split” procedure (see below) is composed of the subset of satellites used in the current solution plus one randomly selected. Concerning the perturbation on giant tour, i.e. a “mutation” procedure (see Fig. 3): mutation(GT ). Three types are envisaged: the first one performs p random swap moves; the second is to crack a part of giant tour at two weak edges and to re-insert it at the best position; the third is to add the edge linking the first and the last customer of the giant tour, and then break at a weak edge. The partition of the giant tour GT into 2nd level feasible routes using a subset SS of available satellites is performed by a procedure called split (cf. [11]: split(GT, SS, S). It can be implemented in O(p2 q) using Bellman’s algorithm, for a giant tour GT of p customers and a subset SS of q allowed satellites. In Split, satellite capacities are ignored because computing the trips would be NPhard. Thus, selected satellites are inserted in each route and trips are moved toward other depots if the capacity of some satellites is violated. Finally, the satellites used are connected via the nearest neighbor heuristic. The solution produced by “split” is improved by Local Search and tested by Tabu List as sketched in Section 3.3. Algorithm 3 connects these components. Repeat that GT, SS, S, S ∗ , T respectively denote a giant tour, a set of available satellites, a LRP-2E solution, the best solution and a trip of solution.
MS-ELS for LRP-2E
95
Fig. 3. Mutation procedure
Algorithm 3. A dynamic ELS/ILS S ← a new good solution from GRASP phase BestSat ← set of open satellites of S begin for ite ← 1 to ni ∗ nc do initiale giant tour GT ← first trip of 2nd-level ∈ S for each other trip T of 2nd level ∈ S do call concat(GT, T ) ; // concatenate trip T in giant tour GT call mutation(GT ) ; // mutation on giant tour GT SS ← BestSat+a random satellite ; // mutation on satellites call split(GT, SS, S) ; // build 2nd level trips of new solution S if satelite capacities are violated then repair 2nd level trips of S build trips of 1st level from the opened satellites call LS1(S) ; // local search on routing if Cost(S) < (1 + a)BestCost then call LS2(S) ; // local search on location of satellites if S ∈ T abuList then ite ← ite + ni ∗ nc/2 else update S to T abuList if Cost(S) < (1 + b)Cost(S ∗ ) then if Cost(S) < Cost(S ∗ ) then S ∗ ← S rebuild giant tour GT from current solution S BestSat ← set of open satellites of S else ite ← ite + 5 end
96
4
V.-P. Nguyen, C. Prins, and C. Prodhon
Computational Results
Similarly to GRASP complemented by Learning Process [11], the proposed method is coded in Visual C++ 6.0 and tested on a Dell Optiplex GX745 with a Pentium 4 clocked at 3.4 GHz, 1GB of memory and Window XP. Depending on the value of parameters (np: number of GRASP iterations; ni ∗ nc: number of ELS/ILS iterations and b: threshold of good solution), we can obtain several methods, for instance: GRASP (np > 1, ni ∗ nc = 0), ELS (np = 1, ni ∗ nc > 1, b < −0.5), ILS (np = 1, ni ∗ nc > 1, b > 1.0), a ELS/ILS (np = 1, ni ∗ nc > 1, −0.5 < b < 1.0), a hybrid GRASP x ELS (np = 1, ni ∗ nc > 1, b < −0.5), a hybrid GRASP x ILS (np = 1, ni ∗ nc > 1, b > 1.0) and a hybrid GRASP x ELS/ILS or MS-ELS (np = 1, ni ∗ nc > 1, −0.5 < b < 1.0). 4.1
Computational Study of MS-ELS Parameter Setting
A comparison among the algorithms based only on the average solution costs or on the running times does not usually be valid. For instance, an exceptional performance (either very good or very bad) on a few instances influences the overall performance of the algorithm observed. That is why this section provides a statistical evaluation to select the best heuristic based on several sets of parameters. This is done by applying a non-parametric Friedman test - an extension of the Wilcoxon test, followed by the Bonferroni-Dunn post hoc test for comparing three or more heuristics. More details of these tests can be found in [20]. In order to reduce the number of parameter sets, we carried out a preliminary test. It results that, weighing the pros and cons between quality of solution and CPU time, the parameters concerning the number of generated solutions are chosen as follows: np = 100, ni ∗ nc = 50. The statistical test is thus executed to select the value of other variables: a, b and SizeOf List. Finally, two good values of each parameter are obtained that create h = 23 = 8 combinations, noted M1, M2,. . . , M8 as shown in the first part of Table 1.
Table 1. The eight parameter sets and the heuristic rankings Heuristic
M1
SizeOf List a b
6 1.25 1.2
on cost on CPU time
4.67 5.48
on cost on CPU time
1.50 0.23
M2
M3 M4 M5 Set of parameters 6 6 6 8 1.25 1.3 1.3 1.25 1.1 1.1 1.2 1.2 Mean ranks 5.02 5.00 3.96 3.17 3.88 4.33 5.27 5.25 Difference from M5 rank 1.85 1.83 0.79 0.00 -1.38 -0.92 0.02 0.00
M6
M7
M8
8 1.25 1.1
8 1.3 1.1
8 1.3 1.2
4.54 4.54
5.40 2.63
4.25 4.63
1.38 -0.71
2.23 -2.63
1.08 -0.63
MS-ELS for LRP-2E
97
Then, the Friedman test is used to compare the h = 8 heuristics on N = 30 LRP-2E instances of Prodhon. Our null hypothesis is that all 8 heuristics are all equal in their performance. This test can be described as follows. Let xij denote the objective function value or CPU time of the solution obtained by heuristic i on problem j. In order to make the comparison of heuristics independent of the parameters of the problems, define the ratio of the obtained heuristic solutions xij over the best known solution, i.e. Rij = BKS(j) where BKS(j) is the best known solution of problem j for various cases. For a given problem j, the ratios Rij are arranged in increasing order and ranked from 1 to h (in case of equal performance, average ranks are assigned). The rank of Rij is denoted by rij . N N h 1 We calculate the following values: rj = N1 i=1 rij ; r = N.h i=1 j=1 rij ; h N h 1 2 2 SSt = N. j=1 (rj − r) ; SSe = N (h−1) . i=1 j=1 (rij − r) .
SSt . Since h and N are large (h > 4 The statistic test is given by: Q = SS e and N > 15), the chi-square distribution is used to approximate the Friedman statistic test. In this case the p−value is given by P (χ2h−1 ≥ Q with critical value α = 0.05 (the 95th percentile). The results of mean ranks presented in Table 1 confirm the conclusions which we draw from observing the average values that heuristic M5 is the best choice among the 8 sets of parameters regarding the solution quality and the sixth best choice regarding the computational time. The Friedman’s test is run in SPSS version 11. Since p − value = 0.018 < 0.05 = α for the objective function value and 0.001 < 0.05 for the CPU time, we reject the null hypothesis. So, appropriate post-hoc multiple comparisons tests would be performed to find out the best performance heuristic. The BonferroniDunn test is used to compare a control heuristic M5 with all the other heuristic. The performance of two heuristics is significantly different if the corresponding average ranks differ by at least the critical difference (CD):
CD = qα . h(h+1) 6N Where critical values qα at the probability level α is given in the statistical table of [20]. With h = 8, we have q0.05 = 2.690 and q0.10 = 2.450, thus CD0.05 = 1.7 and CD0.10 = 1.55. According to the result of difference from M5 rank in Table 1, we can see that M5 is significantly better than M2, M3, M7 at both probability levels. Figure 4 illustrates these differences. To conclude, the set of parameters used (M5), identical for all instances, is given in Table 2. These values of parameters correspond to the name of this paper: MS-ELS.
Table 2. Parameters used for MS-ELS Parameter Value
np 100
ni ∗ nc 50
a 0.2
b 0.2
SizeOf T abuList 8
98
V.-P. Nguyen, C. Prins, and C. Prodhon
Fig. 4. Average ranks of solution quality with Critical difference
The MS-ELS is tested on three sets of benchmarks for two problems: LRP-2E and LRP-1E. These results are compared to the two methods GRASP x Learning Process (LP) [11] and GRASP x Path Relinking (PR) [12] on LRP-2E instances, and to the four methods GRASPxELS [7], GRASPxPR [14], MAPM [15] and LRGTS [16] on LRP-1E instances. Because this metaheuristic is a random search algorithm, each instance is solved five times and the results is the best found solution over the runs. The CPU time corresponds to the average value of 5 runs. 4.2
Results on the LRP-2E
The first test is performed on 24 instances grouped in four subsets with capacitated routes and satellites proposed by Nguyen et al [11]. Its main features are: number of customers n in 20,50,100,200, number of satellites m in 5,10, first-level vehicle capacity k1 =750, second-level vehicle capacity k2 =100. Table 3 expounds in details the results obtained and a comparison with two methods developed by the authors. This table has several columns in common: Instance, BKS, Cost, Gap and CPU respectively denote the file name, the best-known cost found, the solution cost, the deviation in %, the running time in seconds. The deviation of a method A over a BKS is calculated by (A − BKS)/BKS × 100. Cost in boldface indicates which method gives the best value. It shows that on average, MS-ELS saves 1.81% in comparison with GRASP x LP [11], and 0.40% with GRASP x PR [12]. Compared to the results presented by these methods, this method finds BKS on 18/24 instances. The second test is realized on 30 instances derived from Prodhon’s instances for LRP-1E [17] by adding one main depot and one fleet of 1st level vehicles. Details of results are given in Table 4 which uses the same format as the one in Table 3. Our approach allows to improve 24/30 instances. The average percentage
MS-ELS for LRP-2E
99
Table 3. Results for the LRP-2E on Nguyen’s instances Instance
BKS
25-5N 80370 25-5Nb 64562 25-5MN 79674 25-5MNb 64438 50-5N 138646 50-5Nb 111608 50-5MN 123920 50-5MNb 105401 50-10N 116132 50-10Nb 87315 50-10MN 135519 50-10MNb 110613 100-5N 196999 100-5Nb 159714 100-5MN 207141 100-5MNb 166335 100-10N 215792 100-10Nb 157682 100-10MN 207795 100-10MNb 170706 200-10N 357286 200-10Nb 264241 200-10MN 337748 200-10MNb 292632 Avg Gap (%) Avg CPU (s)
GRASPxLP Cost Gap CPU 81152 0.97 0.90 64572 0.02 0.80 80651 1.23 0.90 64438 0.00 0.80 145942 5.26 2.40 113234 1.46 2.30 126313 1.93 2.20 106033 0.60 2.30 116709 0.50 4.50 90559 3.72 6.40 137321 1.33 5.40 110703 0.08 6.70 200974 2.02 5.90 160488 0.48 5.30 210381 1.56 5.30 170513 2.51 6.10 229246 6.23 20.70 163616 3.76 20.30 210496 1.30 17.90 172276 0.92 21.00 361971 1.31 29.80 267733 1.32 52.30 348866 3.29 34.40 302500 3.37 59.60 1.88 13.10
GRASPxPR Cost Gap CPU 80370 0.00 2.20 64562 0.00 1.78 79674 0.00 1.56 64438 0.00 6.80 143328 3.38 3.91 112764 1.04 3.56 123920 0.00 3.13 105846 0.42 3.91 116132 0.00 7.07 87315 0.00 10.01 136337 0.60 9.45 110613 0.00 10.54 196999 0.00 8.02 159714 0.00 8.53 207141 0.00 8.39 167466 0.68 9.13 215792 0.00 32.4 160322 1.67 29.47 209478 0.81 26.34 171872 0.68 38.51 357286 0.00 35.90 264241 0.00 77.63 337748 0.00 48.50 298556 2.02 85.49 0.47 19.70
MS-ELS Cost Gap CPU 80370 0.00 2.34 64562 0.00 1.42 79674 0.00 2.14 64438 0.00 1.27 138646 0.00 7.73 111608 0.00 6.02 124309 0.31 7.39 105401 0.00 9.63 116132 0.00 26.52 87315 0.00 23.72 135519 0.00 30.39 110613 0.00 35.67 196999 0.00 15.13 160399 0.43 14.98 207141 0.00 13.94 166335 0.00 24.09 216620 0.38 235.70 157682 0.00 130.05 207795 0.00 149.02 170706 0.00 208.47 357342 0.02 361.33 265570 0.50 231.66 337954 0.06 456.97 292632 0.00 638.52 0.07 109.80
of improvement over the solution obtained is respectively 1.34%, 0.56% in comparison with GRASPxLP [11], GRASPxPR [12]. The results evaluated show that the MS-ELS clearly outperforms the two previously published methods of LRP-2E. However, the hybrid MS-ELS requires more CPU time. For instance, its CPU time for the first set is 109.8s in average while the GRASP needs only 13.1s and the GRASPxPR [12] needs 19.7s. 4.3
Results on the LRP-1E
This test is performed on the 30 instances of LRP-1E proposed by Prodhon et al [17]. The results are compared to ones of four efficient methods of LRP-1E. The MS-ELS can find the best-known solutions on 10/30 instances with an acceptable CPU time (approximately 1 minute). Solution costs are on average 0.60% larger than the BKS found by the all published methods. Table 5 summarizes a comparison of results obtained with other methods. A deviation of MS-ELS to BKR is always smaller than of the GRASPxPR [14], better than MAPM [15] on
100
V.-P. Nguyen, C. Prins, and C. Prodhon Table 4. Results for the LRP-2E on Prodhon’s instances
Instance
BKS
20-05-1 89075 20-5-1b 61863 20-5-2. 85290 20-5-2b 60838 50-5-1. 134855 50-5-1b 101780 50-5-2. 132364 50-5-2b. 110658 50-5-2BIS. 122654 50-5-2bBIS 105776 50-5-3. 128379 50-5-3b 104006 100-5-1 320455 100-5-1b 259263 100-5-2 235277 100-5-2b 196228 100-5-3 247811 100-5-3b 195254 100-10-1 363303 100-10-1b 312188 100-10-2 307061 100-10-2b 264594 100-10-3 315226 100-10-3b 266657 200-10-1 557698 200-10-1b 452286 200-10-2 502333 200-10-2b 426493 200-10-3 534108 200-10-3b 419215 Avg Gap (%) Avg CPU (s)
GRASPxLP Cost Gap CPU 92633 3.99 0.60 63094 1.99 0.60 86212 1.08 0.40 60838 0.00 0.40 136137 0.95 2.20 109173 7.26 1.90 136785 3.34 2.10 111440 0.71 2.10 124870 1.81 3.00 108718 2.78 2.60 129225 0.66 3.10 104057 0.05 2.40 324823 1.36 5.90 261529 0.87 5.40 236937 0.71 4.60 197035 0.41 4.30 250398 1.04 4.40 197279 1.04 4.80 370603 2.01 10.40 314277 0.67 10.20 310929 1.26 9.30 264984 0.15 12.90 319806 1.45 9.20 268413 0.66 11.00 570210 2.24 26.50 454181 0.42 20.6 508450 1.22 22.40 429075 0.61 21.90 541754 1.43 26.00 421585 0.57 18.30 1.42 8.30
GRASPxPR Cost Gap CPU 91062 2.23 1.20 64090 3.60 1.66 86118 0.97 0.63 60838 0.00 1.09 135549 0.51 3.48 102286 0.50 3.84 132364 0.00 3.03 112810 1.94 3.32 124375 1.40 5.05 105776 0.00 6.62 128903 0.41 4.50 104006 0.00 3.79 321870 0.44 7.48 259791 0.20 8.69 235277 0.00 6.48 196228 0.00 6.41 248893 0.44 6.18 195254 0.00 8.75 364988 0.46 17.14 313072 0.28 18.14 309621 0.83 13.71 266393 0.68 17.23 318209 0.95 16.10 267643 0.37 15.95 561103 0.61 39.71 453286 0.22 47.12 506345 0.80 41.91 427147 0.15 37.38 538821 0.88 43.20 419984 0.18 35.21 0.64 14.2
MS-ELS Cost Gap CPU 89075 0.00 1.10 61863 0.00 0.89 85290 0.00 1.06 60838 0.00 0.56 134855 0.00 5.78 101780 0.00 6.78 132377 0.01 5.56 110658 0.00 7.83 122654 0.00 13.22 107564 1.69 12.11 128379 0.00 9.47 104006 0.00 8.95 320455 0.00 20.63 259263 0.00 13.52 235582 0.13 12.49 196679 0.23 10.25 247811 0.00 31.38 195640 0.20 39.23 363303 0.00 162.22 312188 0.00 156.70 307061 0.00 209.52 264594 0.00 219.08 315226 0.00 253.47 266657 0.00 280.97 557698 0.00 819.14 452286 0.00 529.55 502333 0.00 689.66 426493 0.00 432.44 534108 0.00 374.31 419215 0.00 389.39 0.08 157.20
Table 5. Comparison of results on the LRP-1E Method
GRASPxPR MAPA GRASPxELS LRGTS MS-ELS [14] [15] [7] [16] [this paper] Gap BKS 3.23 1.02 0.70 0.38 0.60 CPU Time (s) 96.5a 76.7a 258.2b 17.5a 82.3 a : the CPU time was carried out on a 2.4 GHz PC with 512 MB of RAM b : the CPU time was carried out on a quadcore 2.83 GHz with 8 GB of RAM
MS-ELS for LRP-2E
101
average and a few better than GRASPxELS [7] in a less CPU time. Note that the CPU time of GRASPxELS [7] is one required to reach the best solution within the corresponding run. These results also confirm that the MS-ELS competes with LRGTS [16] - the best meta-heuristic published for the single-echelon LRP.
5
Conclusion
In this paper, we present a new metaheuristic to solve the two-echelon locationrouting problem (LRP-2E) with both capacitated satellite depots and vehicles. The MS-ELS is a hybrid of GRASP and ELS/ILS, using Tabu List. The GRASP uses three constructive heuristics to generate the initial solutions. Starting from a solution of GRASP, the intensification strategy is carried out by a dynamic alternation between ELS and ILS. This method is tested on three set of instances with up to 200 customers for two problems: LRP-2E (main problem) and LRP-1E (comparable problem). The results evaluated show that our metaheuristic clearly outperforms all previously published methods on LRP-2E instances. Furthermore, it is competitive with the best meta-heuristic published for the single-echelon LRP. Future research directions include the derivation of a lower bound to better evaluate the quality of solutions found with heuristics approaches and the development of metaheuristics hybridized with exact method. One can also extend the research toward inventory management, in which the level of products to deliver over the horizon is optimized at the same time as the location of the depots and the routing of the vehicles. Acknowledgments. This research is supported by the Champagne-Ardenne Regional Council, France.
References 1. Crainic, T.G., Ricciardi, N., Storchi, G.: Advanced freight transportation systems for congested urban. Transportation Research Part C (12), 119–137 (2004) 2. Crainic, T.G., Ricciardi, N., Storchi, G.: Models for evaluating and planning city logistic transportation systems. Technical Report, CIRRELT-2007-65, CIRRELT, Montreal, Canada (2007) 3. Crainic, T.G., Mancini, S., Perboli, G., Tadei, R.: Heuristics for the two-echelon capacitated vehicle routing problem. Technical report, Universit´e de Montreal, Montreal, Canada (2008) 4. Crainic, T.G., Mancini, S., Perboli, G., Tadei, R.: Lower bounds for the two-echelon capacitated vehicle routing problem. In: EU/Meeting, France (2008) 5. Crainic, T.G., Mancini, S., Perboli, G., Tadei, R.: Two-Echelon Vehicle Routing Problem: A satellite Location Analysis. Technical Report, CIRRELT-2009-15, CIRRELT, Montreal, Canada (2009) 6. Crevier, B., Cordeau, J.-F., Laporte, G.: The multi-depot vehicle routing problem with inter-depot routes. European Journal of Operational Research 176(2), 756– 773 (2007)
102
V.-P. Nguyen, C. Prins, and C. Prodhon
7. Duhamel, C., Lacomme, P., Prins, C., Prodhon, C.: A GRASPxELS approach for the capacitated location-routing problem. Computer & Operations Research (2009) 8. Feliu, J.G., Perboli, G., Tadei, R., Vigo, D.: The two-echelon capacitated vehicle routing problem. Technical Report OR/02/08, Politecnico di Torino (2008) 9. Gendron, B., Semet, F.: Formulations and Relaxations of a Multi-Echelon Capacitated Location-Distribution Probl´eme. Computers & Operations Research 36, 1335–1355 (2009) 10. Jacobsen, S.K., Madsen, O.B.G.: A comparative study of heuristics for a two-level routing-location probl´eme. European Journal of Operational Research 5, 378–387 (1980) 11. Nguyen, V.P., Prins, C., Prodhon, C.: GRASP with learning process for a twoechelon location routing problem. In: 8th MOSIM (2010) 12. Nguyen, V.P., Prins, C., Prodhon, C.: A hybrid GRASP x Path Relinking for the Two-Echelon Location Routing. In: EURO 2010, Lisbon, Portugal (2010) 13. Prins, C.: A simple and effective evolutionary algorithm for the vehicle routing problem. Computers & Operations Research 31, 1985–2002 (2004) 14. Prins, C., Prodhon, C., Wolfler-Calvo, R.: Solving the Capacitated LocationRouting Problem by a GRASP complemented by a Learning Process and a Path Relinking. 4OR - A Quarterly Journal of Operations Research 4(3), 221–238 (2006) 15. Prins, C., Prodhon, C., Wolfler-Calvo, R.: A Memetic Algorithm with Population Management (MAPM) for the Capacitated Location-Routing Problem. In: Gottlieb, J., Raidl, G.R. (eds.) EvoCOP 2006. LNCS, vol. 3906, pp. 183–194. Springer, Heidelberg (2006) 16. Prins, C., Prodhon, C., Soriano, P., Ruiz, A., Wolfler-Calvo, R.: Solving the Capacitated Location Routing Problem by a Cooperative Lagrangean RelaxationGranular Tabu Search Heuristic. Transportation Science 41(4), 470–483 (2007) 17. Prodhon, C.: Le Problme de Localisation-Routage. Th`ese de Doctorat, Universit de Technologie de Troyes, France (2006) 18. Scheuerer, S.: A tabu search heuristic for the truck and trailer routing problem. Computers & Operations Research 33, 894–909 (2006) 19. Semet, F., Taillard, E.: Solving real-life vehicle routing problems efficiently using tabu search. Annals of Operations Research 41, 469–488 (1993) 20. Sheskin, J.: Handbook of parametric and nonparametric statistical procedures. Chapman&Hall/CRC, Boca Raton (2000) 21. Taniguchi, E., Thompson, R.G.: Modeling City Logistics. Transportation Research Record 1970, 45–51 (2002) 22. Tragantalerngsak, S., Holt, J., Ronnqvist, M.: Lagrangian heuristics for the twoechelon, single-source, capacitated facility location problem. European Journal of Operational Research 102, 611–625 (2007) 23. Villegas, J.G., Prins, C., Prodhon, C., Medaglia, A.L., Velasco, N.: GRASP and multi-start evolutionary local search for the single truck and trailer routing problem with satellite depots. Engineering Applications of Artificial Intelligence (2010)
A Memetic Algorithm for Reconstructing Cross-Cut Shredded Text Documents Christian Schauer1 , Matthias Prandtstetter2 , and G¨ unther R. Raidl1 1
2
Institute of Computer Graphics and Algorithms Vienna University of Technology, Vienna, Austria {schauer,raidl}@ads.tuwien.ac.at Mobility Department—Dynamic Transportation Systems Austrian Institute of Technology, Vienna, Austria
[email protected]
Abstract. The reconstruction of destroyed paper documents became of more interest during the last years. On the one hand it (often) occurs that documents are destroyed by mistake while on the other hand this type of application is relevant in the fields of forensics and archeology, e.g., for evidence or restoring ancient documents. Within this paper, we present a new approach for restoring cross-cut shredded text documents, i.e., documents which were mechanically cut into rectangular shreds of (almost) identical shape. For this purpose we present a genetic algorithm that is extended to a memetic algorithm by embedding a (restricted) variable neighborhood search (VNS). Additionally, the memetic algorithm’s final solution is further improved by an enhanced version of the VNS. Computational experiments suggest that the newly developed algorithms are not only competitive with the so far best known algorithms for the reconstruction of cross-cut shredded documents but clearly outperform them.
1
Introduction
Although many sensitive documents are electronically prepared, transmitted and stored nowadays, it is still common and often necessary to print them—especially due to legal reasons. In many cases these (printed) documents are then stored in archives and after a while they are destroyed by either burning them or by using mechanical machines called shredders which cut them according to security standards either in thin strips or small rectangles. Although this process of destruction is performed for making the documents unreadable, it is in some situations desirable to reconstruct the destroyed documents, e.g., when destruction was performed by mistake or in forensics or archeology. Within this work we focus on the reconstruction of cross-cut shredded text documents (RCCSTD), i.e., of documents which were cut into rectangles of identical shape. In this case it is not possible to gather any helpful information from the snippets’ shapes that can be exploited during the reconstruction process. Hence, solely the information printed on the snippets can be utilized. Because information retrieval is mainly attached to the fields of pattern recognition and M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 103–117, 2010. c Springer-Verlag Berlin Heidelberg 2010
104
C. Schauer, M. Prandtstetter, and G.R. Raidl
image processing, we will not further examine this process. We lay our focus on the reconstruction part using a combinatorial optimization approach based on a simple but for our needs effective pattern recognition function. Nevertheless, through the modularity of our implementation this function can easily be replaced by more sophisticated techniques. Therefore we will present a memetic algorithm (MA) [14] for solving RCCSTD incorporating a variable neighborhood search (VNS) [9] as local improvement procedure. Based on the formal definition in [16] RCCSTD can be expressed as follows: Given is the output of a cross-cut shredding device, i.e., a set S = {1, . . . , n} of rectangular, geometrically identical snippets. All blank shreds, i.e., shreds with no helpful information printed on them, are replaced by a single “virtual” blank shred. Without loss of generality let us assume that this blank shred is shred n. To simplify matters, we further assume that the orientation of all shreds is known, e.g., identified using methods like those presented in [1,13]. Furthermore, we are given an error estimation function c(i, j), for all i, j ∈ S, computing for each pair of shreds an estimated error made when placing shred i left to shred j. Analogously, an error estimation function c(i, j) estimating the error when placing shred i on top of shred j is given. In our case, these error estimation functions solely rely on the pixel information along the touching edges of the shreds and compare them by measuring the differences in the concrete gray values. A detailed definition of c(i, j) and c(i, j) can be found in [16]. A solution to RCCSTD is an injection Π : S\{n} → D2 of shreds to positions p = (x, y) in the two-dimensional (Euclidean) space, with x, y ∈ D = {1, . . . , n − 1}. To all positions p ∈ D2 not met by Π, we implicitly assume the blank shred n to be assigned. For such a solution a total error estimate is calculated as the sum of the errors imposed by all realized neighborhood relations of the shreds, including neighborhoods with the blank shred. Although at a first glance this representation might look rather unhandy, it turns out to be very useful, in particular since well matching sequences of shreds need not to be wrapped at the end of a row or column. Using efficient data structures and algorithms, the overhead of this solution representation is rather small (if not negligible). In situations where the exact dimensions of the original document(s) are known, the solution space can, of course, be defined smaller. The remainder of the paper is organized as follows: In the next section a short overview on related work is given. In Sec. 3 we present the memetic algorithm with local improvement based on variable neighborhood search. Section 4 describes detailed experimental results comparing the proposed approaches with the best previously published method. Finally conclusions including an outlook on future research on this topic complete this article.
2
Related and Previous Work
The field of document reconstruction can be classified into various subdomains including among others the reconstruction of strip shredded (text) documents [21,22], the restoration of hand torn paper documents [6,11] and the
A Memetic Algorithm for RCCSTD
105
reconstruction of cross-cut shredded (text) documents (RCCSTD) [15,16,20]. Also, there is the large (sub-)field of restoration and reconstruction of historical fragmented documents and clay jugs as found in archeology, cf. [12]. Another related topic is the (computer aided) solving of jigsaw puzzles [4,8]. Although these problems are similar on a first glance, they significantly differ in the details. For example, the pieces of a high quality jigsaw puzzle fit (almost) perfectly and uniquely into each other which obviously makes the result singular. Hand torn paper documents, on the other hand, might consist of snippets with unique shapes but due to frayed edges provoked by physical characteristics of paper, it is likely that two originally connected snippets will not perfectly fit together anymore. Finally, snippets produced during mechanically destroying multiple sheets of paper are in many cases shaped almost identical such that methods not only relying on the outer form of the pieces must be developed for correctly matching them. Ukovich et al. [22], for instance, used MPEG-7 descriptors in the context of strip shredded documents. They extended their list of extracted features with characteristics especially related to text documents like line spacing or text color in [21]. In [16] Prandtstetter formulated this problem as a combinatorial optimization problem and showed that the reconstruction of strip shredded documents is N P-complete. Since this problem represents a special case of RCCSTD, it can be concluded that RCCSTD is N P-hard, too. Other approaches published so far can be used as a preprocessing step for narrowing the search space; e.g., in [23] Ukovich et al. published a clustering algorithm to identify sets of strips most likely originating from the same input page. Since no relative order of the strips is produced an approach like the one published in [17] can be applied to gather the original document.
3
A Hybrid Approach for the Reconstruction of Cross-Cut Shredded (Text) Documents
For many real-world as well as academic optimization problems best results are frequently obtained by hybrid approaches, which combine different optimization strategies in order to exploit individual properties and benefit from synergy. Nowadays, a large variety of such hybridization techniques is known, from very simple, straight-forward methods to highly sophisticated and complex ones. General overviews on hybrid metaheuristics can, e.g., be found in [3,19]. Here, we consider a memetic algorithm (MA) [14] which can be seen as a combination of a genetic algorithm (GA) [10] and a local improvement procedure. While the GA emphasizes diversification of the heuristic search, local improvement is supposed to “fine-tune” solutions, i.e., to focus on intensification. In our case, we realize the local improvement with a variable neighborhood search (VNS) [9] strategy. In addition to the intertwined execution of VNS as a subordinate of the MA, an extended version of the VNS is finally applied to the best solution obtained from the MA.
106
C. Schauer, M. Prandtstetter, and G.R. Raidl
Algorithm 1: Memetic Algorithm for RCCSTD begin t ← 0; Initialize the population P (t); repeat // start the reproduction cycle t ← t + 1; Select(P (t − 1)); // choose from the parents Recombine(P (t)); // generate & evaluate the descendants Mutate(P (t)); // mutate descendants Create new population P (t); // new population from descendants ImproveSolutions(P (t)); // improve some individuals until allowed generations reached; ImproveFinalSolution(P (t)); // improve best individual return best individual; end
The memetic algorithm’s general framework is shown in Algorithm 1. In the following, we discuss its individual parts in detail. 3.1
Initial Population
For creating initial solutions we use two construction heuristics—namely the row building heuristic and the Prim based heuristic—originally introduced in [16], whereas 50% of the individuals of the first population were created using RBH and the other 50% by using PBH: Row Building Heuristic (RBH): In general, text documents are laid out such that there is a blank margin on the left and the right of each page. Furthermore, it can be observed that usually shredded documents will not be exactly cut along the text line beginning, i.e., there will still be shreds with blank left or right margins. Obviously, it is very likely that these shreds should be placed in any final solution to the left and right edges of the reconstructed document page(s). Therefore, the row building heuristic starts to build rows by first randomly choosing a shred with a blank left margin. Subsequently, a best fitting shred—with respect to the error estimation function—is placed to the right of the already processed snippets. This process is repeated until a shred is added containing a blank right margin. Following the same procedure, a new line is started. If no more shreds with blank left margins are available, some other not yet processed shred is randomly chosen for starting the next row. This process continues until all shreds are placed. Prim-Based Heuristic (PBH): Based on the same idea as the well-known algorithm of Prim [18] for determining minimum spanning trees, our Prim-based heuristic (PBH) starts with a randomly chosen shred. It then expands the partial solution iteratively by always adding the currently best matching shred to the according position, i.e., the solution grows from the initial shred in general in all directions. Again, the process is iterated until all shreds are placed.
A Memetic Algorithm for RCCSTD
107
(a)
(b)
Fig. 1. Schematic representations of (a) the horizontal block crossover and (b) the horizontal flop mutation
3.2
Recombination
Three special recombination operators, called horizontal block crossover, vertical block crossover, and biased uniform crossover are used in our MA. They are essentially two-dimensional extensions of standard crossover operators for strings. Horizontal Block Crossover (HBX): This operator follows the idea of the one-point crossover introduced by Holland [5]. While in the latter a splitting point is randomly chosen, a splitting line needs to be computed in our twodimensional case. To create one offspring all shreds on top of this line are taken from the first parent while all shreds below are adopted from the second parent, see Fig. 1a. A second descendant can be correspondingly obtained by taking the shreds on top of the splitting line from the second parent and the shreds below the line from the first parent. The position of the splitting line itself is randomly chosen based on a binomial distribution in the range [1, r] with r indicating the minimum number of rows of the two parents. Unfortunately, it might happen that after performing HBX shreds appear twice or not at all. To avoid the former case, all shreds already contained in the newly generated solution when adding the shreds below the splitting line are skipped. Those shreds missing at all are inserted into the offspring by using a best fit strategy that places them either at empty positions (of previously skipped shreds) or to the end of the rows, see black shreds in Fig. 1a. Vertical Block Crossover (VBX): This operator forms the vertical equivalent to HBX, i.e., analogously to HBX, VBX randomly chooses a vertical splitting line and places all shreds left of this line according to the first parent and right of that line according to the second parent. A second offspring is derived correspondingly by switching the parents. Of course, it is again important to make sure that in the end each shred occurs exactly once.
108
C. Schauer, M. Prandtstetter, and G.R. Raidl
Biased Uniform Crossover (BUX): This operator is as indicated by the name related to the standard uniform crossover on strings. Essentially analogously to it, for each position of the offspring either the shred of the first parent or the shred of the second parent is selected. BUX contains, however, some modifications to standard uniform crossover which became necessary primarily due to the uniqueness of the shreds and the two-dimensional problem representation. Two offspring are again generated, and they inherit their shapes with respect to the positions where non-empty shreds are placed from the two parental solutions, respectively. Iteratively considering all the non-empty positions of the shape-defining parent, shreds are either adopted from the first or second parent. In contrast to standard uniform crossover, however, this decision is not made purely at random but using a best fit strategy, i.e., the shred is selected that fits better to the current position (with respect to the already placed shreds and the error estimation function). Furthermore, if one of the two candidate shreds is the virtual blank shred or has already been assigned to another position, then the other shred is chosen if not yet placed. If, both shreds have already been processed (or are blank), then a shifting in the assignment of shreds is performed, i.e., the shreds of the next position from the parents are considered for placing them at the offspring’s current position. This procedure is iterated until all positions of the first parent are processed (or no more shreds to be assigned are left). In the end, there might be some shreds which have not been assigned to the offspring. These missing shreds are finally placed in random order to the respectively best fitting positions (independent of the parental shape). 3.3
Mutation
In general mutation acts as diversification and innovation operator such that the algorithm does not converge too fast and new or lost genetic material is (re-)introduced. In our case, mutation also performs as regulator such that (negative) side-effects of the recombination operations can be compensated. Our MA includes the following four mutation operators: Horizontal Flop (HFM): This operator is the mutating equivalent of HBX, i.e., the individual is horizontally split into two parts along a splitting line, which is randomly chosen based on a binomial distribution. The lower and upper parts of the parent are then swapped with each other, see Fig. 1b. Thus all left-right and top-bottom relations are retained except the relations along the splitting line. Vertical Flop (VFM): This mutation complements HFM analogously to VBX, i.e., a vertical splitting line is chosen and the emerging left and right parts of the individuals are swapped. Since the lines of a solution in general do not share the same length, the left side of the descendant is filled with placeholders, i.e., blank shreds. Otherwise the new right half would be
A Memetic Algorithm for RCCSTD
109
shifted to the end of each line and thus the top-bottom relations could not be conserved. Break Line (BLM): This operator was designed because first tests showed that especially HBX and VBX create individuals whose lines become longer and longer over time. This effect is certainly evoked due to the best fit heuristic utilized that often adds remaining shreds to the end of lines. The idea is now to find the longest line of the parent individual and randomly, again using a binomial distribution, choose a point where this line is split. While the left part of the line remains where it is, the right part is added to the bottom of the document page. Swap Two (S2M): Finally, S2M is the most simple but also most flexible mutation operator. The basic idea is to randomly swap two shreds. This operation is repeated up to ten times depending on a randomly chosen value. 3.4
Selection and Generation Replacement
The error estimation functions c(i, j) and c(i, j) from [16] perform well for our purpose as a fitness function but cannot garantee that the error induced by the original document is the minimal error, i.e., there might exist a shred assigment with an overall error smaller than the error of the correctly reconstructed document. These “better” solutions are represented by a negative value in Tab. 1. At this point it should also be mentioned that individuals are seen as fitter than others if the estimated total error of the corresponding solution is smaller. Because of this problem a fitness proportional selection depending on these error estimation functions does not seem adequate. Therefore in preliminary experiments the following selection and generation replacement scheme, which is somehow related to the (μ + λ) model of evolution strategies [2], turned out to be superior to a classical fitness-proportional scheme: A new generation is built by first copying the 10% best individuals (elitists) of the previous population. The remaining 90% are filled with newly created individuals, which are derived by recombining uniformly selected parents and performing mutation. Because of the crossover operators’ computational complexity only as many descendants are created as necessary to fill the next population. From the two offspring each call of HBX or VBX yields, only the better one is kept. 3.5
Local Improvement by Variable Neighborhood Search
The MA includes a VNS as embedded procedure for improving candidate solutions and in particular also the final solution. More precisely, this VNS is a socalled general VNS, which itself further includes a variable neighborhood descent (VND) procedure, i.e., a systematic local search utilizing multiple neighborhood structures [9]. The following paragraphs detail the VND/VNS framework and their application within the MA.
110
C. Schauer, M. Prandtstetter, and G.R. Raidl
Variable Neighborhood Descent (VND) Based on the concept of local search, VND tries to systematically examine predefined neighborhood structures Nl , with 1 ≤ l ≤ lmax , to transform a given initial solution into one that is a local optimum w.r.t. all these neighborhood structures. Usually, the neighborhoods are ordered such that the smaller ones are searched first and the larger ones are only examined if no further improvements in the smaller ones can be achieved. For this work we adopted the moves and neighborhood structures originally presented in [15]: SwapMove(i, j) swaps two shreds i and j, with i, j ∈ S. ShiftMove(p, w, h, d, a) moves a rectangular region of snippets, whereas parameter p = (x, y) ∈ D2 indicates the top left shred of this rectangle, the length and width of the rectangle are given by w ≥ 1 and h ≥ 1, parameter a ≥ 1 indicates the amount of shreds the rectangle should be shifted, and d specifies the direction, i.e., horizontally (left or right) or vertically (up or down). Previously adjacent shreds are suitably shifted. Based on these two move types the following neighborhoods are defined: N1 All solutions reachable by a single swap move. N2 All solutions reachable by a single shift move of one single shred in either x or y direction. N3 All solutions obtained by applying a single shift move with either parameter w or parameter h set to one, while the other parameters can be chosen freely. N4 As neighborhood N3 but all parameters can be freely chosen. N5 All solutions reachable by two consecutive shift moves applied to a single shred, whereas the first shift move moves the shred along the x-axis and the second one along the y-axis. N6 Analogously to N5 this neighborhood contains all solutions reachable by two consecutive shift moves (first along x-axis, second along y-axis), but instead of displacing a single shred a larger rectangle of either width one or height one is considered. N7 This neighborhood is the most general one, induced by two consecutive shift moves (first along x-axis, second along y-axis) of an arbitrarily sized rectangle, i.e., p, w, h and a are chosen freely. Obviously, an implicit order of the neighborhoods is given since Ni contains Ni−1 for i = 3, 4, 6, 7, i.e., the number of candidate solutions within Ni (Π) will in general be larger than the number of candidates in Ni−1 (Π). To achieve a reasonable runtime of this VND, an efficient implementation is crucial. Therefore, an incremental update function for estimating the error is utilized. In addition, we assume that at least one position p ∈ D2 is affected by each move since the shifting/swapping of empty shreds has either a negative effect on the error made or none at all. Finally, we use a next improvement strategy to further reduce the overall running time.
A Memetic Algorithm for RCCSTD
111
Variable Neighborhood Search (VNS) The VND described in the last paragraphs in general only yields solutions that are locally optimal with respect to the considered neighborhood structures. To further enlarge the improvement potential, VND is embedded in a variable neighborhood search (VNS) that performs shaking on the basis of additional larger neighborhood structures. These additional neighborhood structures are defined by a series of shift moves of single shreds, where in VNS neighborhood structure Ni , with 1 ≤ i ≤ 5, i2 randomly chosen shift moves are applied. Embedding of the VNS in the MA In the MA’s inner local improvement phase, only a reduced variant of the above described VNS is applied due to runtime reasons. This reduced variant only considers the three smallest neighborhood structures, i.e., N1 , N2 and N3 within the VND. Furthermore, this local improvement is only executed every 5000 generations and only to the best 10% of the individuals of the current population. The best solution of the MA’s last generation is finally improved in a more aggressive way by applying the full VNS, i.e., utilizing also the more complex neighborhood structures N4 to N7 within the VND.
4
Experimental Results
Within this section computational results are presented including a description of the experimental setups and the used benchmark instances. 4.1
Test Instances
As benchmark instances we used the same as in [15]. These instances were generated by virtually cutting five text document pages using nine different cutting patterns ranging from 9 × 9 to 15 × 15 shreds. Moreover, all pages were scanned with a resolution of 1240 × 1755. According to our definition of RCCSTD, all blank shreds are replaced by the single virtual shred. The instances p01 and p02 can be seen in Fig. 2, while a visual representation of the complete set can be found in [16]. 4.2
Experimental Setups
For each of the test series, the population size was set to 300 individuals and the number of generations was 30000. Based on preliminary tests we selected the following combinations of crossover operators and mutation operators to be examined in detail: HBX+VBX. It turned out that HBX and VBX perfectly complement each other such that this test setting applies to 50% of all pairs of parents HBX and to the other 50% VBX, whereas 270 pairs of parents are randomly selected in
112
C. Schauer, M. Prandtstetter, and G.R. Raidl
(a)
(b)
Fig. 2. (a) instance p01 and (b) instance p02
each generation. For each crossover operator only the better of the two obtained descendants is used, while the other is discarded. This results in 270 newly created descendants while the remaining 30 individuals are the adopted elite of the previous generation. To 25% of all individuals mutation was applied whereas the concrete probabilities for choosing each mutation operator are the following: 5% HFM, 5% VFM, 10% BLM and 5% S2M. BUX. With this configuration the biased uniform crossover is tested. Since no other crossover operator is used in this setup both descendants of the operator were used for the next population. Again, 25% of the newly created individuals are mutated, but here the individual probabilities are 5% HFM, 15% VFM and 5% S2M. For both basic setups we wanted to investigate in particular the influence of the local search phase(s), i.e., a pure genetic algorithm, a memetic algorithm, and the memetic algorithm followed by a more sophisticated VNS are compared. This leads in total to six different settings. 4.3
Test Results
Table 1 shows the results of the six tested configurations together with the so far best results obtained by the ACO from [15]. As a local improvement this ACO incorporates the same VND as described above using the first three neighborhood structures, N1 , N2 , N3 , as the MA does in its inner local improvement phase. During the ACO this local improvement is applied to each solution every
A Memetic Algorithm for RCCSTD
113
x y/ orig
gap/dev [%]/ [%]
gap/ dev [%]/ [%]
gap/dev [%]/ [%]
instance p01
9 9/2094 9 12/3142 9 15/3223 12 9/2907 12 12/3695 12 15/3825 15 9/2931 15 12/3732 15 15/3870
3,7/ 7,2 30,4/ 4,2 33,9/ 3,9 32,1/ 5,2 31,3/ 3,7 36,0/ 2,8 39,2/ 5,2 34,5/ 2,3 39,2/ 2,8
0,0/ 39,3/ 45,8/ 44,1/ 43,7/ 54,8/ 39,6/ 48,1/ 52,4/
0,0 6,9 8,5 8,8 6,5 6,1 6,4 5,6 7,1
0,0/ 0,0 12,2/ 4,4 9,8/ 5,4 13,2/ 4,7 8,9/ 2,5 11,8/ 1,9 10,2/ 6,5 12,7/ 3,4 15,6/ 2,2
instance p02
9 9/1434 9 12/1060 9 15/1978 12 9/1396 12 12/1083 12 15/1904 15 9/1658 15 12/1503 15 15/2283
-3,8/ 5,1 23,6/ 5,5 7,9/ 2,8 6,4/ 4,8 31,6/ 5,7 12,4/ 3,4 10,7/ 4,4 17,5/ 4,8 11,9/ 2,4
0,3/11,6 63,3/21,9 29,0/10,5 -1,6/11,6 34,4/13,3 14,5/11,4 12,7/ 7,5 21,5/ 8,0 13,0/ 7,7
-28,4/ 1,6 2,9/ 1,8 -8,4/ 1,0 -26,8/ 2,4 1,5/ 2,7 -9,7/ 1,7 -11,6/ 2,3 1,9/ 2,2 -5,0/ 1,7
instance p03
9 9/2486 9 12/2651 9 15/2551 12 9/3075 12 12/3377 12 15/3313 15 9/3213 15 12/3278 15 15/3308
10,0/ 5,6 35,0/ 3,6 23,0/ 3,9 15,4/ 3,0 26,2/ 3,2 18,1/ 2,0 19,4/ 3,0 41,6/ 3,8 26,4/ 2,8
4,8/ 32,2/ 26,6/ 18,7/ 33,5/ 26,9/ 27,9/ 51,7/ 44,8/
instance p04
9 9/1104 9 12/1463 9 15/1589 12 9/1515 12 12/2051 12 15/2146 15 9/1567 15 12/1752 15 15/2026
22,9/ 7,8 11,6/ 4,7 -0,3/ 4,0 34,7/ 6,3 17,8/ 3,2 4,0/ 2,6 17,8/ 5,5 33,6/ 4,8 2,8/ 2,8
19,6/12,9 15,6/ 8,5 -0,2/ 5,9 38,8/ 9,2 19,8/ 5,3 3,9/ 4,7 26,1/11,3 32,3/ 9,6 10,8/ 6,2
9 9/ 690 9 12/ 888 9 15/1623 12 9/1016 12 12/1325 12 15/1986 15 9/1010 15 12/1156 15 15/1900
19,0/ 9,1 86,6/ 7,4 43,1/ 4,4 31,0/ 4,2 41,5/ 5,5 39,6/ 3,6 -9,6/ 4,0 57,8/ 8,8 36,3/ 3,6
gap/dev [%]/ [%]
> > > > > > > > >
0,0/ 0,0 11,9/ 4,2 9,1/ 5,7 12,6/ 4,8 8,4/ 2,6 11,4/ 2,0 10,0/ 6,3 12,5/ 3,5 15,2/ 2,3
≈ ≈ ≈ > ≈ ≈ > ≈ >
> > > > > > > > >
-28,6/ 1,6 2,7/ 1,7 -9,0/ 0,9 -27,6/ 2,0 1,3/ 2,6 -10,1/ 1,6 -12,0/ 2,1 1,8/ 2,2 -5,2/ 1,7
BV2
H
HV
gap/ dev [%]/ [%]
gap/ dev [%]/ [%]
pACO/HV2
BV
pBV2 /HV2
B
pACO/BV2
ACO
instance p05
Table 1. The mean percentage gaps of objective values over 30 runs and standard deviations for the tested configurations. For comparison the ACO results from [15] are also presented. The symbols in columns pACO/BV2 , pACO/HV2 , pBV2 /HV2 indicate the statistical significance of differences according to student t-test with an error level of 1%.
HV2 gap/ dev [%]/ [%]
0,0/ 0,0 0,0/ 0,0 > 0,0/ 20,4/ 8,8 9,6/ 5,3 > 9,3/ 25,5/14,0 9,2/ 6,9 > 9,1/ 18,6/12,6 7,6/ 9,1 > 7,6/ 28,2/ 4,0 8,5/ 2,7 > 8,3/ 34,7/ 6,0 10,6/ 2,1 > 10,5/ 1,9/ 5,9 2,0/ 6,4 > 1,9/ 27,1/ 8,6 10,0/ 4,4 > 9,9/ 39,3/ 5,4 11,7/ 3,0 > 11,4/
0,0 5,4 6,7 9,0 2,8 2,2 6,3 4,3 2,9
≈ -24,0/ 4,6 -29,1/ 1,4 > -29,2/ 1,3 > 9,1/ 7,8 0,9/ 1,7 > 0,9/ 1,7 ≈ 1,8/ 5,4 -9,4/ 1,9 > -9,5/ 1,9 > -15,2/ 8,7 -28,9/ 2,3 > -29,2/ 2,1 ≈ 8,9/11,2 0,3/ 2,1 > 0,2/ 1,9 ≈ 1,0/ 7,6 -9,3/ 2,2 > -9,3/ 2,2 > -7,1/ 7,8 -14,3/ 2,9 > -14,3/ 2,9 > 3,7/ 6,0 0,4/ 1,3 > 0,4/ 1,3 ≈ 5,6/ 7,1 -5,1/ 2,5 > -5,2/ 2,5
8,3 -7,6/ 1,7 > -7,6/ 1,7 ≈ 9,1 6,7/ 3,6 > 6,3/ 3,7 ≈ 7,4 2,0/ 2,9 > 1,8/ 2,9 > 3,9 5,8/ 2,4 > 5,6/ 2,4 ≈ 6,0 3,6/ 2,5 > 3,0/ 2,5 ≈ 5,8 2,1/ 2,7 > 1,7/ 2,8 > 6,3 -0,7/ 4,0 > -1,0/ 3,9 ≈ 6,2 10,5/ 4,1 > 10,1/ 4,1 ≈ 5,2 5,8/ 2,4 > 5,4/ 2,4 >
-4,0/ 7,0 13,3/12,3 2,8/ 5,8 11,4/ 4,8 18,9/ 7,4 4,0/ 6,5 11,0/ 7,2 27,4/ 9,1 6,8/ 7,5
5,0 6,5 1,4 2,2 4,4 1,1 3,0 5,2 2,0
> > > > > > > > >
> > > > > > > > >
-15,3/13,7 -3,8/10,2 -17,1/ 6,9 16,2/17,4 13,2/ 6,4 -10,6/ 5,7 11,5/ 9,9 24,9/ 9,9 -3,2/ 5,9
-20,6/11,9 -12,8/ 4,7 -22,2/ 2,9 -3,3/ 5,7 -3,7/ 3,4 -18,9/ 1,5 0,9/ 3,8 6,1/ 4,5 -9,1/ 2,3
> > > > > > > > >
-20,9/11,9 -13,1/ 4,6 -22,3/ 2,9 -3,4/ 5,7 -3,9/ 3,4 -19,0/ 1,6 0,9/ 3,8 6,0/ 4,5 -9,1/ 2,2
0,0/ 0,0 0,0/ 0,0 > 0,0/ 0,0 ≈ 0,0/ 0,0 79,7/19,0 8,0/ 8,8 > 7,0/ 8,4 ≈ 30,3/26,6 57,3/ 7,8 9,9/ 4,8 > 9,0/ 4,7 ≈ 28,6/14,1 15,6/12,3 0,7/ 3,1 > 0,6/ 2,9 ≈ 2,8/ 7,4 50,9/16,7 2,0/ 5,5 > 1,4/ 5,6 > 17,4/18,4 61,9/ 9,6 16,0/ 3,1 > 15,3/ 3,0 > 35,7/12,4 -14,8/ 9,9 -18,8/ 2,1 > -18,8/ 2,1 ≈ -18,8/ 2,1 66,1/19,4 5,4/ 7,3 > 4,8/ 7,4 > 14,9/24,4 73,0/10,7 5,1/ 4,1 > 4,2/ 3,8 > 41,9/ 8,4
0,0/ 0,0 7,8/10,6 7,4/ 4,8 -0,1/ 2,2 -7,5/ 7,4 9,3/ 4,5 -19,3/ 0,5 -6,4/ 8,3 1,7/ 4,3
> > > > > > > > >
0,0/ 0,0 7,6/10,4 7,2/ 4,6 -0,1/ 2,2 -8,1/ 6,2 9,0/ 4,5 -19,3/ 0,5 -6,6/ 8,0 1,0/ 4,0
-27,1/ 2,9 -13,1/ 4,9 -20,7/ 3,4 -8,1/ 6,4 3,2/ 2,7 -11,9/ 2,4 -0,5/ 5,5 8,9/ 3,5 -8,8/ 1,6
-28,0/ 2,7 -13,7/ 5,0 -20,8/ 3,4 -8,3/ 6,3 3,0/ 2,6 -12,4/ 2,4 -1,0/ 5,6 8,5/ 3,4 -8,9/ 1,6
< ≈ ≈ < > > ≈ ≈ ≈
-5,6/ 4,7/ -0,1/ 4,7/ 1,8/ -2,9/ 0,2/ 12,6/ 0,8/
-5,6/ 4,3/ -0,1/ 4,7/ 1,8/ -3,0/ 0,1/ 12,3/ 0,7/
5,0 6,1 1,4 2,2 4,4 1,0 3,0 5,1 2,0
114
C. Schauer, M. Prandtstetter, and G.R. Raidl
iteration. Because in [15] is shown that the ACO clearly outperforms the VNS alone, the results of the MA are only compared to the ACO within this work. The labels of the columns should be interpreted as follows: H, HV, HV2 indicate the three test settings based on the combination of HBX and VBX solely (genetic algorithm), with intertwined VNS (memetic algorithm) and with intertwined VNS and VNS at the end (extended hybrid approach). Analogously, B, BV, BV2 refer to the results obtained by a pure genetic algorithm utilizing BUX, the corresponding memetic algorithm (BV) and the hybrid of the memetic algorithm and the VNS (BV2 ). The column labeled ACO refers to the results obtained by the ACO. For each setting the mean percentage gaps over 30 runs are presented together with the standard deviations (columns gap and dev), whereas the percentage gap indicates the relative gap to the calculated estimated error of the original document (shown in the column labeled with orig). The first two columns list the applied cutting patterns for each instance (shreds along the x-axis and along the y-axis). Finally, the columns labeled pACO/BV2 , pACO/HV2 and pBV2 /HV2 indicate the statistical significance of differences according to student t-test with an error level of 1%: A “<” means that algorithm A is significantly better than algorithm B, where algorithm A is the ACO in case of column pACO/BV2 and pACO/HV2 and BV2 for pBV2 /HV2 . Algorithm B is HV2 for pACO/HV2 and pBV2 /HV2 and BV2 for pACO/BV2 . A “>” indicates that algorithm B is significantly better than algorithm A and a “≈” shows that no significant difference can be observed for that instance. However, the following trend can be extended from the results in Tab. 1: related to the GA alone the settings based on HBX and VBX are far better than the settings based on BUX, whereas the intertwined VNS slightly compensates the positive effects of HBX and VBX. The performance of the MAs is, however, clearly better than the performance of the pure GAs. Furthermore, even for BV2 and HV2 a trend to HV2 can be detected as indicated by column pBV2 /HV2 . As verified by columns pACO/BV2 and pACO/HV2 both settings are clearly better than the so far best known approach. (Even the settings H, HV and BV are better than the ACO based approach—not explicitly shown in the table). All tests were executed with 3GB of RAM on a single core of an Intel Xeon (Nehalem) Quadcore CPU with 2.53 GHz. The computation times for ACO lie between 10 seconds and 800 seconds. The B setup needed between 100 seconds and 400 seconds, while H lies between 200 seconds and 700 seconds. Incorporating the VNS for BV2 the computational times vary between 150 seconds to 4000 seconds and for HV2 from 200 seconds to 2500 seconds. 4.4
Reconstruction Results
In Fig. 3 four reconstruction possibilities of the instances p01 and p02 are shown, whereas the virtual shreds are not printed and thus the number of shreds shown is smaller than the original. All shreds are seperated by gray edges. A light grey edge indicates that along this border the two shreds are positioned correctly, while dark grey symbolizes an incorrect assignment.
A Memetic Algorithm for RCCSTD
(a)
115
(b)
(c)
(d) Fig. 3. (a) and (b) show reconstructions of p01, (c) and (d) of p02
Fig. 3a shows instance p01 with a cutting pattern of 9 × 9 and was reconstructed with a percentage gap of 6.1% due to original. Note that great parts are reconstructed correctly beside the wrong position of two right blocks, which leads to the dark gray line seperating the left and right blocks. Fig. 3b shows another reconstruction of p01 with a percentage gap of 16.3%. Two possible reconstructions of instance p02 are shown in Fig. 3c cut 9 × 9 with a percentage gap of -1% and Fig. 3d cut 12 × 12 with -1.7%. Because of many shreds that contain little information a reconstruction with an overall error smaller than the error indicated by the original document is possible. Therefore great parts of the text passages could be reconstructed, while the correct position of these blocks could not be determined.
116
5
C. Schauer, M. Prandtstetter, and G.R. Raidl
Conclusions and Future Work
In this work we presented a memetic algorithm (MA) to reconstruct cross-cut shredded text documents. This hybrid approach is based on a genetic algorithm (GA) extended with a local search procedure, which is realized in form of a variable neighborhood search (VNS) incorporating a variable neighborhood descent (VND). In addition, we presented a hybrid algorithm combining the MA with a more sophisticated version of the VNS. For the GA/MA three different crossover and four mutation operators were designed and implemented. The MA was then tested on five document pages shredded into nine different cutting patterns each, which leads to 45 different test instances. Based on these test instances we compared the algorithms presented within this paper with each other as well as with the so far best known approach which is based on an ant colony optimization method. The results obtained suggest that the proposed GA/MA mainly based on a two-dimensional version of a one-point crossover clearly outperforms the ACO approach. Even more, the hybrid MA/VNS version, i.e., the subsequently executed VNS, could further improve the results obtained by the pure MA. The results indicate, however, that for relatively small instances it is possible to clearly reconstruct the original documents. Nevertheless, future research in this area is necessary, e.g., it would be of great interest to develop crossover operators respecting the relative positions of shreds to each other. Moreover, other (metaheuristic) approaches should be followed to further improve the obtained results. Finally, some work needs to be done for further developing the error estimation function such that the results become more reliable.
References ´ 1. Avila, B.T., Lins, R.D.: A fast orientation and skew detection algorithm for monochromatic document images. In: DocEng 2005: Proceedings of the 2005 ACM symposium on Document Engineering, pp. 118–126. ACM, New York (2005) 2. B¨ ack, T.: Evolutionary Algorithms in Theory and Practice. Oxford University Press, Oxford (1996) 3. Blum, C., Augilera, M.J.B., Roli, A., Sampels, M. (eds.): Hybrid Metaheuristics – An Emergent Approach for Combinatorial Optimization. Studies in Computational Intelligence, vol. 114. Springer, Heidelberg (2008) 4. Chung, M.G., Fleck, M.M., Forsyth, D.A.: Jigsaw puzzle solver using shape and color. In: Proceedings of the Fourth International Conference on Signal Processing 1998, vol. 2, pp. 877–880 (1998) 5. Davis, L. (ed.): Handbook of genetic algorithms, 1st edn. International Thomson Publishing Services (1996) 6. De Smet, P.: Reconstruction of ripped-up documents using fragment stack analysis procedures. Forensic Science International 176(2), 124–136 (2008) 7. Glover, F.W., Kochenberger, G.A. (eds.): Handbook of Metaheuristics. International Series in Operations Research & Management Science, vol. 57. Kluwer Academic Publishers, New York (2003)
A Memetic Algorithm for RCCSTD
117
8. Goldberg, D., Malon, C., Bern, M.: A global approach to automatic solution of jigsaw puzzles. Computational Geometry 28(2-3), 165–174 (2004) 9. Hansen, P., Mladenovi´c, N.: Variable neighborhood search. In: Glover and Kochenberger [7], pp. 145–184 10. Holland, J.: Adaptation In Natural and Artificial Systems. University of Michigan Press, Ann Arbor (1975) 11. Justino, E., Oliveira, L.S., Freitas, C.: Reconstructing shredded documents through feature matching. Forensic Science International 160(2-3), 140–147 (2006) 12. Kleber, F., Diem, M., Sablatnig, R.: Torn document analysis as a prerequisite for reconstruction. In: Sablatnig, R., et al. (eds.) 15th International Conference on Virtual Systems and Multimedia, pp. 143–148. IEEE, Los Alamitos (2009) 13. Lu, S., Tan, C.L.: Automatic detection of document script and orientation. In: International Conference on Document Analysis and Recognition – ICDAR 2007, vol. 1, pp. 237–241. IEEE Computer Society, Los Alamitos (2007) 14. Moscato, P., Cotta, C.: A gentle introduction to memetic algorithms. In: Glover and Kochenberger [7], pp. 105–144 15. Prandtstetter, M., Raidl, G.R.: Meta-heuristics for reconstructing cross cut shredded text documents. In: Raidl, G.R., et al. (eds.) GECCO 2009: Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, pp. 349–356. ACM Press, New York (2009) 16. Prandtstetter, M.: Hybrid Optimization Methods for Warehouse Logistics and the Reconstruction of Destroyed Paper Documents. Ph.D. thesis, Vienna University of Technology (2009) 17. Prandtstetter, M., Raidl, G.R.: Combining forces to reconstruct strip shredded text documents. In: Blesa, M.J., Blum, C., Cotta, C., Fern´ andez, A.J., Gallardo, J.E., Roli, A., Sampels, M. (eds.) HM 2008. LNCS, vol. 5296, pp. 175–189. Springer, Heidelberg (2008) 18. Prim, R.C.: Shortest connection networks and some generalizations. The Bell System Technical Journal 3, 1389–1401 (1957) 19. Raidl, G.R., Puchinger, J., Blum, C.: Metaheuristic hybrids. In: Gendreau, M., Potvin, J.Y. (eds.) Handbook of Metaheuristics, 2nd edn. Springer, Heidelberg (accepted 2009) (to appear) 20. Schauer, C.: Reconstructing Cross-Cut Shredded Documents by means of Evolutionary Algorithms. Master’s thesis, Vienna University of Technology, Institute of Computer Graphics and Algorithms (2010) 21. Ukovich, A., Ramponi, G.: Features for the reconstruction of shredded notebook paper. In: IEEE International Conference on Image Processing, vol. 3, pp. 93–96 (2005) 22. Ukovich, A., Ramponi, G., Doulaverakis, H., Kompatsiaris, Y., Strintzis, M.: Shredded document reconstruction using MPEG-7 standard descriptors. In: Proceedings of the Fourth IEEE International Symposium on Signal Processing and Information Technology, pp. 334–337 (2004) 23. Ukovich, A., Zacchigna, A., Ramponi, G., Schoier, G.: Using clustering for document reconstruction. In: Dougherty, E.R., et al. (eds.) Image Processing: Algorithms and Systems, Neural Networks, and Machine Learning. Proceedings of SPIE, vol. 6064, pp. 168–179. International Society for Optical Engineering (2006)
New Hybrid Matheuristics for Solving the Multidimensional Knapsack Problem Sa¨ıd Hanafi1,2,3 , Jasmina Lazi´c4,5, Nenad Mladenovi´c4,5, Christophe Wilbaut1,2,3 , and Igor Cr´evits1,2,3 1
Univ Lille Nord de France, F-59000 Lille, France UVHC, LAMIH, F-59313 Valenciennes, France 3 CNRS, FRE 3304, F-59313 Valenciennes, France {said.hanafi,christophe.wilbaut,igor.crevits}@univ-valenciennes.fr 4 Brunel University, West London UB8 3PH, UK Mathematical Institute, Serbian Academy of Sciences and Arts, Kneza Mihaila 36, 11000 Belgrade, Serbia {Jasmina.Lazic,Nenad.Mladenovic}@brunel.ac.uk 2
5
Abstract. In this paper we propose new hybrid methods for solving the multidimensional knapsack problem. They can be viewed as matheuristics that combine mathematical programming with the variable neighbourhood decomposition search heuristic. In each iteration a relaxation of the problem is solved to guide the generation of the neighbourhoods. Then the problem is enriched with a pseudo-cut to produce a sequence of not only lower, but also upper bounds of the problem, so that integrality gap is reduced. The results obtained on two sets of the large scale multidimensional knapsack problem instances are comparable with the current state-of-the-art heuristics. Moreover, a few best known results are reported for some large, long-studied instances. Keywords: Integer Programming, Multidimensional Knapsack Problem, Decomposition, Matheuristics, Variable Neighbourhood Search.
1
Introduction
The 0-1 Multidimensional Knapsack Problem (MKP) is a resource allocation problem which can be formulated as follows: ⎡ n max cj xj ⎢ j=1 ⎢ n (P ) ⎢ ⎢ subject to aij xj ≤ bi ∀i ∈ M = {1, 2, . . . , m} ⎣ j=1
xj ∈ {0, 1}
∀j ∈ N = {1, 2, . . . , n}
Here, n is the number of items, m is the number of knapsack constraints. The right hand side bi (i ∈ M ) represents capacity of knapsack i, A = [aij ] is the weights matrix, whose element aij represents the resource consumption of the item j ∈ N M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 118–132, 2010. c Springer-Verlag Berlin Heidelberg 2010
VNDS with pseudo-cuts for the MKP
119
in the knapsack i ∈ M , and cj (j ∈ N ) is the profit income for the item j ∈ N . The optimal objective function value of problem (P ) is denoted as ν(P ). As other knapsack problems MKP has a simple formulation and a significant number of practical applications. MKP is known to be NP-hard [11] and it is often used as a benchmark model for testing general purpose combinatorial optimization methods. Thus there were numerous contributions over several decades to the development of both exact and heuristic solution methods. Some efficient exact methods for the cases m = 1 and m > 1 are proposed in [23,25], and in [2,9], respectively. In the general case with m > 1, several efficient heuristic approaches can also be found in [3,15,30]. Among other existing applications we can cite capital budgeting problems [21] or cutting stock problems [13]. For reviews of recent developments and applications of MKP, the reader is referred to [7,31]. It is not so easy to classify the existing optimization methods. Beyond the classical separation between exact methods and heuristic methods, several papers are devoted to the taxonomy of hybrid methods. Hybrid (or cooperative) methods are not new in the operational research community. This class of approaches includes several subclasses among which techniques combining metaheuristics and exact algorithms have a dominating place. For instance in [26] Puchinger and Raidl distinguish collaborative combinations in which the algorithms exchange information but are not part of each other, and integrative combinations in which one technique is a subordinate embedded component of another technique. Metaheuristic approaches and mathematical programming techniques are two highly successful streams, so it is not surprising that the community tries to exploit and combine the advantages of both. A new subclass of methods appeared recently within the term matheuristic. Matheuristics combine metaheuristics and approaches relying on mathematical programming problem formulations. So a number of methods for solving optimisation problems which can be considered as matheuristics have emerged over the last decades. Often, exact optimisation method is used as the subroutine of the metaheuristics for solving a smaller subproblem [22]. Neighbourhood search type metaheuristics, such as Variable Neighbourhood Search (VNS)[24], are proved to be very effective when combined with optimization techniques based on the mathematical programming problem formulations [16]. Several methods combining the temporary fixation of some explicit or implicit variables to some particular values with the complete exploration of (small) neighbourhoods have emerged since a few years such as: the local branching (LB) proposed in [6], variable neighbourhood branching (VNB) [16], the relaxation induced neighbourhood search (RINS) proposed in [4], the distance induced neighbourhood search (DINS) proposed in [12]. Following the ideas of LB, VNB and RINS, another method for solving mixed integer programming problems, based on the principles of Variable Neighbourhood Decomposition Search (VNDS) [17], was proposed in [20]. This method uses the solution of the linear relaxation of the initial problem to define subproblems to be solved within the VNDS framework. Hanafi and Wilbaut proposed in [18,30] some extensions and improvements of a convergent algorithm for 0-1 mixed integer programming (denoted as
120
S. Hanafi et al.
LPA for Linear Programming-based Algorithm). LPA [27] solves a series of small subproblems generated by exploiting information obtained through a series of linear programming relaxations. In this paper we propose new hybrid methods, which combine LPA with VNDS, for solving MKP. Our method dynamically improves lower and upper bounds on the optimal value. Different heuristics are derived by choosing a particular strategy of updating the bounds, and thus defining different schemes for generating a series of sub-problems. The results obtained on two sets of available and correlated instances show that our approach is efficient and effective: – our proposed algorithms are comparable with the state-of-the-art heuristics – a few new best known lower bound values are obtained. The remainder of the paper is organized as follows. In Section 2 we present the new hybrid matheuristics based on the LPA and VNDS. In Section 3, computational results are presented and discussed. In Section 4, some final outlines and conclusions are provided.
2
New Hybrid VNDS Based Heuristics
Notation. As mentioned previously, both LPA and VNDS deal with reduced problems obtained by fixing some of the variables. Given an arbitrary binary solution x0 and an arbitrary subset of variables J ⊆ N , the problem reduced from original problem P and associated with x0 and J can be defined as: ⎡ max cT x ⎢ s.t. Ax ≤ b P (x0 , J) ⎢ ⎣ xj = x0j ∀j ∈ J xj ∈ {0, 1} ∀j ∈ N We further define the sub-vector associated with the set of indices J and solution x0 as x0 (J) = (x0j )j∈J , the set of indices of variables with integer values as B(x) = {j ∈ N | xj ∈ {0, 1}}, and the set of indices of variables with value v ∈ {0, 1} as B v (x) = {j ∈ N | xj = v}. We will also use the short form notation P (x0 ) for the reduced problem P (x0 , B(x0 )). If C is a set of constraints, we will denote with (P | C) the problem obtained by adding all constraints in C to the problem P . To define the neighbourhood of a solution, we introduce the following partial distance between two arbitrary binary solutions x and y of the problem, relative to J ⊆ N (note that, in case when J = N , this distance is actually a Hamming distance): | xj − yj |. δ(J, x, y) = j∈J
Let X be the solution space of the problem P considered. The neighbourhood structures {Nk | k = kmin , . . . , kmax }, 1 ≤ kmin ≤ kmax ≤| N |, can be defined
VNDS with pseudo-cuts for the MKP
121
knowing the distance δ(N, x, y) between any two solutions x, y ∈ X. The set of all solutions in the kth neighbourhood of x ∈ X is denoted as Nk (x), where Nk (x) = {y ∈ X | δ(N, x, y) = k}. Related work. The LPA consists in generating two sequences of upper and lower bounds until justifying the completion of an optimal solution of the problem [18]. This is achieved by solving exactly a series of sub-problems obtained from a series of relaxations (the linear programming relaxation for instance) and adding a pseudo-cut in each iteration, which guarantees that sub-problems already explored are not revisited. It can be proved that LPA converges to an optimal solution of the problem considered or indicates that the problem is infeasible in a finite number of iterations under certain conditions [18,30]. In practice, reduced problems within LPA can be very complex themselves, so LPA is normally used as a heuristic limited by a total number of iterations or a running time. For a detailed algorithmic description of LPA, the reader is referred to [18]. VNDS is a two-level VNS scheme for solving optimisation problems, based upon the decomposition of the problem [17]. Our new heuristics are based on a new variant of VNDS for solving 0-1 MIP problems, called VNDS-MIP [20]. It combines VNS with a general-purpose CPLEX MIP solver. A systematic hard variable fixing (or diving) is performed, following the variable neighbourhood search steps. Instead of solving just a single reduced problem P (x), as in the case of LPA, a series of sub-problems P (x, Jk ) is solved. Sets Jk ⊆ N , with J0 = ∅, are chosen according to distances δ(Jk , x, x), until the improvement of the incumbent objective value is reached. If there is an improvement, variable neighbourhood descent branching (denoted as VND-MIP in this paper) is performed as the local search in the whole solution space and the whole process is reiterated with respect to the new incumbent solution. A detailed algorithmic description of VNDS for 0-1 MIPs, denoted as VNDS-MIP, can be found in [20]. Combining LPA with VNDS. In the basic VNDS-MIP the search space is not being reduced during the solution process (except for temporarily fixing the values of some variables). This means that the same solution vector may be examined many times, which may affect the efficiency of the solution process. In this section we propose to restrict the search space by introducing pseudo cuts like in LPA, in order to avoid the multiple exploration of the same areas. Another objective is to strenghten the upper bound of the problem and to reorient the search by changing the LP-solution. In the VNDS-MIP, decomposition is always performed with respect to the solution of the linear relaxation LP(P ) of the original problem P . In other words, the upper bound (in the context of maximisation) is computed only once and only the lower bound is updated during the search process. This way, the solution process ends as soon as all sub-problems P (x, Jk ) are examined or the maximum time limit is reached. In order to introduce further diversification into the search process, pseudo-cuts δ(J, x, x) ≥ k, for some subset J ⊆ B(x) and certain integer k ≥ 1, are added whenever sub-problems P (x, J) are explored, completely or partially, by exact
122
S. Hanafi et al. VNDS-MIP-PC1(P, d, x∗ , kvnd ) 1 Choose stopping criteria (set proceed1=proceed2=true); 2 LB = ct x∗ ; P = (P | ct x > LB); //Add objective cut. 3 while (proceed1) do 4 Find an optimal solution x of LP(P ); set U B = ν(LP(P )); 5 if (B(x) = N ) then LB = U B; goto 22; 6 δj =| x∗j − xj |; reorder xj so that δj ≤ δj+1 , j = 1, . . . , p − 1 = 0} |, kstep = [nd /d], k = p − kstep ; 7 Set nd =| {j ∈ N | δj 8 while (proceed2 and k ≥ 0) do 9 Jk = {1, . . . , k}; x = M IP SOLV E(P (x∗ , Jk ), x∗ ); 10 if (ct x > ct x∗ ) then 11 LB = ct x ; P = (P | ct x > LB); //Update objective cut. 12 x∗ = VND-MIP(P, kvnd , x ); LB = ct x∗ ; goto 17; 13 else 14 if (k − kstep > p − nd ) then kstep = max{[k/2], 1}; 15 Set k = k − kstep ; 16 endif 17 Update proceed2; 18 endwhile 19 Add pseudo-cut to P : P = (P | δ(B(x), x, x) ≥ 1); 20 Update proceed1; 21 endwhile 22 return LB, U B, x∗ . Fig. 1. VNDS-MIP with pseudo-cuts
or heuristic approaches. The addition of these pseudo-cuts guarantee the change of the LP solution x and also updates the current upper bound on the optimal value of the original problem. This way, even if there is no improvement when decomposition is applied with respect to the current LP solution, the search process continues with the updated LP solution. Finally one obvious way to narrow the search space is to add the objective cut ct x > ct x∗ , where x∗ is the current incumbent solution, each time the objective function value is improved. This updates the current lower bound on the optimal objective value and reduces the new feasible region to only those solutions which are better (regarding the objective function value) than the current incumbent. The pseudo-code of the new procedure, called VNDS-MIP-PC1, is presented in Figure 1. Input parameters for the VNDS-MIP-PC1 algorithm are an instance P of the MKP, parameter d which defines the number of variables to be released in each iteration, initial feasible solution x∗ of P and the maximum size kvnd of a neighbourhood explored within VND-MIP. The algorithm returns the best solution found within the stopping criteria defined by the variable proceed. Proposition 1. The total number of iterations of VNDS-MIP-PC1 is bounded by (3n − 2n )(d + log2 n). Proof. The number of iterations in the outer loop of VNDS-MIP-PC1 is limited by the number of all possible LP solutions which contain integer components.
VNDS with pseudo-cuts for the MKP
123
n k There are 2 possible solutions with k integer components, so there are k n n k 2 = 3n possible LP solutions having integer components. However, k=0 k the algorithm stops if the LP solution x is integer feasible, so the 2n solution vectors whose all n components are integer do not contribute to the total number of outer loop iterations in VNDS-MIP-PC1. As a result, the total number of outer loop iterations in VNDS-MIP-PC1 is 3n − 2n . Since at most d + log2 n reduced problems are examined in each inner iteration of VNDS-MIP-PC1, the above proposition follows. The optimal objective function value ν(P ) of current problem P is either the optimal value of (P | δ(B(x), x, x) ≥ 1), or the optimal value of (P | δ(B(x), x, x) = 0) i.e. ν(P ) = max{ν(P | δ(B(x), x, x) ≥ 1), ν(P | δ(B(x), x, x) = 0)}. If the improvement of objective value is reached by solving subproblem P (x∗ , Jk ), but the optimal solution of P is ν(P | δ(B(x), x, x) = 0), then the solution process continues by exploring the solution space of (P | δ(B(x), x, x) ≥ 1) and fails to reach the optimum of P . Therefore, VNDS-MIP-PC1, if used as an exact method, provides a feasible solution of the initial input problem P in a finite number of steps, but does not guarantee the optimality of that solution. However, one can observe that if sub-problem P (¯ x) is solved exactly before adding the pseudo-cut δ(B(x), x, x) ≥ 1 in P then the algorithm converges to an optimal solution. In practice, when used as a heuristic with the time limit as a stopping criterion, VNDS-MIP-PC1 has a good performance (see Section 3). In the previous algorithm, the solution space of P (x∗ , J ) is the subset of the solution space of P (x∗ , Jk ), for k < , k, ∈ N. This means that, in each iteration of VNDS-MIP-PC1, when exploring the search space of the current subproblem P (x∗ , Jk−kstep ), the search space of the previous subproblem P (x∗ , Jk ) gets revisited. In order to avoid this repetition and possibly allow more time for exploration of those areas of P (x∗ , Jk−kstep ) search space which were not examined before, we can discard the search space of P (x∗ , Jk ) by adding cut δ(Jk , x∗ , x) ≥ 1 to the current subproblem. The corresponding pseudo-code of this variant, called VNDS-MIP-PC2(P, d, x∗, kvnd ), is obtained from VNDS-MIP-PC1(P, d, x∗, kvnd ) (see Figure 1) by replacing line 9 with the following line 9 : 9 : Jk = {1, . . . , k}; x = M IP SOLV E(P (x∗ , Jk ) | δ(Jk , x∗ , x) ≥ 1), x∗ ); P = (P | δ(Jk , x∗ , x) ≥ 1); and by dropping line 19 (the pseudo-cut δ(B(x), x, x) ≥ 1 is not used in this heuristic). The following obvious properties of the pseudo-cut δ(Jk , x∗ , x) ≥ 1 are given in the next Proposition: Proposition 2. (i) The pseudo-cut δ(Jk , x∗ , x) ≥ 1 does not necessarily change the LP solution but ensures that the current subproblem P (x∗ , Jk ) does not get examined again later in the search process; (ii) The pseudo-cut δ(Jk , x∗ , x) ≥ 1 does not discard the original optimal solution from the reduced search space.
124
S. Hanafi et al.
Proof. Statement (i) is obvious, and (ii) holds since ν(P ) = max{ν(P | δ(Jk , x∗ , x) ≥ 1), ν(P | δ(Jk , x∗ , x) = 0)}.
The next proposition is obvious and the proof is omitted: Proposition 3. The VNDS-MIP-PC2 method finishes in a finite number of steps and either returns an optimal solution x∗ of the original problem (if LB = U B), or proves the infeasibility of the original problem (if LB > U B).
3
Computational Results
Hardware and Software. All values presented are obtained using a Pentium 4 computer with 3.4GHz processor and 4GB RAM and general purpose MIP solver CPLEX 11.1. We use C++ programming language to code our algorithms and compile them with g++ and the option -O2. Test bed. We validate our heuristics on two sets of available and correlated instances of MKP. The first set is composed by 90 instances from the OR-Library, with n = 500 and m = 5, 10, 30 (and denoted as 5.500, 10.500 and 30.500 respectively). Although the OR-Library contains instances with n = 100 and n = 250 as well, the larger instances with n = 500 are known to be difficult. In particular, the optimal solutions of the instances with m = 30 are not known, whereas the running time needed to prove the optimality of the solutions for the instances with m = 10 is in general very significant [2]. The second set of instances is composed by 18 MKP problems generated by Glover & Kochenberger (GK)[14], with number of items n between 100 and 2500, and number of knapsack constraints m between 15 and 100. We select these problems because they are known to be very hard to solve by branch-and-bound technique. Methods compared. As the VNDS-MIP algorithm is valid for 0-1 MIP, we can use it directly for solving the MKP. Thus in this section we compare three algorithms: VNDS-MIP, VNDS-MIP-PC1 and VNDS-MIP-PC2. Each algorithm is run once for each instance. Due to the consistency of CPLEX solver, the objective function value obtained by a certain algorithm applied to a particular instance is the same in different runs of the algorithm. Initial solution. All our variants start with the same initial solution obtained by solving the input MKP instance with the CPLEX MIP solver with parameter CPX PARAM INTSOLLIM set to 2 (since the setting CPX PARAM INTSOLLIM = 1 yields the trivial solution vector whose all components are equal to 0). In that case the associated CPU required by CPLEX is less than 1 second in all cases. CPLEX parameters. The CPLEX MIP solver is used in each method compared. We choose to set the CPX PARAM MIP EMPHASIS to FEASIBILITY for the first feasible solution, and then change to the default BALANCED option after the first feasible solution has been found.
VNDS with pseudo-cuts for the MKP
125
Table 1. Average results on the OR-Library with 1 hour total running time limit
class 5.500
10.500
30.500 Global
VNDS-MIP VNDS-MIP-PC1 VNDS-MIP-PC2 α Avg. Gap #opt Avg. Gap #opt Avg. Gap #opt 0.25 0 10 0.002 6 0.002 7 0.5 0 10 <0.001 9 0 10 0.75 <0.001 9 <0.001 8 <0.001 8 Avg./Total <0.001 29 0.001 23 0.001 25 0.25 0.022 0 0.016 1 0.025 0 0.5 0.010 1 0.009 2 0.009 2 0.75 0.006 1 0.004 3 0.005 1 Avg./Total 0.013 2 0.010 6 0.013 3 0.25 0.051 1 0.066 1 0.042 1 0.5 0.020 0 0.021 0 0.021 0 0.75 0.009 1 0.010 1 0.008 0 Avg./Total 0.027 2 0.032 2 0.024 1 Avg./Total 0.013 33 0.014 31 0.012 29
VNDS Parameters. The variants of our heuristics use the same parameters. In all the cases we set the value of parameter d to 10, and we set kvnd = 5. Furthermore, we allow running time tsub = tvnd = 300s for calls to CPLEX MIP solver for subproblems and calls to VND, respectively, for all instances in test bed unless otherwise specified. Finally running time limit is set to 1 hour (3,600 seconds) for each instance of the OR-Library. Comparison. Table 1 provides the average results obtained by our heuristics over the OR-Library instances. For each heuristic we report the average gap obtained, according to the formula fbest − f × 100, |fbest | where fbest is the best known published objective value and f is the observed objective value. The value α ∈ {0.25, 0.5, 0.75} was used to generate the instances according to the procedure in [8], and it corresponds to the correlation degree of the instances. There are ten instances available for each (n, m, α) triplet. Then we report the number of optimal solutions (or best-known solutions) visited during the process among the 10 instances. The main conclusions of this table can be listed as follows: – According to the average gap the VNDS-MIP-PC2 slightly dominates the other variants based on VNDS-MIP, in particular for m = 30. Globally it is difficult to distinguish one version from the others. – All the variants have difficulties in tackling the largest instances with m = 30. However, if one hour of running time can be considered as an important measure for heuristic approaches, it is necessary to observe that a large part of the optimal values and best-known values for the instances with m = 10
126
S. Hanafi et al.
and m = 30, respectively, were obtained in a significant running time. More precisely, the approach proposed by Boussier et al. [2] requires in average 28 hours of CPU time on a Dell Precision 690 2 Dual Core 3 GHz with 2 GB RAM to obtain the optimal solution for every instance with n = 500 and m = 10 (and 280 hours in average to prove the optimality of the solution). For the instances with n = 500 and m = 30, it is interesting to note that optimal solutions are unknown. The best solution values reported in [29,30] are associated to CPU times varying between one hour and ten hours for every instance. Table 2 provides the results obtained over the GK set of instances, compared to the best-known lower bounds reported in column “Best”. These values were obtained by an efficient hybrid tabu search algorithm [28] and by the iterative heuristics proposed by Hanafi and Wilbaut [30]. We report in column “Best-lb” the difference between the best value and the value obtained by our algorithm, and in column “CPU*” the running time needed to obtain this value. Due to the very large size of several instances and the significant running time needed by the other approaches to obtain the best-known solutions (between 1 hour and 11 hours in [30] and approximately 3 days in [28]), we use two different values for the running time of our heuristics. We set this value at two hours for the medium size instances, but we allow the process running five hours for the instances MkGK 04, MkGK 06 and MkGK 08 to MkGK 11. Table 2 demonstrates a global interesting behaviour of our heuristics which visit a significant number of best-known solutions, and also two new best solutions. Table 2. Average results on the GK instances Inst. Inst. name n m 1 GK18 100 25 2 GK19 100 25 3 GK20 100 25 4 GK21 100 25 5 GK22 100 25 6 GK23 200 15 7 GK24 500 25 8 MkGK 01 100 15 9 MkGK 02 100 25 10 MkGK 03 150 25 11 MkGK 04 150 50 12 MkGK 05 200 25 13 MkGK 06 200 50 14 MkGK 07 500 25 15 MkGK 08 500 50 16 MkGK 09 1500 25 17 MkGK 10 1500 50 18 MkGK 11 2500 100 #best #new best
VNDS-MIP VNDS-MIP-PC1 VNDS-MIP-PC2 Best Best-lb CPU* Best-lb CPU* Best-lb CPU* 4528 0 1584 0 51 0 153 3869 0 22 0 321 0 296 5180 0 197 0 215 0 15 3200 0 302 0 63 0 742 2523 0 61 0 21 0 20 9235 0 172 0 1202 0 729 9070 0 2672 0 3021 1 342 3766 0 2 0 5 0 2 3958 0 23 0 32 0 74 5656 0 625 0 1380 0 1307 5767 0 2458 -1 3673 -1 6665 7560 0 3506 0 3191 -1 882 7678 1 9217 0 9641 1 15688 19220 1 815 1 5169 0 3533 18806 2 5986 0 11658 0 2287 58091 4 3193 2 11148 4 2535 57295 4 13467 4 3787 2 13275 95237 9 11719 8 2581 3 7461 12 14 13 0 1 2
VNDS with pseudo-cuts for the MKP
127
In general the new versions derived from VNDS-MIP with some new modifications converge more quickly to the best solutions. Based on the average gap and average running time values, we may observe that VNDS-MIP-PC1 obtains the best results for these instances. However, VNDS-MIP-PC2 is in average the best method for the largest instances (from the objective value point of view). In Figures 2–4 a graphical representation of the studied algorithms is provided. Figures 2–3 show how the solution quality progresses with time, for instances MkGK 6 and MkGK 10, respectively. In case of MkGK 10, VNDS-MIP achieves the largest improvement in the beginning of the solution process, but also gets stalled very soon and does not manage to achieve any further improvement for a large portion of time in the final stage of the solution process. On the other hand, both VNDS-MIP-PC1 and VNDS-MIP-PC2 show a steady increase in solution quality throughout the solution process. Although VNDS-MIP-PC1 attains better solution quality in the beginning of the search process, VNDS-MIP-PC2 manages to reach higher solution quality near the end, which implies that further increase in the running time limit may be beneficial for this method (in that case). In case of MkGK 6, VNDS-MIP shows a very small progression rate throughout the solution process. Both VNDS-MIP-PC1 and VNDS-MIP-PC2 have very similar behaviour: the improvement is large in the beginning of the solution process, but becomes smaller and smaller near the end. Figure 4 depicts a solution quality versus
Fig. 2. Solution quality dependence on Fig. 3. Solution quality dependence on the computational time for the instance the computational time for the instance MkGK 6 MkGK 10
Fig. 4. CPU time required to find an optimal solution for the instance 5.500-4
128
S. Hanafi et al.
running time behaviour of the studied algorithms for the instance 5.500-4 from the OR library, for which all methods have reached the optimal objective value. Statistical Analysis. It is well known that average values are susceptible to outliers, i.e., it is possible that exceptional performance (either very good or very bad) in a few instances influences the overall performance of the algorithm observed. Therefore comparison between the algorithms based only on the averages does not necessarily have to be valid. In our case it is hard to say how significant this performance distinction is, due to the very small differences between gap values. This is why we have carried out statistical tests to verify the significance of differences between the solution quality performances. Since we cannot make any assumptions about the distribution of the experimental results, we apply a nonparametric (distribution-free) Friedman test [10]. Let I be a given set of problem instances and A a given set of algorithms. The Friedman test ranks the performances of algorithms for each data set (in case of equal performance, aver|I| j 1 age ranks are assigned) and tests if the measured average ranks Rj = |I| i=1 ri (rij as the rank of the jth algorithm on the ith data set) are significantly different from the mean rank. The statistic used is: ⎡ ⎤ |A| 2 12 |I| |A| (|A| + 1) ⎣ ⎦, χ2F = R2 − |A| (|A| + 1) j=1 j 4 which follows a χ2 distribution with |A|−1 degrees of freedom. Since this statistic proved to be conservative [19], a more powerful version of the Friedman test was developed [19], with the following statistic: FF =
(|I| − 1)χ2F , |I| (|A| − 1) − χ2F
which is distributed according to the Fischer’s F -distribution with |A| − 1 and (|A| − 1)(|I| − 1) degrees of freedom. For more details, see [5]. In order to verify if any significant distinction between our three methods can be made, we further perform Friedman test on these methods, over the entire set of 108 instances. According to the average ranks (see Table 3), the best choice is the convergent algorithm VNDS-MIP-PC2, with rank 1.85, followed by the basic VNDS-MIP with 2.01, whereas the variant VNDS-MIP-PC1 has the worst performance, having the highest rank 2.14. The value of the FF statistic for |A| = 3 decomposition algorithms and |I| = 108 data sets is 2.41. The test is able to detect the significant difference between the algorithms at the probability level 0.1, for which the critical value of the F -distribution with (|A| − 1, (|A| − 1)(|I| − 1)) = (2, 214) degrees of freedom is equal to 2.33. In order to further examine to which extent is VNDS-MIP-PC2 better than the other two methods, we will perform the Bonferroni-Dunn post-hoc test [1].
VNDS with pseudo-cuts for the MKP
129
Table 3. Differences between the average solution quality ranks Algorithm VNDS-MIP VNDS-MIP-PC1 VNDS-MIP-PC2 (2.01) (2.14) (1.85) (Average Rank) VNDS-MIP (2.01) 0.00 0.13 0.00 VNDS-MIP-PC1 (2.14) -0.16 -0.30 0.00 VNDS-MIP-PC2 (1.85)
Bonferroni-Dunn test is normally used when one algorithm of interest (the control algorithm) is compared with all the other algorithms. The critical difference (CD) used for the Bonferroni-Dunn test is calculated using the formula |A| (|A| + 1) CD = qα 6 |I| where qα is the critical value at the probability level α that can be obtained from the corresponding statistical table (see [5]). The performance of an observed algorithm is considered to be significantly different from the performance of the control algorithm, if the corresponding average ranks differ by at least the critical difference CD. For |A| = 3, we have q0.1 = 1.96 (see [5]) and critical difference CD = 0.27. Therefore, from Table 3 we can see that VNDS-MIP-PC2 is significantly better than VNDS-MIP-PC1 at the probability level α = 0.1. The post-hoc test is not powerful enough to detect any significant difference between VNDS-MIP-PC2 and VNDS-MIP at this probability level. In addition, we also provide the statistical analysis for the set of the 11 MkGK instances, which represent the hardest instances in the benchmark. According to the average ranks on this restricted set of instances, the best choice is the convergent algorithm VNDS-MIP-PC2, with rank 1.636, followed by the variant VNDS-MIP-PC1 with rank 1.864, whereas the basic VNDS-MIP has the worst performance, having the highest rank 2.500. The value of the FF statistic for |A| = 3 decomposition algorithms and |I| = 11 data sets is 2.51. The test is able to detect the significant difference between the algorithms at the probability level 0.11, for which the critical value of the F -distribution with (|A| − 1, (|A| − 1)(|I| − 1)) = (2, 20) degrees of freedom is equal to 2.47. In order to further examine to which extent is VNDS-MIP-PC2 better than the other two methods, we can again perform the Bonferroni-Dunn post-hoc test [1] with the VNDS-MIP-PC2 as the control algorithm. For this restricted benchmark the critical difference for the critical value q0.1 = 1.96 is equal CD = 0.836. Therefore, from Table 4 we can see that VNDS-MIP-PC2 is significantly better than VNDS-MIP at the probability level α = 0.1. The post-hoc test is not powerful enough to detect any significant difference between VNDS-MIP-PC2 and VNDS-MIP-PC1 at this probability level. By performing the Bonferroni-Dunn post-hoc test with the VNDS-MIP-PC1 as the control algorithm, we can detect a
130
S. Hanafi et al.
Table 4. Differences between the average solution quality ranks for the MkGK set Algorithm VNDS-MIP VNDS-MIP-PC1 VNDS-MIP-PC2 (Average Rank) (2.500) (1.864) (1.636) VNDS-MIP (2.500) 0.00 -0.636 0.00 VNDS-MIP-PC1 (1.864) -0.227 0.00 VNDS-MIP-PC2 (1.636) -0.864
significant difference between VNDS-MIP-PC1 and VNDS-MIP at the probability level α = 0.275, for which the critical value q0.275 = 1.49 yields a critical difference CD = 0.633.
4
Conclusion
In this paper we propose model-based heuristics or matheuristics for solving Multidimensional Knapsack Problem (MKP). We hybridize exact MIP solver and variable neighborhood decomposition search (VNDS) metaheuristic [17] with a linear programming-based algorithm (LPA) [18,27]. VNDS has already been proposed as a mean for solving general mixed integer programming problems (MIPs) [20]. However, in this paper, we propose two new variants, which introduce pseudo-cuts and objective cuts during the execution of the code. Thus, both upper and lower bounds of the problem are improved dynamically. Based on computational analysis performed on benchmark instances from the literature and several statistical tests designed for the comparison purposes, we may conclude that our hybrid methods have a lot of potential for solving MKP. One of our variants, VNDS-MIP-PC2, which is also shown to converge to an optimal solution, performs better than others in terms of solution quality. In addition, the two new best lower bounds are reported for the set of 18 hard MKP instances from the literature. With another hybrid method, VNDS-MIPPC1, the greatest number of best solutions is obtained (14 out of 18). Future research may include the validation of some other decomposition strategies. In particular, we think that the introduction of a second level decomposition in VNDS could be an interesting perspective. The MKP could be decomposed in several subproblems where the number of items to choose is fixed at a given integer value. This idea has already been used in several efficient methods for this problem (see [2,28] for instance), but not within VNDS. Another perspective may consists in the application of our hybrid methods to other hard integer programming problems. Acknowledgments. The present research work has been supported by International Campus on Safety and Intermodality in Transportation, the Nord-Pas-deCalais Region, the European Community, the Regional Delegation for Research and Technology, the Ministry of Higher Education and Research, and the National Center for Scientific Research. The authors gratefully acknowledge the support of these institutions.
VNDS with pseudo-cuts for the MKP
131
References 1. Dunn, O.J.: Multiple comparisons among means. Journal of the American Statistical Association, 52–64 (1961) 2. Boussier, S., Vasquez, M., Vimont, Y., Hanafi, S., Michelon, P.: A multi-level search strategy for the 0-1 Multidimensional Knapsack. Discrete Applied Mathematics 158, 97–109 (2010) 3. Chu, P.C., Beasley, J.E.: A genetic algorithm for the multidimensional knapsack problem. Journal of Heuristics 4, 63–86 (1998) 4. Danna, E., Rothberg, E., Le Pape, C.: Exploring relaxations induced neighborhoods to improve MIP solutions. Mathematical Programming 102, 71–90 (2005) 5. Demsar, J.: Statistical comparisons of classifiers over multiple data sets. The Journal of Machine Learning Research 7, 1–30 (2006) 6. Fischetti, M., Lodi, A.: Local Branching. Mathematical Programming 98, 23–47 (2003) 7. Fr´eville, A.: The multidimensional 0–1 knapsack problem: An overview. European Journal of Operational Research 155, 1–21 (2004) 8. Fr´eville, A., Plateau, G.: An efficient preprocessing procedure for the multidimensional 0–1 knapsack problem. Discrete Applied Mathematics 49, 189–212 (1994) 9. Fr´eville, A., Plateau, G.: The 0-1 bidimensional knapsack problem: towards an efficient high-level primitive tool. Journal of Heuristics 2, 147–167 (1996) 10. Friedman, M.: A comparison of alternative tests of significance for the problem of m rankings. The Annals of Mathematical Statistics 11, 86–92 (1940) 11. Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-completeness. WH Freeman, San Francisco (1979) 12. Ghosh, S.: DINS, a MIP improvement heuristic. In: Fischetti, M., Williamson, D.P. (eds.) IPCO 2007. LNCS, vol. 4513, pp. 310–323. Springer, Heidelberg (2007) 13. Gilmore, P.C., Gomory, R.E.: The theory and computation of knapsack functions. Operations Research 14, 1045–1075 (1966) 14. Glover, F., Kochenberger, G.A.: Critical event tabu search for multidimensional knapsack problems. In: Osman, I., Kelly, J. (eds.) Meta Heuristics: Theory and Applications, pp. 407–427. Kluwer Academic Publishers, Dordrecht (1996) 15. Hanafi, S., Fr´eville, A.: An efficient tabu search approach for the 0–l multidimensional knapsack problem. European Journal of Operational Research 106, 659–675 (1998) 16. Hansen, P., Mladenovi´c, N., Uroˇsevi´c, D.: Variable neighborhood search and local branching. Computers & Operations Research 33(10), 3034–3045 (2006) 17. Hansen, P., Mladenovi´c, N., Perez-Britos, D.: Variable Neighborhood Decomposition Search. Journal of Heuristics 7, 335–350 (2001) 18. Hanafi, S., Wilbaut, C.: Improved convergent heuristics for the 0–1 multidimensional knapsack problem. Annals of Operations Research (2009), doi: 10.1007/s10479-009-0546-z 19. Iman, R.L., Davenport, J.M.: Approximations of the critical region of the Friedman statistic. Communications in Statistics – Theory and Methods 9, 571–595 (1980) 20. Lazi´c, J., Hanafi, S., Mladenovi´c, N., Uroˇsevi´c, D.: Variable neighbourhood decomposition search for 0–1 mixed integer programs. Computers & Operations Research 37(6), 1055–1067 (2010) 21. Lorie, J., Savage, L.J.: Three problems in capital rationing. Journal of Business 28, 229–239 (1955)
132
S. Hanafi et al.
22. Maniezzo, V., Stutzle, T., Voss, S. (eds.): Matheuristics: Hybridizing Metaheuristics and Mathematical Programming. Annals of Information Systems, vol. 10. Springer, Heidelberg (2009) 23. Martello, S., Toth, P.: Upper bounds and algorithms for hard 0–1 knapsack problems. Operations Research 45, 768–778 (1997) 24. Mladenovi´c, N., Hansen, P.: Variable neighborhood search. Computers & Operations Research 24, 1097–1100 (1997) 25. Pisinger, D.: An expanding-core algorithm for the exact 0–1 knapsack problem. European Journal of Operational Research 87, 175–187 (1995) 26. Puchinger, J., Raidl, G.R.: Combining Metaheuristics and Exact Algorithms in ´ Combinatorial Optimization: A Survey and Classification. In: Mira, J., Alvarez, J.R. (eds.) IWINAC 2005. LNCS, vol. 3562, pp. 41–53. Springer, Heidelberg (2005) 27. Soyster, A.L., Lev, B., Slivka, W.: Zero-One Programming with Many Variables and Few Constraints. European Journal of Operational Research 2(3), 195–201 (1978) 28. Vasquez, M., Hao, J.K.: Une approche hybride pour le sac–` a–dos multidimensionnel en variables 0–1. RAIRO Operations Research 35, 415–438 (2001) 29. Vimont, Y., Boussier, S., Vasquez, M.: Reduced costs propagation in an efficient implicit enumeration for the 01 multidimensional knapsack problem. Journal of Combinatorial Optimization 15, 165–178 (2008) 30. Wilbaut, C., Hanafi, S.: New convergent heuristics for 0–1 mixed integer programming. European Journal of Operational Research 195, 62–74 (2009) 31. Wilbaut, C., Hanafi, S., Salhi, S.: A survey of effective heuristics and their application to a variety of knapsack problems. IMA Journal of Management Mathematics 19, 227–244 (2008)
An Improved Memetic Algorithm for Break Scheduling Magdalena Widl and Nysret Musliu Institute of Information Systems, Vienna University of Technology, Austria {widl,musliu}@dbai.tuwien.ac.at
Abstract. In this paper we consider solving a complex real life break scheduling problem. This problem of high practical relevance arises in many working areas, e.g. in air traffic control and other fields where supervision personnel is working. The objective is to assign breaks to employees such that various constraints reflecting legal demands or ergonomic criteria are satisfied and staffing requirement violations are minimised. In our previous work we proposed a memetic algorithm for the assignment of breaks. We improve in this paper the previous method by proposing a new memetic representation, a new crossover and selection operator, and a penalty system that helps to select memes that have a better chance to be improved by a local search. Our approach is influenced by various parameters, for which we experimentally evaluate different settings. The impact of each parameter is statistically assessed. We compare our algorithm to state of the art results on a set of existing real life and randomly generated instances. Our new algorithm returns improved results on 28 out of the 30 benchmark instances. To the best of our knowledge, these results constitute current upper bounds for the respective instances.
1
Introduction
Breaks are periods during work shifts where staff is allowed, or in some cases obliged, to discontinue work in order to recover and to perform personal activities like having meals or using facilities. In many countries constraints for work and break periods are governed by federal law. Some employers might grant additional or extended breaks to comply with ergonomic needs of staff members and in some working areas breaks after certain working periods might even be crucial due to security related issues. While each employee is supposed to take breaks according to the mentioned constraints, also staffing requirements are to be fullfilled at all time, i.e. enough staff must be available to perform a specific task during a given timeslot. Consider, for instance, airport security staff in charge of monitoring baggage xray machines: The person working in front of the monitor is required to keep high concentration in order to prevent mistakes that might result in hazardous items passing through. Thus, for all staff, breaks are mandatory to properly recover after given periods of working time. Additionally, suppose there are estimated M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 133–147, 2010. c Springer-Verlag Berlin Heidelberg 2010
134
M. Widl and N. Musliu
staffing requirements according to scheduled aircraft take-offs. Now breaks are to be scheduled such that all employees take breaks within given intervals, but at the same time a minimum number of employees is monitoring the screens. Instead of a minimum, we might even consider an exact number of employees to be present in order to minimize personnel costs. Our particular problem statement origins from a real world scenario in the area of supervision personnel. We regard a shiftplan that consists of consecutive timeslots and of shifts. Each shift starts and ends in a specific timeslot and must contain a given amount of breaktime. Shifts may overlap in time. There are several constraints concerning the distribution of breaktime within a single shift such as minimum and maximum values limiting the length of breaks and worktime, to which we will refer as temporal constraints. Additionally, during each timeslot a given number of staff is required to be working. The breaktime for each shift is to be scheduled such that the temporal constraints are satisfied and staffing requirement violations are minimised. We denote our formulation as Break Scheduling Problem and abbreviate it with Bsp. In literature, the break assignment problem has mainly been addressed as part of the so-called shift scheduling problem, where shifts are scheduled along with breaks (see [2], [1], [6], [17], [15], [7], and [14]). However, these approaches consider up to 3-4 breaks per shifts while our problem definition does not restrict the number of breaks (the instances tested contain up to 11 breaks) and imposes several additional constraints. Recently, Di Gaspero et al [9] proposed a hybrid LS-CP solver for solving simultaneously the shift design and Bsp. This work gives promising results, but the best results for benchmark problems are still obtained by solving shift design and Bsp in two phases with a help of an expert. Bsp has been previously investigated in [4] and [13]. A similar problem for call centers, which additionally considers meetings and slightly different constraints, has been investigated in [3]. Beer et al. [4] applied a min-conflict based heuristic to solve the Bsp. We note that scheduling breaks considering only temporal constraints and leaving aside the staffing requirements can be formulated as simple temporal problem (STP) [8], which is solvable in polynomial time. In practical applications however the consideration of staffing requirements is crucial. The main goal of this paper is to improve the memetic algorithm we proposed in [13]. Our current algorithm is based on the concept of memetic algorithms introduced by Moscato [12]. Memetic algorithms are also known as Hybrid Genetic Algorithms as presented by Goldberg [10]. The idea is to imitate cultural evolution on a pool of different solutions for an instance of an optimisation problem in order to obtain improved solutions. In contrast to purely genetic algorithms, local improvements are integrated in addition to the standard operators of biological evolution. It can thus be seen as a hybridisation of genetic operators with a local improvement method. To solve Bsp we propose a new memetic representation, new crossover and selection mechanisms, and a penalty system to avoid local optima. We experimentally evaluate the parameters that influence the optimisation process. The impact
An Improved Memetic Algorithm for Break Scheduling
135
of each parameter is statistically verified. We finally compare our new memetic algorithm with the best existing results for this problem in the literature.
2
Problem Definition
Definition 1 (Timeslot t). A time period of fixed length. In our real life problem, one timeslot corresponds to a period of five minutes. Definition 2 (Shift S). A set of consecutive timeslots S = {ti , ti+1 , ..., ti+n }, ∀j(i ≤ j < i + n) : tj+1 − tj = 1. Ss = ti denotes the shift start and Se = ti+n denotes the shift end. Each shift represents exactly one employee on duty. Definition 3 (Slot). A timeslot in a particular shift. A slot can be either a break slot, a work slot or a re-acquaintance slot. The latter are those and only those slots that directly follow a sequence of break slots and stand for an employee getting familiar with an altered working situation after a break. During such a slot, the employee is not consuming breaktime but neither counted as working staff regarding staffing requirements. Definition 4 (Break B). A set of consecutive break slots within a particular shift. The first slot in the set is referred to as break start, and the last slot as break end. A break is associated to exactly one shift. Definition 5 (Work period W ). A set of consecutive work slots and the subsequent re-acquaintance slot. Definition 6 (Breaktime). The number of required break slots in a shift S. The breaktime depends on the shift’s length |S| and is given as input by a function τ (|S|). Definition 7 (Temporal constraints). A set of global restrictions regarding lengths and locations of breaks and worktime within shifts. The following set of temporal constraints is part of our problem formulation: C1 Break positions, defined by (d1 , d2 ). The first d1 and the last d2 slots of each shift must be work slots, i.e. a break may start earliest d1 timeslots after the start and end latest d2 timeslots before the end of its associated shift. C2 Lunch breaks, defined by (h, g, l1 , l2 ). Each shift S with |S| > h must contain a lunch break L with |L| ≤ g. The break may start earliest l1 timeslots and end latest l2 timeslots after the start of its associated shift. C3 Work periods, defined by (w1 , w2 ). For each work period W , w1 ≤ |W | ≤ w2 . C4 Minimum break duration, defined by (w, b). A work period W with |W | ≥ w must be followed by a break B with |B| ≥ b. C5 Break lengths, defined by (b1 , b2 ). For each break B, b1 ≤ |B| ≤ b2 . Definition 8 (Break pattern DS ). A set DS ⊂ S of timeslots defining an assignment of breaks for a shift S satisfying breaktime τ (|S|) (|DS | = τ (|S|)) and the set of constraints C. Definition 9 (Staffing requirements). Number of required work slots for each timeslot t ∈ T .
136
M. Widl and N. Musliu overcover undercover
T (ti ) S7 S6 S5 S4 S3 S2 S1
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 t29 t30 2
2
2
1
0
1 2
2 3
3
3
2
1
1
3 4
4
4 5
6 7
3
4
1
1
1
1
0
0
0
1
1
1
1
1
0
0
0
1
1
1
work slot
work period
break
1
0
0
3 5
5
2
2 3
2
2
2 4
1
1
1
1
1
1
0
1
1
1
1
1
1
0
1
1
0
1 1
1
3
1
re-acquaintance slot 1
2 5
0
1
1
1
0
0
0
1
1
1
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
0
0
1
0
0
0
1
1
1
1
1
1
1
0
0
2
2
2
0
1
1
1
0
1
1
1
1
Fig. 1. A sample instance of Bsp with solution
Bsp is formally defined as follows: Instance. A tuple (k, S, τ, ρ, C): k: Number of timeslots defining a set of consecutive timeslots T = {t1 , t2 , ..., tk }. S: Collection of shifts, each shift taking place within T , ∀S ∈ S : S ⊆ T . τ (|S|): Function mapping each shift length to a value denoting its breaktime. ρ(t): Function mapping each timeslot t to its staffing requirements. C: Set of temporal constraints {C1 , C2 , ..C5 }, as defined above. A sample instance of Bsp with a possible solution is depicted in Fig. 1 for instance (k, S, τ, ρ, C) with k = 30, S = {S1 , S2 , ..S7 }, τ (|S|) = 3 if |S| ≤ 15; 4 otherwise, ρ as stated in the second line, C1 = (3, 3), C2 = (25, 4, 7, 7), C3 = (3, 6), C4 = (5, 2), C5 = (1, 3). Objective. Let P = (k, S, τ, ρ, C) be an instance of BSP. The objective is to find a mapping B relating each shift S ∈ S to a break pattern DS , s.t. the following objective function is minimised: F (B, P) = wo · O(B, P) + wu · U (B, P) weights for over- and undercover violations respectively. – wo and wu – O(B, P) = max(0, ω(B, t) − ρ(t)) i.e. sum of overcover – U (B, P) =
t∈T
max(0, ρ(t) − ω(B, t)) i.e. sum of undercover
t∈T
– ω(B, t) number of work slots in timeslot t ∈ T according to B
3
A New Memetic Algorithm for the Break Scheduling Problem (MAPBS)
We propose a new memetic algorithm that differs in several aspects from the algorithm in [13]. This new algorithm uses a memetic representation that regards
An Improved Memetic Algorithm for Break Scheduling
137
shifts which have many timeslots in common as memes. The new crossover operator uses memes of the whole generation to create an offspring instead of only two parents. The selection mechanism is included in the crossover operator. The mutation and local search procedures consider only breaks contained in a subset of an individual’s memes. Memes keep a memory to track data about their search history. The new algorithm is abbreviated MAPBS for Memetic Algorithm with Penalty System for Break Scheduling. Algorithm 1 outlines the new proposed method with the components explained in the following.
Algorithm 1. Memetic Algorithm with Penalty System 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
buildBreakPatterns I ← initialise repeat E ← fittest I ∈ I for all individuals I ∈ I \ E do I ← penalty-update(I) I ← crossover-select(I) E ← fittest I ∈ I M ← fittest M ⊂ M I ← mutate(I, M ) B ← all breaks contained in M I ← search(I, B) end for until timeout return fittest I ∈ I
3.1
A New Memetic Representation
In the previous work [13] a memetic algorithm for Bsp was introduced. In this algorithm a meme M was represented by exactly one shift S ∈ S and its associated breaks according to B, as depicted in Fig. 2. This representation implies a strong interference between memes regarding the satisfaction of staffing requirements, which makes the design of effective genetic operators, especially crossover operators, difficult. Although this algorithm could T ρ
t1 t2 t3 t4 t5 t6 t7 t8 t9t10t11t12t13t14t15t16t17t18t19t20t21t22t23t24t25t26t27t28t29t30t31t32t33t34t35 3
3
2
2
2
2
2
2
2
3
3
3
4
4
1
1
1
0
0
1
1
1
1
1
0
0
1
1 S1
S4
1
1
1
0
0
1
1
1
0
0
1
1
S5
1
1
1
1
0
0
0
1
1
1
1
1
S6
1
1
1
1
0
0
1
1
1
S7
1
1
1
1
0
0
1
1
1
1
1
1
0
0
1
1
0
0
1
1
1 S2
1
1
1
1
0
0
1
1
1
1
0
0
1
3
1 S3
3
2
2
3
3
3
3
3
3
4
3
2
2
2
2
2
2
3
3
3
S8
1
1
1
0
0
1
1
1
1
0
0
1
1
1
0
0
1
1
1
0
0
1
1
S9
1
1
1
1
0
0
0
1
1
1
1
1
S10
1
1
0
0
1
1
1
0
0
1
1
1
Fig. 2. Previous memetic representation
138
M. Widl and N. Musliu
give competitive results to the literature for the random instances, we further investigated other representations and added other features to the algorithm to improve results in literature. We propose a new memetic representation that overcomes the problem of the previous representation by regarding sets of interfering shifts as memes. Shifts interfere if they have the bigger part of their timeslots in common and thus may assign breaks to the same timeslots. Definition 10 (Memetic representation). A meme M ∈ M is defined by a period [m , m ), with (m , m ) ∈ T 2 and contains those and only those shifts S ∈ S where m ≤ (Se + Ss )/2 ≤ m , Ss and Se denoting shift start and end, as well as the breaks associated to these shifts. Each shift S ∈ S is thus contained in exactly one meme: ∀Mi , Mj ∈ M : Mi ∩ Mj = ∅, M1 ∪ M2 ∪ · · · ∪ Mm = S. We use the following heuristic to determine the periods that induce the set of memes: For each t ∈ T let a set of shifts St ⊂ S s.t. ∀S : S ∈ St iff t ∈ S, i.e. the set of shifts taking place during t. We assign a value p(t) to each t ∈ T : ⎧ ⎪ 0 if t < Ss + d1 ⎪ ⎪ ⎪ ⎪ ⎪ ⎨0 if t > Se − d2 p(t) = 1 if Ss + d1 < t < Ss + d1 + b1 + w1 . ⎪ S∈St ⎪ ⎪ 1 if Se − d2 > t > Se − d2 − b1 − w1 ⎪ ⎪ ⎪ ⎩10 otherwise Recall that Ss and Se denote start and end of shift S, d1 , d2 denote the number of timeslots after Ss and before Se respectively, to which no breaks can be assigned, b1 stands for the minimal length of a break and w1 for the minimal length of a work period, as described in Section 2. p(t) serves as an indicator for the number of breaks that can be assigned to t. A low value for p(t) tells us that there will be little intereferences between breaks regarding the staffing requirements, usually because a small number of shifts is taking place or many of them are ending or starting. This makes t a good point to separate one meme from another. We determine a set of timeslots T ⊂ T with size |T | given by a parameter s.t. – p(t ) is minimised t ∈T – ∀ti , tj ∈ T : ti − tj > d with d = (min |S|)/2 , i.e. the distance between S∈S
each pair of timeslots is at least half of the smallest shift length To retrieve this set, we start with adding timeslot t0 to T with t0 = t, t ∈ T with minimal value p(t), ties broken randomly, and continue by addingtimeslots ti = t, t ∈ T \ T with minimal value p(t) and ∀tk , tj ∈ T ∪ t : tk − tj > d. We obtain a set M of memes with |M| = |T | − 1 by sorting the elements in T and defining each meme Mi by period [ti , ti+1 ).
An Improved Memetic Algorithm for Break Scheduling T ρ
139
t1 t2 t3 t4 t5 t6 t7 t8 t9t10t11t12t13t14t15t16t17t18t19t20t21t22t23t24t25t26t27t28t29t30t31t32t33t34t35 3
3
2
2
2
2
2
2
2
3
3
3
4
4
1
1
1
0
0
1
1
1
1
1
0
0
1
1 S1
3
3
2
2
3
3
3
3
3
3
4
3
2
2
2
2
2
2
3
3
3
S8
1
1
1
0
0
1
1
1
1
0
0
1
1
S4
1
1
1
0
0
1
1
1
0
0
1
1
S5
1
1
1
1
0
0
0
1
1
1
1
1
S6
1
1
1
1
0
0
1
1
1
1
0
0
1
1
S7
1
1
1
1
0
0
1
1
1
1
0
0
1
1
S9
1
1
1
1
0
0
0
1
1
1
1
1
S10
1
1
0
0
1
1
1
0
0
1
1
1
1
1
1
0
0
1
1
0
0
1
1
1 S2
1
1
1
1
0
0
1
1
1
1
0
0
M1
1
1 S3
M2
M3
Fig. 3. New memetic representation
Fig. 3 depicts the new memetic representation on a solution represented by a set of memes M = {M1 , M2 , M3 }, M1 = ({S1 , S2 , S3 }, m = 1, m = 12), M2 = ({S4 , S5 , S6 , S7 }, m = 13, m = 23) and M3 = ({S8 , S9 , S10 }, m = 24, m = 35). Definition 11 (Meme fitness). We define the fitness F (M ) of a meme M as the weighted sum of staffing requirement violations in all timeslots that are covered by the shifts contained in M , or more formally: Let T = S, ∀S ∈ M , then F (M ) = F (B, P, T ) = wo · O(B, P, T ) + wu · U (B, P, T ) – wo and wu the same weights for over- and undercover defined in Section 2. – O(B, P, T ) = max(0, ω(B, t) − ρ(t)) i.e. sum of overcover t∈T max(0, ρ(t) − ω(B, t)) i.e. sum of undercover – U (B, P, T ) = t∈T
– ω(B, t) the number of work slots in timeslot t ∈ T according to B Definition 12 (Individual). A solution B for an instance P and fitness value F (I), which is the value of the objective function F (B, P). Definition 13 (Population). A set I of individuals. Definition 14 (Generation). Population during an iteration of the algorithm. Definition 15 (Memepool). The set of all memes in a generation. Definition 16 (Elitist). The individual E ∈ I with the best fitness value. 3.2
Initialisation
We first precalculate a set DS of break patterns for each shift S using the small temporal problem model presented by [8]. Details on this procedure are given in [18]. Each individual in the population is initialised in two steps: First, for each shift S ∈ S a valid break pattern D ∈ DS is selected randomly. This provides us with a first solution satisfying the temporal constraints C. Second, a simple local search using Neighbourhood N1 , as described in 3.5, is executed on the solution.
140
3.3
M. Widl and N. Musliu
Penalty System
For each meme M we keep the following values: Best fitness value B(M ): The best value for F (M ) the meme ever reached Penalty value P (M ): Number of iterations since last update of B(M ) The higher P (M ), the longer the meme was not able to improve. This means it is more likely to be stuck in a local optima. We use this value at two points of the algorithm: The crossover operator prefers memes with low P (M ), thus memes stuck in local optima are likely to be eliminated, disregarding their fitness value F (M ). Second, the subset of memes used for the mutation and local search also prefers memes with low P (M ) and this way focuses on areas within a solution where improvements can be found more easily. After each iteration, the values for B(M ) and P (M ) are updated for each M ∈ M : B(M ) = F (M ), P (M ) = 0, if B(M ) < F (M ) P (M ) = P (M ) + 1 otherwise 3.4
Crossover and Selection
First, an individual is created by selecting for each period the meme M with the best current fitness value F (M ) out of the current memepool. This individual is likely to become the elitist in the current population. However, shifts overlapping different memes might prevent this to happen. Using this procedure we make sure to keep the best memes. Second, each of |I| − 1 individuals is created as follows: For all sets of memes M, each containing all memes with the same period [m , m ) in the current memepool, we perform a k-tournament selection [5]: We select k memes out of M. Out of these k memes, the meme with the lowest penalty value P (M ) is inherited to the offspring. The parent individuals are deleted and the algorithm continues using only the offsprings and their memes. The first part assures to survive the best memes in the current memepool. The second part forms the actual crossover procedure. Using P (M ) as selection criteria, we get rid of memes that have been stuck in local optima for too long. If a local optimum constitutes in fact a global optimum, then it survives through the first step of the crossover operator as described above. Fig. 4 depicts the crossover operator: The first offspring is created by choosing only the fittest memes, i.e. M1 from I2 and M2 from I1 . The remaining offsprings are created applying a k-tournament selection on memes with the same period. Different values for F after the crossover may occur from shifts overlapping into different memes. 3.5
Mutation and Local Search
On each individual I ∈ I \ E the following steps are performed. A set M ∈ M of memes is defined s.t. M contains the memes with the lowest penalty values (ties are broken randomly).
An Improved Memetic Algorithm for Break Scheduling 2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
141
2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
I1 F = 58, P = 3
F = 50, P = 4
F = 46, P = 2
F = 50, P = 4
I2 , I1 2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
I2 F = 46, P = 2
F = 74, P = 4
I1 , I3
F = 58, P = 3
F = 72, P = 3
I3 , I4 2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
I3 F = 80, P = 3
F = 72, P = 3
F = 80, P = 3
F = 70, P = 3
I3 , I2 2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
2 2 3 3 1 1 1 2 2 2 2 4 4 3 3 3 3 3 2 2 2 1 1 3 3
I4 F = 56, P = 3
F = 70, P = 3
F = 80, P = 3
F = 74, P = 4
Fig. 4. Crossover operator
Each M ∈ M is mutated as follows: A set of shifts S ∈ M is chosen at random. Then for each shift S ∈ S its current break pattern is replaced by a pattern selected randomly out of the set DS of break patterns computed in the beginning (see Section 3.2). The size of S is a parameter for which different values are evaluated in Section 4. The local search is executed on each individual using set B of all breaks contained in M for the respective individual. In each iteration of the local search the following steps are performed on an individual I: First, a break b is selected at random out of B. Second, a neighbourhood N out of three neighbourhoods {N1 , N2 , N3 } is chosen at random with a probability given by parameter η = (η1 , η2 , η3 ). Then the set N of all neighbours according to the chosen neighbourhood is computed. For each N ∈ N let δ(N, I) = F (N ) − F (I), i.e. the difference between the fitness values. Let N = {N ∈ N : δ(N, I) ≤ 0}. If |N | > 0 then I = N with N being the best neighbour, i.e. neighbour N ∈ N with minimal δ(N, I), ties broken randomly. Otherwise nothing happens. The local search terminates when for μ subsequent iterations |N | = 0, i.e. no neighbours with better or equal fitness could be found. This procedure is influenced by three parameters: The size of B, the search intensity determined by μ and the probabilities η of the different neighbourhoods. Different values for these
142
M. Widl and N. Musliu
Algorithm 2. Local Search (Individual I, Breaks{}B) 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13:
c←0 repeat b ← select break b ∈ B randomly N ← select and compute one of {N1 , N2 , N3 } as moves from b N ← {N ∈ N : δ(N, I) ≤ 0} if |N | > 0 then I ← N ∈ N with minimal δ(N, I) c←0 else c←c+1 end if until c == μ return I
parameters and their evaluation are described in Section 4. Algorithm 2 outlines the local search procedure. Neighborhoods N1 , N2 , N3 are generated by the following three moves respectively: Single Assignment, Double Assignment, and Shift Assignment. The single assignment move assigns a break b to a different set of timeslots under consideration of C. This includes appending b to its predecessor or successor, b or b respectively, resulting in one longer break. The double assignment move involves two breaks. We consider a break b and both its predecessor b and successor b , or only b respectively b if b is the last or first break within its shift. A double assignment move is a re-assignment of b and b or b and b under consideration of C. Like single assignment moves, two breaks might be joined to form a longer break. Two breaks of different length may also be swapped. A shift assignment move assigns a whole break pattern D ∈ DS to the shift b is associated to. A detailed description of all moves and neighborhoods is given in [18].
4
Evaluation
We evaluated a set of parameters for which a preliminary analysis showed an impact on the solution qualities. Due to the execution time of the algorithm, it was not possible to do an exhaustive analysis. We thus started with a reasonable initial parameter setting and consecutively decreased and increased the value of each parameter while the other parameter values remained the same. The impact of each parameter was assessed using the Kruskal-Wallis test [11]. Details on the evaluations and values for each parameter setting are available in [18]. The parameter tests were conducted on six different instances among the 30 instances presented by Beer at al. [4], which are publicly available in [16]. 20 of the 30 instances in [4] were retrieved from a real life application without known optimal solutions, and ten selected among 60 randomly generated instances with known optimal solutions. Details regarding the random generation are provided by the same authors [16].
An Improved Memetic Algorithm for Break Scheduling
143
The input data C (constraints) and k (number of timeslots) are the same for all random and real life instances with k = 2016 and C defined as follows: C1 C2 C3 C4 C5
Break positions: d1 = d2 = 6. Lunch breaks: h = 72, g = 6, l1 = 42, l2 = 72. Duration of work periods: w1 = 6, w2 = 20. Minimum break times: w = 10, b = 4. Break durations: b1 = 2, b2 = 12.
All measures are given in timeslots with one timeslot corresponding to five minutes. k thus represents an entire calendar week. The timeout was normalised to 3046 seconds according to a benchmark of the machine of [4] and ours. This allows us a more reliable comparison of our results to those of [4]. We ran the algorithm ten times for each instance and parameter value. Each run was performed on one core with 2.33Ghz of a QuadCore Intel Xeon 5345 with three runs being executed simultaneously, i.e. three cores being fully loaded. The machine provides 48GB of memory. All experiments and the final runs we compare with [4] have been conducted using the mentioned timeout and hardware resources. 4.1
Parameter Evaluation for Our New Algorithm (MAPBS)
The evaluated parameter values for our algorithm are given below: |I| Population size, values tested: 1, 4, 6, 10, 20, best |I| = 4 λ Defines number of memes |M | being mutated and improved for each individual: max(1, |M| · λ), 0 ≤ σ ≤ 1, values tested: 0.05, 0.1, 0.2, 0.3, 0.5, best λ = 0.05 σ Mutation weight, number of shifts being mutated: max(1, |S | · σ), 0 ≤ σ ≤ 1, values tested: 0.01, 0.05, 0.1, 0.3, 0.5, best σ = 0.05 κ Selection: Number of memes performing a tournament in the crossover operator, values tested: 1, 2, best κ = 1 with significantly different results only for one out of six instances μ Search intensity: Number of iterations the local search continues without finding improvements, this value is multiplied by the number of breaks |B| available to the local search, values tested: 10, 20, 30, 40, best μ = 20 (η1 , η2 , η3 ): Probability for each neighbourhood to be selected in local search iterations, values tested: (0, .5, .5), (.5, 0, .5), (.5, .5, 0), (.2, .8, 0), (.8, .2, 0), (.3, .3, .3), (1, 0, 0), (0, 1, 0), best η = (.8, .2, 0) The algorithm performs best with a small population size. We also tested a population size of |I| = 1 to make sure that the population based approach is indeed necessary to obtain good solutions. In this case no selection and no crossover is performed and thus the algorithm is reduced to a local search with mutation acting as perturbation. The search intensity μ was set to 20, the same value used for the population-based approach. After 20 iterations the algorithm
144
M. Widl and N. Musliu
performs a mutation on the individual as described in Section 3.5. The mutation prevents the search from getting trapped in a local optimum. Since mutation may worsen a solution during the progress of the algorithm, the best obtained solution is kept in memory. The results showed clearly that there is indeed the need for a population based approach, as the results with runs applying local search only, i.e. with |I| = 1, gave the worse results. To verify the need for hybridisation of the genetic operators with a local search mechanism, we additionally conducted experiments leaving out the local search. The rest of the algorithm was executed as described in the previous sections. The parameter settings for this experiment correspond to the settings for the final runs. On all tested instances the solution qualities significantly worsened. The mutation and search rate λ determining |M | led to the best results when kept low. On many instances, λ = 0.05 leads to only one meme being mutated and searched. The mutation weight σ also worked well with a low value. Different values for κ did not have a significant impact on most instances tested. The local search intensity μ was set relative to the number of breaks |B| taking part in the search. MAPBS considers only a subset of all breaks, namely those contained in M , which, according to the low value for λ are only a small subset. All runs where N3 participated gave worse results than those where we used only N2 and N1 . The best performing combination was η1 = 0.8, η2 = 0.2 and η3 = 0. 4.2
Final Results and Comparison with Literature
Based on our experiments we used the following settings for the final runs: |I| = 4, λ = 0.05, σ = 0.05, μ = 20, κ = 1 and η = (0.8, 0.2, 0.0). We note that MAPBS outperforms significantly the results obtained with our previous memetic algorithm [13] and therefore we compare only results of our new memetic algorithm with the best existing results in the literature. Table 1 compares the results of MAPBS to state of the art results from [4]. Columns “Best” and “Average” respectively show best, average values of the objective function presented in the problem definition based on ten runs. Solutions provided by [4] have shown to be very good in practice and are currently in use in real life applications. Based on Table 1 we can conclude that our algorithm (MAPBS) returns improved results on all random instances and 18 out of 20 real life instances compared to results from literature. The improvements for some random instances are striking. It is not clear if this is due to the algorithm itself or due to the initialisation process: Authors in [4] initialised their algorithm for the random instances without taking into account the set of constraints C. The constraints were resolved, or partly resolved, in course of their algorithm. Our algorithm uses the approach proposed by [8] to initialise the solutions, and this possibly had an impact on these very significant improvements.
An Improved Memetic Algorithm for Break Scheduling
145
Table 1. Comparison with literature: Real life and random instances
Instance 2fc04a 2fc04a03 2fc04a04 2fc04b 3fc04a 3fc04a03 3fc04a04 3si2ji2 4fc04a 4fc04a03 4fc04a04 4fc04b 50fc04a 50fc04a03 50fc04a04 50fc04b 51fc04a 51fc04a03 51fc04a04 51fc04b random1-1 random1-2 random1-5 random1-7 random1-9 random1-13 random1-24 random1-28 random2-1 random2-4
5
Best existing results [4] Best Average σ 3,094 3,224 84 3,100 3,200 61 3,232 3,342 68 1,822 2,043 92 1,644 1,767 102 1,632 1,759 87 1,932 1,980 40 3,626 3,667 35 1,694 1,817 126 1,666 1,795 87 1,918 2,017 95 1,410 1,489 49 1,672 1,827 81 1,686 1,813 84 1,790 1,917 64 1,822 2,012 91 2,048 2,166 89 1,950 2,050 86 2,058 2,191 64 2,244 2,389 94 728 972 177 1,654 1,994 172 1,284 1,477 99 860 1,077 154 1,358 1,658 213 1,264 1,535 245 1,586 1,713 74 1,710 2,020 233 1,686 1,855 142 1,712 2,053 242
Results of MAPBS Best Average σ 2,816 2,961 71 2,834 2,934 54 2,884 2,954 60 1,884 1,948 49 1,430 1,533 67 1,440 1,514 40 1,614 1,718 48 3,177 3,206 17 1,478 1,540 29 1,430 1,502 42 1,606 1,674 48 1,162 1,233 48 1,548 1,603 36 1,402 1,514 67 1,480 1,623 89 1,818 1,900 56 1,886 2,074 87 1,886 1,949 46 1,958 2,039 52 2,306 2,367 43 346 440 48 370 476 65 378 418 29 496 583 42 318 423 51 370 445 55 542 611 43 222 318 71 724 889 75 476 535 45
Conclusions
In this paper we introduced a new memetic algorithm to solve the break scheduling problem Bsp. We proposed a new memetic representation of Bsp, genetic operators and a local search heuristic. The local search heuristic with three different neighborhoods is applied only on selected memes. Further, we introduced a method based on penalty values to avoid local optima for parts of solutions. We conducted a set of experiments for different parameter settings. The impact of each parameter was assessed with statistical methods. The use of genetic operators combined with the local search heuristic returned better results than using only local search. Applying the local search only on small parts of each
146
M. Widl and N. Musliu
individual significantly improved the qualities of the solutions compared to applying the local search on entire individuals. Focusing on neighbourhoods N1 and N2 returned better solutions than using only one neighbourhood. The largest neighbourhood, N3 , performed worst. The use of a penalty system along with focusing the local search only on memes that are not likely to be stuck in local optima significantly improved the solution qualities. The results of the algorithm with parameter values performing best according to our experiments were compared to the results in literature on 30 publicly available benchmarks. Our algorithm returned improved results for 28 out of 30 instances. To the best of our knowledge, our method gives currently best results for the Bsp. Acknowledgments. The research herein is partially conducted within the competence network Softnet Austria (http://www.soft-net.at/) and funded by the Austrian Federal Ministry of Economics (bm:wa), the province of Styria, the Steirische Wirtschaftsf¨ orderungsgesellschaft mbH. (SFG), and the City of Vienna in terms of the center for innovation and technology (ZIT).
References 1. Aykin, T.: A comparative evaluation of modelling approaches to the labour shift scheduling problem. European Journal of Operational Research 125, 381–397 (2000) 2. Bechtold, S., Jacobs, L.: Implicit modelling of flexible break assignments in optimal shift scheduling. Management Science 36(11), 1339–1351 (1990) 3. Beer, A., G¨ artner, J., Musliu, N., Schafhauser, W., Slany, W.: Scheduling breaks in shift plans for call centers. In: The 7th International Conference on the Practice and Theory of Automated Timetabling, Montr´eal, Canada (2008) 4. Beer, A., G¨ artner, J., Musliu, N., Schafhauser, W., Slany, W.: An AI-based breakscheduling system for supervisory personnel. IEEE Intelligent Systems 25(2), 60–73 (2010) 5. Brindle, A.: Genetic algorithms for function optimisation. PhD thesis, University of Alberta, Department of Computer Science, Edmonton, Canada (1981) 6. Canon, C.: Personnel scheduling in the call center industry. 4OR: A Quarterly Journal of Operations Research 5(5(1), 89–92 (1989) 7. Cˆ ot´e, M.-C., Gendron, B., Quimper, C.-G., Rousseau, L.-M.: Formal languages for integer programming modeling of shift scheduling problems. Constraints (2009) 8. Dechter, R., Meiri, I., Pearl, J.: Temporal constraint networks. Artificial Intelligence 49, 61–95 (1991) 9. Di Gaspero, L., G¨ artner, J., Musliu, N., Schaerf, A., Schafhauser, W., Slany, W.: A hybrid LS-CP solver for the shifts and breaks design problem. In: The 7th International Workshop on Hybrid Metaheuristics (HM 2010), Vienna, Austria. LNCS. Springer, Heidelberg (2010) (to appear) 10. Goldberg, D.: Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley Publishing Company, Reading (1989) 11. Montgomery, D.: Design and Analysis of Experiments, 6th edn. John Wiley & Sons, Chichester (2005)
An Improved Memetic Algorithm for Break Scheduling
147
12. Moscato, P.: On evolution, search, optimization, gas and martial arts: Towards memetic algorithms. Technical Report Caltech Concurrent Comput. Prog. Rep. 826, California Institute of Technology (1989) 13. Musliu, N., Schafhauser, W., Widl, M.: A memetic algorithm for a break scheduling problem. In: 8th Metaheuristic International Conference, Hamburg, Germany (2009) 14. Quimper, C.-G., Rousseau, L.-M.: A large neighbourhood search approach to the multi-activity shift scheduling problem. Journal of Heuristics 16(3), 373–391 (2010) 15. Rekik, M., Cordeau, J., Soumis, F.: Implicit shift scheduling with multiple breaks and work stretch duration restrictions. Journal of Scheduling 13, 49–75 (2010) 16. http://www.dbai.tuwien.ac.at/proj/SoftNet/Supervision/Benchmarks/ (2008) 17. Tellier, P., White, G.: Generating personnel schedules in an industrial setting using a tabu search algorithm. In: Burke, E.K., Rudov´ a, H. (eds.) PATAT 2007. LNCS, vol. 3867, pp. 293–302. Springer, Heidelberg (2006) 18. Widl, M.: Memetic algorithms for break scheduling. Master’s thesis, Vienna University of Technology, Vienna, Austria (2010)
Consultant-Guided Search Algorithms for the Quadratic Assignment Problem Serban Iordache SCOOP Software GmbH, Cologne, Germany
[email protected]
Abstract. Consultant-Guided Search (CGS) is a recent swarm intelligence metaheuristic for combinatorial optimization problems, inspired by the way real people make decisions based on advice received from consultants. Until now, CGS has been successfully applied to the Traveling Salesman Problem. Because a good metaheuristic should be able to tackle efficiently a large variety of problems, it is important to see how CGS behaves when applied to other classes of problems. In this paper, we propose an algorithm for the Quadratic Assignment Problem (QAP), which hybridizes CGS with a local search procedure. Our experimental results show that CGS is able to compete in terms of solution quality with one of the best Ant Colony Optimization algorithms, the MAX-MIN Ant System. Keywords: Metaheuristics, combinatorial optimization, swarm intelligence, quadratic assignment problem.
1
Introduction
Consultant-Guided Search (CGS) [10] is a swarm intelligence [3] technique based on the direct exchange of information between individuals in a population. It takes inspiration from the way real people make decisions based on advice received from consultants. CGS is a metaheuristic that can be applied to virtually any hard combinatorial optimization problem, but until now it has been evaluated only on the Traveling Salesman Problem (TSP). For this class of problems, experimental results have shown that CGS is able to outperform some of the best Ant Colony Optimization (ACO) [7] algorithms. Nevertheless, the question remains if CGS is still able to achieve high performance when applied to other combinatorial optimization problems. In this paper, we introduce CGS-QAP, an algorithm for the Quadratic Assignment Problem (QAP), which hybridizes CGS with a local search procedure. In our experiments we use MAX-MIN Ant System (MMAS) [15] as a yardstick to compare the performance of the proposed algorithm. The experimental results show that the solution quality obtained by CGS-QAP is comparable with or better than that obtained by MMAS. In the present work, we also discuss how CGS relates to other metaheuristics for combinatorial optimization. We argue that CGS is a hybrid metaheuristic, M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 148–159, 2010. c Springer-Verlag Berlin Heidelberg 2010
Consultant-Guided Search Algorithms for the QAP
149
by identifying a series of concepts borrowed from other optimization techniques. This is an important aspect that has not been addressed in the original CGS paper [10]. The rest of this paper is organized as follows: in order to make the paper self-contained, we describe in Section 2 the CGS metaheuristic; in Section 3 we place CGS in the context of heuristic optimization methods; in Section 4 we introduce the CGS-QAP algorithm and we report our experimental results; in Section 5 we conclude the paper and present future research directions.
2
The CGS Metaheuristic
CGS is a population-based method. An individual of the CGS population is a virtual person, which can simultaneously act both as a client and as a consultant. As a client, a virtual person constructs at each iteration a solution to the problem. As a consultant, a virtual person provides advice to clients, in accordance with its strategy . Usually, at each step of the solution construction, there are several variants a client can choose from. The variant recommended by the consultant has a higher probability to be chosen, but the client may opt for one of the other variants, which will be selected based on some heuristic. At the beginning of each iteration, a client chooses a consultant based on its personal preference and on the consultant’s reputation. The reputation of a consultant increases with the number of successes achieved by its clients. A client achieves a success, if it constructs a solution better than all solutions found until that point by any client guided by the same consultant. Each time a client achieves a success, the consultant adjusts its strategy in order to reflect the sequence of decisions taken by the client. The exact details of how reputation and personal preference are used in order to select a consultant are specific to each application of CGS to a particular class of problems. Because the reputation fades over time, a consultant needs that its clients constantly achieve successes, in order to keep its reputation. If the consultant’s reputation sinks below a minimum value, it will take a sabbatical leave, during which it will stop offering advice to clients and it will instead start searching for a new strategy to use in the future. The pseudocode that formalizes the CGS metaheuristic is shown in Fig. 1. During the initialization phase (lines 2-5), virtual people are created and placed in sabbatical mode. Based on its mode, a virtual person constructs at each iteration (lines 7-33) either a solution to the problem (line 13) or a consultant strategy (line 9). Optionally, a local optimization procedure (line 17) may be applied to improve this solution or consultant strategy. After the construction phase, a virtual person in sabbatical mode checks if it has found a new best-so-far strategy (lines 20-22), while a virtual person in normal mode checks if it has achieved a success and, if this is the case, it adjusts its strategy accordingly (lines 24-29). At the end of each iteration, the reputation and action mode of each virtual person are updated (lines 32-33).
150
S. Iordache
1. procedure CGSMetaheuristic() 2. create the set P of virtual persons 3. foreach p ∈ P do 4. setSabbaticalMode(p) 5. end foreach 6. while(termination condition not met) do 7. foreach p ∈ P do 8. if actionMode[p]=sabbatical then 9. currStrategy[p] ← constructStrategy(p) 10. else 11. currCons[p] ← chooseConsultant(p) 12. if currCons[p] = null then 13. currSol[p] ← constructSolution(p, currCons[p]) 14. end if 15. end if 16. end foreach 17. applyLocalOptimization() // optional 18. foreach p ∈ P do 19. if actionMode[p]=sabbatical then 20. if currStrategy[p] better than bestStrategy[p] then 21. bestStrategy[p] ← currStrategy[p] 22. end if 23. else 24. c ← currCons[p] 25. if c = null and currSol[p] is better than all solutions 26. found by a client of c since last sabbatical then 27. successCount[c] ← successCount[c]+1 28. strategy[c] ← adjustStrategy(c, currSol[p]) 29. end if 30. end if 31. end foreach 32. updateReputations() 33. updateActionModes() 34. end while 35. end procedure Fig. 1. The CGS Metaheuristic
Fig. 2 details how consultants’ reputations are updated based on the successes achieved by their clients. Each consultant is ranked based on the best result obtained by any client working under its guidance. For a number of top-ranked consultants, CGS prevents their reputations from sinking below a predefined level (lines 12-14). Fig. 3 details how the action mode of each virtual person is updated: consultants whose reputations have sunk below the minimum level are placed in sabbatical mode, while consultants whose sabbatical leave has finished are placed in normal mode.
Consultant-Guided Search Algorithms for the QAP
151
1. procedure updateReputations() 2. foreach p ∈ P do 3. if actionMode[p]=normal then 4. rep[p] ← applyReputationFading(rep[p]) 5. rep[p] ← rep[p] + successCount[p] 6. if currSol[p] is better than best-so-far solution then 7. rep[p] ← rep[p] + bonus 8. end if 9. if rep[p] >maxReputation then 10. rep[p] ← maxReputation 11. end if 12. if isTopRanked(p) then 13. rep[p] ← enforceMinimumReputation(rep[p]) 14. end if 15. end if 16. end foreach 17. end procedure Fig. 2. Procedure to update reputations
1. procedure updateActionModes() 2. foreach p ∈ P do 3. if actionMode[p]=normal then 4. if rep[p] <minReputation then 5. setSabbaticalMode(p) 6. end if 7. else 8. sabbaticalCountdown ← sabbaticalCountdown - 1 9. if sabbaticalCountdown = 0 then 10. setNormalMode(p) 11. end if 12. end if 13. end foreach 14. end procedure Fig. 3. Procedure to update action modes
Fig. 4 shows the actions taken to place a virtual person in sabbatical or in normal action mode.
3
Positioning of CGS
CGS introduces a new metaphor, but it is not obvious whether it represents a novel metaheuristic or rather a reformulation of a known method, using new names for existing concepts. In this section, we try to place CGS in the context of heuristic optimization methods and we argue that it represents a hybrid metaheuristic, which combines new ideas with concepts found in other optimization techniques.
152
S. Iordache
1. procedure setSabbaticalMode(p) 2. actionMode[p] ← sabbatical 3. bestStrategy[p] ← null 4. sabbaticalCountdown ← sabbaticalDuration 5. end procedure 6. procedure setNormalMode(p) 7. actionMode[p] ← normal 8. rep[p] ← initialReputation 9. strategy[p] ← bestStrategy[p] 10. end procedure Fig. 4. Procedures to set the sabbatical and normal mode
CGS can be classified as a model-based search (MBS) algorithm [19]. In MBS, candidate solutions are constructed using some parameterized probabilistic model. These solutions are then used to modify the probabilistic model in order to bias future sampling toward high quality solutions. CGS mainly differs from other MBS algorithms like ACO and estimation of distribution algorithms (EDA) [12] in the way it bias probabilities with respect to past experience in order to intensify the search around the best combinations. Instead of using an indirect pheromone-based learning mechanism (like in ACO), or estimation of distributions (like in EDA), a set of combinations is used in CGS to directly bias probabilities. Somewhat surprisingly, CGS can even be cast into the formal framework of ant programming (AP) [2]. AP is based on the use of an iterated Monte Carlo approach for the multi-stage solution of combinatorial optimization problems. A population of agents, called ants, is used in order to construct solutions. Each agent perceives the state of the system through a representation, which can be seen as a mental image and, in general, gives less information than the state description. During the solution construction, each ant moves on the state graph, but it represents its movement on the representation graph. At each step, a set of feasible candidate actions is determined based on information pertaining to the system state. One of these actions is then selected based on a probabilistic policy parameterized in terms of a desirability function. The desirability function associates a real value to each edge of the representation graph. For both ACO and CGS, a partial solution is expressed as a sequence of components, while the AP representation of a state can be expressed as the last component added to the partial solution. In the case of ACO, the desirability is given by the amount of pheromone on the edge connecting the last component included and the candidate component. In the case of CGS, the desirability function can be expressed in terms of two elements: the reputations and the strategies of the consultants. The reputations bias the probability to use a given strategy, which in turn biases the probability to select a given component. In AP, the desirability information is updated on the basis of the cost of the generated solutions. CGS fits into the AP framework, because both reputations and strategies are
Consultant-Guided Search Algorithms for the QAP
153
updated in accordance with the successes achieved by clients. This shows that the AP framework is not restricted to pheromone-based algorithms, but it can also accommodate algorithms that use non stigmergic communication. In CGS, the information exchange is based on direct communication, thus bearing some resemblance to bee inspired algorithms [11]. These algorithms mimic the behavior of real bees, which perform a so-called waggle dance in order to transmit information about the direction and distance to a food source. In this way, a bee is able to recruit other nest mates to the discovered food source. In the CGS metaphor the consultants wait passively to be selected by clients, but we can consider that they actually try to recruit clients. The recruitment procedure in CGS differs though from the recruitment procedure in bee inspired algorithms in the way the probability to recruit an agent is biased: CGS uses the consultant reputation, while most bee inspired algorithms use the solution quality. CGS combines several concepts found in other optimization techniques. For example, the reputation fading is similar to the pheromone evaporation in ACO. Another example is the construction of a new strategy during the sabbatical leave. This process resembles the escape mechanism used in Reactive Tabu Search [1] when the system is trapped in a complex attractor, or the pheromone trail reinitialization performed in MAX-MIN Ant System [15] when the algorithm approaches the stagnation behavior. As a final example, we consider how CGS keeps information about promising solutions, by means of consultant strategies. This approach of maintaining a list of high quality solutions can also be found in some ACO variants like Population-Based ACO [8] or ACOR [13].
4
Applying CGS to the QAP
In this section, we discuss how CGS can be applied to the QAP and we propose the CGS-QAP algorithm, which hybridizes CGS with a local search procedure. Then, we describe the experimental setting and we compare the performance of CGS-QAP with that of MAX-MIN Ant System. 4.1
The CGS-QAP Algorithm
Given n facilities and n locations, a flow matrix F = {fij } and a distance matrix D = {dij }, the QAP consists in finding an assignment φ of facilities to locations, which minimizes the cost: cφ =
n n
fij dφ(i)φ(j)
(1)
i=1 j=1
The QAP is one of the most difficult combinatorial problems. Currently, exact algorithms are not able to solve in reasonable time instances with size n > 30. An instantiation of the CGS for the QAP must define the different concepts and actions left unspecified by the CGS metaheuristic. In CGS-QAP, the strategy is implemented as a solution advertised by the consultant. It is represented by an assignment of facilities to locations, which is constructed during the
154
S. Iordache
sabbatical leave. In the proposed algorithm, the sabbatical leave lasts only one iteration. In order to construct a new strategy, a consultant generates a random assignment and improves it by using a local search procedure. The personal preference for a consultant is determined by the cost of its advertised assignment. Together with the reputation, it gives the suitability of a consultant k: reputationk (2) suitabilityk = costk −costbsf β+ costbsf where the parameter β determines the influence of personal preference, costk is the cost of the assignment advertised by consultant k and costbsf is the cost of the best so far assignment. The probability to choose consultant k is: suitabilityk c∈C suitabilityc
pk =
(3)
where C is the set of all available consultants. A client is allowed to choose itself as a consultant. Because the probabilities given by formula (3) do not depend on the client making the choice, the client index does not appear in this formula. At each construction step, a client places a not yet assigned facility to a free location. In CGS-QAP, the order in which facilities are assigned to locations is random. At each step, a client receives from its consultant a recommendation regarding the location to be chosen. The recommended location is the one corresponding to the given facility in the assignment advertised by the consultant. In order to decide whether to follow the recommendation, the client uses a method inspired by the pseudorandom proportional rule introduced by the Ant Colony System [6]: with probability q0 , a client places the given facility to the location recommended by its consultant; with probability (1 − q0 ) it randomly places the facility to one of the free locations. The value of the parameter q0 is critical for the performance of CGS-QAP. A large value for q0 leads to an aggressive search, focused around the assignment advertised by the consultant. A small value for q0 favors the exploration of the search space, allowing the algorithm to escape from local optima. Every time a client achieves a success (i.e., it finds an assignment better than that advertised by its consultant), the consultant updates its strategy, replacing its advertised assignment with the assignment constructed by the client. At each iteration, the consultant’s k reputation fades as given by formula (4): reputationk = reputationk (1 − r)
(4)
where the parameter r represents the reputation fading rate. CGS-QAP prevents the reputation of a top-ranked consultant from sinking below the limit given by: initialReputation · bestSoF arCost/advertisedCost. The value of the parameter minReputation referred in Fig. 3 is fixed in this algorithm at 1, because only the differences between minReputation and the other reputation parameters are relevant for the algorithm. At the end of each iteration, the algorithm applies a local search procedure in order to improve the assignments constructed by clients. Since the CGS metaheuristic provides an optional local optimization step, hybridizing CGS with a
Consultant-Guided Search Algorithms for the QAP
155
local search procedure is a straightforward process. Similar to other algorithms for the QAP, CGS-QAP can use 2 opt local search, short runs of tabu search [17] or simulated annealing [5] as the local search procedure. 4.2
Experimental Setup
We run a series of experiments in order to compare the performance of CGSQAP with that of MAX-MIN Ant System (MMAS) [15]. The choice of MMAS as a yardstick is motivated by the fact that it currently represents one of the best performing heuristics for the QAP. To allow a meaningful comparison between heuristics, we have created a software package containing Java implementations of the algorithms considered in our experiments. The software package is available as an open source project at http://swarmqap.sourceforge.net/. At this address, we also provide all configuration files, problem instances and results files for the parameter tuning and for the experiments described in this paper. Taillard [18] groups the QAP instances in four categories: 1. 2. 3. 4.
unstructured instances with uniform random distances and flows. unstructured instances with random flows on grids. structured, real-life problems. structured, real-life like problems.
The instances in the first group are the most difficult to solve optimally. According to [14], in the case of MMAS the instance type has a strong influence on the local search procedure that should be used. Our preliminary experiments have shown that this is also true for CGS-QAP: as in the case of MMAS, 2-opt local search gives better solutions for structured instances, while short runs of tabu search are preferred for unstructured instances. In this paper we concentrate on the unstructured QAP instances and we combine all algorithms with short robust tabu search runs of length 4n, where n is the problem size. The parameters used for MMAS are those recommended in [14]: m = 5 ants; 1 1 ρ = 0.8; τmax = 1−ρ , where Jψgb is the objective function value of the global J gb ψ
max best solution; τmin = τ2·n . In MMAS the pheromone trails are updated using either the iteration-best solution ψ ib , or the global best solution ψ gb . As suggested in [14], when applying tabu search we use ψ gb every second iteration. We have tuned the parameters of CGS-QAP using the ParamILS configuration framework [9]. ParamILS executes an iterated local search in the parameter configuration space and it is appropriate for algorithms with many parameters, where a full factorial design becomes intractable. As training data for paramILS, we have used a set of 500 QAP instances with sizes uniformly distributed in the interval [30, 90]. The training instances have random distances and flows and have been generated based on the method described in [16]. The parameter settings are given in Table 1.
156
S. Iordache Table 1. Parameter settings for CGS-QAP
Parameter
Value
Description
m β q0 maxReputation initialReputation bonus protectedRanks r
10 0.002 1 − 10/n 40 15 6 2 0.1
number of virtual persons influence of the advertised cost probability to follow consultant’s recommendation maximum reputation value reputation after sabbatical best-so-far reputation bonus protected top consultants reputation fading rate
4.3
Experimental Results
In our experiments we use 17 unstructured instances taken from QAPLIB [4]. For each run, we allow a total of 500 applications of tabu search. The experiments have been performed on an HP ProLiant with 8 x 2.33 GHz Intel(R) Xeon(R) CPUs and 16 GB RAM, running Red Hat Enterprise Linux 5. Table 2 reports for each algorithm and QAP instance the mean percentage deviations from the best known solutions over 25 trials. The best mean results for each problem are in boldface. We also report for each problem the p-values
Table 2. Algorithm performance for unstructured QAP instances, averaged over 25 trials. Runs are terminated after 500 applications of tabu search. Problem instance
Best known
MMAS (%)
CGS-QAP (%) (p-value)
tai20a
703482
0.302
0.097
(0.0005)
tai25a
1167256
0.361
0.288
(0.1671)
tai30a tai35a
1818146 2422002
0.436 0.556
0.364 0.470
(0.0441) (0.0739)
tai40a tai50a
3139370 4938796
0.719 1.089
0.585 0.999
(0.0122) (0.1400)
tai60a
7205962
1.257
1.051
(0.0004)
tai80a tai100a
13511780 21052466
1.380 1.420
0.964 0.917
(0.0000) (0.0000)
nug30
6124
0.013
0.008
(0.3510)
sko42 sko49
15812 23386
0.014 0.060
0.004 0.044
(0.0108) (0.3551)
sko56 sko64
34458 48498
0.046 0.036
0.029 0.023
(0.9131) (0.5728)
sko72
66256
0.104
0.098
(0.5058)
sko81 sko90
90998 115534
0.077 0.086
0.074 0.120
(0.9365) (0.9509)
Consultant-Guided Search Algorithms for the QAP
157
of the one-sided Wilcoxon rank sum tests for the null hypothesis (H0 ) that there is no difference between the solution quality of CGS-QAP and that of MMAS, and for the alternative hypothesis (H1 ) that CGS-QAP outperforms MMAS. Applying the Bonferroni correction for multiple comparisons, we obtain the adjusted α-level: 0.05/17 = 0.00294. The p-values in boldface indicate the cases where the null hypothesis is rejected at this significance level. Using the one-sided Wilcoxon signed rank test, we compute the p value for the null hypothesis (H0 ) that there is no difference between the means of CGS-QAP and the means of MMAS, and the alternative hypothesis (H1 ) that the means of CGS-QAP are smaller than the means of MMAS. The p-value obtained is 0.00019, which means that the null hypothesis can be rejected at a high significance level. Although the results are statistically significant, they do not seem to be important from a practical point of view. In the previous experiment, CGS-QAP has outperformed MMAS on all instances except sko90. In the following experiment, we compare for this QAP instance the development of the mean percentage deviations from the best known solution for our competing algorithms over 10 trials and 10000 applications of tabu search. As shown in Fig. 5, although CGS-QAP initially produces poorer results for the sko90 instance, it is able to outperform MMAS in the long run.
Fig. 5. Mean percentage deviations for instance sko90 averaged over 10 trials
158
5
S. Iordache
Conclusions and Future Work
The experimental results show that combining CGS with a local search procedure leads to an efficient algorithm for the QAP. For unstructured QAP instances, the experimental results show that the CGS-QAP algorithm proposed in this paper performs better than MMAS. Our future research will investigate if CGS-QAP is still able to compete with MMAS for structured QAP instances. We also plan to evaluate variants of CGS-QAP that further hybridize the metaheuristic, with the goal of improving the solution quality. One possible direction is to allow clients to ask for a second opinion. For this purpose, a client can randomly select a second consultant from the remaining ones. With a given probability, the client will choose to follow the recommendation of the second consultant instead of that of its main consultant. The solution construction bears in this case some resemblance to the approach used by genetic algorithms: choosing a location recommended by either the main or the second consultant is similar to a recombination operator; the perturbation produced when none of the recommendations is followed can be seen as a mutation.
References 1. Battiti, R., Tecchiolli, G.: The reactive tabu search. ORSA Journal on Computing 6, 126–140 (1994) 2. Birattari, M., Di Caro, G.A., Dorigo, M.: Toward the formal foundation of Ant Programming. In: Dorigo, M., Di Caro, G.A., Sampels, M. (eds.) Ant Algorithms 2002. LNCS, vol. 2463, pp. 188–201. Springer, Heidelberg (2002) 3. Bonabeau, E., Dorigo, M., Theraulaz, G.: Swarm Intelligence: From Natural to Artificial Systems. Oxford University Press, USA (1999) 4. Burkard, R.E., Karisch, S., Rendl, F.: QAPLIB - A quadratic assignment problem library. European Journal of Operational Research 55, 115–119 (1991) 5. Connolly, D.T.: An improved annealing scheme for the QAP. European Journal of Operational Research 46, 93–100 (1990) 6. Dorigo, M., Gambardella, L.M.: Ant Colony System: A Cooperative Learning Approach to the Traveling Salesman Problem. IEEE Transactions on Evolutionary Computation 1(1), 53–66 (1997) 7. Dorigo, M., St¨ utzle, T.: Ant Colony Optimization. MIT Press, Cambridge (2004) 8. Guntsch, M., Middendorf, M.: A population based approach for ACO, Applications of Evolutionary Computing. In: Cagnoni, S., Gottlieb, J., Hart, E., Middendorf, M., Raidl, G.R. (eds.) EvoIASP 2002, EvoWorkshops 2002, EvoSTIM 2002, EvoCOP 2002, and EvoPlan 2002. LNCS, vol. 2279, pp. 71–80. Springer, Heidelberg (2002) 9. Hutter, F., Hoos, H.H., Leyton-Brown, K., St¨ utzle, T.: ParamILS: An Automatic Algorithm Configuration Framework. Journal of Artificial Intelligence Research (JAIR) 36, 267–306 (2009) 10. Iordache, S.: Consultant-Guided Search - A New Metaheuristic for Combinatorial Optimization Problems. In: Proceedings of the 2010 Genetic and Evolutionary Computation Conference (GECCO 2010). ACM Press, New York (2010) 11. Karaboga, D., Akay, B.: A Survey: Algorithms Simulating Bee Swarm Intelligence. Artificial Intelligence Review 31(1), 68–85 (2009)
Consultant-Guided Search Algorithms for the QAP
159
12. Larra˜ naga, P., Lozano, J.A.: Estimation of Distribution Algorithms. In: A New Tool for Evolutionary Computation. Kluwer Academic, Boston (2001) 13. Socha, K., Dorigo, M.: Ant Colony Optimization for Continuous Domains. European Journal of Operational Research 185(3), 1155–1173 (2008) 14. St¨ utzle, T., Dorigo, M.: ACO Algorithms for the Quadratic Assignment Problem. In: Corne, D., Dorigo, M., Glover, F. (eds.) New Ideas in Optimization, pp. 33–50. McGraw-Hill, New York (1999) 15. St¨ utzle, T., Hoos, H.H.: MAX-MIN Ant System. Future Generation Computer Systems 16(8), 889–914 (2000) 16. St¨ utzle, T., Fernandes, S.: New Benchmark Instances for the QAP and the Experimental Analysis of Algorithms. In: Gottlieb, J., Raidl, G.R. (eds.) EvoCOP 2004. LNCS, vol. 3004, pp. 199–209. Springer, Heidelberg (2004) 17. Taillard, E.D.: Robust taboo search for the quadratic assignment problem. Parallel Computing 17, 443–455 (1991) 18. Taillard, E.D.: Comparison of iterative searches for the quadratic assignment problem. Location Science 3, 87–105 (1995) 19. Zlochin, M., Birattari, M., Meuleau, N., Dorigo, M.: Model-based search for combinatorial optimization: A critical survey. Annals of Operations Research 131, 373– 395 (2004)
On Index Structures in Hybrid Metaheuristics for Routing Problems with Hard Feasibility Checks: An Application to the 2-Dimensional Loading Vehicle Routing Problem Johannes Strodl, Karl F. Doerner, Fabien Tricoire, and Richard F. Hartl Department of Business Administration, University of Vienna, Bruenner Strasse 72, 1210 Vienna, Austria {johannes.strodl,karl.doerner,fabien.tricoire,richard.hartl}@univie.ac.at
Abstract. In this paper we study the impact of different index structures used within hybrid solution approaches for vehicle routing problems with hard feasibility checks. We examine the case of the vehicle routing problem with two-dimensional loading constraints, which combines the loading of freight into the vehicles and the routing of the vehicles to satisfy the demands of the customers. The problem is solved by a variable neighborhood search for the routing part, in which we embed an exact procedure for the loading subproblem. The contribution of the paper is threefold: i) Four different index mechanisms for managing the subproblems are implemented and tested. It is shown that simple index structures tend to lead to better solutions than more powerful albeit complex ones, when using the same runtime limits. ii) The problem of balancing the CPU budget between exploration of different solutions and exact solution of the loading subproblem is investigated; experiments show that solving exactly hard subproblems can lead to better solution quality over the whole solution process. iii) New best results are presented on existing benchmark instances. Keywords: Vehicle Routing Problem; Variable Neighborhood Search; Two-Dimensional Packing.
1
Introduction
Two important problems in distribution logistics concern the loading of the freight into the vehicles, and the successive routing of the vehicles along the road network, with the aim of satisfying the demands of the customers. In the field of combinatorial optimization, loading and routing problems have been studied intensively but separately. Only in recent years some attention has been devoted to their combined optimization. The obvious advantage is that, by considering the information on the freight to be loaded, one can construct more appropriate routes for the vehicles. This comes at a price since the combinatorial difficulty of the problem increases considerably. In this paper we address a particular M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 160–173, 2010. c Springer-Verlag Berlin Heidelberg 2010
Index structures on 2L-CVRP
161
combination of two-dimensional loading and vehicle routing, defined as the twodimensional loading capacitated vehicle routing problem (2L-CVRP [5,10]). In the 2L-CVRP customers demand sets of rectangular weighted items, while vehicles have a weight capacity and a rectangular two-dimensional loading surface. The aim is to load the items into the vehicles and deliver them to the customers, through a road network, with minimum total cost. The problem is of interest in the transportation of three-dimensional box-shaped items that cannot be stacked one on top of each other, because of their fragility, weight or large dimensions. This happens, for example, when the transported items are kitchen appliances or large mechanical components. The 2L-CVRP generalizes the well known capacitated vehicle routing problem (CVRP), in which the demand of each customer is only given by a positive integer, representing weight or volume.
2
Problem Description
We consider a complete undirected graph G = {V, E} where V is the set of vertices including the depot (vertex 0) and the n customers, and E is the set of edges, with associated costs cij . Each customer wants to be delivered a set of mi oriented rectangular items. The term oriented refers to the fact that these items cannot be rotated. Each item (i, p) for customer i has a width wip , a length lip , and a weight dip . All items for a given customer should be delivered by the same vehicle, i.e. split deliveries are not allowed. In order to make these deliveries, a fleet of K identical vehicles is available. Each vehicle has a loading bay of width W , length L, and weight capacity D. A feasible solution to the 2L-CVRP consists of a set of K (or less) feasible routes. A route is feasible if it is possible to find a feasible 2-dimensional packing for the items belonging to the customers it visits, and if the total weight of these items does not exceed D. A 2-dimensional packing is feasible if the total packed area has a width of at most W , and a length of at most L. This packing subproblem is a 2-dimensional bin packing problem, which is known to be NPhard. Additionally, routes must start and end at the depot. The cost of a solution is defined by the sum of thecosts of all routes in this cij . When solving the solution; the cost of a route r is defined as cr = (i,j)∈r
2L-CVRP, we are looking for a feasible solution with minimum cost.
3
Algorithm to Solve the 2L-CVRP Problem
The solution procedure consists of two steps: first an initial solution is built by means of a construction heuristic; then a variable neighborhood search (VNS) improves the solution quality.
162
J. Strodl et al.
3.1
Initial Solution
To obtain an initial solution, routes are constructed by applying the Savings algorithm [2]. The algorithm is initialized with n single-customer routes. The two routes which lead to the maximum saving in tour length are then merged. This step is repeated until no cost improvement can be feasibly gained. Infeasibility occurs when the tour length limit is exceeded. It is not guaranteed that the initial savings algorithm provides a feasible solution: it is possible that more routes are used than allowed. Therefore a feasible solution may yet have to be found during the VNS. 3.2
Variable Neighborhood Search
A Variable Neighborhood Search is responsible for the improvement of the initial solution. VNS is a metaheuristic solution method that has been successfully applied to various routing problems in the last years. It was originally introduced by Mladenovi´c and Hansen [13]. For more details on VNS, the curious reader may also refer to [6]. Recently, Tricoire et al. provided a hybrid VNS approach to solve the multi-pile vehicle routing problem, which shares common features with the 2L-CVRP [18]. Namely, a hard packing subproblem is also present, and the authors solve it with a dedicated exact algorithm based on dynamic programming. However, their solution approach also includes intensive use of heuristics for packing, and the exact packing algorithm is called only in rare occasions (when a new best solution is found). This is possible for their specific packing problem because very good heuristics exist; in the case of the 2L-CVRP the average efficiency of packing heuristics is not as good. We therefore present a VNS framework inspired by that of Tricoire et al., but relying more heavily on exact algorithms for packing. We now describe this VNS algorithm. Algorithm 1 describes the general framework of the VNS procedure. The neighborhood structure is defined by the parameter κ and in the beginning it is set to 1 (κ = 1), which is the smallest defined neighborhood. In every iteration of the main loop the same three steps (shaking, iterative improvement, move or not) are executed. By shaking the current solution a new neighbor solution is built. The difference between the neighborhood solution and the current incumbent solution is expressed with respect to κ. A larger κ allows greater perturbations of the current incumbent solution. As a shaking operator the cross-exchange operator [16] is used for building a neighborhood solution. In a cross-exchange, two randomly chosen segments of two routes (which can be the same) are interchanged, by preserving the orientation of both segments. The maximum length of a chosen segment of a route is limited by the neighborhood κ or the length of the route. The minimum sequence length is always zero. The new generated neighbor solution is improved by applying an iterative improvement procedure. As an iterative improvement a 2-opt procedure with a first improvement strategy is used. Finally, in the move or not phase it is determined if the new generated neighbor solution x will be accepted as the new incumbent solution. Every time a new global best solution is found, the neighborhood κ is reset to 1. If no better solution was found the neighborhood κ is
Index structures on 2L-CVRP
163
Algorithm 1. Variable Neighborhood Search (VNS) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* Initialization κ ←− 1; Find an initial solution x;
*/
/* Main loop while runtime limit not reached do /* Shaking x ←− random neighbor from the κth neighborhood of x (x ∈ Nκ (x));
*/ */
/* Iterative Improvement x ←− local search improvement of x ;
*/
/* Move or not if x meets the acceptance criterion then x ←− x ; κ ←− 1; else κ ←− κ + 1;
*/
if κ > κmax then κ ←− 1;
incremented by 1 until the maximum allowed level κmax . After reaching κmax , κ is set back to 1. The whole procedure stops after a given amount of CPU time is reached. Move or not. Deciding whether a new solution is accepted as a new incumbent or not is relatively straightforward. Solutions which are better than the incumbent are always accepted. To avoid local optima the procedure also accepts a deterioration of the total route length by at most 10% of the current working solution sometimes. From our experience, accepting such deteriorations every 8000 iterations since the last acceptance of a new incumbent solution works well. Additionally, solutions can only be accepted if all routes satisfy both tour length and packing constraints. 3.3
Packing Strategy
To check if a route is feasible the container loading problem more precisely the two-dimensional bin packing problem has to be solved for each route. The items have to be feasible packed in each of the routes. The packing is a three step procedure. The first step consists in checking whether some general preconditions are fulfilled or not. First, the sum of the weights of the items must be smaller or equal then the capacity of the vehicle. Second, the sum of all areas of the items must also be smaller or equal then the available area of the vehicle. If one of the preconditions is not fulfilled then the route can never be feasibly packed. After this check a heuristic packing procedure
164
J. Strodl et al.
Fig. 1. Packing strategy
is used. In case the heuristic does not find a feasible solution an exact packing routine is executed. Heuristic packing. For the heuristic packing the touching perimeter heuristic [11] is used. All items in the route are sorted from the biggest to the smallest one with respect to width. In this order the items are packed into the vehicle to the position where the item edges touch the maximum amount (in percent of its perimeter) of other item edges or the vehicle outer edges (the bin wall). This total amount of touching is called the touching perimeter. There are at most n possible positions to place an item in the vehicle, were n is the number of items, so the complexity of this heuristic is O(n2 ). Exact packing. If the touching perimeter heuristic did not find a feasible packing, an exact method is performed. We use a branch-and-bound procedure [10] to solve the packing problem to optimality. At each node of the enumeration tree, one remaining item is selected and placed in a limited subset of possible positions. These positions are called corner points [12]. Backtracking is performed when an item cannot be placed at any corner point. For bounding, the continuous lower bound [1,12] is used. In order to avoid endless calculations in the hardest cases, the application of the branch-and-bound procedure is subject to a limit of 10 CPU seconds or 1000 backtracking steps. 3.4
Indexed Packing Strategy
Two important observations can be made from the packing strategy: first, the random neighborhood search leads to the fact that it is likely that many routes are generated more than once and second, there is a tradeoff between the time and backtracking limit of the branch-and-bound procedure and the number of iterations that can be made by the whole solution procedure within the total time budget allowed. When more time is invested in the exact method then more packing results can be expected from this step, but this investment decreases the number of iterations of the main loop of the VNS algorithm that can be done. On the one hand side, this leads to a smaller part of the search space that can be examined, which may cause weaker solution quality at the end. On the other hand side, with the assistance of a more sophisticated packing routine more interesting routes are evaluated and therefore the solution quality of the complete optimization procedure will increase.
Index structures on 2L-CVRP
165
The packing routine can be improved with respect to efficiency by indexing all already evaluated routes and their respective packing results. There is no need to pack the items of a route more than once and so the stored result from the first time a route is selected for packing can be reused. This leads to a gain of time which allows more iterations for the VNS, possibly achieving a better examination of the search space. Such an index system can be integrated between the heuristic and the exact procedure. The two underlying ideas are that (i) checking the preconditions is not time-consuming, and (ii) the heuristic method can act as a filter for the easily packable problems, thus keeping the index size low: only those packing problems hard enough so that they require the exact method are stored in the index. Figure 2 shows the exact flow process chart where the index search and update are integrated.
Fig. 2. Packing strategy with index
Three types of indexes are implemented and tested. These three types fulfill different aspects and requirements of the search, and tend to improve the search in different ways. They can be combined into different policies. Four different index policies are compared in the next two chapters. Storing packing results. This is the simplest way an index could work. The key of the index is the route in an adequately encoded form and the stored value is the ternary information packable, unpackable or unknown. The unknown status is treated to be the same as the unpackable status, because it is not proven that the items are packable and so the route may not be feasible. As long as the packing order of the items does not matter (which is the case in our problem setting), the customers on the route can be represented as a bit string of the length of the total number of customers and every bit identifies exactly one customer. Each bit is set to 1 if the customer is on the route, 0 otherwise. As a result every permutation of the customers on a route will be transformed into the same representation. The packing information can be stored in a small integer variable that has at least the size of two bits to store the three values.
166
J. Strodl et al.
So every record of the index has a fixed size and the index can be implemented in a hash table or a binary tree structure very efficiently. This index form is very fast and requires little memory. Storing branch-and-bound path. As we saw before, it can happen that after a given time limit the exact packing procedure does not allow to conclude anything regarding feasibility. We therefore suggest an extension of the previous index, which consists in storing more than only the ternary information on packability. If the branch-and-bound is stopped because the time limit or the maximum number of backtrackings is reached, then the current status of the branch-and-bound decision tree can be stored too. With this information, the calculation can be continued at this step the next time the same route is generated. The advantage of this method is that it allows to make a difference between the “unknown” and “unpackable” status of a given route in the index. The items of the customers on the route can get another chance of decision whether they are packable or not (or again unknown). The branch-and-bound method can continue from the frozen position trying to finish the calculation until there is a result, or until the runtime or backtracking limit is reached again. With the assumption that an interesting route candidate is generated more often during VNS than an uninteresting one, this can lead to the situation that more calculation time will be invested in more relevant routes. When the search converges to a (local) optimum at the end of the process and when the improvement steps barely find an improvement then the focus on the search is in the local area. The routes in this local area can be accurately examined. To store the last position in the branch-and-bound tree, only the path in the tree and the coordinates of all the items on this path are needed. As the order of the customer items in the vehicle is not constrained, they can be ordered before the branch-and-bound procedure starts and with a chosen sequence. We order the items in decreasing width and then in decreasing height. This is a standard behavior, similar for instance to the work by Gendreau et al. [5]. The simplest data structure for this preempted or continued branch-andbound method is a stack structure, the elements of which comprise item references and their associated position coordinates. The continued branch-andbound method consumes more time and more memory in relation to the previous simple method and so it can be expected that this method decreases the number of iterations that could be made perceptibly. Sub- and superroute search. A route r1 is a subroute of route r (denoted by (r1 ⊆ r)) if and only if it contains a subset of the customers of route r. Similarly to this a route r2 is a superroute of route r (denoted by (r2 ⊇ r)) if and only if it contains a superset of the customers of route r. If the order of the customers on the route is important then the customers from route r in the superroute r2 must occur in the same order.
Index structures on 2L-CVRP
167
We call a route packable if all the items from the customers on this route are packable in one vehicle. It is easy to observe that if a route r is packable then every subroute r1 (r1 ⊆ r) is also packable; similarly, if a route r is unpackable then every superroute (r2 ⊇ r) is also unpackable. The proof is very simple: in the two-dimensional space when some items are feasibly packable in a vehicle then it remains feasible if some items are removed from this vehicle. On the other hand, if some items are not feasibly packable in a vehicle then it will also not be possible when some more items are added. When we extend the index in this way and allow sub- and superroute search queries then another improvement in the design decisions can be integrated. The index can be built much smaller because it is not necessary to store every route in the index. If we want to store a packable route r in the index, we need not do that if there exists a superroute of r which is already packable; in case there is no such route, we can remove every subroute of r which is packable, because the new route will have their information. Similarly, if r is unpackable, we need not do that in the case where there exists an unpackable subroute of r and again, if there is no such route, we can remove every superroute of r. A packable route covers all subroutes which are packable, and an unpackable route covers all superroutes which are unpackable. So only the biggest packable route from a subroute hierarchy and the smallest unpackable route from a superroute hierarchy need to be stored. This may reduce the index size therefore the time spent looking up in the index, again allowing more VNS iterations. There are many interesting data structures, most introduced by the information retrieval sector, which can provide the sub- and superset search efficiently (e.g. [3,14,17]). Data structures based on S-trees [3] and different kinds of hash table hierarchies are examples for such data structures, but none of them can guarantee that in case of a sub- and superset query there is no need to walk through the complete data set. So in the worst case an exhaustive search is done. In the next section an implementation of the multi-level extendible hashing scheme is used as a candidate for comparison.
4
Index Candidates
Five different candidates were created for comparison reasons. The first one is the original packing strategy without any index. In this case the packability of the items of the customers on a route must be checked again at every iteration. The second and third candidates use a binary tree for storing the already evaluated routes. The second candidate only stores the ternary information if the items are packable, unpackable or the packing status is unknown. The third implementation additionally also stores the information to continue the exact method. The fourth and the fifth use a multi-level extendible hashing scheme for storing the routes. The fourth only saves the packability status whereas the fifth also stores the required information for continuing a previously stopped exact search. We now provide detailed information for each of these five candidates.
168
4.1
J. Strodl et al.
Reference Implementation
This is the reference implementation of the whole route optimization problem and the packing process without the use of any index structure. It is the baseline approach of all other candidates. All other implementations with index differ only in the index mechanism. 4.2
STL Map
The provided map data structure available in the C++ standard template library (STL) [15] is used as index structure. This is also what is used in the ant colony optimization (ACO) by Fuellerer et al. in order to index packability of the previously considered routes [4]. Since the ACO uses exactly the same data structure for the already evaluated routes, it can be used as comparing algorithm which differs only in the optimization method (VNS instead of ACO). The STL map data structure is implemented as binary tree and it guarantees that the complexity for most operations is never worse than O(log(n))[15]. For the index key that represents a route, a bit string of the length of the total number of customers is used, every bit in it representing exactly one customer. If a customer is on the route the bit is set to one, otherwise it is set to zero. A comparison between two keys can be done in the usual way when the bit string is seen as a binary number. With this comparison function the binary tree and the search in it can be made. The packing status is stored in a small integer variable, which can hold the three stats packable, unpackable and unknown packable status. 4.3
STL Map with Continued Branch-and-Bound
In contrast to the previous STL map candidate this variant stores, if the packing status is unknown, the last status of the branch-and-bound process for continuing later when the same route is again generated. It stores the complete path of the branch-and-bound tree and the coordinates of all the already packed items. This is done in a special stack data structure, which can easy be used by the branchand-bound process to go on with the calculation exactly at the same point where it was stopped by the time or backtracking limit. Here the branch-and-bound process is not aborted ultimately. It is only interrupted and can be resumed. If the branch-and-bound calculation is able to find a feasible solution then only the status information is saved and the branch-and-bound data is freed. 4.4
Multi-level Extendible Hashing Scheme
The Multi-Level Extendible Hashing Scheme (MLH) is a very interesting index data structure that originates from the information retrieval sector for efficient search in huge datasets. It provides the sub- and superset search and so it’s predestined to be used in such a problem like this one. Due to space constraints only a short brief general description can be given here. For detailed information see [7,8,9].
Index structures on 2L-CVRP
169
The data structure is divided into two different storage parts, directories and buckets. In the buckets the bit string representation of the routes are stored as keys. Also the packing status is stored here next to the keys. To find a key in a bucket a sequential search is needed. Sub-, superset and exact search can be done with the binary operators. In this implementation of the MLH one bucket can hold 1024 records. To find the right bucket in which a record should be stored or could be found, directories are needed. A directory always has a size 2k with k ∈ {1, 2, . . .} and is just an array of pointers; the pointers in it refer to another directory or to a bucket. In this implementation a directory is an array of 256 pointers. The binary representation of the position of a pointer in a directory is used to find the next directory or right bucket. This binary number is seen as a part of the prefix of the key. A search is done by walking through the directory hierarchy and the use of a pointer sequence whose positions together build the key. This is done until a bucket is reached, which must be the wanted bucket. For efficiency a directory of the size 2k can be split up to 2k−1 small directories which are called buddies. The smallest buddy consists only of 2 pointers whose positions represents the bits 0 and 1. At first when a directory is created all pointers refer to the same bucket. If the bucket runs out of space it must be split. If more than one pointer points to the empty bucket, new buckets must be created for the other pointers, otherwise the doubled buddy size must be taken and the directory must be split. If the buddy size exceeds the directory size a new hierarchy level must be built. A directory split can be seen in figure 4. The leftmost bucket from figure 3 was split. Detailed description of the buddy system can be found in [9]. There is one exclusive root directory. This is the starting point of every search. In the beginning there exists only one directory and one bucket. Every pointer in the directory points to this bucket. The hierarchy grows asymmetrically downwards and creates the minimum number of directories that are needed to store all records. A sub- and superset search is done by not only looking for the exact prefix of the key but also each sub- and super prefix. The prefix is normally short in comparison to the original key, and it is built on the hierarchical structure of the directories; this narrows the search space.
Fig. 3. Multi-Level Extendible Hashing Scheme
170
J. Strodl et al.
Fig. 4. Multi-Level Extendible Hashing Scheme after split
We now describe the strategy used to search for routes in the MLH. In order to prove that the items on a route are not packable, the branch-and-bound process must walk through the complete branch-and-bound tree, which usually requires a lot of time. However, showing that the items are packable is typically faster, since the search can be stopped as soon as a feasible packing is found. In the end it is likely that more positive (packable) records are indexed than negative ones. Therefore the strategy we use is to look for a packable superroute first; in case this is unfruitful, we then look for the unfinished exact route, then finally for an unpackable subroute. 4.5
Multi-level Extendible Hashing Scheme with Continued Branch-and-Bound
Like the STL map with continued branch-and-bound this variant is an extension of the previous one. Here also not only the simple packing status information is saved in the data structure. The complete status position of the branch-andbound procedure is stored, allowing to resume the calculation if the same route is generated again. The used data structure for the branch-and-bound information is equal to the one of the STL Map with continued branch-and-bound, so these two implementations can be compared with respect to index structure performance, since the index structure is the only difference.
5
Computational Results
The implementation of the algorithm was done in C++ and executed on a 64 bit quad core PC under a GNU/Linux operation system. During the calculation no index structure needed more than 1GB of memory. For all runs the same run time limit of two hours was used for the whole VNS; branch-and-bound was always stopped or suspended after 10 seconds or 1000 nodes. Every instance was optimized four times with different random seeds. There are 36 CVRP instances and for each instance there are 5 classes of packing difficulty. This is denoted in one number like 1203. The first two digits describe the instance (12) and the last two the class. In total there are 180 test samples1 . 1
All this 2L-CVRP instances can be downloaded from http://www.or.deis.unibo.it/research.html.
Index structures on 2L-CVRP
171
The results from the ACO by Fuellerer et al. [4] are used as a benchmark to compare solution quality. The average values of the results were used as a comparison. The results are discussed in the following, while the detailed tables are reported on the website http://prolog.univie.ac.at/research/VRPandBPP/. In this paper we only provide a synthesis of these results, presented in Table 1. Table 1. Comparison of the performance of various indexing candidates Number of results better than benchmark: Method Instances 01-18 Instances 19-36 Without index STL Map STL Map Continued MLH MLH Continued
21 31 42 17 28
32 44 79 27 67
Number of results equal to benchmark: Method Instances 01-18 Instances 19-36
All instances
Without index STL Map STL Map Continued MLH MLH Continued
11 13 37 10 39
All instances
1 1 1 1 1
34 37 43 38 38
Number of results worse than benchmark: Method Instances 01-18 Instances 19-36
All instances
Without index STL Map STL Map Continued MLH MLH Continued
33 36 42 37 37
46 41 11 43 14
68 58 47 72 61
114 99 58 115 75
With each of the five methods it is possible to improve the benchmark (ACO) solution for some instances. But no method of the five outperforms the ACO results on all instances. The weakest method is the candidate with the MLH index structure without the continued branch-and-bound procedure. This method could improve the benchmark only 27 times and is 115 times worse. The best performing method is the STL map with continued branch-and-bound. It outperforms the benchmark 79 times, is 58 times worse and can produce 43 times the same solution quality. The second best method is the normal STL map without the continued branch-and-bound. Two instances, 1001 and 3504, can not be solved by any of these methods. For both instances only solutions with an infeasible number of routes can be found, but for different reasons. For instance 1001 the savings algorithm in the
172
J. Strodl et al.
beginning produces a good solution with one more route than allowed, and then the improvement procedure fails at improving the given quality in compliance with the capacity constraint. Here a redesign of the acceptance decision could improve the situation. For instance 3504 the time limit is the problem: the STL map with continued branch-and-bound candidate was able to find a feasible solution, even better than the benchmark solution, after two more hours. So here the performance is the bottleneck. We note that using the continued branch-and-bound always improves the situation, be it with the STL map or with the MLH. This shows that some packing subproblems are worth some extra CPU time, and that finding the proper balance for spending CPU resources is vital to a good overall optimization process. Additionally, we also note that the more sophisticated MLH cannot compete with the simpler (and lighter) binary tree behind STL map for the purpose of looking up already considered routes in the context of our research.
6
Conclusion
In this paper, we adapted an existing variable neighborhood search framework for another routing problem with packing constraints [18] to the 2-dimensional vehicle routing problem. This problem includes a NP-hard subproblem for checking the feasibility of routes under packing constraints. This packing subproblem can be solved by a branch-and-bound algorithm, which is costly in terms of CPU resources. We therefore also developed various indexing mechanisms in order to avoid re-calculating feasibility of similar routes several times; this in order to spend less time in the branch-and-bound packing algorithm, and more time in the VNS itself. In addition to traditional binary trees, we developed a multi-level extendible hashing scheme which allows to look up sub- and supersets. Our experiments show that on average the binary tree performs better than the MLH when it comes to quickly looking up already processed routes within a metaheuristic solution procedure. As a matter of fact, looking up sub- and supersets does not bring a spectacular improvement in our case, although it does have a cost. Furthermore, we developed a procedure in order to suspend and resume the branch-and-bound algorithm on-the-fly, which allows to dynamically adapt the CPU budget spent on packing to the search history. This is done by extending the time limit allowed for packing a given route, in case this route is often used by the VNS. Experiments show that this mechanism is very useful, and always brings an improvement on the overall VNS results, regardless of which data structure is used to store already processed routes. Finally, new best results for the standard instances on the 2L-CVRP were obtained.
Acknowledgments Financial support from the Austrian Science Fund (FWF-project no. P20342N13) is gratefully acknowledged.
Index structures on 2L-CVRP
173
References 1. Dell’Amico, M., Martello, S., Vigo, D.: A lower bound for the non-oriented twodimensional bin packing problem. Discrete Applied Mathematics 118 (2002) 2. Clarke, G., Wright, J.: Scheduling of vehicles from a central depot to a number of delivery points. Operations Research 12, 568–581 (1964) 3. Deppisch, U.: S-tree: a dynamic balanced signature index for office retrieval. In: SIGIR 1986: Proceedings of the 9th annual international ACM SIGIR conference on Research and development in information retrieval, New York, pp. 77–87 (1986) 4. Fuellerer, G., Doerner, K., Hartl, F., Iori, M.: Ant colony optimization for the twodimensional loading vehicle routing problem. Computer and Operations Research (2007) 5. Gendreau, M., Iori, M., Laporte, G., Martello, S.: A tabu search heuristic for the vehicle routing problem with two-dimensional loading constraints. Networks 51(1), 4–18 (2008) 6. Hansen, P., Mladenovi´c, N.: Variable neighborhood search: Principles and applications. European Journal of Operational Research 130, 449–467 (2001) 7. Helmer, S., Neumann, T., Moerkotte, G.: A robust scheme for multilevel extendible hashing. Technical Report 19/01, University of Mannheim (2001) 8. Helmer, S., Neumann, T., Moerkotte, G.: A robust scheme for multilevel extendible hashing. In: Proceedings of the 18th International Symposium on Computer and Information Sciences (IS-CIS 2003), Antalya, pp. 220–227 (2003) 9. Helmer, S., Aly, R., Neumann, T., Moerkotte, G.: Indexing Set-Valued Attributes with a Multi-Level-Extendible Hashing Scheme (2007) 10. Iori, M., Salazar, G., Vigo, D.: An exact approach for the vehicle routing problem with two-dimensional loading constraints. Transportation Science 41(2), 253–264 (2007) 11. Lodi, A., Martello, S., Vigo, D.: Heuristic and Metaheuristic Approches for a Class of Two-Dimensional Bin Packing Problems. INFORMS Journal on Computing 11(4) (Fall 1999) 12. Martello, S., Vigo, D.: Exact Solution of the Two-Dimensional Finite Bin Packing Problem. Management Science 44(3), 388–399 (1998) 13. Mladenovi´c, N., Hansen, P.: Variable neighborhood search. Computer and Operations Research 24, 1097 (1997) 14. Elizabeth, S.I., Izaaz, Y., Nadarajan, R.: On the SD-tree construction for optimal signature operations. In: In Proceedings of the 1st Bangalore Annual Compute Conference, COMPUTE 2008, Bangalore, India, January 18-20. ACM, New York (2008) 15. SGI: Sandard Template Library Programmer’s Guide, http://www.sgi.com/tech/ stl/index.html 16. Taillard, E., Badeau, P., Gendreau, M., Guertin, F., Potvin, J.: A tabu search heuristic for the vehicle routing problem with soft time windows. Transportation Science 31, 170–186 (1997) 17. Tousidou, E., Bozanis, P., Manolopoulos, Y.: Signature-based structures for objects with set-valued attributes. Inf. Syst. 27(2), 93–121 (2002) 18. Tricoire, F., Doerner, K.F., Hartl, R.F., Iori, M.: Heuristic and Exact Algorithms for the Multi-Pile Vehicle Routing Problem. OR Spectrum (2010) (available online)
Variable Neighborhood Search Coupled with ILP-Based Very Large Neighborhood Searches for the (Periodic) Location-Routing Problem Sandro Pirkwieser and G¨ unther R. Raidl Institute of Computer Graphics and Algorithms Vienna University of Technology, Vienna, Austria {pirkwieser,raidl}@ads.tuwien.ac.at
Abstract. This work deals with the application of a variable neighborhood search (VNS) to the capacitated location-routing problem (LRP) as well as to the more general periodic LRP (PLRP). For this, previous successful VNS algorithms for related problems are considered and accordingly adapted as well as extended. The VNS is subsequently combined with three very large neighborhood searches (VLNS) based on integer linear programming: Two operate on whole routes and do a rather coarse, yet powerful optimization, with the more sophisticated one also taking the single customers into account, and the third operates on customer sequences to do a more fine-grained optimization. Several VNS plus VLNS combinations are presented and very encouraging experimental results are given. Our method clearly outperforms previous PLRP approaches and is at least competitive to leading approaches for the LRP.
1
Introduction
The location-routing problem (LRP) combines two classical NP-hard problems: the facility location problem (FLP) and the vehicle routing problem (VRP). The LRP occurs when it is necessary to place some facilities at given locations, assign customers to them, and serve these customers by a fleet of vehicles, often imposing a limit on the maximal load (capacity) of a vehicle. Additionally, also capacity constraints on the facilities can and will be considered in the following. Hence, contrary to the simple out-and-back routes visiting single customers in the classical FLP, one is faced here with multi-stop routes. Solving the LRP demands a strategic (facility placement) and tactical (routing) planning task at the same time, contributing to the potential practical relevance of the LRP. Considering both aspects simultaneously is in favor of solving them in a subsequent way (usually starting with placing the facilities first), since the latter is more prone to yield suboptimal solutions [1]. An additional interesting strategic level can be incorporated by considering the LRP for a given planning period, resulting in the periodic LRP (PLRP). Here, specific customers must be served several times during the planning period. The following definitions are targeted to the PLRP only since the LRP can be considered as special case when having only a single day planning horizon. A M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 174–189, 2010. c Springer-Verlag Berlin Heidelberg 2010
VNS Coupled with ILP-Based VLNS for the (P)LRP
175
planning horizon of t days, referred to by T = {1, . . . , t}, is considered and it is defined on a complete, undirected, weighted graph G = (V, E), with V = VC ∪VD being the set of nodes, composed of n customers VC = {0, . . . , n − 1} and m = j} ∪ potential depots VD = {n, . . . , n + m}, and E = {{i, j} | i, j ∈ VC , i {{i, j} | i ∈ VC , j ∈ VD } being the set of edges. Travel cost cij ≥ 0, independent of the day, are given for any pair of nodes i, j ∈ V . Each depot i ∈ VD has an associated capacity Wi and opening costs Oi . Further, a homogeneous fleet of K vehicles, each having capacity Q, is available per depot and day. The fixed cost of using a single vehicle at least once during T is given by F , and each vehicle is limited to perform one single route per day. Further, each customer j ∈ VC has defined a total demand dj , a visit frequency fj , and a non-empty set Cj ⊆ {T | T ⊆ T, |T | = fj } of allowed combinations of visit days. The actual demand of customer j on day l using visit combination r ∈ Ci is assumed to be given by djlr . The PLRP then aims at selecting facilities (depots) to be opened as well as a single visit combination per customer, and finding (at most) N ≤ K vehicle routes on each of the t days on G such that: – Each route starts and ends at the same opened depot within the same day, – each customer j belongs to fj routes over the planning horizon at those days belonging to the selected visit day combination, overall satisfying its demand dj and respecting the given djlr values, – the total load of each route does not exceed vehicle capacity limit Q, – for each opened depot i the total load of each route assigned to it on any day does not exceed depot capacity limit Wi , – the total costs of opening depots, fixed costs for used vehicles, and corresponding travel costs are minimized. In this contribution we present a variable neighborhood search (VNS) suited for the periodic as well as the non-periodic LRP. For this we combine successful VNS variants/concepts for similar problems. To further improve the overall performance, very large neighborhood searches based on integer linear programming are introduced, and they are combined with the VNS in a fruitful way. The remainder is organized as follows: Related work is presented in the next section, the VNS is the topic of Section 3, and the very large neighborhood searches are detailed in Section 4. Experimental results for both, LRP and PLRP, are given in Section 5. Section 6 finishes the work with concluding remarks.
2
Related Work
The LRP with capacitated vehicles and depots was primarily dealt with in recent years only, earlier work often considered one of both restrictions exclusively. Among the currently leading methods for the so-called general LRP are (hybrid) metaheuristics by Prins et al. [2,3] and Duhamel et al. [4,5] as well as combinations of exact techniques and heuristics, e.g. [6]. A recent survey of different LRPs and solution methods can be found in Nagy and Salhi [7]. The authors emphasize the high practical relevance of the LRP in supply chain management as well as a substantially increasing interest in the last years.
176
S. Pirkwieser and G.R. Raidl
The PLRP was introduced only recently by Prodhon together with an iterative algorithm for solving it [8]. At the HM 2008 workshop, the same author(s) presented a sophisticated genetic algorithm [9] yielding improved results. Finally, at the HM 2009 workshop the so far best performing algorithm for the PLRP was again introduced by Prodhon [10], being a hybrid of evolutionary local search and path relinking, even more concentrating on the periodic aspect. A similar VNS as the one applied here has been used for the periodic VRP (PVRP) [11], the PVRP with time windows (PVRPTW) [12], as well as for the related multi depot VRP with time windows [13]. As already mentioned, we draw upon the experience described therein and obtained by ourselves. Furthermore, a very large neighborhood search similar to the one we present in Section 4.2 was introduced by De Franceschi et al. [14] for VRPs in general. The very large neighborhood search of Section 4.1 is related to it, but operates on a coarser level of the problem. A variant of it was recently successfully applied to the PVRPTW by us [15]. Finally, for a survey on ongoing trends of combining metaheuristics and exact methods, especially integer linear programming techniques, we refer to [16].
3
Variable Neighborhood Search for the (P)LRP
The variable neighborhood search (VNS) [17] metaheuristic applies random steps in neighborhoods with growing size for diversification, referred to as shaking, and uses an embedded local search component for intensification. It has been successfully applied to a wide range of combinatorial optimization problems, among others for very related problems, see Section 2. In the following we give a overview on our VNS for the (P)LRP. To smooth the search space, the VNS relaxes the vehicle load as well as the depot load restrictions and adds penalties corresponding to the excess of these constraints to the cost function; whereat we settled to use a constant weighting of 10000 for all instances considered in this work. An initial solution is created in the following way: 1. Choose a single visit day combination r ∈ Cj per customer j ∈ VC at random. 2. Determine the actual lower bound for the accumulated depot capacity based on the previously selected visit combinations: WLB = argmax j∈VC djlr , l∈T for the LRP this equals the sum of the customer demands: j∈VC dj . 3. Select depots to be opened at random one by one until their combined capacity is greater or equal than WLB . 4. Repeat the following steps for each day l in T : (a) Assign each customer to be visited on day l to its nearest opened depot, thereby considering penalized depot load violations. (b) Apply the well-known Clarke and Wright savings algorithm [18] until no more routes can be feasibly merged due to the vehicle load restriction. (c) In the event of ending up with more than N routes, least customer routes are selected and customers contained therein are re-added in a greedy
VNS Coupled with ILP-Based VLNS for the (P)LRP
177
way on that day, allowing (penalized) excess of vehicle load. [Note that due to the structure of the considered instances this never happened.] We deem the initialization procedure rather straightforward, being not that sophisticated as those described in [10]. Nevertheless, we felt (and also experienced in preliminary tests) that having initial solutions of high(er) quality is often not beneficial for the subsequent optimization process, and we apply the procedure solely for initialization purposes, too. In the shaking phase we utilize five different neighborhood structures, each with several moves of increasing perturbation size (denoted by δ), yielding a total of 18 shaking neighborhoods (i.e. kmax = 18) for both LRP variants. Next, these five basic neighborhood structures are described. Exchange-segments: Exchange two random segments of variable length between two routes at the same depot and on the same day. One of the segments might be empty, realizing a customer relocation. Exchange-segments-two-depots: In principle similar to the previous exchange-segments but both segments are located at two distinct depots. This neighborhood structure facilitates the partitioning of customers to the opened depots. Exchange-segments is applied in case only a single depot is opened. Change-two-depots: A previously closed depot is opened and subsequently another opened depot is closed such that the actual lower bound regarding the depot capacity WLB is still satisfied. After opening the selected depot it is tried to relocate routes to it in a cost saving manner, which means to place the new depot at minimum cost between two consecutive customers. Afterwards the routes of the depot to be closed are relocated to an opened depot one by one in the least expensive way (as before also using the penalized objective function). After such a neighborhood move the number of opened/closed depots stays the same. A prerequisite is that at least one of all the available depots is not opened yet, the following change-depot is applied otherwise. Change-depot: Here the status of a single depot is changed, i.e. from closed to opened or vice versa. The necessary route relocation operations are applied as for change-two-depots. Finally, this neighborhood move allows to alter the number of opened/closed depots. However, also here it is guaranteed that the actual lower bound regarding the depot capacity WLB is still satisfied. Change-visit-combinations: For tackling the periodic aspect of the PLRP it is necessary to enable the VNS to change the selected visit combination per customer. As for the periodic VRPs, it turned out that randomly changing several visit combinations with greedy insertion for the new visit days (also allowing to reassign the same visit combination) performs very well. In this work we only consider a fixed shaking neighborhood order, which is detailed in Table 1 for the LRP and in Table 2 for the PLRP. Apart from the obvious difference of using change-visit-combinations for the PLRP only, a greater focus is laid on exchanging segments for the LRP instead. For intensification we apply the well-known 3-opt intra-route exchange procedure in a best improvement fashion, only considering routes changed during shaking, and re-applying the operator until no more improvement is possible.
178
S. Pirkwieser and G.R. Raidl Table 1. (Fixed) Shaking neighborhood order used for the LRP k 1–5 6 7–11 12 13–15 16–18
Nk Exchange-segments of maximal length δ = k Exchange-segments of maximal lengths bounded by corresponding route size (δ = 6) Exchange-segments-two-depots of maximal length δ = k − 6 Exchange-segments-two-depots of maximal lengths bounded by corresponding route size (δ = 6) Change-two-depots is applied up to δ = k − 12 times Change-depot is applied up to δ = k − 15 times
Table 2. (Fixed) Shaking neighborhood order used for the PLRP k 1–6 7–9 10–12 13–15 16–18
Nk Change-visit-combinations for up to δ = k customers Exchange-segments of maximal length δ = k − 6 Exchange-segments-two-depots of maximal length δ = k − 9 Change-two-depots is applied up to δ = k − 12 times Change-depot is applied up to δ = k − 15 times
Afterwards, each new incumbent solution is also subject to a 2-opt∗ inter-route exchange heuristic [19]. Hereby for each pair of routes of the same day and depot all possible exchanges of the routes’ end segments are tried, also applied repeatedly. For the LRP this is further applied with a probability of 0.2 to each newly derived solution lying within 3% to the current incumbent. To often enhance the overall VNS performance quite substantially, in addition to better solutions sometimes also solutions having a worse objective value are accepted. As in [11,12] this is done in a systematic way using the Metropolis criterion like in simulated annealing [20]. A linear cooling scheme is used in a way such that the acceptance rate of worse solutions is nearly zero in the last iterations. Though this is somewhat of a hybrid variant on its own, we still denote it as VNS.
4
ILP-Based Very Large Neighborhood Searches
The general idea of very large(-scale) neighborhood search (VLNS) [21] is to apply a more sophisticated procedure than naive enumeration to search for a best (or better) solution within a reasonably large but restricted part of the whole search space induced by an incumbent solution. Various techniques especially including (mixed) integer programming methods, dynamic programming, and constraint programming have been successfully used in VLNS as embedded optimization procedures. In the following we will introduce two VLNS procedures based on integer linear programming (ILP) applicable to the LRP as well as to the PLRP.
VNS Coupled with ILP-Based VLNS for the (P)LRP
4.1
179
VLNS Operating on Routes
The first VLNS deals with (re-)locating whole routes to depots, as well as opening/closing depots in the course of the application. In fact, we implemented a simpler version (denoted as V1 ) and a more sophisticated one (denoted as V2 ) of it, the latter building upon a set covering formulation which is to some degree similar to the one used for the PVRPTW in [15] and being especially appealing for the PLRP in principle. V1 is a special case of V2 and basically resembles the procedure applied in [6] for the LRP. There the authors (approximately) solve a Lagrangian relaxation formulation of the FLP subproblem via considering the aggregated routes as supercustomers. For this several subproblems need to be solved many times, as well as a lower and upper bound be computed. Contrary, we directly solve the resulting ILP model which is presented in the following, and is also applicable to the PLRP: L Oi yi + Cij xij + F zi (1) min i∈VD
subject to
l∈T i∈VD j∈R(l)
i∈VD
xij = 1
∀l ∈ T ; ∀j ∈ R(l)
(2)
xij ≤ zi
∀i ∈ VD ; ∀l ∈ T
(3)
∀i ∈ VD ; ∀l ∈ T
(4)
i∈VD
j∈R(l)
Lj xij ≤ Wi
j∈R(l)
Wi yi ≥ WLB
(5)
i∈VD
zi ≥ yi xij ∈ {0, 1} yi ∈ {0, 1} zi ∈ N
∀i ∈ VD
(6)
∀i ∈ VD ; ∀l ∈ T ; ∀j ∈ R(l) ∀i ∈ VD
(7) (8)
∀i ∈ VD
(9)
The objective (1) is to minimize costs for opening depots, routing costs (here only route location costs), as well as vehicle fixed costs. The set of all considered (aggregated) routes per day l is denoted by R(l), the least cost of locating it L . We introduce following binary variables: xij (7) indicating at depot j is Cij whether or not depot i hosts route j, yi (8) if depot i is opened, as well as integer variables zi (9) stating the maximum number of routes located at depot i of all days, used for the vehicle fixed costs in (1). The following restrictions are applied: Each route must be located at one depot (2), the value of the zi variables is determined by (3), and the load of a depot must be respected (4), with Lj denoting the load of route j. The last two constraints are to strengthen the model: the accumulated capacity of the selected depots must be at least the actual corresponding lower bound (5), and the depot with its corresponding
180
S. Pirkwieser and G.R. Raidl
maximum number of routes are coupled via (6); refer to [22], though they used the minimal number of depots in (5). The previous model is built for a given feasible solution and the solution’s routes are used for the corresponding day only. As already mentioned, the more sophisticated variant formulates a similar, yet potentially much larger neighborhood as a set covering model. Therefore, the main difference between V1 and V2 is that although both operate on whole routes, the latter takes the single customers into account. The whole model including constraints for both the LRP and the PLRP can be stated as (also refer to [22] for a similar model for the LRP only): L min Oi yi + (Cij + CjR ) xij + F zi (10) i∈VD
l∈T i∈VD j∈R(l)
subject to
(3)–(4) pnr ≥ 1
anj xij −
i∈VD j∈R(l)
bnrl pnr ≥ 0
(11)
∀n ∈ VC ; ∀l ∈ T
(12)
xij ≤ N
∀l ∈ T
(13)
∀n ∈ VC ; ∀i ∈ VD ; ∀l ∈ T
(14)
i∈VD j∈R(l)
anj xij − yi
j∈R(l)
anj ≤ 0
j∈R(l)
Wi yi −
i∈VD
∀n ∈ VC
r∈Cn
r∈Cn
i∈VD
Wi yi ≥ WLB
bnrl pnr dnlr ≥ 0
n∈VC r∈Cn
l∈T i∈VD j∈R(l)
xij −
n∈VC
Q
(15)
i∈VD
dn
∀l ∈ T
(16)
≥0
dnj xij ≥ dn
(17) ∀n ∈ VC
(18)
∀n ∈ VC ; ∀r ∈ Cn ; ∀l ∈ T
(19)
∀n ∈ VC ; ∀r ∈ Cn
(20)
l∈T i∈VD j∈R(l)
dnj xij − djlr bnrl pnr ≥ 0
i∈VD j∈R(l)
(6)–(9) pnr ∈ {0, 1}
Beside the adopted constraints and variables from V1 following additions were made: For each customer n ∈ VC , binary variables pnr (20) indicate whether or not visit combination r ∈ Cn is chosen. The objective function (10) now also includes routing costs CjR for visiting the customers in route j (without the depot connection). Cover constraints (11) guarantee that at least one visit
VNS Coupled with ILP-Based VLNS for the (P)LRP
181
day combination is selected per customer, visit constraints (12) link the routes and the visit combinations, whereat anj and birl are binary constants indicating whether or not route j visits customer n and if day l belongs to visit combination r ∈ Cn of customer n, respectively, and the number of routes per day may not exceed N (13). Again, constraints (14)–(17) strengthen the model: the routes containing customer n located at depot j and the depot itself are coupled in (14), (15) is like for V1 and only used in case of the LRP, further (16) is a special variant instead of the latter for the PLRP, incorporating the periodic aspect, and finally, the minimal amount of vehicles (routes) necessary is set by (17). The motivation for a set covering model was to be able to exploit the routes of more than one feasible solution. A consequence with respect to the PLRP is that the selected visit combination of several customers might (or better need) to eventually change. However, the fact that the daily demand of a customer depends on the chosen visit combination does not ”suit the model very well“: In order to build a feasible PLRP solution out of the ILP solution it might be necessary to change the amount delivered to a customer, which is a potential problem if the amount has to be increased due to given vehicle load constraints. At least we alleviate this problem by introducing constraints (18) and (19), reducing the chance of a conflict by forcing a certain amount to be delivered per customer (and chosen visit combination), with dnj denoting the amount delivered to customer n in route j. If all fails, the customer is tried to be added in a feasibly way via greedy insertion. Finally, also over-covered customers need to be dealt with: we simply remove all but their first occurrence. The model of V2 is created for a given set of feasible solutions, again using the solution’s routes for the corresponding day only. This solution set always contains the current incumbent solution as well as a preferred number of optional solutions which are selected via binary tournament from the set of all improved solutions (found during the run up to that time). This way of handling it has the advantage of keeping a certain diversity (assuming enough available solutions) yet still favoring good solutions, as well as having to store no additional solutions. The current incumbent further acts as a starting solution for the ILP solver. Basically, this model could be applied as the master problem of classical column generation as well [23], of course a suitable subproblem for generating new columns would have to be defined. However, our intention is to have a (relatively) fast supplementary neighborhood. Therefore we restrict ourselves to producing the columns (routes) with the VNS only, i.e. having a pure metaheuristic column generation. Regarding runtime, there is the possibility to restrict the number of depots a route can be located to (the x% least costly ones), whereas the routes of the best solution in the given set are allowed to be located at any depot. 4.2
VLNS Operating on Customers
Our second type of VLNS (denoted by V3 ) operates on the customer level, it is therefore responsible for finer-grained optimization, yet it bears quite some resemblance with V2 in that it also makes use of a set covering formulation. It is similar to the so-called ILP-based refinement heuristic presented by De Franceschi et al. [14].
182
S. Pirkwieser and G.R. Raidl
The idea is to extract sequences of customers from given routes, re-connect the disconnected route parts, and then find an optimal allocation of these sequences to the possible insertion points, i.e. between any two (remaining) consecutive customers. Whenever sequences’ customer sets are not disjoint, this neighborhood is hard to solve and an ILP formulation as a set covering model is appropriate. A suitable one for our setting is the following: I min CjR + Csi xsi (21) j∈R
s∈S i∈Is
subject to
xsi ≥ 1
∀n ∈ VC
(22)
xsi ≤ 1
∀i ∈ I
(23)
Ls xsi ≤ Q
∀j ∈ R
(24)
Ls xsi ≤ Wi
∀i ∈ VD
(25)
∀s ∈ S; ∀i ∈ Is
(26)
s∈S:n∈s i∈Is
Lj + j∈R(i)
s∈S:i∈Is
s∈S i∈Is ∩I(j)
Lj +
s∈S i∈Is ∩I(j)
xsi ∈ {0, 1}
I The objective (21) is to minimize the insertion costs Csi of the sequences s ∈ S in their possible or allowed insertion points i ∈ Is . Each extracted customer must be covered by at least one of the sequences containing it (22). Further, each insertion point can hold at most one sequence (23). Constraints (24) and (25) are responsible to enforce limits on vehicle and depot load, respectively. Here, Lj again denotes the load of route j and Ls is the load of sequence s, I(j) are all insertion points provided by route j, and R(i) are all routes located at depot i. Several methods were proposed in the literature for similar or related neighborhoods to extract customers from given routes. Among them to pick the customers inducing the greatest detour [24], select a seed node and neighbored nodes, to select all odd or even customers of a route, or just select them at random on a per route basis; refer to [14] for more details. Here we settle for a simple model: select the customers independent of the actual routes, since it is to be expected that no selection scheme is generally better as all others, and preliminary results showed no great difference, too. Therefore we proceed in the following way: choose a preferred number of consecutive iterations iterV3 of V3 , randomly partition all customers into equally sized sets Ni with |Ni | = n/iterV3 , and finally perform V3 iterV3 times, for each iteration i using set Ni as customers to be extracted as well as considering a specific set of feasible solutions. The latter is created as for V2 described in Section 4.1. The routes of the current incumbent represent the considered set of routes R, and together with the sequences contained therein they are used as a starting solution for the ILP solver. Initially all possible sequences from the given solutions’ routes are extracted adhering to the pre-selected customers, and the potential insertion points are determined while processing routes of set R. This way we omit the costly generation of sequences
VNS Coupled with ILP-Based VLNS for the (P)LRP
183
via making use of the linear programming dual values as in [14], yet (most likely) also obtain non-disjoint sequences, hence like for V2 we again exploit the information of several solutions. Additionally, for each sequence of length more than one we create all possible sequences containing one of the customers each. Again, a customer is only accepted in the resulting solution on its first occurrence. Note that V3 is applied on a per day basis only, which has to be considered when using it for the PLRP. The possible insertion points Is per sequence s are determined by taking the x% least costly ones, also omitting infeasible pairings.
5
Experimental Results
The algorithms have been implemented in C++, compiled with GCC 4.3 and executed on a single core of a 2.83 GHz Intel Core2 Quad Q9550 with 8 GB RAM. The general purpose MIP solver CPLEX version 12.1 is used to solve the VLNS’ ILP models. For both problem variants we took freely available benchmark data sets comprising 30 instances each, provided by Caroline Prodhon [25]. The instances differ in the number of customers n, depots m, and clusters, as well as in the vehicle capacity (’a’ denotes low, and ’b’ high) and are named: n-m-#clusters[a,b]. The PLRP instances further span a working week, i.e. five working days and two idle days and customers must be visited one, two, or three times, offering five, three, and one visit combinations, respectively. We refer to [25,10] for computing the daily demands djlr . More details about the instances can be found in [6] regarding the LRP and in [10] for the PLRP. VNS is always run for 105 iterations, setting an initial temperature of 500 and apply linear cooling every 100 iterations. The combination with the VLNS variants is performed in the following way: V1 is applied on each new incumbent solution since it can be considered quite fast (denoted by VNS+V1 ). The other two, more demanding VLNS are executed at fixed times, namely after every 104 iterations of the VNS, resulting in 10 applications per run. Thereby we either solely apply V2 (resulting in VNS+V1,2 ) or V2 directly followed by V3 (denoted by VNS+V1,2,3 ). Naturally, more combinations would be possible, but for now we solely investigated the effect of gradually adding all neighborhoods. The number of additional feasible solutions used for V2 is three and five for V3 , iterV3 is set to four. For both, possible depots for routes as well as possible insertion points for sequences we only consider the set of the least costly 33%, whereas the initial depot location is always retained. Basically, the runtime per application of each VLNS is restricted to two seconds, although this limit is seldom reached. Each new VLNS incumbent is subject to 2-opt∗ , those of V3 also to 3-opt. For each algorithm setting we perform 30 runs per instance, and state the average costs (avg.), the corresponding standard deviations in percentage (sdv.[%]), and the runtimes in seconds (t[s]). The results for the LRP are shown in Table 3, those for the PLRP in Table 4. Furthermore, %-gap min, BKS and %-gap avg., BKS state the average gap to the so far best known solutions (mostly up to date values can be found at [25], some newer values for the LRP were taken from [5]) of
184
S. Pirkwieser and G.R. Raidl Table 3. Results of VNS and VNS plus VLNS combinations on the LRP VNS
Instance
sdv. [%]
avg. 20-5-1a 20-5-1b 20-5-2a 20-5-2b 50-5-1a 50-5-1b 50-5-2a 50-5-2b 50-5-2aBIS 50-5-2bBIS 50-5-3a 50-5-3b 100-5-1a 100-5-1b 100-5-2a 100-5-2b 100-5-3a 100-5-3b 100-10-1a 100-10-1b 100-10-2a 100-10-2b 100-10-3a 100-10-3b 200-10-1a 200-10-1b 200-10-2a 200-10-2b 200-10-3a 200-10-3b %-gap %-gap
min, BKS avg., BKS
54881.27 39104.00 48920.13 37542.00 90732.47 64197.23 89931.77 68884.60 84582.17 52564.40 87216.20 62132.77 279817.40 217985.50 196410.30 158949.53 203481.40 156289.00 316581.83 268297.33 248775.67 208692.87 259271.30 209812.43 489068.47 387485.03 462234.10 387271.63 481857.00 377792.13
VNS+V1 t [s]
0.56 1.1 0.00 1.2 0.12 1.1 0.00 1.2 1.05 1.5 1.50 2.3 0.89 1.6 1.17 3.7 0.39 2.2 0.88 4.4 0.83 1.3 0.94 2.3 0.52 3.6 0.55 6.4 0.58 2.4 0.65 3.1 0.65 2.4 0.72 3.1 1.67 4.2 4.00 6.8 0.67 3.5 0.79 5.2 0.52 3.5 0.99 5.0 0.71 11.8 0.72 9.5 0.88 10.7 0.87 9.3 0.58 10.4 0.70 7.3
0.65 2.29
sdv. [%]
avg. 54905.70 39104.00 48933.90 37542.00 90780.50 64348.83 89553.50 68060.00 84500.33 52350.83 87039.93 62236.80 279017.83 217940.50 196388.63 158355.97 202460.07 155749.70 292857.77 240989.67 246791.30 207346.30 256511.00 209047.90 483895.40 385752.33 454203.83 381417.83 477278.80 372415.27
VNS+V1,2 t [s]
0.59 1.1 0.00 1.2 0.29 1.1 0.00 1.2 0.96 1.5 1.07 2.2 0.82 1.7 0.79 3.4 0.33 2.2 0.76 4.4 0.72 1.3 0.95 2.3 0.41 3.6 0.57 6.5 0.42 2.5 0.45 3.2 0.38 2.4 0.93 3.1 0.65 5.5 1.26 6.8 0.35 3.8 0.68 5.3 0.72 3.7 0.76 5.1 0.33 11.7 0.70 8.7 0.43 10.7 0.47 8.8 0.40 11.0 0.69 6.7
0.28 1.16
sdv. [%]
avg. 54873.67 39104.00 48932.53 37542.00 90684.70 64125.30 89484.20 68108.50 84437.20 52326.63 87095.17 62208.67 279038.27 218012.67 196147.17 158682.53 202131.23 155873.37 293227.17 241682.67 246363.47 206373.40 255896.97 208041.30 483788.30 385085.97 453625.67 380320.33 477010.47 370046.37
VNS+V1,2,3 t [s]
0.51 1.2 0.00 1.2 0.27 1.1 0.00 1.2 0.92 1.6 1.20 2.3 0.93 1.7 0.65 3.5 0.35 2.3 0.63 4.5 0.96 1.5 1.00 2.4 0.34 3.8 0.68 6.6 0.41 2.7 0.49 3.3 0.51 2.7 0.95 3.1 0.68 7.3 2.81 8.3 0.44 4.6 0.46 5.6 0.66 5.2 0.61 5.5 0.53 11.7 0.59 9.8 0.28 11.6 0.44 9.6 0.38 13.2 0.81 7.9
0.18 1.06
avg.
sdv. [%]
t [s]
54890.33 39104.00 48933.90 37542.00 90388.87 63471.57 89858.77 68013.17 84208.23 52131.20 86727.53 62095.30 278291.83 216285.93 195022.27 158217.13 201748.07 154917.30 291775.00 238058.60 245614.20 205718.67 255140.30 207410.27 481141.73 381516.50 452374.37 376836.03 475344.83 365705.17
0.39 0.00 0.29 0.00 0.71 0.67 1.20 1.00 0.26 0.64 0.33 0.75 0.33 0.50 0.44 0.56 0.34 0.64 0.45 0.98 0.44 0.64 0.40 0.68 0.24 0.28 0.20 0.27 0.32 0.34
1.3 1.3 1.2 1.4 1.9 2.7 2.0 3.7 2.6 4.9 1.7 2.6 4.9 8.0 4.0 4.5 3.9 4.4 8.5 9.8 5.6 6.9 6.6 6.7 18.4 16.2 16.7 15.5 18.3 15.2
0.01 0.64
the best solutions obtained in the 30 runs each as well as of the average solution values of these runs of the corresponding algorithm. Average results are marked bold if they yield a significant improvement over solely applying the VNS; verified with a Wilcoxon rank sum test with an error level of 5%. We will start by comparing our enhanced VNS methods to solely applying VNS, followed by a comparison to leading methods of the corresponding problem variant. It can be observed that the VNS performs very well in general, but especially on the PLRP. Adding V1 (VNS+V1 ) induces only a slight increase in runtime, yet for the LRP the average gap is nearly halved, and for the PLRP the negative gap is further decreased by 0.25%. Additionally applying V2 (VNS+V1,2 ) further improves the results for both variants, this time showing a greater impact on the PLRP, which was partly expected due to the incorporation of the periodic aspect. Not surprisingly the increase in runtime is also greater for the PLRP, and since the model’s size depends on the number of depots, this is especially notable on the instances with m = 10. Finally, also using V3 (VNS+V1,2,3 ) increases the runtimes contrary to before, since its model’s size depends on the number of customers (per day), which mainly concerns the LRP, where longer routes appear
VNS Coupled with ILP-Based VLNS for the (P)LRP
185
Table 4. Results of VNS and VNS plus VLNS combinations on the PLRP VNS Instance 20-5-1a 20-5-1b 20-5-2a 20-5-2b 50-5-1a 50-5-1b 50-5-2a 50-5-2b 50-5-2aBIS 50-5-2bBIS 50-5-3a 50-5-3b 100-5-1a 100-5-1b 100-5-2a 100-5-2b 100-5-3a 100-5-3b 100-10-1a 100-10-1b 100-10-2a 100-10-2b 100-10-3a 100-10-3b 200-10-1a 200-10-1b 200-10-2a 200-10-2b 200-10-3a 200-10-3b %-gap %-gap
min, BKS avg., BKS
VNS+V1
avg.
sdv. [%]
t [s]
79454.10 78343.80 79804.87 63257.53 152972.60 142449.97 143731.17 116350.80 175978.60 106017.00 157683.73 112633.10 356720.93 238598.30 272547.67 169677.70 227452.33 176998.30 268807.80 217358.80 267882.93 175829.90 265910.37 199922.63 453541.50 384547.63 397358.37 328169.77 557255.00 362268.50
0.79 2.18 1.24 0.90 1.74 1.52 0.78 1.09 1.68 2.19 1.30 1.65 0.99 1.50 0.82 1.74 1.09 1.71 0.97 1.47 1.33 1.58 1.32 1.67 0.80 1.07 0.90 1.27 1.00 1.47
1.6 1.6 1.6 1.5 3.7 3.8 3.6 3.4 3.0 3.2 3.6 3.6 6.2 7.0 6.0 6.0 6.1 7.5 10.7 9.8 7.8 8.0 8.4 9.3 18.5 20.0 15.2 16.3 14.5 16.5
-4.35 -1.99
VNS+V1,2
avg.
sdv. [%]
t [s]
79411.53 79629.37 79556.57 63238.87 152477.50 142229.13 143547.83 116245.43 176993.17 104976.10 157828.03 112255.33 355023.53 237310.50 271416.67 169351.50 227125.63 176197.67 265693.07 216326.27 267811.00 175681.90 263870.90 198927.20 451017.47 384567.47 393325.00 327180.13 554921.90 361395.50
0.67 2.85 1.36 0.74 1.58 1.48 1.37 1.60 1.88 1.93 1.20 1.60 1.18 1.45 1.05 1.52 1.15 1.38 1.19 1.47 1.27 1.81 1.34 1.08 1.02 1.19 0.98 1.29 1.03 1.19
1.6 1.6 1.5 1.5 3.9 4.1 3.6 3.6 3.0 3.3 3.7 3.9 6.3 7.4 6.0 5.7 6.3 7.9 12.3 11.3 8.9 8.4 9.9 10.2 20.0 22.0 15.5 16.1 16.5 16.5
-4.68 -2.24
VNS+V1,2,3
avg.
sdv. [%]
t [s]
79361.47 78318.60 79028.73 63223.27 152329.27 141794.13 142796.73 115572.63 174541.90 105021.07 156203.50 112791.17 355883.87 238005.00 269891.33 169601.23 225138.40 176313.03 263990.00 216803.00 267365.00 175196.30 264044.60 198500.53 448584.57 383839.33 391387.60 325184.10 555822.73 361268.60
0.75 2.53 1.40 0.80 1.77 1.64 0.94 1.67 1.55 2.32 1.06 1.96 1.02 1.51 1.14 1.46 1.20 1.48 0.87 1.46 1.09 1.66 1.13 1.64 1.22 0.89 1.20 1.17 1.15 1.38
1.9 1.8 1.8 1.8 4.5 4.8 4.4 4.2 3.5 3.6 4.3 4.3 7.3 8.7 7.6 6.9 7.7 9.1 18.7 17.5 13.4 11.1 15.3 13.8 27.6 29.9 20.3 20.8 21.9 22.0
-4.92 -2.54
avg.
sdv. [%]
t [s]
79282.57 78105.87 78970.33 63096.60 152177.43 141262.33 142491.27 114849.53 175577.97 105173.47 156515.37 112162.07 355150.70 237438.70 271363.50 170040.70 226444.73 176004.53 265438.37 217084.20 268575.77 176078.47 264714.53 199679.60 452401.77 386224.97 393316.83 329007.53 560297.17 365044.00
0.72 2.52 1.27 0.80 1.00 1.69 0.92 1.92 1.96 2.11 1.02 1.67 1.25 1.78 1.28 2.03 1.45 1.61 0.94 1.27 1.22 1.70 1.47 1.55 0.94 1.37 0.75 1.80 1.00 1.27
2.1 2.1 2.1 2.0 5.0 5.2 4.8 4.6 3.9 4.0 4.7 4.7 8.1 9.5 8.1 7.4 8.2 9.9 19.9 18.9 13.6 11.7 15.0 14.4 29.6 32.4 22.3 24.4 25.0 23.4
-4.58 -2.33
in general, too. However, perhaps due to this, and also the single day planning horizon, an overall performance gain with V3 only occurs for the LRP, yielding the best solutions on average. In case of the PLRP it even reduces the overall solution quality. Taking a closer look shows that the performance is more or less the same up to instances having 50 customers, whereas afterwards it deteriorates and somehow seems to work against the optimization process. Probably it leads to getting stuck in unfavorable local optima. However, the bad performance of V3 for the PLRP is most likely also related to the structure of the instances considered, since they rather promote many small routes, offering less potential for more sophisticated intra-route improvement. Anyway, this fact needs to be investigated further, probably applying tests on altered or newly created instances. We remark that solely applying V2 would often lead to a considerably larger increase in runtime, especially for the LRP this time. So it seems that V1 achieves important preliminary work. Otherwise we deem the increase of runtime only moderate and hence omitted to state additional VNS runs with more iterations. The best found solutions of our algorithm variants over all runs performed are compared to the so far best known solutions in Table 5, stating the individual
186
S. Pirkwieser and G.R. Raidl
Table 5. Comparison of previous best known solutions (BKS) and best results obtained by our algorithm over all runs for the LRP and PLRP LRP
Instance 20-5-1a 20-5-1b 20-5-2a 20-5-2b 50-5-1a 50-5-1b 50-5-2a 50-5-2b 50-5-2aBIS 50-5-2bBIS 50-5-3a 50-5-3b 100-5-1a 100-5-1b 100-5-2a 100-5-2b 100-5-3a 100-5-3b 100-10-1a 100-10-1b 100-10-2a 100-10-2b 100-10-3a 100-10-3b 200-10-1a 200-10-1b 200-10-2a 200-10-2b 200-10-3a 200-10-3b average
PLRP
BKS
best
%-gap
BKS
best
%-gap
54793 39104 48908 37542 90111 63242 88298 67308 84055 51822 86203 61830 275993 214392 194267 157173 200246 152528 290429 234641 243778 203988 253344 204597 479425 378773 450468 374435 472898 364178
54793 39104 48908 37542 90111 63242 88298 67308 84055 51822 86203 61830 275813 213973 193671 157157 200160 152466 288540 232230 243677 203988 251128 204706 478349 378631 449571 375129 471024 363907
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 -0.07 -0.20 -0.31 -0.01 -0.04 -0.04 -0.65 -1.03 -0.04 0.00 -0.87 0.05 -0.22 -0.04 -0.20 0.19 -0.40 -0.07
78851 75727 80538 62987 157632 142359 152376 119925 177649 102824 162640 114931 364324 239235 287093 174963 238031 181334 281896 224751 282437 179047 272463 208890 464596 401901 410514 324121 574398 356618
78477 76102 77784 62133 146360 136454 138391 110043 168721 100836 152863 108790 341083 224307 260182 163191 214341 166726 256892 207326 257388 166810 253617 188678 431373 362143 380262 310110 530195 342944
-0.47 0.50 -3.42 -1.36 -7.15 -4.15 -9.18 -8.24 -5.03 -1.93 -6.01 -5.34 -6.38 -6.24 -9.37 -6.73 -9.95 -8.06 -8.87 -7.75 -8.87 -6.83 -6.92 -9.68 -7.15 -9.89 -7.37 -4.32 -7.70 -3.83
-0.13
-6.26
and the average percentage gaps between them. The encouraging results clearly show the potential of our method(s) for this problem variants. A further interesting comparison is made with regard to the dependence of runtime on instance size for previous, leading (P)LRP approaches and our VNS as well as the best performing VNS plus VLNS variant; these results are shown in Table 6 for the LRP and in Table 7 for the PLRP. Here each algorithm’s runtime is normalized by its average runtime on instances of type n = 50, m = 5, yielding a better picture as using the smallest instances with n = 20, m = 5 for it. Looking at the moderate increase of relative runtime our methods also seem very promising with respect to tackling even larger instances. Comparing the absolute runtimes with those of several LRP approaches presented in [5] using a similar computing environment (or giving scaled runtimes) is also clearly in favor of our methods. For completeness we also state in Tables 6 and 7 the overall average percentage gaps to the (previously) best known solutions as given in Table 5. Due to different practices of performing computational tests and/or presenting results we are not able to compare the different methods in a more direct way. Hence we denote the results where only a single run was executed with %-gap 1×run, BKS (those methods were claimed to be robust), and those of the average as well as
VNS Coupled with ILP-Based VLNS for the (P)LRP
187
Table 6. Showing average relative runtimes of LRP solution approaches and average percentage gaps to (previously) best known solutions GRASP MAPM LRGTS GRASP+ELS VNS VNS+V1,2,3 [2] [3] [6] [5]
n
m
50 100 100 200
5 5 10 10
%-gap %-gap %-gap
1.00 10.87 17.33 207.79
1.00 9.10 8.46 87.88
1.00 5.11 16.00 73.11
3.37
1.15
0.52
1×run, BKS
1.00 29.76 32.52 188.26
1.00 1.45 1.95 4.07
1.00 1.79 2.66 6.05
0.84
1.06 0.18
0.64 0.01
avg, BKS min, BKS
Table 7. Showing average relative runtimes of PLRP solution approaches and average percentage gaps to (previously) best known solutions n
m
IM[8]
MAPM[9]
ELS[10]
VNS
VNS+V1,2
50 100 100 200
5 5 10 10
1.00 8.01 17.97 145.14
1.00 11.26 13.45 250.78
1.00 5.50 10.15 60.95
1.00 1.85 2.58 4.82
1.00 1.88 3.56 5.65
12.32
9.37 1.45
-1.99
-2.54
%-gap %-gap
1×run, BKS avg., BKS
best solution quality as before. We note that for GRASP+ELS[5] and ELS[10] five runs were performed. Anyway, it is obvious that our methods are at least competitive to leading LRP approaches, yielding 15 new best solutions for 30 instances, and clearly outperform previous solution approaches for the PLRP, yielding new best solutions for 29 out of 30 instances.
6
Conclusions
We presented a variable neighborhood search (VNS) for the periodic locationrouting problem (PLRP) with capacitated vehicles and depots, which is also directly applicable to the LRP, i.e. the special case when having only a single day planning horizon The VNS is subsequently combined with integer linear programming-based very large neighborhood searches (VLNS). Two of them operate on a higher level via relocating whole routes to depots, considering all days at once, with one being a more sophisticated version using a set covering model. The third one deals with the location of customer sequences to insertion points in routes of a single day. Two of the VLNS are further designed to exploit the information contained in several solutions provided by the VNS. Experimental results on available benchmark test data show the excellent performance of our
188
S. Pirkwieser and G.R. Raidl
methods on the LRP and the PLRP when compared to corresponding leading approaches, both in terms of solution quality and dependence of runtime on instance size. The results further indicate almost always a gain in solution quality when gradually applying all VLNS, very often yielding significantly better results as applying VNS alone. Next, we want to incorporate the periodicity in a suitably enhanced version of the third VLNS, as well as to especially test also on other available LRP data sets as well as on new or modified PLRP instances. Since we used only a moderate amount of iterations/runtime it would be interesting to allow more resources and investigate the behavior of our methods.
Acknowledgments This work has been supported by the Austrian Science Fund (FWF) under contract number P20342-N13. The authors also want to thank the anonymous reviewers for their valuable comments.
References 1. Salhi, S., Rand, G.K.: The effect of ignoring routes when locating depots. European Journal of Operational Research 39(2), 150–156 (1989) 2. Prins, C., Prodhon, C., Calvo, R.W.: Solving the capacitated location-routing problem by a GRASP complemented by a learning process and a path relinking. 4OR 4(3), 221–238 (2006) 3. Prins, C., Prodhon, C., Calvo, R.W.: A memetic algorithm with population management (MA|PM) for the capacitated location-routing problem. In: Gottlieb, J., Raidl, G.R. (eds.) EvoCOP 2006. LNCS, vol. 3906, pp. 183–194. Springer, Heidelberg (2006) 4. Duhamel, C., Lacomme, P., Prins, C., Prodhon, C.: A memetic approach for the capacitated location routing problem. In: Prodhon, C., et al. (eds.) Proceedings of the 9th EU/MEeting on Metaheuristics for Logistics and Vehicle Routing, Troyes, France (2008) 5. Duhamel, C., Lacomme, P., Prins, C., Prodhon, C.: A GRASP×ELS approach for the capacitated location-routing problem. Computers & OR 37(11), 1912–1923 (2010) 6. Prins, C., Prodhon, C., Ruiz, A., Sorianoa, P., Calvo, R.W.: Solving the capacitated location-routing problem by a cooperative Lagrangean relaxation-granular tabu search heuristic. Transportation Science 41(4), 470–483 (2007) 7. Nagy, G., Salhi, S.: Location-routing: Issues, models and methods. European Journal of Operational Research 177(2), 649–672 (2007) 8. Prodhon, C.: A metaheuristic for the periodic location-routing problem. In: Kalcsics, J., Nickel, S. (eds.) Proceedings of Operations Research 2007, pp. 159–164. Springer, Heidelberg (2007) 9. Prodhon, C., Prins, C.: A memetic algorithm with population management (MA|PM) for the periodic location-routing problem. In: Blesa, M.J., Blum, C., Cotta, C., Fern´ andez, A.J., Gallardo, J.E., Roli, A., Sampels, M. (eds.) HM 2008. LNCS, vol. 5296, pp. 43–57. Springer, Heidelberg (2008)
VNS Coupled with ILP-Based VLNS for the (P)LRP
189
10. Prodhon, C.: An ELS×path relinking hybrid for the periodic location-routing problem. In: Blesa, M.J., Blum, C., Gaspero, L.D., Roli, A., Sampels, M., Schaerf, A. (eds.) HM 2009. LNCS, vol. 5818, pp. 15–29. Springer, Heidelberg (2009) 11. Hemmelmayr, V.C., Doerner, K.F., Hartl, R.F.: A variable neighborhood search heuristic for periodic routing problems. European Journal of Operational Research 195(3), 791–802 (2009) 12. Pirkwieser, S., Raidl, G.R.: A variable neighborhood search for the periodic vehicle routing problem with time windows. In: Prodhon, C., et al. (eds.) Proceedings of the 9th EU/MEeting on Metaheuristics for Logistics and Vehicle Routing, Troyes, France (2008) 13. Polacek, M., Hartl, R.F., Doerner, K.F., Reimann, M.: A variable neighborhood search for the multi depot vehicle routing problem with time windows. Journal of Heuristics 10, 613–627 (2004) 14. De Franceschi, R., Fischetti, M., Toth, P.: A new ILP-based refinement heuristic for vehicle routing problems. Math. Program. 105(2-3), 471–499 (2006) 15. Pirkwieser, S., Raidl, G.R.: Multiple variable neighborhood search enriched with ILP techniques for the periodic vehicle routing problem with time windows. In: Blesa, M.J., Blum, C., Di Gaspero, L., Roli, A., Sampels, M., Schaerf, A. (eds.) HM 2009. LNCS, vol. 5818, pp. 45–59. Springer, Heidelberg (2009) 16. Raidl, G.R., Puchinger, J.: Combining (integer) linear programming techniques and metaheuristics for combinatorial optimization. In: Blum, C., et al. (eds.) Hybrid Metaheuristics – An Emergent Approach for Combinatorial Optimization. SCI, vol. 114, pp. 31–62. Springer, Heidelberg (2008) 17. Hansen, P., Mladenovi´c, N.: Variable neighborhood search. In: Glover, F., Kochenberger, G. (eds.) Handbook of Metaheuristics, pp. 145–184. Kluwer Academic Publishers, Boston (2003) 18. Clarke, G., Wright, J.W.: Scheduling of vehicles from a central depot to a number of delivery points. Operations Research 12(4), 568–581 (1964) 19. Potvin, J.Y., Rousseau, J.M.: An exchange heuristic for routeing problems with time windows. Journal of the Operational Research Society 46, 1433–1446 (1995) 20. Kirkpatrick, S., Gelatt Jr., C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983) ¨ Orlin, J.B., Punnen, A.P.: A survey of very large-scale 21. Ahuja, R.K., Ergun, O., neighborhood search techniques. Discrete Applied Mathematics 123(1-3), 75–102 (2002) 22. Akca, Z., Berger, R.T., Ralphs, T.K.: A branch-and-price algorithm for combined location and routing problems under capacity restrictions. In: Chinneck, J.W., et al. (eds.) Operations Research and Cyber-Infrastructure. Operations Research/Computer Science Interfaces Series, vol. 47, pp. 309–330. Springer, Heidelberg (2009) 23. Desrosiers, J., L¨ ubbecke, M.E.: A primer in column generation. In: Desaulniers, G., et al. (eds.) Column Generation, pp. 1–32. Springer, Heidelberg (2005) 24. Rousseau, L.M., Gendreau, M., Pesant, G.: Using constraint-based operators to solve the vehicle routing problem with time windows. Journal of Heuristics 8(1), 43–58 (2002) 25. Prodhon, C. (June 2010), http://prodhonc.free.fr/
SearchCol: Metaheuristic Search by Column Generation Filipe Alvelos1 , Amaro de Sousa2 , and Dorabella Santos3 1
Departamento de Produ¸ca ˜o e Sistemas / Centro de Investiga¸ca ˜o Algoritmi Universidade do Minho, Portugal
[email protected] 2 Instituto de Telecomunica¸co ˜es – P´ olo de Aveiro Departamento de Electr´ onica, Telecomunica¸co ˜es e Inform´ atica Universidade de Aveiro, Portugal
[email protected] 3 Instituto de Telecomunica¸co ˜es – P´ olo de Aveiro, Portugal
[email protected]
Abstract. We propose a general framework for the combination of column generation (CG) with metaheuristics (MHs) aiming to solve combinatorial optimization problems amenable for decomposition approaches, “SearchCol”. The combination of the two approaches is based on representing the solution of the problem as the selection of a subset of solutions of smaller (sub)problems which are generated by CG. In each iteration of a SearchCol algorithm, CG provides the optimal solution (primal and dual) to the MH which returns a (incumbent) solution used for defining the (perturbed) CG problem of the next iteration. We describe the SearchCol framework and a general SearchCol algorithm based on local search. Keywords: Combinatorial optimization, Column generation, Hybrid metaheuristics, Matheuristics.
1
Introduction
Metaheuristic search by column generation, “SearchCol” for short, is a general approach to obtain approximate solutions for combinatorial optimization problems. The core idea of SearchCol is that the decomposition context provided by column generation (CG) is a powerful base for the definition of metaheuristics (MHs). The aim is to obtain good quality solutions in short times through the exchange of information between CG and MH search. SearchCol assumes that a solution of a problem is a combination of solutions of smaller (sub)problems (SPs) which are generated by a CG algorithm. Global constraints (i.e. constraints imposed on subsets of subsolutions from more than one SP) establish the relation between the SPs. Solutions generated by the SPs (which are seen by SearchCol as “black-boxes”) are treated without any problem specific knowledge. Each iteration of SearchCol has two phases. In the first, CG is applied to obtain an optimal solution to the linear programming relaxation of the M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 190–205, 2010. c Springer-Verlag Berlin Heidelberg 2010
SearchCol: Metaheuristic Search by Column Generation
191
problem and solutions from the SPs (associated with the columns of the so-called restricted master problem (RMP)). In the second phase, using the information of CG, a restricted search space is defined and a MH search is conducted. At the end of the second phase, a perturbation on the CG algorithm is introduced by the incumbent solution and a new iteration starts. Several variants can be implemented in an actual SearchCol algorithm. In this paper, we introduce the general ideas of the SearchCol framework and its most basic components. We also describe a general SearchCol algorithm based on local search. A core ingredient of SearchCol is CG, a decomposition approach driven by linear programming, where SPs can be tackled by any optimization algorithm. Although their first developments, due to Ford and Fulkerson [10] and Dantzig and Wolfe [6], have more than 50 years, CG is still an active field of research. We believe there are two main reasons for that. Firstly, the availability of computational tools have simplified and turned more robust the implementation of CG based algorithms, exposing their advantages over other approaches where no decomposition or less computationally demanding decomposition methods (such as subgradient methods) are used. Secondly, CG has been successfully applied on a wide range of problems as, for example, the ones mentioned in [8] and [15]. In recent years, the combination of CG and branch-and-bound (branch-andprice) with or without the inclusion of cuts from polyhedral theory (branch-andcut-and-price) has been a major research topic, allowing remarkable results in obtaining proven optimal solutions for relevant problems, like vehicle routing problems [11]. Besides the use of CG on these powerful exact algorithms, recent research has also been directed to improve its convergence properties [2,4,14]. Two main motivations (co)exist for the development of a CG based algorithm. Firstly, it is based on a decomposition approach. Even if a compact model exists (a model where the growth of the number of variables and constraints with respect to the data of the problem is bounded by a polynomial), many times such a model is so large that the possibility of solving it directly, in an efficient way, is ruled out. In such cases, a decomposition approach is attractive since solutions to parts of the model can be obtained by solving smaller SPs and, then, combined to form a solution to the overall problem. Note that most of the practical problems (for many examples, see [17]), for which a compact model can be devised, have some kind of structure that can be used to identify submodels within the model. Thus, even if it is feasible to solve the compact model, many times CG based algorithms are an appealing approach due to their efficiency when compared to other approaches. The decomposition framework can be even extended to problems where the sub-models are not formulated with linear or integer programming. Those can be nonlinear (as is usual in routing and scheduling applications, where, typically, the nonlinear SPs are solved by dynamic programming [9]) or formulated with constraint programming (as, for example, in [19]). The SPs may also take advantage of heuristic solution methods although, if an optimal solution is desired, an exact SP solver is required (see, for example, [20] for a combination of heuristic and exact SP solvers).
192
F. Alvelos, A. de Sousa, and D. Santos
A second motivation is a fundamental one when dealing with integer programming models. In those models, a major issue when they are dealt with by methods based on bounds given by relaxations (such as branch-and-bound) is their quality. Alternative models with a huge number of columns, under certain circumstances, give better lower/upper bounds (if a minimization/maximization problem is considered). A classical illustration is the pioneering work of Gilmore and Gomory in the cutting stock problem [12,13] where a CG algorithm is devised to obtain “good” linear solutions that are then rounded by a heuristic. Most CG based algorithms have been developed in the context of exact methods, where a proven optimal solution to NP-hard problems is desired. With SearchCol, we propose the combination of CG and MH for achieving good quality solutions in short running times. We take a combinatorial perspective of the problem to be solved. Instead of using branching strategies for solving the “integer” master problem, we see the problem as selecting one solution of each SP. The rationale is that this decomposition-based combinatorial perspective provides a solution’s space which can be efficiently and effectively searched. CG is used not only to define the restricted search spaces but also to guide the search of MHs. The first step of SearhCol is to solve a linear programming model which provides a lower bound (in a minimization problem) to the value of the optimal solution. This lower bound may be useful to overcome two usual drawbacks of MHs: the lack of a measure of the quality of the solution obtained and the lack of a well-defined stopping criterion. There is a fairly large literature on the combination of decomposition methods (CG and Lagrangean relaxation methods) and (meta)heuristics. The vast majority is devoted to specific problems. One exception is [5] where a framework for combing approximate methods with CG is proposed. In that work, MHs are applied in the nodes of the branch-and-price tree for improving the incumbent solution and generating new columns. The resulting hybrid approach is applied to a vehicle routing problem where the master problem has a very specific structure (set partitioning) with only one set of constraints and no convexity constraints. We now discuss SearchCol in the context of the classification for hybrid MHs proposed in [21]. Figure 1 represents the SearchCol basic components. The two main blocks are CG and MH search. The CG has two components corresponding to the linear programming RMP and to the SP that can be solved by any algorithm (in fact, we assume at least one exact algorithm exists for each SP). In the Figure, the MH block has only the components discussed in this paper, although other components can easily be incorporated in the SearchCol framework. According to the classification of [21], the kind of algorithms that are hybridized define the first differentiation criterion. In SearchCol, at least three algorithms must exist: a linear programming algorithm, a (hybrid) metaheuristic and an algorithm for solving the SP. As previously explained, SearchCol can combine any type of algorithm. The second differentiation is the strength of combination. In SearchCol, CG influences MH and the reverse is also true (see details in Section 3). As the algorithms retain their own identities, there is a low
SearchCol: Metaheuristic Search by Column Generation
193
Fig. 1. Basic components of the Searchcol framework
level of hybridization (still following the categorization of [21]). Note that this weak coupling is a consequence of the generality of the approach. The order of execution is interleaved and the combination is collaborative: the CG and the MH exchange information but none is subordinated to the other. This paper is organized as follows. In the next section, we introduce the types of problems suitable for SearchCol and establish the link between CG for integer programming and MH by taking a combinatorial perspective over the CG’s master problem. In Section 3, we detail the components of the SearchCol framework for a particular case (used for clarity of exposition). The general problem is described in Section 4. In Section 5, we describe how the SearchCol components can be combined in an actual algorithm. In the last section, we summarize the conclusions of the paper.
2 2.1
Decomposition Based Approaches and Column Generation Applications and the Optimization Problem
A large number of optimization problems can be decomposed in different SPs where each SP is defined in a similar way. Let us consider some examples with references to pioneer decomposition approaches. In a production planning over a temporal horizon, the decision on the number of products of each product type to be produced, given a set of common production resources, can be defined by a similar problem for each product [16]. In vehicle routing [7], the route determination is a similar problem for each vehicle (in the simplest variant where all vehicles have the same characteristics, the problem is equal for all vehicles). In the generalized assignment problem, where a set of jobs must be assigned to a set of agents with limited capacity, the determination of the jobs assigned to
194
F. Alvelos, A. de Sousa, and D. Santos
agents is a similar problem for each agent [23]. In machine scheduling, where a set of tasks must be scheduled in a set of machines, the determination of the tasks assigned to machines is a similar problem for each machine [1]. Note that in general, an optimization problem can be addressed through different decompositions and solution techniques efficiency might be different between them (for comparisons of different decompositions on the same problem, please see [3], [18], and [22]). When an optimization problem can be decomposed by a set of similar SPs, the overall problem can be defined by an integer programming model, which we define as problem (P ), in the following way: (P )
Min
k∈K
ckj yjk
(1)
j∈J k
subject to yjk = 1
k ∈ K := {1, ...h}
(2)
i ∈ I := {1, ..., m}
(3)
j∈J k
akij yjk {≤, =, ≥}bi
j∈J k
yjk ∈ {0, 1}
k ∈ K, j ∈ J k
The set of variables of (P ) are partitioned in h subsets, indexed by k. For each subset k, the set of indexes of the corresponding decision variables, yjk , is represented by J k . The column associated with variable yjk has a coefficient ckj in the objective function (1), a coefficient 1 in the k-th constraint (2), and coefficient akij in constraints (3). A decision variable, yjk , is equal to one if the j-th solution of the k-th subset is chosen and 0, otherwise. Constraints (2) state that one subsolution of each subset must be in the solution. Constraints (3) are global, as they include variables from different subsets. A sketch of the match of the previous examples and (P ) is given in Table 1. 2.2
Unifying CG Algorithms
Relation with Dantzig-Wolfe decomposition. A fundamental issue when solving (P ) is that, typically, it has a huge number of variables/columns. It is well known that, when solving the linear relaxation of (P ), this huge number of columns is amenable by CG if the problem (P ) results from a Dantzig-Wolfe decomposition [6] of a compact model. In that case, a SP results directly from a set of constraints of the compact model and the CG algorithm is based on solving the SP at the dual (optimal) solution of a restricted version of (P ) (the RMP) for obtaining variables with negative reduced costs which are then introduced in the RMP as columns (by column, we mean the coefficient of a variable in the objective function and all its coefficients in the constraints). One optimal solution to the linear relaxation of (P ) is obtained when no variables with negative reduced costs are found in the SP when solved at an optimal dual solution of the RMP.
SearchCol: Metaheuristic Search by Column Generation
195
Table 1. Examples of problems that fit the decomposition framework Problem Decomposition by... One variable of subset k represents a... Production planning product production plan of the k-th product Vehicle routing vehicle route of the k-th vehicle Generalized assignment agent subset of tasks assigned to the k-th agent Machine scheduling machine schedule for the k-th machine Problem Production planning Vehicle routing Generalized assignment Machine scheduling
Global constraints (3) A variable is included in subset k have to do with... only if it meets... the availability of common the production requirements resources required for production of the k-th product (for example, (e.g., machine capacities) forced by existing demand) constraints imposed the route and vehicle constraints on the fleet of vehicles (e.g., a route must end at a depot and (e.g., must visit all clients) vehicle capacity cannot be exceeded) constraints imposed on the capacity of the the group of agents (e.g., all k-th agent tasks must be performed) constraints imposed on jobs machine constraints (e.g., all jobs must be done) (e.g., release time, two tasks cannot be made at the same time)
Unifying Type II and III of CG approaches. As proven in [24], there is always at least one compact model in which the application of a Dantzig-Wolfe decomposition results in (P ). The compact formulation may not be known explicitly, but the relevant set of variables for the definition of a column in (P ) and an algorithm able to generate the minimum reduced cost column at any dual solution, are usually easy to identify. This result provides a strong link between the two types of column generation algorithms defined in [25]: the type in which a Dantzig-Wolfe decomposition is applied in a compact model (type III) and the type in which a Dantzig-Wolfe decomposition is not present (type II). Furthermore, it allows the definition of a SP in a much more general way than the one provided by Dantzig-Wolfe decomposition. This general definition is the one used by SearchCol and is detailed in the following subsection. Note that although the concept of original variable does not exist in this perspective, SP’s variables play the same role when devising perturbations in the master problem (as branching constraints in a branch-andprice context). 2.3
Subproblem
The SP is responsible for generating the minimum reduced cost column of (P ). For that purpose, we introduce a vector of decision variables of a SP k represented by xk . We do not make any assumption on the type of these variables, but we remark that, usually, at least some of them are binary. We also assume that the feasible set of solutions, X k is bounded. We represent the dual variables associated with the convexity constraints (2) of (P ) by π k , k = 1, ..., h and the dual variables associated with global constraints (3) by ωi , i = 1, ..., m. A solution xk∗ associated with a minimum reduced cost column of (P ) at a fixed dual solution is an optimal solution of problem (SP k ):
196
F. Alvelos, A. de Sousa, and D. Santos
(SP k ) zSP k = Min f0k (xk ) − π k −
ωi fik (xk )
(4)
i∈I
subject to xk ∈ X k where f0k (xk ) is a function that returns the objective coefficient of the column associated with solution xk , i.e., the value ckj for the solution associated with the j-th column of SP k. Similarly, fi (xk ) is a function that returns the coefficient of the column associated with xk in the i-th global constraint, i.e., the value akij . 2.4
CG Algorithm
Figure 2 shows a CG algorithm that determines an optimal solution for the linear relaxation of (P ). We note that the objective modification of the SP stated in line 7 corresponds to (4). The calculation of the column of line 11 is based on, for the optimal solution of the SP k, xk∗ , obtaining the associated coefficient in the objective function, c∗ = f0 (xk∗ ) and the associated coefficients in constraints, k k∗ 1 for the k − th convexity constraint and ak∗ i = fi (x ) for the i − th global constraint. Note that this algorithm is the first step of the branch-and-price method to solve the integer programming model (P ). After this first step, each node of the branch-and-bound search tree is also solved by column generation. In SearchCol, the linear relaxation of (P ) is also solved by the CG algorithm in the first step but, then, no implicit enumeration strategy is used. Instead, SearchCol uses MH search in a restricted search space defined by the SP’s solutions associated with the columns of the RMP. These solutions are inserted 1: Initialize the RM P and the SPs SP k , k ∈ K 2: repeat 3: Optimize the RM P 4: π, ω ← optimal duals from the RM P 5: end ← true 6: for all k ∈ K do 7: Modify the objective function of SP k according to π k and ω 8: Optimize SP SP k 9: zSP k ← optimal value of SP k 10: if zSP k < 0 then 11: Obtain the RMP column associated with the optimal solution of SP k 12: Update the RMP by adding that column 13: Save the optimal solution of SP k in the solution pool of SP k 14: end ← f alse 15: end if 16: end for 17: until end = true Fig. 2. Column generation algorithm
SearchCol: Metaheuristic Search by Column Generation
197
in a pool (line 13 of the CG algorithm) during the execution of the CG algorithm. This restricted search space may be enlarged by applying again the CG algorithm with some modifications or reduced by removing solutions from the pool. Strategies to modify the restricted search space will be described later in the next section.
3 3.1
SearchCol Framework Overview
SearchCol is the combination of CG and MH search. CG is used to solve the linear relaxation of (P ). At the end of the optimization, an “optimal” RMP (in the sense that its solution is optimal to the linear relaxation of (P )) is available. Then a MH search is started. The search is influenced by the information provided by the optimal RMP and also by the current incumbent solution. When the search ends, the incumbent solution is used to modify the RMP problem and a new iteration begins. Two stopping criteria are defined: (i) the relative gap (given by |zinc −zLR |/|zinc | where the zinc is the value of the incumbent solution and zLR is the value of the linear relaxation) smaller than a given parameter and (ii) a given number of iterations without improvement of the incumbent solution. The core idea of the search phase of SearchCol is to look at (P ) as a combinatorial problem: we have to select one element from each subset J k , k ∈ K, such that the sum of the costs associated with each selected element is minimum and the global constraints (3) are fulfilled. Since the number of columns is huge, information provided by optimal RMPs is used to define restricted search spaces where, hopefully and reasonably, good quality integer solutions will be found. Taking this combinatorial perspective, a (global) solution can be represented as s = (s(1), s(2), ..., s(h)) where s(k), k ∈ K represents the index of the columm of SP k included in solution s (note that this representation does not rely on any problem specific characteristic). In the next subsections, we describe the basic search components of the SearchCol framework. The search phase uses information provided by the last optimal RMP. In particular, the search phase may use the value of each column (the primal solution of the optimal RMP), its reduced cost, and the dual solution (duals of the convexity constraints and of the global constaints), depending on the components selected for an actual SearchCol algorithm. 3.2
Defining the Restricted Search Space
Depending on the number of solutions of each SP generated during the CG phase, the search space may be extremely large. Defining the number of solutions associated with SP k as nk , then the restricted search space has n1 × n2 × ... × nh global solutions. Defining nmin = min{n1 , n2 , ..., nh } and nmax = max{n1 , n2 , ..., nh } then the number of solutions, n, in the restricted search space
198
F. Alvelos, A. de Sousa, and D. Santos
has a value between (nmin )h and (nmax )h . A small value of n may restrict the search space too much, while a large value of n may turn the search too heavy. A balance between these two extremes must be achieved in an actual SearchCol algorithm. Noting that an upper bound to the dimension of the basis of the linear relaxation is h + m, a value of α(h + m) with α ≥ 1 is adequate. If the search space exceeds this value, solutions associated with the columns with larger reduced cost are removed from the search space. 3.3
Evaluating Solutions
SearchCol uses different ways of evaluating feasible and infeasible solutions. A feasible solution compares favourably with an infeasible solution. The values given by the feasible (infeasible) evaluation function are only used for comparing two feasible (infeasible) solutions. In any evaluating function, a smaller value is better than a larger one. A feasible solution can be evaluated in two different ways. The first way is by using its real cost and the second way is by using its reduced cost: k k k evalf eas2 (s) = ωi ais(k) evalf eas1 (s) = k∈K cks(k) cs(k) − π − k∈K
i∈I
The rationale behind the evaluation by real cost is straightforward. The rationale behind the evaluation by reduced cost is the minimization of the violation of the complementary slackness conditions of the primal variables when s replaces the optimal solution of the linear relaxation. Note that if a column in s has a positive value in the optimal solution of the linear relaxation, then it has a zero reduced cost. If all columns belonging to s have zero reduced costs, evalf eas2 (s) = 0, and all complementary slackness conditions of the primal variables continue to be fulfilled when the primal solution of the linear relaxation is replaced by s. When a column of s has a zero value in the optimal solution of the linear relaxation, its reduced cost is positive (excluding degeneracy). When the optimal solution of the linear relaxation is replaced by s, the reduced cost of that column measures its contribution to the violation of the complementary slackness conditions. SearchCol defines five functions for evaluating infeasible solutions. Let us first introduce some notation. We consider the slack of a constraint i in a solution s given by ui (s) = k∈K akis(k) −bi . We set wi = 1 when constraint i is violated and wi = 0 otherwise. We quantify the violation of a constraint i as vi (s) = |ui | · wi , i.e., it is null for a non-violated constraint and it is the absolute value of its slack otherwise. We define two alternative factors to replace the value of a dual variable = 0}. In the second, when its value is zero. In the first, σmin = mini∈I {|ωi | : ωi σmax = maxi∈I {|ωi | , i ∈ I}. Finally, we define pimin = σmin if ωi = 0 and pimin = |ωi |, otherwise, i ∈ I. We define pimax in a similar way. The infeasibility evaluation functions are:
SearchCol: Metaheuristic Search by Column Generation
evalinf eas1 (s) =
pimin vi (s)
evalinf eas3 (s) =
i∈I
evalinf eas2 (s) =
i∈I
199
wi (s)
i∈I
pimax vi (s)
evalinf eas4 (s) =
vi (s)
i∈I
evalinf eas5 (s) = max{vi (s)} i∈I
In the first two evaluation infeasibility functions the violation of the constraints are weighted by their duals (or by a constant when their duals are zero - avoiding evaluating with zero a violated constraint). The third evaluation function just counts the number of constraints being violated. The fourth evaluating function corresponds to the sum of the absolute violations of all constraints. The fifth evaluation function considers only the absolute violation of the constraint which is being more violated. 3.4
Initial Solutions
The actual SearchCol algorithm detailed in this paper uses multi-start local search as the core of the search phase. Different procedures for generating solutions from scratch and based on the perturbation of a given (incumbent) solution are proposed. Their use may co-exist in an actual SearchCol algorithm. Deterministic creation. For each SP, we select the solution associated with the variable with the highest value in the optimal solution of the last solved RMP. (Weighted) random creation. We consider two variants. For each SP, we define the weight of a solution as the value of its associated variable in the optimal solution of the last solved RMP. In the weighted random creation, we randomly select a solution for each SP with a probability given by its weight. In the pure random creation, an uniform distribution is used instead of the weights. (Deterministic/randomized) greedy construction. In the deterministic variant, a permutation of the SPs is first defined by sorting in non-increasing order the absolute value of the duals of the convexity constraints. Then, a solution is built incrementally by taking each SP in turn and selecting the SP’s solution which causes the smallest increase in the current evaluation function. The rationale is that the SPs with higher influence on the optimal value of the linear relaxation (measured by the convexity duals) should have priority in selecting their solution. In the randomized variant, the permutation of the SPs is randomly chosen. (Convexity based) solution modification. A solution is built by modifying a given solution on a number of SPs given by an input parameter (if it is 0.5, half of the SPs are selected for modification). For each of these SPs, a new solution is randomly selected. The SPs are randomly selected in the pure solution modification, or based on their convexity dual values of the last solved RMP in convexity based solution modification.
200
3.5
F. Alvelos, A. de Sousa, and D. Santos
Neighborhood Structure and Local Search
The neighborhood structure of SearchCol is based on the modification of a solution of a SP. The size of the neighborhood is k∈K (nk − 1) which is amenable for a maximum descent local search as long as the number of solutions of the SPs is kept in reasonable sizes. 3.6
Perturbed CG
At the end of the search phase, an incumbent solution is available and it is used to perturb the CG phase of the next iteration. The aim is to lead the CG algorithm to generate SP solutions / columns which can improve the current incumbent. In order to keep the procedure independent of the problem, this is accomplished by using the global constraints to identify SP variables to forbid in the next RMP. Forbidding columns / SP solutions from being part of the optimal solution of an RMP is similar to perform a down branching (on the SP’s variables) in branchand-price and is easily achieved by removing the RMP columns which include the forbidden variables and removing them also from the SP. We propose three ways, which can be used in conjunction, of defining which SP variables are forbidden. In the first, we forbid all the SP variables which contribute to the violation of rows being violated by the incumbent solution. In the second, we forbid SP variables which belong to the incumbent solution and contribute to left hand side being equal to the right hand side of the constraints having zero slack and the higher (absolute) duals. In the third, we forbid a randomly selected set of SP variables belonging to the incumbent solution. In the last two cases, we use a parameter to set the proportion of rows / SP variables to be considered / forbidden.
4
The General Problem
Problem (P ) is a particular case of the more general problem with two additional sets of variables. The first set is the one composed by variables y0k , k ∈ K, which are used when parameter δ is equal to 1. In such cases, a global solution does not include a solution for SP k when y0k = 1 (variables y0k may be seen as the slacks of the convexity constraints). The introduction of these variables allows SearchCol to represent the solutions as before, extending its applicability to problems where the number of SP solutions used in a global solution is not known a priori and might even be the value to optimize. The second set in the one composed by continuous variables yj0 which are not associated with any SP (J 0 defines this set). SearchCol deals with these variables by fixing them with their optimal values (given by the RMP) before each search phase begins. With this approach, the search is done in the very same way as described before.
SearchCol: Metaheuristic Search by Column Generation
201
The general problem, (G), is given by: c0j yj0 + ckj yjk (G) Min j∈J 0
k∈K j∈J k
subject to yjk = 1 δy0k +
j∈J k
a0ij yj0 +
j∈J 0
akij yjk {≤, =≥}bi
i ∈ I := {1, ..., m}
j∈J k
yjk ∈ {0, 1}
k ∈ K, j ∈ J k
y0k ∈ {0, 1}
k∈K
yj0
5
k ∈ K := {1, ...h}
≥0
j ∈ J0
SearchCol Algorithm
A SearchCol algorithm can be seen as having two cycles. The outer cycle corresponds to the CG phase, where a (pertubed) CG is optimized and a pool of solutions of SPs is defined. The inner cycle correspond to the MH search phase. Using multi-start local search, this phase corresponds to a set of runs of a local search algorithm, each one starting at a different solution (possibly, obtained from a perturbation of another one). The parameters of the actual SearchCol algorithm are given in Table 2 and the multi-start local search SearchCol algorithm is shown in Figure 3. Some of the parameters were already described in the previous subsections, while others are related with the different alternatives proposed in the previous subsections. The parameter size restricted space is the α introduced in subsection 3.2. For evaluating feasible solutions (subsection 3.3), two different situations are considered. Parameter f easibility evaluation incremental defines the function Table 2. Parameters for multi-start local search SearchCol Parameter Meaning size restricted space Removal of columns of the RMP f easibility evaluation incremental Feasibility evaluation function for constructive procedures f easibility evaluation f ull Feasibility evaluation function for full solutions inf easibility evaluation Infeasibility evaluation function f irst solution Generation of the first solution initial inner solution Generation of the initial solution of each inner iteration (except the first) initial outer solution Generation of the initial solution of each outer iteration (except the first) colgen perturbation Perturbation of the column generation stop inner iterations Maximum number of inner iterations stop outer iterations Maximum number of outer iterations stop relative gap Relative gap tolerance
202
5:
10:
15:
20:
25:
30:
35:
40:
F. Alvelos, A. de Sousa, and D. Santos
Initialize CG Set the evaluation functions according to f easibility evaluation incremental, f easibility evaluation f ull and inf easibility evaluation Value of the incumbent solution ← ∞ outer iterations ← 0 ≤ stop outer iterations and current gap ≤ while outer iterations stop relative gap do Apply CG Define the restricted search space according to size restricted space if First outer iteration then Generate current solution according to f irst solution else Generate current solution according to initial outer solution end if if current solution is better than incumbent solution then incumbent solution ← current solution outer iterations ← 0 Update current gap end if inner iterations ← 0 best inner solution ← current solution while inner iterations ≤ stop inner iterations do if Not the first inner iteration then Generate current solution according to initial inner solution end if Apply LS if current solution is better than best inner solution then best inner solution ← current solution inner iterations ← 0 if current solution is better than incumbent solution then incumbent solution ← current solution incumbent solution was updated Update current gap end if else inner iterations ← inner iterations + 1 end if end while if incumbent solution was updated then outer iterations ← 0 else outer iterations ← outer iterations + 1 end if Perturb CG according to colgen perturbation end while Fig. 3. SearchCol algorithm based on multi-start local search
SearchCol: Metaheuristic Search by Column Generation
203
to be used when constructing a solution. Note that evaluation by reduced cost may be more suitable in this case, because when using the original costs in a greedy procedure, it is very likely that the solutions obtained will be infeasible (as no information of the global constraints is taken into account). Parameter f easibility evaluation f ull defines the function to be used when evaluating a global solution. Typically, the original costs should be used. Each infeasibility evaluation function of subsection 3.3 corresponds to a value of parameter inf easibility evaluation. Parameter f irst solution is used for defining how the first incumbent solution (which, of course, can be infeasible) is generated. Any method of subsection 3.4 not relying on a previous solution can be used. For example, using deterministic creation corresponds to round the optimal solution of the RMP. Parameter initial inner solution is used for defining how the solution used as the initial solution in each run of the multi-start local search algorithm of the inner cycle (except the first which is defined by f irst solution or initial outer solution) is generated. Any method of subsection 3.4 can be used. Methods based on perturbing a solution may use the incumbent solution or the local optimum obtained in the previous run of local search. Parameter initial outer solution is used for defining how the solution used as the initial solution of the first run of the inner cycle (except the first which is defined by f irst solution) is generated. Any method of subsection 3.4 can be used. Methods based on perturbing a solution use the incumbent solution. For simplicity of notation, we represent only a parameter related with the perturbation of CG, colgen perturbation. In fact, a set of parameters corresponding to the pertubation methods described in subsection 3.6 are used. Parameter stop inner iterations corresponds to the maximum number of runs of the multistart local search algorithm without improvement of the best solution found in the inner cycle. Parameter stop outer iterations corresponds to the maximum number of outer iterations without improvement of the incumbent solution and is used to define one of the two stopping criteria. The other stopping criterion is if a solution with relative gap less than or equal to stop relative gap was found. Concerning the SearchCol algorithm (Figure 3), the outer cycle, which corresponds to the CG phase, starts after the initializations (line 5). Its mais components are the application (line 6) and the perturbation (line 42) of CG. The inner cycle, which corresponds to the MH phase, is associated with lines 20 to 36. In each iteration of the inner cycle, a local search algorithm is applied (line 24) starting from different solutions. The stopping conditions of both cycles have to do with the number of iterations without improvement, which are counted by outer iterations and inner iterations. An improvement in the inner cycle is related with the initial solution of the inner cycle and not with the incumbent solution. Therefore the best solution of the inner cycle is kept (best inner solution). As described before, the way the initial solutions are generated depends on the iteration, allowing, for example, (i) the first incumbent to be obtained by rounding, (ii) the initial solution of an outer iteration (except the first of all) to be given
204
F. Alvelos, A. de Sousa, and D. Santos
by perturbing the incumbent solution, and (iii) the initial solution of an inner iteration (except the first) to be given by perturbing the last local optimum.
6
Conclusions
We have proposed metaheuristic search by column generation, SearchCol. SearchCol combines linear programming decomposition techniques (column generation), problem specific algorithms and metaheuristics in a common framework. We described a general column generation model that hides variables from an (implicit) compact model in a subproblem and defines restricted spaces where a search is conducted without any problem-specific information. A SearchCol algorithm based on multi-start local search for a general decomposable problem (which may include continuous variables) was presented.
Acknowledgements This work have been partially funded by FCT (Funda¸c˜ao para a Ciˆencia e a Tecnologia - Portugal) through project ”SearchCol: Metaheuristic search by column generation” (PTDC/EIA-EIA/100645/2008) and through the post-doc grant SFRH/BPD/41581/2007 of D. Santos.
References 1. van den Akker, J.M., Hoogeveen, J.A., van de Velde, S.L.: Parallel machine scheduling by column generation. Operations Research 47, 862–872 (1999) 2. Ben Amor, H., Desrosiers, J., Val´erio de Carvalho, J.M.: Dual-optimal inequalities for stabilized column generation. Operations Research 54, 454–463 (2006) 3. Alvelos, F., Val´erio de Carvalho, J.M.: Comparing branch-and-price algorithms for the unsplittable multicommodity flow problem. In: Ben-Ameur, W., Petrowski, A. (eds.) Proceedings of the INOC - International Network Optimization Conference, Evry, Paris, pp. 7–12 (2003) 4. Alvelos, F., Val´erio de Carvalho, J.M.: An Extended Model and a Column Generation Algorithm for the Planar Multicommodity Flow Problem. Networks 50, 3–16 (2007) 5. Danna, E., Pape, C.L.: Branch-and-Price Heuristics: A Case Study on the Vehicle Routing Problem with Time Windows. In: Desaulniers, G., Descrosiers, J., Solomon, M.M. (eds.) Column Generation, ch. 4. Springer Science and Business Media, New York (2005) 6. Dantzig, G.B., Wolfe, P.: Decomposition principle for linear programs. Operations Research 8, 101–111 (1960) 7. Desrosiers, J., Soumis, F., Desrochers, M.: Routing with time windows by column generation. Networks 14, 545–565 (1984) 8. Desaulniers, G., Desrosiers, J., Solomon, M.M. (eds.): Column Generation. Springer, New York (2005) 9. Desrosiers, J., Dumas, Y., Solomon, M.M., Soumis, F.: Time Constrained Routing and Scheduling. In: Ball, M.O., Magnanti, T.L., Monma, C.L., Nemhauser, G.L. (eds.) Network Routing, pp. 35–139. North Holland, Amsterdam (1995)
SearchCol: Metaheuristic Search by Column Generation
205
10. Ford, L.R., Fulkerson, D.R.: A suggested computation for maximal multicommodity network flows. Management Science 5, 97–101 (1958) 11. Fukasawa, R., Longo, H., Lysgaard, J., Poggi de Arag˜ ao, M., Reis, M., Uchoa, E., Werneck, R.F.: Robust Branch-and-Cut-and-Price for the Capacitated Vehicle Routing Problem. Mathematical Programming, Series A 106, 491–511 (2006) 12. Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting stock problem. Operations Research 9, 849–859 (1961) 13. Gilmore, P.C., Gomory, R.E.: A linear programming approach to the cutting stock problem - Part II. Operations Research 11, 863–888 (1963) 14. Liang, D., Wilhelm, W.E.: A generalization of column generation to accelerate convergence. Mathematical Programming, Series A 122, 349–378 (2010) 15. L¨ ubbecke, M.E., Desrosiers, J.: Selected topics in column generation. Operations Research 53, 1007–1023 (2005) 16. Manne, A.S.: Programming of Economic Lot Sizes. Management Science 4, 115–135 (1958) 17. Martin, R.K.: Large Scale Linear and Integer Optimization, A Unified Approach. Kluwer Academic Publishers, Dordrecht (1999) 18. Pimentel, C., Alvelos, F.P., Val´erio de Carvalho, J.M.: Comparing Dantzig-Wolfe decompositions and branch-and-price algorithms for the multi-item capacitated lot sizing problem. Optimization Methods and Software 25, 299–319 (2010) 19. Pisinger, D., Sigurd, M.: Using decomposition techniques and constraint programming for solving the two-dimensional bin-packing problem. INFORMS Journal on Computing 19, 1007–1023 (2007) 20. Puchinger, J., Raidl, G.R.: Models and algorithms for three-stage two-dimensional bin packing. European Journal of Operational Research 183, 1304–1327 (2007) 21. Raidl, G.R.: A Unified View on Hybrid Metaheuristics. In: Almeida, F., Blesa Aguilera, M.J., Blum, C., Moreno Vega, J.M., P´erez P´erez, M., Roli, A., Sampels, M. (eds.) HM 2006. LNCS, vol. 4030, pp. 1–12. Springer, Heidelberg (2006) 22. Santos, D., de Sousa, A., Alvelos, F.: Traffic Engineering of Telecommunication Networks based on Multiple Spanning Tree Routing. In: Valadas, R. (ed.) FITraMEn 2008. LNCS, vol. 5464, pp. 114–129. Springer, Heidelberg (2009) 23. Savelsbergh, M.: A branch-and-price algorithm for the generalized assignment problem. Operations Research 45, 831–841 (2007) 24. Villeneuve, D., Desrosiers, J., L¨ ubbecke, M.E., Soumis, F.: On Compact Formulations for Integer Programs Solved by Column Generation. Annals of Operations Research 139, 375–388 (2005) 25. Wilhelm, W.E.: A technical review of column generation in integer programming. Optimization and Engineering 2, 159–200 (2001)
Survey: Matheuristics for Rich Vehicle Routing Problems Karl F. Doerner and Verena Schmid University of Vienna, Faculty of Business, Economics and Statistics, Austria {karl.doerner,verena.schmid}@univie.ac.at
Abstract. This paper surveys recent developments of hybrid solution techniques for different vehicle routing problems. Only hybridizations of heuristic and exact solution techniques are considered. Most of the existing hybrid approaches are based on set-covering formulations, local branching or different decomposition techniques. Keywords: rich vehicle routing problems, hybrid metaheuristics, matheuristics.
1
Introduction
Vehicle routing problems (VRPs) appear in many practically highly relevant areas of our daily life. In general, they include the assignment of produced goods to customers and decisions on which route and at which time the goods are picked up and delivered. Improvements in solutions often have a direct and substantial impact on costs and other important factors like customer satisfaction. Important problem classes are the classical vehicle routing problem (with time windows) and the periodic vehicle routing problem (with time windows). A recent overview of the solution methods for the classical VRP is given in [42]. Most of the problems appearing in the real world are difficult to solve to optimality in reasonable time, therefore metaheuristic or hybrid solution methods have been developed. For an overview of such hybrid optimizers see [24], [47], [64] and [65]. In this paper we give a survey on recently developed hybrid matheuristics in the field of vehicle routing and transportation logistics. This paper is organized as follows. In Section 2 we present different mathematical formulations and exact solution techniques of the classical VRPs with some extensions. In Section 3 recently developed metaheuristic techniques are briefly mentioned. In Section 4 different hybridization schemes are presented. In Section 5 starting points for possible future developments are outlined.
2 2.1
Mathematical Formulations and Exact Solution Techniques Formulation for the VRP and VRPTW
The classical VRP (see [79,78,41]) is defined on a directed graph G = (V, A), where V = {0, . . . , n} corresponds to the set of vertices and A = {(i, j) : i, j ∈ V } M.J. Blesa et al. (Eds.): HM 2010, LNCS 6373, pp. 206–221, 2010. c Springer-Verlag Berlin Heidelberg 2010
Matheuristics for VPRs
207
the set of arcs, upon which a cost (cij ) and travel-time matrix (tij ) are defined. There are m identical vehicles (each with a capacity of Q), which are located at one central depot, denoted as vertex 0. Each customer i ∈ V \{0} is associated with a non-negative demand di ≤ Q, where d0 = 0. The problem now consists of finding a set of K cost-minimal routes, each starting and ending at the depot, such that every customer is visited exactly once and its demand is fully satisfied. Furthermore the total demand of all customers on any single route may not exceed the vehicle capacity Q. The fleet of homogeneous vehicles is denoted by set K = {1, . . . , m}. The problem consists of assigning customers to vehicles and finding costminimum routes for all vehicles simultaneously. Binary variables yik are used to assign customers to vehicles, with a value 1 indicating that customer i will be visited by vehicle k. Binary variables xkij are used to model the flow of vehicles throughout the network, a value 1 indicates if the corresponding arc (i, j) ∈ A is traversed by vehicle k. The objective function tries to minimize the costs associated with traversing the chosen arcs. For a mathematical problem formulation see [78]. Many exact and heuristic algorithms have been developed for the VRP. Concerning exact approaches we refer to the surveys in [43] and [76]. In the book edited by Toth and Vigo [79]) the chapters of Toth and Vigo [77], Naddef and Rinaldi [51], and Bramel and Simchi-Levi [10] cover, respectively, branch-and-bound, branchand-cut, and set-covering approaches. Recent results were provided in [4] with an algorithm based on a two-commodity formulation, in [46] through branch-and-cut, and in [30] through branch-and-cut-and-price (see also [5,6]). A common extension to the classical VRP is the so-called vehicle routing problem with time windows (VRPTW), which has drawn a lot of attention in the scientific community (see [15,18]). For computational reasons the depot is represented by two nodes 0 and n+1. Let V denote the set of all nodes, including the depots, i.e. V = {0, . . . , n + 1}, whereas V denotes the set of customer locations excluding the depot, i.e. V = V \{0, n + 1}. Each customer i ∈ V has an associated time-window [ei , li ] and a service duration si , whereas s0 = sn+1 = 0. Service may only start within this time window and the vehicle may only leave the customer’s site after fully having served the customer. Additional time variables aki are used to model the time vehicle k starts to service customer i. There is also a time window associated with the depot, i.e. [e0 , l0 ] = [en+1 , ln+1 ], which correspond to the earliest possible start from and arrival at the depot. A complete model for the VRPTW can be denoted as follows: i∈V j∈V
yik = 1
cij
xkij → min
(1)
k∈K
∀i ∈ V
(2)
k∈K
k∈K
y0k = m
(3)
208
K.F. Doerner and V. Schmid
k yn+1 =m
(4)
k∈K
xkji = yik
∀i ∈ V \{0}, k ∈ K
(5)
xkij = yik
∀i ∈ V \{n + 1}, k ∈ K
(6)
∀k ∈ K
(7)
∀i, j ∈ V, k ∈ K
(8)
∀i ∈ V, k ∈ K
(9)
∀i ∈ V, k ∈ K
(10)
∈ {0, 1}
∀i, j ∈ V, k ∈ K
(11)
∈ {0, 1}
∀i ∈ V, k ∈ K
(12)
j∈V
j∈V
di · yik ≤ Q
i∈V
aki + si + tij ≤ akj + M (1 − xkij ) aki aki xkij yik
≥ ≤
ei · yik li · yik
The augmented model formulation taking into account time-windows is similar to the classical VRP model presented before. Constraints (2)-(7) are analogous to the VRP model. Constraints (8), due to which the subtour-elimination constraints are no longer needed, ensure feasibility in terms of the time necessary when traveling from node i to j. Constraints (9) and (10) impose that service may only start within the given interval. For a recent overview of the different algorithms for solving the VRPTW, see [12] and [13]. There also exist a few exact approaches based on Lagrangian relaxation (see [39]) and a branch-and-cut approach as described in [8]. 2.2
Formulation for the PVRPTW (and MDVRPTW)
Other important variants of the VRP(TW) are the periodic vehicle routing problem with time windows (PVRPTW) and the multi-depot vehicle routing problem with time windows (MDVRPTW), both of which are generalizations of the classical VRPTW (see [16,19,56,59]). The periodic vehicle routing problem (PVRP) covers a planning horizon of t days, whereas each customer i is associated with a specified service frequency fi , as well as a non-empty set of possible visit day combinations Fi . The problem now consists of selecting visit day combinations for customers and finding a set of cost-minimal routes for every day simultaneously. In order to formulate a MIP formulation for the problem at hand we will expand the notation used previously in the following way. In order to model the choice among visit day combinations per customer we will introduce the binary decision variable zir , which will be equal to 1 if visit combination r ∈ Fi is chosen for customer i. Let xkl ij be a binary decision variable that is equal to 1 if vehicle k travels from node i to j on day l, where l ∈ L = {1, . . . t} and yikl be a binary indicator evaluating to 1 if customer i is visited by vehicle k on day l. rl The time vehicle k starts to service vertex i on day l is denoted by akl i . Let αi
Matheuristics for VPRs
209
be a binary indicator, which is equal to 1 if visit combination r for customer i foresees visiting him/her on day l. cij xkl (13) ij → min i∈V j∈V
zir = 1
∀i ∈ V
(14)
∀i ∈ V , l ∈ L
(15)
y0kl = m
∀l ∈ L
(16)
kl yn+1 =m
∀l ∈ L
(17)
kl xkl ji = yi
∀i ∈ V \{0}, k ∈ K, l ∈ L
(18)
kl xkl ij = yi
∀i ∈ V \{n + 1}, k ∈ K, l ∈ L
(19)
∀k ∈ K, l ∈ L
(20)
∀i, j ∈ V, k ∈ K, l ∈ L
(21)
kl akl i ≥ ei · yi
∀i ∈ V, k ∈ K, l ∈ L
(22)
akl i kl xij yikl zir
∀i ∈ V, k ∈ K, l ∈ L
(23)
∈ {0, 1}
∀i, j ∈ V, k ∈ K, l ∈ L
(24)
∈ {0, 1}
∀i ∈ V, k ∈ K, l ∈ L
(25)
r∈Fi
r αrl i · zi =
r∈Fi
k∈K l∈L
yikl
k∈K
k∈K
k∈K
j∈V
j∈V
di · yikl ≤ Q
i∈V akl i + si
kl + tij ≤ akl j + M (1 − xij )
≤ li ·
yikl
∈ {0, 1}
∀i ∈ V , r ∈ Fi
(26)
Equation 14 and 15 make sure that exactly one visit day combination will be chosen per customer and that the customer will be visited on the corresponding days accordingly. All other constraints are straightforward and have been extended in order to capture the multi-period planning horizon. The same formulation can be used for modeling the MDVRPTW by associating depots with days and imposing a service frequency of fi = 1 for every single customer (i.e. every customer can be delivered by a vehicle starting at any of the depots). Exact solution techniques based on column generation for these problem classes are presented in [5], [50] and [57].
3
Metaheuristics for the VRP
For the classical VRP good results from a heuristical point of view were for example obtained in [31] and in [80] through tabu search, in [62] and [48] through evolution strategies, and in [67] with an ant colony optimization heuristic. A variable
210
K.F. Doerner and V. Schmid
neighborhood search algorithm algorithm developed for a combined scheduling and routing problem (the multi-pile VRP) was also applied to the classical VRP and provided competitive results (see [81]). Recent surveys devoted to heuristics for the VRP are the ones in [44,34] and [17]. Also for the VRPTW different metaheuristic search techniques were developed. For the heuristic solution techniques for the VRPTW a lexicographic objective function is used. As primary objective the number of vehicles is minimized and as a secondary objective the driving time is minimized. For a recent overview of the different algorithms for solving the VRPTW see [12,13]. In the last years different metaheuristics mainly based on local search methods were developed which provide fairly good results (see [11,9,37]). Based on the findings of the past ten years on the design of tabu search Cordeau et al. developed a unified tabu search and applied it to different VRP variants (VRPTW, MDVRPTW, PVRPTW) [18,19]. In [16] a tabu search heuristic for the PVRP that can also be used to solve the MDVRP and the periodic traveling salesman Problem (PTSP) is proposed. In [1] a scatter search procedure was developed for solving a problem of periodic pick-up of raw materials for a manufacturer of auto parts. In [61] a variable neighborhood search for the MDVRPTW was developed. For the PVRPTW the presented variable neighborhood search was successfully extended and hybridized in [58], [56], [59].
4
Hybrid Solution Methods for Rich VRPs
In the following we are going to give a short overview on three main directions of hybridization between exact algorithms and metaheuristic approaches. Namely, set-covering based, local branching approaches and decomposition techniques. Finally we are going to present a couple of promising hybridizations between (meta)heuristics, which – so far – do not include any exact component. But we are convinced that there is potential for increased efficiency when merging the concepts at hand with exact components. 4.1
Set-Covering/Partitioning Based Approaches
The VRP (along with its extensions) can also be formulated as a set-partitioning problem. The set-partitioning formulation originally has been proposed by [7]. A similar approach has been designed by [27]. Let R be the set of all feasible routes, where cr denotes the costs associated with route r ∈ R. Let ur be a binary decision variable that equals to 1 if route r is chosen. The objective is to find a set of m feasible routes, such that the total costs are minimized. The formulation for the VRP looks as follows, where βir is a binary indicator, that equals to 1 if node i belongs to route r. r∈R
cr · u r
(27)
Matheuristics for VPRs
r∈R
βir · ur = 1
∀i ∈ V
ur = m
211
(28) (29)
r∈R
ur ∈ {0, 1}
∀r ∈ R
(30)
Equation 28 and 29 make sure that each customer is part of exactly one route and that exactly m routes are chosen. This formulation can also be used in incorporate additional route-related constraints, such as time windows, maximal route durations or limitations with respect to the vehicles’ capacity. The formulation however has to be adapted accordingly for handling variants of the classical VRP, as the MDVRP or PVRP (see e.g. [56,59]). Please note that the set-partitioning model can be transformed into an equivalent set-covering formulation, if the cost matrix satisfies the triangle inequality (see [78]). Due to the exponential high number of feasible routes this model cannot be solved as such. Promising methods rather work on a limited number of feasible routes. The LP-relaxation is solved iteratively. The critical part is finding new promising feasible routes that will be added into the set of routes R. This is commonly done by column generation and/or exploiting the corresponding dual information. The set-covering formulation – given only a subset of feasible routes – is still NP-hard, but typically can be solved exactly for up to several thousand columns in a reasonable amount of time. For very large set-covering approaches an efficient heuristic has been developed in [14]. The first steps in developing hybrid solution techniques for the VRP date back to the 70s, see [27]. The authors propose a solution technique based on the set-covering formulation, where a set of feasible tours is generated heuristically motivated by the farthest-away-cheapest-insertion concept. An additional phase for further improvement of the routes is executed afterwards. The set of feasible routes is referred to as the petal set. Their approach has further been extended in [69] and [68], where this concept was denoted as the petal heuristic. These concepts were further enhanced in [38], where solutions generated by a generic tabu search heuristic were selected and assembled by a set-partitioning model to produce superior solutions. In [49] a similar approach for the onedimensional bin packing problem is applied. This problem class can be seen as a variant of the classical VRP with a modified objective function, where the number of vehicles (or bins, respectively) is minimized. In order to tackle very large problem instances, however, a heuristic approach was used to solve the embedded set-covering problem. Nowadays two main classes of research can be identified in this context. Within integrative approaches the set-covering component is responsible for the selection of the routes based on a given subset of feasible routes. This pool of routes is iteratively enriched by means of a subordinate heuristic. The heuristic component cannot be applied solely and serves as a route generator for promising feasible routes, which are used to enrich the pool of routes. Whereas in collaborative approaches the (meta)heuristic component could be applied solely. Good examples
212
K.F. Doerner and V. Schmid
for an integrative and collaborative approach have been developed in [3] and [73], respectively, which will described in more detail below. Archetti et al. designed an integrative matheuristic for the split delivery VRP (see [3]), which is concerned with serving the demand of a set of customers with a fleet of capacitated vehicles at minimum cost. Contrary to what is assumed in the classical VRP, a customer could be served by more than one vehicle. They present a hybrid solution approach that integrates heuristic search with exact optimization. An integer program is used to explore promising parts of the solution space identified by a tabu search heuristic. The tabu search component has originally been described in [2]. The proposed integer programming model generalizes the classical set-covering formulation. Routes (columns) are still modeled by using binary indicators for customers that are part of the route. Additional continuous decision variables are used for modeling the quantity delivered to each customer on any chosen route. Note that customers now can be visited by more than one vehicle. The metaheuristic part – based on tabu search – and the exact component – based on an extension of the classical set-covering model – are hybridized as follows. Tabu search is executed once. The set of solutions obtained by tabu search is analyzed with respect to frequency counters, indicating the number of times a particular edge was part of a solution and a particular customers’ demand was split. A customer that is never or rarely split in the solutions encountered during the tabu search, is likely to be served by a single vehicle in high-quality solution. Similar it is very likely that edges, which were used a lot in solutions encountered during tabu search, are part of a near-optimal solution. The frequency counters are used to generate a set of promising routes R, which are sorted according to a desirability measure. Then the set-covering problem is solved iteratively, based on a subset of routes R from the set of promising routes R. Routes that are part of the current best known solution will always be considered within the set-covering problem. Additionally routes from R that have not been considered so far will be added. Computational results show that the proposed method improves the solution of the tabu search in all but one instance of a large test set. A collaborative hybridization has been proposed by Schmid et al. in [73,71] for solving a VRP with rich constraints encountered in the delivery of ready-mixed concrete (RMC). Companies in the concrete industry are facing the following scheduling problem on a daily basis: Concrete produced at several plants has to be delivered at customers’ construction sites using a heterogeneous fleet of vehicles in a timely, but cost-effective manner. As the ordered quantity of concrete typically exceeds the capacity of a single vehicle, several deliveries need to be scheduled in order to fulfill an order. The deliveries cannot overlap and the time between consecutive deliveries has to be small. The solution approach effectively integrates optimization and heuristic techniques. Information is exchanged in a bi-directional way between an integer multicommodity network flow (MCNF) component and a metaheuristic component based on variable neighborhood search (VNS) in order to find high-quality solutions in a reasonable
Matheuristics for VPRs
213
amount of time. Both components are capable of producing feasible solutions, the integrated approach, however, is far more effective. The two components are hybridized as follows: So-called fulfillment patterns are going to be exchanged. A fulfillment pattern for any order completely specifies a set of unloading operations that will feasibly fulfill the demand associated with that order, i.e., the exact sequence of vehicles to show up at the construction site as well as the exact points in time when these vehicles will arrive at the construction site and start unloading. Any additional requirements of the order concerning specialized unloading equipment will also be considered. The MCNF component is solved first, initialized with a set of randomly generated patterns. Then iteratively the best solution found is further improved by means of VNS, which enriches the pool of patterns used by MCNF, the latter is then solved again. The MCNF component takes a global view and selects the best set of fulfillment patterns for the orders from among a set of potential fulfillment patters. The VNS component takes a local view and generates delivery schedules in the neighborhood of the delivery schedule produced by the MCNF component, thus constructing additional fulfillment patterns and diversifying the search. The delivery schedules found by the VNS component enrich the pool of fulfillment patterns of the MCNF component, thereby enabling it to find better solutions. The hybrid approach iterates between the global view and the local view. The set of fulfillment patterns is constantly updated because the embedded VNS component continually adds fulfillment patterns. Computational results show that the hybrid approach outperforms an innovative metaheuristic approach by more than 6% on average for large instances. A similar approach for the heterogeneous dial-a-ride problem with driver related constraints is introduced in [55], where an exact component based on column generation is hybridized with a metaheuristic based on VNS. The problem is solved by iteratively applying those components. New columns are added to the master problem by both the column generation (exploiting dual information) and the incumbent solutions found by VNS. Comparisons with the pure column generation show that the collaborative scheme improves the efficiency of the original method but does not outperform it in all cases. The general concept was introduced in [21]. 4.2
Local Branching
Especially for large instances solving a MIP, using a commercial solver as a black box, usually is not a promising idea as it does not guarantee finding good feasible solutions – if any – in a reasonable amount of time. Hence a general strategy called Local Branching (LB) was proposed in [25]. The authors use a generic MIP solver as tool to effectively explore promising solution subspaces defined and controlled at a strategic level by an external branching framework. The neighborhoods are obtained through the introduction of completely general linear inequalities called local branching cuts in the MIP model. Their approach has further been extended in [35], where the method is coupled with VNS, which allows a simpler and more systematic neighborhood exploration.
214
K.F. Doerner and V. Schmid
This concept has also been applied to a rich VRP for the distribution of readymixed concrete (RMC) in [72]. The two approaches described in [25] and [35] do not explicitly state which decision variables are allowed to change. Their neighborhoods are defined in a sense that given any feasible reference solution, at most a certain number of binary decision variables can change (i.e. flip its value from 0 to 1 or vice versa). Hence actually all (however not at the same time) of their binary decision variables are allowed to change. In the approach proposed in [72] and [71], however, only certain decision variables, using problem specific knowledge and exploiting an implicit hierarchy among them, are allowed to change. The strength in the developed solution approach lies in the excellent solution quality of medium-sized real-world test instances. When driven by the local branching paradigm the MIP solver produced significantly better incumbent solutions. In [66] an algorithm that uses both local branching and Monte Carlo sampling is used in a multidescent search strategy for solving 0-1 integer stochastic programming problems. This procedure is applied to the single vehicle routing problem with stochastic demands. 4.3
Decomposition
Other successful approaches for the hybridization of exact and metaheuristic approaches are based on decomposition. The problem as such is decomposed into smaller subproblems, parts of which can easily be solved to optimality. The derived subproblems might be a result of an implicit hierarchy among the decision levels involved or a segregation into natural partial problems. Subproblems can also arise from instance-specific information, such as heterogeneity with respect to vehicles, demand or the geographic location of customers. Alternatively smaller subproblems may also be derived artificially. Early methods decomposing the problem at hand date back to the early 80s. In [26] an idea of decomposing the problem hierarchically is introduced. The tackled VRP is decomposed using the cluster-first-route-second paradigm, where the clustering and routing decisions are decoupled and solved sequentially. In a first step so-called seed customers are heuristically chosen. Based on the selected seed customers the clustering of the remaining customers (i.e. clustering) is done by exactly solving an assignment problem. The routes are finally obtained by solving a traveling salesman problem for every cluster. This approach has further been extended for the VRPTW in [40]. Constraints related to time-windows are treated as soft constraints, whose violation is penalized in the objective function accordingly. Other ideas for hierarchical decompositions include the concept based on ruinand-recreate, where a solution is heuristically destroyed and the repairing could take place exactly. In [22] a distance constraint variant of the VRP is solved using this idea. Solutions are going to be destroyed by removing customer nodes from tours, which are later reinserted using an ILP. A similar approach for the open VRP was developed in [70]. Both methods were able to improve best known solutions from the literature. A similar idea was proposed in [52], where an exact method is used to guide a metaheuristic approach based on tabu search for solving a m-peripathetic VRP. During the execution of tabu search solutions
Matheuristics for VPRs
215
are altered by exchanging edges for other promising edges. In order to reduce the neighborhood used within tabu search a set of promising edges is identified by solving a b-matching problem. Edges chosen by the b-matching problem are more likely to be part of an optimal solution, hence the solution produced by the exact method is used to guide the solution procedure of tabu search by restricting its neighborhood size. In [82] a multi-period orienteering problem with multiple time windows, a new routing problem combining concepts of the orienteering, the team orienteering problem, as well as constraints from standard VRPs and some additional real-world requirements, is presented. This is a real-world problem typically encountered by sales representatives managing their weekly schedule. Customers may have up to two different time windows per day, among which one needs to be chosen. Time windows are chosen using an exact algorithm, which is embedded into the global optimization framework based on VNS. The exact component (i.e. the time window selection) is part of the feasibility check therein. Results showed that the tailor-made VNS is also competitive for solving existing standard benchmark instances for the embedded subproblems such as the orienteering problem and the team-orienteering problem (with and without time windows) respectively. Another concept-related approach was introduced in [36]. Routes that are generated within the proposed local search procedure are evaluated using an exact approach based on dynamic programming. For each route the optimal timing, based on a given sequence, has to be determined, also taking into account time-dependent travel times. For complex problems in supply chain services (e.g. the combined problem of container loading and routing) the resulting problem can naturally be decomposed into its original subproblems. Starting at a strategic-tactical level a hybrid approach for solving the capacitated location routing problem is proposed in [63]. This problem combines two well-studied combinatorial optimization problems in logistics: the facility location problem and the MDVRP, both of which are known to be NP-hard. A set of depots – from a set of potential facility locations – needs to be chosen. Once the depot locations are fixed an MDVRP can be solved. The two decision levels, however, are intertwined and cannot be solved independently, as the routing decisions affect the location decision and vice versa. In their paper Prins et al. propose a matheuristic, where the facility location problem is solved using Lagrangean relaxation and the routing part by a metaheuristic approach based on tabu search (see [80]). An initial solution is generated heuristically. First customers are aggregated into supernodes, upon which the facility location is solved. In the next step the MDVRP, based on the chosen facilities and the customers at a disaggregated level is solved. The resulting routes are used to generate new supernodes, which serve as an input for the facility location problem. The procedure iterates between these two phases until a certain number of restarts has been reached. In [23] a real-world problem for the delivery of timber-wood products is considered. Specific loading constraints (timber-wood products are stacked on piles)
216
K.F. Doerner and V. Schmid
need to be considered. The resulting problem combines aspects from vehicle routing and the parallel machine scheduling problem (for the embedded vehicle loading problem). Both subproblems decompose naturally and are solved heuristically by means of ant colony optimization and tabu search. In [81] an approach based on VNS is proposed and the embedded packing subproblem is solved exactly using a dynamic programming algorithm. In [32] the two-dimensional version of the loading vehicle routing problem (2L-CVRP) is solved using a tabu search with an embedded optimization for the packing component based on branch-and-bound. A hybridization of ant colony optimization and branchand-bound for the same problem is proposed in [28]. Their hybrid approach including ant colony optimization clearly outperforms previous heuristics from the literature. Afterwards new best solutions were obtained in [74], where the metaheuristic procedure was guided by means of VNS. Strodl et al. also investigated the problem of balancing the CPU budget between the exploration of different solutions and solving the loading subproblem exactly. Experiments show that by solving hard subproblems exactly, the solution quality of the entire search process can be improved. Hybrid approaches for the three-dimensional variant of the above mentioned problem can be found in [33] and [29]. A geographic decomposition approach is exploited in [54], where a memetic algorithm is embedded as an optimizer within a POPMUSIC (see [75]) framework. Ostertag et al. show that their population-based search combined with the decomposition strategies is a very efficient and flexible tool to tackle real-world problems with regards to solution quality as well as runtime. The same decomposition strategy was used in [53], where VNS was used as the embedded optimizer.
5
Outlook
Matheuristics open new avenues of promising research. By combining the strengths of exact and metaheuristic search components they allow to overcome the difficulties observed when the individual concepts are applied solely. By letting the individual components being guided by each other, high-quality solutions can be obtained in a shorter amount of computational time. Successful implementations include – but are not limited to – set-covering/partitioning formulations, local branching and decomposition techniques (where the original problem is decomposed artificially, naturally or due to implicit hierarchies). In the past these techniques have been applied successfully for vehicle routing, network design and location problems, see [47]. The current state of the literature indicates that there is still great potential especially for rich vehicle routing problems, which should be tackled by matheuristic search techniques. Promising future directions are hybrids of cooperative multi-search methods as presented in [45,60]. This method is based on the solution warehouse strategy where a pool of solutions are managed and exchanged. Also hybrid variants within two-stage solutions procedures [9] or multilevel cooperative search techniques [20] could lead to promising designs for solving rich VRPs. We are convinced that these techniques are also suitable for tackling problems in other domains.
Matheuristics for VPRs
217
Acknowledgements Financial support from the Austrian Science Fund (FWF) under grant P20342N13 is gratefully acknowledged.
References 1. Alegre, J., Laguna, M., Pacheco, J.: Optimizing the periodic pick-up of raw materials for a manufacturer of auto parts. European Journal of Operational Research 179(3), 736–746 (2007) 2. Archetti, C., Speranza, M.G., Hertz, A.: A tabu search algorithm for the split delivery vehicle routing problem. Transportation Science 40(1), 64–73 (2006) 3. Archetti, C., Speranza, M.G., Savelsbergh, M.W.P.: An optimization-based heuristic for the split delivery vehicle routing problem. Transportation Science 42(1), 22–31 (2008) 4. Baldacci, R., Hadjiconstantinou, E., Mingozzi, A.: An exact algorithm for the capacitated vehicle routing problem based on a two-commodity network flow formulation. Operations Research 52(5), 723–738 (2004) 5. Baldacci, R., Bartolini, E., Mingozzi, A., Roberti, R.: An exact solution framework for a broad class of vehicle routing problems. Computational Management Science 7(3), 229–268 (2010) 6. Baldacci, R., Christofides, N., Mingozzi, A.: An exact algorithm for the vehicle routing problem based on the set partitioning formulation with additional cuts. Mathematical Programming 115(2), 351–385 (2008) 7. Balinski, M.L., Quandt, R.E.: On an integer program for a delivery problem. Operations Research 12(2), 300–304 (1964) 8. Bard, J.F., Kontoravdis, G., Yu, G.: A branch-and-cut procedure for the vehicle routing problem with time windows. Transportation Science 36(2), 250–269 (2002) 9. Bent, R., Van Hentenryck, P.: A two-stage hybrid local search for the vehicle routing problem with time windows. Transportation Science 38(4), 515–530 (2004) 10. Bramel, J., Simchi-Levi, D.: Set-covering-based algorithms for the capacitated VRP. The Vehicle Routing Problem, pp. 85–108. SIAM, Philadelphia (2001) 11. Br¨ aysy, O.: A reactive variable neighborhood search for the vehicle-routing problem with time windows. INFORMS Journal on Computing 15(4), 347–368 (2003) 12. Br¨ aysy, O., Gendreau, M.: Vehicle routing problem with time windows, part i: Route construction and local search algorithms. Transportation Science 39(1), 104– 118 (2005) 13. Br¨ aysy, O., Gendreau, M.: Vehicle routing problem with time windows, part ii: Metaheuristics. Transportation Science 39(1), 119–139 (2005) 14. Caprara, A., Fischetti, M., Toth, P.: A heuristic method for the set covering problem. Operations Research 47(5), 730–743 (1999) 15. Cordeau, J.F., Desaulniers, G., Desrosiers, J., Solomon, M.M., Soumis, F.: VRP with Time Windows. The Vehicle Routing Problem, pp. 157–193. SIAM, Philadelphia (2001) 16. Cordeau, J.F., Gendreau, M., Laporte, G.: A tabu search heuristic for periodic and multi-depot vehicle routing problems. Networks 30(2), 105–119 (1997) 17. Cordeau, J.F., Laporte, G.: Tabu Search Heuristics for the Vehicle Routing Problem. Metaheuristic Optimization via Memory and Evolution, pp. 145–163. Springer, Heidelberg (2005)
218
K.F. Doerner and V. Schmid
18. Cordeau, J.F., Laporte, G., Mercier, A.: A unified tabu search heuristic for vehicle routing problems with time windows. Journal of the Operational Research Society 52(8), 928–936 (2001) 19. Cordeau, J.F., Laporte, G., Mercier, A.: Improved tabu search algorithm for the handling of route duration constraints in vehicle routing problems with time windows. The Journal of the Operational Research Society 55(5), 542–546 (2004) 20. Crainic, T.G., Li, Y., Toulouse, M.: A first multilevel cooperative algorithm for capacitated multicommodity network design. Computers & Operations Research 33(9), 2602–2622 (2006) 21. Danna, E., Le Pape, C.: Branch-and-Price Heuristics: A Case Study on the Vehicle Routing Problem with Time Windows. Column Generation, pp. 99–129. Springer, Heidelberg (2005) 22. De Franceschi, R., Fischetti, M., Toth, P.: A new ILP-based refinement heuristic for vehicle routing problems. Mathematical Programming 105(2-3), 471–499 (2006) 23. Doerner, K.F., Fuellerer, G., Hartl, R.F., Gronalt, M., Iori, M.: Metaheuristics for the vehicle routing problem with loading constraints. Networks 49(4), 294–307 (2007) 24. El-Abd, M., Kamel, M.: A taxonomy of cooperative search algorithms. In: Blesa, M.J., Blum, C., Roli, A., Sampels, M. (eds.) HM 2005. LNCS, vol. 3636, pp. 32–41. Springer, Heidelberg (2005) 25. Fischetti, M., Lodi, A.: Local branching. Mathematical Programming 98(1-3), 23– 47 (2003) 26. Fisher, M.L., Jaikumar, R.: A generalized assignment heuristic for vehicle routing. Networks 11(2), 109–124 (1981) 27. Foster, B.A., Ryan, D.M.: An integer programming approach to the vehicle scheduling problem. Operational Research Quarterly 27(2), 367–384 (1976) 28. Fuellerer, G., Doerner, K.F., Hartl, R.F., Iori, M.: Ant colony optimization for the two-dimensional loading vehicle routing problem. Computers & Operations Research 36(3), 655–673 (2009) 29. Fuellerer, G., Doerner, K.F., Hartl, R.F., Iori, M.: Metaheuristics for vehicle routing problems with three-dimensional loading constraints. European Journal of Operational Research 201(3), 751–759 (2010) 30. Fukasawa, R., Longo, H., Lysgaard, J., Poggi de Arag˜ ao, M., Reis, M., Uchoa, E., Werneck, R.F.: Robust branch-and-cut-and-price for the capacitated vehicle routing problem. Mathematical Programming 106(3), 491–511 (2006) 31. Gendreau, M., Hertz, A., Laporte, G.: New insertion and postoptimization procedures for the traveling salesman problem. Operations Research 40(6), 1086–1094 (1992) 32. Gendreau, M., Iori, M., Laporte, G., Martello, S.: A tabu search algorithm for a routing and container loading problem. Transportation Science 40(3), 342–350 (2006) 33. Gendreau, M., Iori, M., Laporte, G., Martello, S.: A tabu search heuristic for the vehicle routing problem with two-dimensional loading constraints. Networks 51(1), 4–18 (2008) 34. Gendreau, M., Laporte, G., Potvin, J.Y.: Metaheuristics for the capacitated VRP. The Vehicle Routing Problem, pp. 129–154. SIAM, Philadelphia (2001) 35. Hansen, P., Mladenovi´c, N., Uroˇsevi´c, D.: Variable neighborhood search and local branching. Computers & Operations Research 33(10), 3034–3045 (2006) 36. Hashimoto, H., Yagiura, M., Ibaraki, T.: An iterated local search algorithm for the time-dependent vehicle routing problem with time windows. Discrete Optimization 5(2), 434–456 (2008)
Matheuristics for VPRs
219
37. Ibaraki, T., Imahori, S., Kubo, M., Masuda, T., Uno, T., Yagiura, M.: Effective local search algorithms for routing and scheduling problems with general timewindow constraints. Transportation Science 39(2), 206–232 (2005) 38. Kelly, J.P., Xu, J.: A set-partitioning-based heuristic for the vehicle routing problem. INFORMS Journal on Computing 11(2), 161–172 (1999) 39. Kohl, N., Madsen, O.B.G.: An optimization algorithm for the vehicle routing problem with time windows based on lagrangian relaxation. Operations Research 45(3), 395–406 (1997) 40. Koskosidis, Y.A., Powell, W.B., Solomon, M.M.: An optimization-based heuristic for vehicle routing and scheduling with soft time window constraints. Transportation Science 26(2), 69–85 (1992) 41. Laporte, G.: What you should know about the vehicle routing problem. Naval Research Logistics 54(8), 811–819 (2007) 42. Laporte, G.: Fifty years of vehicle routing. Transportation Science 43(4), 408–416 (2009) 43. Laporte, G., Nobert, Y.: Exact solution of the vehicle routing problem. In: Martello, S., Laporte, G., Minoux, M., Ribeiro, C.C. (eds.) Surveys in Combinatorial Optimization. North-Holland Mathematics Studies, vol. 132, pp. 147–184. NorthHolland, Amsterdam (1987) 44. Laporte, G., Semet, F.: Classical heuristics for the capacitated VRP. The Vehicle Routing Problem, pp. 109–128. SIAM, Philadelphia (2001) 45. Le Bouthillier, A., Crainic, T.G.: A cooperative parallel meta-heuristic for the vehicle routing problem with time windows. Computers & Operations Research 32(7), 1685–1708 (2005) 46. Letchford, A.N., Salazar-Gonz´ alez, J.J.: Projection results for vehicle routing. Mathematical Programming 105(2-3), 251–274 (2006) 47. Maniezzo, V., St¨ utzle, T., Voß, S. (eds.): Matheuristics. Hybridizing Metaheuristics and Mathematical Programming. Annals of Information Systems, vol. 10. Springer, Heidelberg (2009) 48. Mester, D., Br¨ aysy, O.: Active-guided evolution strategies for large-scale capacitated vehicle routing problems. Computers & Operations Research 34(10), 2964– 2975 (2007) 49. Monaci, M., Toth, P.: A set-covering-based heuristic approach for bin-packing problems. INFORMS Journal on Computing 18(1), 71–85 (2006) 50. Mourgaya, M., Vanderbeck, F.: Column generation based heuristic for tactical planning in multi-period vehicle routing. European Journal of Operational Research 183(3), 1028–1041 (2007) 51. Naddef, D., Rinaldi, G.: Branch-and-cut algorithms for the capacitated VRP. The Vehicle Routing Problem, pp. 53–84. SIAM, Philadelphia (2001) 52. Ngueveu, S.U., Prins, C., Calvo, R.W.: A Hybrid Tabu Search for the m-Peripatetic Vehicle Routing Problem, Matheuristics. In: Hybridizing Metaheuristics and Mathematical Programming, vol. 10, pp. 253–266. Springer, Heidelberg (2009) 53. Ostertag, A., Doerner, K.F., Hartl, R.F.: Variable neighborhood search integrated in the POPMUSIC framework for a large scale vehicle routing problem. In: Blesa, M.J., Blum, C., Cotta, C., Fern´ andez, A.J., Gallardo, J.E., Roli, A., Sampels, M. (eds.) HM 2008. LNCS, vol. 5296, pp. 29–42. Springer, Heidelberg (2008) 54. Ostertag, A., Doerner, K.F., Hartl, R.F., Taillard, E.D., Waelti, P.: POPMUSIC for a real-world large-scale vehicle routing problem with time windows. Journal of the Operational Research Society 60, 934–943 (2009)
220
K.F. Doerner and V. Schmid
55. Parragh, S.N., Cordeau, J.F., Doerner, K.F., Hartl, R.F.: Models and algorithms for the heterogeneous dial-a-ride problem with driver related constraints, Technical report (2009) 56. Pirkwieser, S., Raidl, G.R.: Boosting a variable neighborhood search for the periodic vehicle routing problem with time windows by ILP techniques. In: Proceedings of the 8th Metaheuristic International Conference (MIC 2009), Hamburg, Germany, July 13-16 (2009) 57. Pirkwieser, S., Raidl, G.R.: A column generation approach for the periodic vehicle routing problem with time windows. In: Proceedings of the International Network Optimization Conference (INOC 2009), Pisa, Italy, April 26-29 (2009) 58. Pirkwieser, S., Raidl, G.R.: Multiple variable neighborhood search enriched with ILP techniques for the periodic vehicle routing problem with time windows. In: Blesa, M., Blum, C., Di Gaspero, L., Roli, A., Sampels, M., Schaerf, A. (eds.) HM 2009. LNCS, vol. 5818, pp. 45–59. Springer, Heidelberg (2009) 59. Pirkwieser, S., Raidl, G.R.: Matheuristics for the periodic vehicle routing problem with time windows. In: Proceedings of Matheuristics 2010 - Third International Workshop on Model-based Metaheuristics, Vienna, Austria, June 28-30 (2010) 60. Polacek, M., Benkner, S., Doerner, K.F., Hartl, R.F.: A cooperative and adaptive variable neighborhood search for the multi depot vehicle routing problem with time windows. Business Research 1(2), 1–12 (2008) 61. Polacek, M., Hartl, R.F., Doerner, K., Reimann, M.: A variable neighborhood search for the multi depot vehicle routing problem with time windows. Journal of Heuristics 10(6), 613–627 (2004) 62. Prins, C.: A simple and effective evolutionary algorithm for the vehicle routing problem. Computers & Operations Research 31(12), 1985–2002 (2004) 63. Prins, C., Prodhon, C., Ruiz, A., Soriano, P., Calvo, R.W.: Solving the capacitated location-routing problem by a cooperative Lagrangean relaxation-granular tabu search heuristic. Transportation Science 41(4), 470–483 (2007) 64. Puchinger, J., Raidl, G.R.: Combining metaheuristics and exact algorithms in com´ binatorial optimization: A survey and classification. In: Mira, J., Alvarez, J.R. (eds.) IWINAC 2005. LNCS, vol. 3562, pp. 41–53. Springer, Heidelberg (2005) 65. Raidl, G.R., Puchinger, J., Blum, C.: Metaheuristic hybrids (2010) (to appear) 66. Rei, W., Gendreau, M., Soriano, P.: A hybrid Monte Carlo local branching algorithm for the single vehicle routing problem with stochastic demands. Transportation Science 44(1), 136–146 (2010) 67. Reimann, M., Doerner, K.F., Hartl, R.F.: D-ants: Savings based ants divide and conquer the vehicle routing problem. Computers & Operations Research 31(4), 563–591 (2004) 68. Renaud, J., Boctor, F.F., Laporte, G.: An improved petal heuristic for the vehicle routeing problem. The Journal of the Operational Research Society 47(2), 329–336 (1996) 69. Ryan, D.M., Hjorring, C., Glover, F.: Extensions of the petal method for vehicle routeing. The Journal of the Operational Research Society 44(3), 289–296 (1993) 70. Salari, M., Toth, P., Tramontani, A.: An ILP improvement procedure for the open vehicle routing problem. Computers & Operations Research 37(12), 2106–2120 (2010) 71. Schmid, V.: Trucks in Movement: Hybridization of Exact Approaches and Variable Neighborhood Search for the Delivery of Ready-Mixed Concrete. Ph.D. thesis, University of Vienna (2007)
Matheuristics for VPRs
221
72. Schmid, V., Doerner, K.F., Hartl, R.F., Salazar-Gonz´ alez, J.J.: Hybridization of very large neighborhood search for ready-mixed concrete delivery problems. Computers & Operations Research 37(3), 559–574 (2010) 73. Schmid, V., Doerner, K.F., Hartl, R.F., Savelsbergh, M.W.P., Stoecher, W.: A hybrid solution approach for ready-mixed concrete delivery. Transportation Science 43(1), 70–85 (2009) 74. Strodl, J., Doerner, K.F., Tricoire, F., Hartl, R.F.: On index structures in hybrid metaheuristics for routing problems with hard feasibility checks: an application to the 2-dimensional loading vehicle routing problem. In: Hybrid Metaheuristics. LNCS. Springer, Heidelberg (2010) 75. Taillard, E.D., Voß, S.: Partial optimization metaheuristic under special intensification conditions. In: Ribeiro, C.C., Hansen, P. (eds.) Essays and Surveys in Metaheuristics, 3rd Metaheuristics International Conference (MIC 1999), July 1822, pp. 613–629. Kluwer, Dordrecht (2002) 76. Toth, P., Vigo, D.: Exact algorithms for vehicle routing. In: Crainic, T.G., Laporte, G. (eds.) Fleet Management and Logistics, pp. 1–31. Kluwer, Dordrecht (1998) 77. Toth, P., Vigo, D.: Branch-and-bound algorithms for the capacitated VRP. The Vehicle Routing Problem, pp. 29–51. SIAM, Philadelphia (2001) 78. Toth, P., Vigo, D.: An overview of vehicle routing problems. The Vehicle Routing Problem, pp. 1–26. SIAM, Philadelphia (2001) 79. Toth, P., Vigo, D. (eds.): The Vehicle Routing Problem. SIAM Monographs on Discrete Mathematics and Applications. SIAM, Philadelphia (2001) 80. Toth, P., Vigo, D.: The granular tabu search and its application to the vehiclerouting problem. INFORMS Journal on Computing 15(4), 333–346 (2003) 81. Tricoire, F., Doerner, K.F., Hartl, R.F., Iori, M.: Heuristic and exact algorithms for the multi-pile vehicle routing problem. OR Spectrum (2009) (published online) 82. Tricoire, F., Romauch, M., Doerner, K.F., Hartl, R.F.: Heuristics for the multiperiod orienteering problem with multiple time windows. Computers & Operations Research 37(2), 351–367 (2010)
Author Index
˙ Kuban 31 Altınel, I. Alvelos, Filipe 190 Aras, Necati 31 Blum, Christian Cr´evits, Igor
Nguyen, Viet-Phuong Ochi, Luiz Satoru
88
73
1, 16
118
da Silva, Andr´e Renato Villela de Sousa, Amaro 190 Di Gaspero, Luca 46 Doerner, Karl F. 160, 206
73
Pirkwieser, Sandro 174 Pop, P.C. 62 Prandtstetter, Matthias 103 Prins, Christian 88 Prodhon, Caroline 88 Raidl, G¨ unther R.
G¨ artner, Johannes
Hanafi, Sa¨ıd 118 Hartl, Richard F. 160 Hemmelmayr, Vera 16 Hern´ andez, Hugo 16 Iordache, Serban
103, 174
46
148
K¨ u¸cu ¨kaydın, Hande
31
Sabo, C. 62 Santos, Dorabella 190 Schaerf, Andrea 46 Schafhauser, Werner 46 Schauer, Christian 103 Schmid, Verena 16, 206 Slany, Wolfgang 46 Strodl, Johannes 160
Lazi´c, Jasmina 118 Lozano, Manuel 1
Tricoire, Fabien
Matei, O. 62 Mladenovi´c, Nenad 118 Musliu, Nysret 46, 133
Widl, Magdalena 133 Wilbaut, Christophe 118
160