METAHEURISTICS: Progress as Real Problem Solvers
INTERFACES SERIES Series Editors Professor Ramesh Sharda
Prof. Dr. Stefan VoB
Oklahoma State Univetsity
Univetsitat Hamburg
Other published titles in the series: Greenberg /A Computer-AssistedAnalysis Systemfor Mathematical Programming Models and Solutions: A User's Guidefor ANALYZE Greenberg / Modeling by Object-Driven Linear Elemental Relations: A Users Guidefor MODLER Brown & Scherer / Intelligent Scheduling Systems Nash & Sofer / The Impact of Emerging Technologies on Computer Science & Operations Research Barth / Logic-Based 0-1 Constraint Programming Jones I Visualization and Optimization B a n , Helgason & Kennington / Interfaces in Computer Science & Operations Research: Advances in Metaheuristics, Optimization, & Stochastic Modeling Technologies Ellacott, Mason & Anderson / Mathematics of Neural Networks: Models, Algorithms & Applications W o o d r u f fI Advances in Computational & Stochastic Optimization, Logic Programming, and Heuristic Search Klein I Scheduling of Resource-ConstrainedProjects Bierwirth /Adaptive Search and the Management of Logistics Systems Laguna & GonzBlez-Velarde 1 Computing Toolsfor Modeling, Optimization and Simulation Stilman I Linguistic Geometry: From Search to Construction Sakawa I Genetic Algorithms and Fuzzy Multiobjective Optimization Ribeiro & Hansen I Essays and Surveys in Metaheuristics Holsapple, Jacob & Rao I Business Modelling: MultidisciplinaryApproaches - Economics, Operational and Information Systems Perspectives Sleezer, Wentling & CudelHuman Resource Development And Information Technology: Making Global Connections VoR & W o o d r u f f/ Optimization Soflware Class Libraries Upadhyaya et a1 / Mobile Computing: Implementing Pervasive Information and Communications Technologies Reeves & R o w e / Genetic Algorithms-Principles and Perspectives: A Guide to GA Theory Bhargava & Y e / ComputationalModeling And Problem Solving In The Networked World: Interfaces in Computer Science & Operations Research W o o d r u f f/ Network Interdiction And Stochastic Integer Programming Anandalingam & Raghavan / TelecommunicationsNetwork Design And Management Laguna & Marti / Scatter Search: Methodology And Implementations In C Gosavi/Simulation-Based Optimization: Parametric Optimization Techniques and Reinforcement Learning Koutsoukis & Mitra 1Decision Modelling And Information Systems: The Information Value Chain Milano / ConstraintAnd Integer Programming: Toward a Un@ed Methodology W i l s o n & Nuzzolo I Schedule-Based Dynamic Transit Modeling: Theory and Applications Golden, Raghavan & Wasil / The Next Wave In Computing, Optimization,And Decision Technologies Rego & Alidaeel Metaheuristics Optimization Via Memory and Evolution: Tabu Search and Scatter Search Kitamura & Kuwaharal Simulation Approaches in TransportationAnalysis: Recent Advances and Challenges
METAHEURISTICS: Progress as Real Problem Solvers
edited by
Toshihide Ibaraki Koji Nonobe Mutsunori Yagiura
a- Springer
Toshihide Ibaraki Kyoto University Japan
Koji Nonobe Kyoto University Japan
Mutsunori Yagiura Kyoto University Japan
Library of Congress Cataloging-in-Publication Data A C.I.P. Catalogue record for this book is available from the Library of Congress.
ISBN-10: 0-387-25382-3 ISBN-13: 9780387253824
e-ISBN: 0-387-25383-1
Printed on acid-free paper.
Copyright O 2005 by Springer Science+Business Media, Inc. All rights reserved. This work may not be translated or copied in whole or in part without the written permission of the publisher (Springer Science + Business Media, Inc., 233 Spring Street, New York, NY 10013, USA), except for brief excerpts in connection with reviews or scholarly analysis. Use in connection with any form of information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now know or hereafter developed is forbidden. The use in this publication of trade names, trademarks, service marks and similar terms, even if the are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. Printed in the United States of America. 9 8 7 6 5 4 3 2 1
SPIN 11053361
Contents
Preface Part I Invited Paper 1 Metaheuristic Agent Processes (MAPS) Red Glover and Gary Kochenberger
Part I1 Tutorial Paper 2 GRASP with Path-Relinking: Recent Advances and Applications Mauricio G.C. Resende and Celso C. Ribeiro
Part I11 Papers on Problem Solving
3 A Tabu Search Heuristic for a University Timetabling Problem Halvard Arntzen and Arne Lflkketangen An Investigation of Automated Planograms Using a Simulated Annealing Based Hyper-Heuristic Ruibin Bai and Graham Kendall 5 Validation and Optimization of an Elevator Simulation Model with Modern Search Heuristics Thomas Bartz-Beielstein, Mike Preuss and Sandor Markon 6 Multi-Objective Hyper-Heuristic Approaches for Space Allocation and Timetabling Edmund K. Burke, J. Dario Landa Silva and Eric Soubeiga
7 Theory and Practice of the Minimum Shift Design Problem Luca Di Gaspero, Johannes Gartner, Guy Kortsarz, Nysret Musliu, Andrea Schaerf and Wolfgang Slany
65
87
109
129
159
vi
Metaheuristics: Progress as Real Problem Solvers
8 Local Search Algorithms for the Two-Dimensional Cutting Stock Problem with a Given Number of Different Patterns Shinji Imahori, Mutsunori Yagiura, Shunji Umetani, Shinya Adachi and Toshihide Ibaraki
181
9 A Generic Object-Oriented Tabu Search Framework Hoong C. Lau, Xiaomin Jia and Wee C. W a n 10 Bi-Objective Sequencing of Cutting Patterns: An application for the paper industry Ana Respicio and M. Eugdnia Captivo 11 243 Metaheuristics Approach for Rule Acquisition in Flexible Shop Scheduling Problems Kazutoshi Sakakibara, Hisashi Tamaki, Hajime Murao and Shinzo Kitamura 12 Predicting Colorectal Cancer Recurrence: A Hybrid Neural NetworksBased Approach Rob Smithies, Said Salhi and Nut Queen 13 A Constructive Genetic Approach to Point-Feature Cartographic Label Placement Missae Yamamoto and Luiz A.N. Lorena Part
IV Papers on Methodologies
14 Parallel Strategies for GRASP with Path-Relinking Renata M. Aiex and Mauricio G. C. Resende 15 Speeding Up Local Search Neighborhood Evaluation for a MultiDimensional Knapsack Problem Ross J. W . James
16 Computationally Difficult Instances for the Uncapacitated Facility Location Problem Yuri Kochetov and Dmitry Ivanenko
259
287
Contents
vii
17 Consistent Neighbourhood in a Tabu Search Michel Vasquez, Audrey Dupont and Djamal Habet
369
18 Constraint Oriented Neighbourhoods - A New Search Strategy in Metaheuristics Ana Vzana, Jorge P. Sousa and Manuel A. Matos
389
Preface
Facing many computationally hard problems in real-world applications, the framework of metaheuristics is becoming one of the most powerful panaceas, as it can produce robust and efficient algorithms that compute approximate solutions of high quality in realistic computation time. Algorithms in metaheuristics may be simply viewed as the repetition of the following two basic steps: (1) Generation of solutions and (2) its improvement by local search. Extensive generalizations and sophistications of these two steps, however, have been proposed and tested. The solution generation may reflect the past computational history; e.g., they may be generated by randomized selections from the promising solution areas, by modifications of good solutions currently available, and by crossover or path relinking operations applied to a pool of candidate solutions compiled by then. The local search may also be realized in different ways; e.g., the search in the neighborhood may be done deterministically or probabilistically, moves to worse solutions may be accepted under certain circumstances, the evaluation function that guides the search can be adaptively modified, the size of neighborhood may change depending on the current status of computation, and so forth. Furthermore the repetition of two basic steps can be controlled by various strategies. As outcomes of these, we see many algorithms with different names such as simulated annealing, tabu search, genetic algorithms, evolutionary computation, genetic local search, greedy randomized adaptive search procedures (GRASP), scatter search, ant system, variable neighborhood search, guided local search, iterated local search, noising methods, threshold accepting, memetic algorithms, neural networks, and their hybrids. Perhaps, the field of metaheuristics has been matured enough to a certain level, and main focus is now being shifted to their applications as real problem solving tools. This is why the title of this volume has the subtitle, Progress as Real Problem Solvers. This book is a collection of selected papers from those presented at the Fifth Metaheuristic International Conference (MIC2003), held in
x
Metaheuristics: Progress as Real Problem Solvers
Kyoto, Japan, 25-28 August 2003. All papers were peer-reviewed according to a tight standard, and as a result only eighteen papers could survive. Among those eighteen papers, there is one invited paper written by F. Glover and G. Kochenberger, which proposes the concept of metaheuristic agent processes. There is one tutorial paper by M. G.C. Resende and C. C. Ribeiro discussing GRASP with path-relinking. Other papers are classified as those of problem solving and those of methodologies. The problems discussed in problem solving papers include timetabling, automated planograms, elevators, space allocation, shift design, cutting stock, flexible shop scheduling, colorectal cancer and cartography. Methodology papers try to clarify various aspects of metaheuristics mainly from computational view point. We believe that all the papers represent the current cutting edges of the metaheuristics study as problem solvers. As editors of this volume, we wish to thank all the anonymous reviewers who contributed their time to make this volume of very high quality. The cooperation from the members of Organizing Committee and Program Committee of MIC2003 was essential for the success of this project, whose lists are given in the next page. From the financial side, we particularly appreciate the support given by the Kyoto University foundation, and the supports given by the Telecommunications Advancement Foundation and Kayamori Foundation of Informational Science Advancement. Finally the supports from the Operations Research Society of Japan and scheduling Society of Japan are gratefully acknowledged. Kyoto, November 2004 Toshihide Ibaraki Koji Nonobe Mutsunori Yagiura
Preface
COMMITTEES OF MIC2003 Organizing committee Masao F'ukushima (Kyoto University) Toshihide Ibaraki (Kyoto University), Chair Hiroaki Ishii (Osaka University) Kazuo Iwama (Kyoto University) Naoki Katoh (Kyoto University) Hiroshi Kise (Kyoto Institute of Technology) Koji Nonobe (Kyoto University) Nobuo Sannomiya (Kyoto Institute of Technology) Hisashi Tamaki (Kobe University) Mutsunori Yagiura (Kyoto University) Yasunari Yoshitomi (Kyoto Prefectural University), Cochair
Program committee Takao Asano (Japan) Hajime Ase (Japan) Jacek Blazewicz (Poland) Endre Boros (USA) Peter Brucker (Germany) Edmund Burke (UK) Philippe Codognet (France) Josk S. Ferreira(Portuga1) Nobuo Funabiki (Japan) Michel Gendreau (Canada) Fred Glover (USA) Peter Greistorfer (Austria) Pierre Hansen (Canada) Jin-Kao Hao (France) Tomio Hirata (Japan) Hitoshi Iba (Japan) Toshihide Ibaraki (Japan), Chair Andrzej Jaszkiewicz (Poland) Taichi Kaji (Japan) Kengo Katayama (Japan) Hajime Kita (Japan) Shigenobu Kobayashi (Japan) Nobuyuki Konishi (Japan) Mikio Kubo (Japan) Andrea Lodi (Italy) Arne L~kketangen(Norway)
Helena R. Lourenqo (Spain) Silvano Martello (Italy) Pablo Moscato (Australia) Azuma Ohuchi (Japan) Josk F. Oliveira (Portugal) Isao Ono (Japan) Ibrahim Osman (Lebanon) Erwin Pesch (Germany) Gkrard Plateau (France) Cksar Rego (USA) Mauricio Resende (USA) Celso C. Ribeiro (Brazil) Catherine Roucairol (France) Hussain A. Saleh (Belgium) Marc Sevaux (France) Jorge P. Sousa (Portugal) ~ r i Taillard c (Switzerland) Jacques Teghem (Belgium) Paolo Toth (Italy) Katsuji Uosaki (Japan) Vicente Valls (Spain) Stefan Vo8 (Germany) Mutsunori Yagiura (Japan), Cochair Takeshi Yamada (Japan) Masayuki Yamamura (Japan) Ming-Jong Yao (Taiwan)
Chapter 1 METAHEURISTIC AGENT PROCESSES (MAPS)
Fred
lover' and Gary ~ o c h e n b e r ~ e r ~
Leeds School of Business, University of ColoradoBoulder,Colorado80309-0419
[email protected]
school of Business Administration, University of Colorado Denver, Colorado 80217-3364
[email protected]
Abstract: Agent-based models have had a remarkable impact in many areas of science, engineering and business. To achieve their full potential, however, these models must be extended to meet challenges of optimization that have so far been sidestepped or left unattended. Because classical optimization procedures are incapable of handling the complex problems that give rise to this challenge, a need arises for agent-based models to draw support from the field of metaheuristics. Accordingly, this situation motivates the creation of Metaheuristic Agent Processes (MAPs) that integrate agent-based models with metaheuristic procedures, and thereby offer a means for achieving further advances through the use of agent-based technology. In this paper, we demonstrate that fundamental metaheuristic strategies already encompass inherent agentbased components, providing a natural foundation for the form of integration necessary to produce MAPs. In addition, we identify a particular class of discrete optimization models that exhibits useful links to agent-based systems, and whose successful applications invite further exploration within the MAP context.
1.1
INTRODUCTION: AGENT-BASED MODELS AND OPTIMIZATION
Agent-based Models (ABMs) are gaining widespread recognition for their role in analyzing complex activities. The underlying structure of ABMs varies, but they are generally conceived to consist of autonomous software objects that interact within an environment. Agents are often described as having behaviors and missions by which they may affect the environment as
2
Metaheuristics: Progress as Real Problem Solvers
well as each other, and they are notably subject to being combined to create interactive simulations and models. Abstract characterizations of ABMs, however, may be viewed chiefly as "after-the-fact" attempts to group together ideas that are intuitively conveyed by the agent terminology. While a thoroughly precise and universally agreed-upon definition of agent-based models may not exist, the relevance of ABMs in science and industry is manifested in its diverse applications. These include explorations into the transmission of diseases, the operation of ecosystems, the dynamics of supply chains, the fluctuations and trends of financial markets, the behavior of economic sectors, the patterns of migrations, the flows of metropolitan traffic and the interactions of chemical and bio-physical processes. Within these numerous and varied systems, two essential elements come conspicuously to the fore: the need for complex simulations and the need for highly adaptive optimization. The relevance of complex simulations' has been long been recognized, and has received extensive attention in agentbased modeling - as evidenced by the existence of public domain libraries for generating simulations from an agent-based per~pective.~ On the other hand, the relevance of optimization has been significantly underplayed. No doubt this is because the structure of many agent-based systems cannot easily be captured by classical optimization models, due to conditions of non-linearity, discreteness andor uncertainty that are often present in these systems. In fact, the current role of optimization in agent-based modeling is entirely analogous to the role it assumed within the general field of simulation only a few years ago, as a result of these same factors - inapplicability of classical models, non-linearity, combinatorial complexity and uncertainty. Within the simulation industry, practitioners struggled for years in an attempt to handle the compelling issues of optimization simply by means of trial-and-error analysis. The simulation literature often claimed to have "optimized" various system components, based on nothing more than a series of guesses and brute force re-trials. Today, this picture has dramatically changed, thanks to the newly-emerged metaheuristic procedures that are now routinely being used in the simulation industry, and that are creating solutions of vastly greater quality and utility than were previously possible. The leading
'
Complexity in this case is manifested in the outcomes of the simulation, though not necessarily in the elements and operations that compose it. A prominent example is the Swarm Simulation System (www.swarm.org). An awardwinning commercial authoring tool for creating agent-based models is provided by Agentsheets (www.agentsheets.com).
Metaheuristic Agent Processes (MAPS)
3
provider of this technology to the simulation industry, OptTek Systems, reports over 50,000 applications of its metaheuristic search software (e.g., see www.opttek.com). In the same way as occurred in the earlier applications of optimization in the simulation area, optimization within agent-based models is still approached for the most part by resorting to a series of educated guesses about the values of various input control parameters and decision variables. There is no globally coordinated mechanism for identifying parameter values that yield outcomes of high quality. In particular, the possibility of conducting an intelligent search for high quality solutions by using an appropriate metaheuristic framework is still largely unrecognized.
1.2
METAHEURISTIC AGENT PROCESSES
A significant opportunity exists to expand the scope and power of agentbased models by integrating them with metaheuristics. We refer to the result of such integration as Metaheuristic Agent Processes (MAPS). From a strictly technical point of view, the creation of MAPs involves nothing revolutionary, since it corresponds to the same type of advance already made in the realm of simulation. Such a development is all the more natural because of the close alliance between simulation and agent-based models, where simulation is pervasively used to capture the dynamics and investigate the implications of many forms of ABMs. Taking advantage of this fact by creating metaheuristic agent processes to improve the quality and value of information derived from agent-based models would mark a significant step forward. The integration required to produce effective MAPs rests on principles already well-known and applied within many segments of the metaheuristic community. Indeed, some metaheuristic procedures are founded on metaphors that call to mind the notions and terminology of agent-based systems, and some proponents of these metaheuristics have already sought to have their work viewed as a contribution to the ABM area.3However, such contributions are still limited in scope, and contributions of a more
These metaheuristics are grouped by the label of "swarm intelligence" or "particle swarm optimization," and widely portrayed by the metaphor of bees swarming about a hive. Interesting and perhaps unexpected bonds to certain other types of methods are evidenced by the fact that this search metaphor was originally introduced in the literature of tabu search and adaptive memory programming (see, eg., Glover (1996) and Glover and Laguna (1997)). A website on particle swarm optimization can be found at www.particleswarm.com.
4
Metaheuristics: Progress as Real Problem Solvers
substantial nature are not only possible but greatly needed. The opportunity to make gains by the creation of MAPs rests on the same types of metaheuristic advances that have made it possible to handle the complex conditions of non-linearity, discreteness and uncertainty in other realms. Our thesis is that MAPS include agent-based processes of solving problems (i.e., agent-based algorithms) and also agent-based representatives of complex systems we try to optimize. The next sections set out to accomplish three things. First, we demonstrate an intimate connection whereby certain long-standing metaheuristic strategies may be viewed as instances of agent-based processes themselves. From this standpoint, there are compelling precedents for a broader integration of metaheuristics and agent-based models to produce MAPs. Second, within this development we also identify recent innovations that hold promise for further enriching the realm of metaheuristic agent processes. Within this context, we discuss the opportunity for next steps that can usefully expand the application of agent-based models by their integration with metaheuristics. Finally, we demonstrate that a class of 0-1 quadratic optimization models has close ties to agent-based systems, and observe that the highly successful application of these models motivates a fuller exploration of their connection with ABMs.
1.3
METAHEURISTIC PROCESSES CONCEIVED AS AGENT-BASED SYSTEMS
We illustrate a few selected metaheuristic strategies that have conspicuous interpretations as agent-based systems. Notably, the first two of these strategies we discuss emerged long before the notions of agent-based models were popularized. On the basis of these interpretations, it will be clear that many other metaheuristic strategies can likewise be viewed as instances of an agent-based framework. Thus, while agent-based modeling and optimization have up to now remained somewhat insulated from each other, the two fields can productively be viewed as interrelated through the design of metaheuristics and, in particular, through the realm of MAPs. We begin by stepping back in time to examine a set of strategies from the 1960s that has motivated the development of more recent ideas. In their original form, these strategies were designed to generate solutions within the setting of job shop scheduling by creating improved local decision rules. The first of these approaches (Crowston, et al., 1963) sought to create improved rules by selecting probabilistically from a collection of known rules so that
Metaheuristic Agent Processes (MAPS)
5
different rules will be applied at different decision points throughout the process of generating a schedule constructively. As complete solutions (schedules) are produced by this approach, the decision rules that are more ofien used to create the solutions of higher quality receive greater increases in the probabilities for applying them in future passes. The process can be viewed from as a metaheuristic agent process as shown in Fig. 1.1. The decision rules (of which there may be many) operate as agents, and at each step of constructing a solution the agents enter into a "probabilistic competition" to determine which rule is allowed to augment the current solution to create an expanded solution for the next stage. The process repeats until completing the generation a new solution, whereupon the updated probabilities are calculated and the procedure begins once more with the null solution, to launch another construction. (For simplicity, we do not try to show all connections in this or subsequent figures, or to identify stopping rules, as typically based on numbers of iterations and/or quality of solutions obtained.) Agents
Interaction
Environment Change
Set of
Probabilistic Competition
Winning Rule Augments Current Solution
Solution : Completed
Learn new Probabilities Start Fresh Solution)
Interaction Change + Reset environment Figure 1.1. Probabilistic Decision Learning MAP
It is to be noted that this type of approach can readily be applied in many other settings, as a multi-start metaheuristic. Also, in the case where different decision rules are used to choose among alternative neighborhoods, the approach can be envisioned as an instance of a probabilistic form of strategic oscillation (Glover and Laguna, 1997; Gendreau, 2003) or as a variable neighborhood search procedure (Hansen and Mladenovic, 2003).
6
Metaheuristics: Progress as Real Problem Solvers
A related, but somewhat more effective method (Glover, 1963) replaces the approach of probabilistically choosing among a basic collection of rules by instead creating new rules that are explicitly different from all members of the collection, using a process of parametric combination. The basic rules are first re-expressed to yield an evaluation metric compatible with the notion of creating a weighted combination, and then each new pass systematically modifies the weights used to combine rules on preceding passes. The design of this approach later became encapsulated in surrogate constraint methods, by combining constraints instead of decision rules, and also more recently embodied in scatter search procedures (see the surveys respectively of Glover (2003) and Glover, Laguna and Marti (2000)). From the perspective of a metaheuristic agent process, the rules to be combined may again be viewed as the agents. The diagrammatic outline in Fig. 1.2 also refers to the more general form of the process that includes surrogate constraint and evolutionary scatter search approaches, by allowing constraints and solutions to be agents instead of decision rules. In this type of process we may conceive of an additional agent entering the picture (a "marriage agent") as the means for creating the weighted combination of the components. Another generalization operates here, because the procedure is not only concerned with augmenting partial solutions (in successive stages of construction), but also with transforming complete solutions directly into other complete solutions. The augmentation repeats until creating a complete solution, while the direct transformation creates a new solution at each step. At this point, the new weights are produced for the next pass, and the procedure iterates until satisfiing a chosen stopping criterion. An instance of this approach called a "ghost image process" has produced the best known solutions for an extensive test-bed of fixed charge transportation problems (Amini, 2003). There are evidently a variety of possible variations that likewise fit within the same agent-based design, such as permitting different weights to be applied at different stages of construction or according to different environments. Likewise, as in the case of the process depicted in Fig. 1.1, the decision rules can refer to rules for choosing neighborhoods and the approach can also be used as a schematic for a multi-start method. Finally, we observe that the approaches of Fig. 1.1 and Fig. 1.2 can be merged, to create a probabilistic variation of a parametric combination process. Within the framework of evolutionary approaches, an important extension of scatter search procedures is represented by path relinking methods (see, e.g.,
Metaheuristic Agent Processes ( M P s )
Agents
Interaction
Agent and Environment Change
Marriage Agent:
Combined Rule Augments or Transforms Current Solution
*
Interaction Change
+ Reset environment Figure 1.2. Parametric Decision Combination MAP
Glover, Laguna and Marti (2000) and Yagiura, Ibaraki and Glover (2002), Ribeiro and Resende (2005)). Path relinking combines solutions by generating paths in neighborhood spaces instead of Euclidean spaces as occurs in scatter search. To provide fuller generality, we treat rules and solutions alike as agents, thereby encompassing path relinking methods that use both transitional and constructive neighborhoods. (Transitional neighborhoods define moves that transform complete solutions into other complete solutions, while constructive neighborhoods define moves that transform incomplete (partial) solutions into more nearly complete solutions.) The same representation, under appropriate qualification, can also capture the approach of referent domain optimization (Glover and Laguna (1997) and Mautor and Michelon (1998)). The depiction of these approaches as metaheuristic agent processes is given in Fig. 1.3. Path relinking using transitional neighborhoods is embodied in this diagram by focusing on solutions as agents. At each step, a subset selection process is applied (which can also be viewed as performed by an agent), and the solutions in the subset are joined by moving fiom selected initiating solutions through neighborhood space toward other members of the subset, which provide guiding solutions for determining the trajectory. New solutions are culled from this procedure by an intermediate selection step and subjected to an improvement process. Finally, an evaluation filter decides which of the resulting solutions enters the set of agents to be considered for the next round, by replacing previous agents that are
Metaheuristics: Progress as Real Problem Solvers
Agents Set of Rules and
Interaction
Subset Selection
Interactive Solution Combination (via neighborhoods )
Solutions
Figure 1.3. Path Relinking 1 Referent Domain MAP
dominated according to intensification and diversification criteria. (As previously noted, not all connections are shown, in order to keep the diagrams from being cluttered.) Applications of this approach are surveyed in Glover, Laguna and Marti (2000,2003). A slightly altered focus where rules also take the role of agents occurs in a form of path relinking involving the use of constructive neighborhoods. In this case, solutions and rules are intermingled, by a design where the guiding solutions provide "votes" (i.e., components of an overall evaluation) that determine which solution element is the next in sequence to be added by the constructive process. Destructive as well as constructive neighborhoods are typically incorporated in such designs. This type of approach has recently been applied effectively in the context of satisfiability problems by Hao, Lardeux and Saubion (2003), yielding new best solutions to a number of benchmark problems. A variant applied in conjunction with ejection chain neighborhoods by Yagiura et al. (2002) succeeds in generating solutions for generalized assignment problems that are not matched by any other procedure. Referent Domain Optimization is captured by this diagram under the condition where the new solutions produced by the solution combination mechanism are subdivided into components (domains), and the improvement process tightly constrains some of these components while subjecting the
Metaheuristic Agent Processes (MAPS)
Agents
Fan (Transformation)
f
\
Solution Pool
.' f
Evaluation (Quality 62 Diversity)
L
Filter C
\
/'
r
Neighborhood Descendants
'.
J
\
f
J
'.
Collective Adaptive Memory
J
\
f
J
.'
Filter B
\
Individual Adaptive Memory J
Filter A
Figure 1.4. Filter-and-Fan MAP
remaining problem to an intensified improvement procedure, typically an exact solution method. Other forms of referent domain optimization sketc hed in Glover and Laguna (1997) can be represented by straightforward modifications of the diagram. Our final illustration of a metaheuristic from the standpoint of an agentbased process concerns the Filter-and-Fan procedure (Glover, 1998; Greistorfer, Rego and Alidaee, 2003). This approach operates with solutions as agents to produce the MAP representation shown in Fig. 1.4, which portrays a single iterative stage of the procedure. Each iteration begins by performing a fan step whereby each agent (solution) generates a subset of descendants in its neighborhood. The solutions carry individual memories (of the type customarily used in tabu search) which are used to separate and remove certain descendants (Filter A). The system as a whole also carries an associated global memory that removes additional descendants (Filter B). Finally, evaluation criteria based on intensification and diversification eliminate certain remaining solutions (Filter C), and those solutions that survive the gauntlet generate an updated solution pool for re-applying the process. After a chosen number of steps, the method recovers a restricted subset of solutions from earlier steps that resulted in the best solution(s) in the final pool. The recovered solutions then compose the starting solution pool for the next stage of the process. The investigation of Greistorfer, Rego and Alidaee (2003) discloses that this approach proves exceedingly effective for solving facility location problems.
10
1.4
Metaheuristics: Progress as Real Problem Solvers
GENERAL OBSERVATIONS O N M A P REPRESENTATIONS
The representations of metaheuristics as MAPs illustrated in the preceding section are intended to be suggestive rather than exhaustive. Evidently, their form can be adapted to create agent-based representations of a variety of other metaheuristic approaches. For example, we may conceive associated constructions for representing processes that might be called Neural MAPs, Genetic MAPs, Evolutionary MAPs, Ant Colony MAPs, Variable Neighborhood MAPs, and so forth. The depiction of metaheuristics as MAPS has the benefit of clarifLing the connection that already exists between metaheuristic procedures and the realm of agent-based models. On the other hand, these representations also suffer a significant limitation, by embodying a level of abstraction that loses track of details that are critical for producing the most effective methods. Among a wide range of procedures that might be portrayed within the same representational framework, only a small subset will reach or surmount the level of performance achieved by the methods that have motivated these MAP diagrams. The foregoing representations are also incomplete in another respect, resulting from their restricted focus on metaheuristics in isolation from other types of agent-based processes. The methods produced by this restricted focus might be called "antecedent MAPs," or a-MAPS, to distinguish them from the more ambitious MAPs that integrate metaheuristics with agentbased models of other forms. It is worth re-emphasizing that this integration is essential to accomplish the goal of bringing optimization to bear on ABMs. Notably, an important step toward creating fully integrated MAPs has been effected by the creation of a library of functions, called the OptQuest Engine, that integrates optimization with simulations that have an entirely general form. The library is not limited to serving as a tool for academic research, but has been widely used in practical applications and has been adopted by nearly all major providers of commercial simulation software. (For background on these developments, see April et al. (2003a, 2003b), Laguna and Marti (2002), Kelly and Laguna (1999).) Consequently, it is a natural next step to structure such metaheuristic processes to handle the specific manifestations of simulation that occur in agent-based modeling. Adaptations of this form can be tailored to yield integrated MAPs that exploit the features of different classes of applications, thereby increasing their usefulness. The resulting higher-order MAPs afford the opportunity to
Metaheuristic Agent Processes (MAPS)
11
significantly extend the capabilities of current agent-based methods, by making it possible to deal more effectively and comprehensively with environments attended by uncertain events, and to perform improved analyses of systems involving agents that behave according to probabilistically defined parameters. The ability of metaheuristics to handle complex nonlinearities and combinatorial relationships provides additional motivation for creating MAPs that go beyond the current "grope-in-thedark" applications of what-if analysis in ABMs, and opens the door to the benefits of advanced optimization capabilities for agent-based modeling.
1.5
A FUNDAMENTALAGENT-BASED OPTIMIZATION MODEL
We briefly sketch an optimization model that has a natural link to agentbased models, and that can be used to capture interactions of a variety of agent-based systems. The model, called the binary quadratic programming (BQP) problem, can be expressed as follows. Given an n x n matrix Q of constants, we seek an n-dimensional vector x of variables to BQP: Minimize (or maximize) x,
= xQx
subject to x binary Although there are no constraints other than the binary restriction on x, standard transformations make it possible to include many types of constraints (including linear equality constraints) directly in the objective function by modifying the entries of Q. Well known applications of the BQP model include Quadratic Assignment Problems, Capital Budgeting Problems, Multi-dimensional Knapsack Problems, Task Allocation Problems (distributed computer systems), Maximum Diversity Problems, P-Median Problems, Asymmetric Assignment Problems, Symmetric Assignment Problems, Side Constrained Assignment Problems, Quadratic Knapsack Problems, Constraint Satisfaction Problems (CSPs), Set Partitioning Problems, Fixed Charge Warehouse Location Problems, Maximum Clique Problems, Maximum Independent Set Problems, Maximum Cut Problems, Graph Coloring Problems, Graph Partitioning Problems and a variety of others. Note that in speaking of the BQP model as a MAP model, we are introducing a concept that goes beyond the customary notion of an agent-based process, which is restricted to refer to a type of algorithm or computational design.
12
Metaheuristics: Progress as Real Problem Solvers
From the current point of view, we consider that a model deserves (or benefits from) an agent-based interpretation if it can be expressed in a natural way as the outcome of an interaction among agents. The BQP model provides an "idealized form" of a MAP model in the following sense. First, in a simplified form, the model is concerned with possible behaviors of agents we index by the symbol j, whose actions are represented by a policy set that consists of two alternatives, coded by the values 0 and 1. The choice among these alternatives in this situation is represented by the assignment xj = 0 and xj = 1, respectively. The result of interaction among agents is captured in the Q matrix. More precisely, the Q matrix is the evaluator for all possible interactions. We seek a policy by each agent from its policy set that yields the best outcome according to the objective function. Actually, the interactions specified in the Q matrix imply that the policy set for each agent is more general that suggested by the preceding simplified description. To identify this broader interpretation, we may consider a policy set PC) for each agent j that consists of multiple options i E PCj), where agent j chooses policy i if and only if q j = 1. In this case the x vector consists of the binary variables q j and for each j the problem contains the additional multiple choice restriction
The choice by agent j of a specific policy from PCj) determines the response to each possible policy choice by every other agent according to the entries of the Q matrix. The effects of all possible pairwise interactions among policy choices receive consideration in this manner. The resulting model can also be viewed in the context of game theory as a Discrete Option Game. The additional multiple choice restrictions, to handle the situation where some players can choose among more than two policies, have a form that permits them to be embedded within the Q matrix in a straightforward way to yield an instance of the BQP model that can be solved highly efficiently. The interpretation of the BQP model in the agent-based setting, where it provides a fundamental class of agent-based models, is useful in relation to the discussion of MAPS in the preceding sections. (We caution that the term "agent based model" has acquired the connotation of not being a model at all in the sense we speak of here, since it refers simply to a way of characterizing a computational scheme.) Specifically, the agent-based interpretation attached to the BQP model establishes a connection that enhances the relevance of integrating metaheuristic processes with agentbased designs to produce MAPS for several reasons. First, metaheuristic
Metaheuristic Agent Processes (MAPS)
13
methods have proved by far the most effective methods for solving BQP problems (see, e.g., Kochenberger et al., (2004)). Moreover, the typical perspective regarding agent-based approaches, which does not envision the possibility of optimizing over the range of agent behaviors, becomes greatly broadened by means of the BQP model, for which optimization is meaningful and achievable within a practical sense. Finally, we note that the BQP model provides a framework that captures key problem areas that many efforts previously described as "agent-based modeling," have sought to address. Applications in such diverse areas as organization change, team building, and the study of international conflicts (see for example the works of Levinthal (1997), Solow, et. al. (2002) and Axelrod and Bennett (1993)) which have typically been modeled in terms of Rugged Landscapes can alternatively be modeled and analyzed via BQP. Finally, there is another way in which the agent-based interpretation of the BQP model is relevant to our present concerns. As we will show shortly, the method we have used to solve the BQP model itself has a convenient description as a metaheuristic agent process. Before proceeding to such a description, however, we elaborate on features of the BQP model (and the outcomes of solving it) that further motivate its consideration as a fundamental class of models. Robustness of BQP The application potential of BQP is extraordinarily robust due to reformulation methods that enable certain constrained models to be re-cast in the form of BQP. Boris and Hammer (1991, 2002), Hammer and Rudeanu (1968), Hansen (1979), and Hansen et. al. (1993) show that any quadratic (or linear) objective in bounded integer variables and constrained by linear equations can be reformulated as a BQP model. This recasting into BQP is accomplished by imposing quadratic infeasibility penalties in place of the linear constraints as described below: Transformation to the BQP Form Many practical combinatorial optimization problems can be modeled as constrained optimization problems of the form
minx, = xQx subject to
Ax = b, x binary The foregoing model accommodates both quadratic and linear objective functions since the linear case results when Q is a diagonal matrix
14
Metaheuristics: Progress as Real Problem Solvers
(observing that xj2= xj when xj is a 0-1 variable). Problems with inequality constraints can also be put into this form by introducing bounded slack variables to convert the inequalities into equations, and representing these slack variables by corresponding binary expansions. The constrained quadratic optimization models are then converted into equivalent BQP models by adding a quadratic infeasibility penalty function to the objective function as an alternative to explicitly imposing the constraints Ax = b . The general approach to such re-casting, which we call Transformation 1, is given below: Transformation I . Let P be a positive scalar penalty value, to yield
=xQx+c where the matrix D and the additive constant c result directly from the matrix multiplication indicated. Upon dropping the additive constant, the equivalent unconstrained version of our constrained problem becomes
BQP(PEN) :rnin XQX,x binary From a theoretical standpoint, a suitable choice of the penalty scalar P can always be chosen so that the optimal solution to BQP(PEN) is the optimal solution to the original constrained problem. As reported in Kochenberger, et. al. (2004), valid and computationally stable penalty values can be found without difficulty for many classes of problems, and a wide range of such values work well. In addition to the modeling possibilities introduced by Transformation 1, a very important special class of constraints that arise in many applications can be handled by an alternative approach, given below. Transformation 2. This approach is convenient for problems with considerations that isolate two specific alternatives and prohibit both from being chosen. That is, for a given pair of alternatives, one or the other but not both may be chosen. If xj and xk are binary variables denoting whether or not alternatives j and k are chosen, the standard constraint that allows one choice but precludes both is:
Xj+Xk I 1 Then, adding the penalty function Px .x to the objective function is a k. simple alternative to imposing the constramt in a traditional manner. For J
Metaheuristic Agent Processes (MAPS)
15
problems with a linear objective function having all nonnegative coefficients, at least one positive, the scalar P (with respect to Transformation 2) can be chosen as small as the largest objective function coefficient [5]. This penalty function has sometimes been used by to convert certain optimization problems on graphs into an equivalent BQP model (see Pardalos and Xue (1994)). Its potential application, however, goes far beyond these settings as demonstrated in this paper. Variable upper bound constraints of the form xij I yi can be accommodated by Transformation 2 by first replacing each yi variable by 1 - yi', where yi' is the complementary variable that equals 1 when yi = 0 and equals 0 when yi = 1. The opportunity to employ this modeling device in the context of Transformation 2 makes it possible to conveniently model a variety of additional problem types. The constraint associated with Transformation 2 appears in many important applications which leads us to single it our here as an important alternative to Transformation 1. We note, however, that many other problem-specific special cases exist that yield quadratic equivalent representations. We illustrate this later in the paper when we discuss results we have obtained for the max 2-SAT problem. Examples Before highlighting some of the solution methods reported in the literature for BQP, we give two small examples from classical NP-hard problem settings to provide concrete illustrations. Example 1: Set Partitioning The classical set partitioning problem is found in applications that range from vehicle routing to crew scheduling. As an illustration, consider the following small example:
minx, = 3x1+ 2x, + x, + x, + 3x5 + 2x6 subject to
all xj binary.
16
Metaheuristics: Progress as Real Problem Solvers
Applying Transformation 1 with P =10 gives the equivalent BQP model: A
BQP(PEN) :min xQx, x binary where the additive constant, c, is 40 and
This simple example of BQP(PEN) can be solved by any of a variety of methods. (The illustrative problems of this paper are solved by the Tabu Search method of Glover et al. [11,12], and solution statistics for benchmark test problems are cited later.) In this case an optimal solution is given by x, = x, = 1 , (all other variables equal to 0) for which x, = 6 . In the straightforward application of Transformation 1 to this example, it is to be noted that the replacement of the original problem formulation by the BQP(PEN) model did not involve the introduction of new variables. In many applications, Transformation 1 and Transformation 2 can be used in concert to produce an equivalent BQP model, as demonstrated next. Example 2: The K-Coloring Problem
Vertex coloring problems seek to assign colors to nodes of a graph such that adjacent nodes are assigned different colors. The K-coloring problem attempts to find such a coloring using exactly K colors. A wide range of applications ranging from frequency assignment problems to printed circuit board design problems can be represented by the K-coloring model. Such problems can be modeled as satisfiability problems using the assignment variables as follows: Let Xij to be 1 if node i is assigned color j, and to be 0 otherwise. Since each node must be colored, we have
17
Metaheuristic Agent Processes ( M P s )
where n is the number of nodes in the graph. A feasible coloring requires that adjacent nodes are assigned different colors. This is accomplished by imposing the constraints x ZP . + x j p 5 1 p = 1 , ...,K (14 for all adjacent nodes (ij)in the graph. This problem can be re-cast into the form of BQP by using Transformation 1 on the assignment constraints of (1.1) and Transformation 2 on the adjacency constraints of (1.2). No new variables are required. Since the model consisting of (1.1) and (1.2) has no explicit objective function, any positive value for the penalty P will do. The following example gives a concrete illustration of the re-formulation process. Consider the following graph and assume we want find a feasible coloring of the nodes using 3 colors.
Our satisfiablity problem is that of finding a feasible binary solution to:
X,+Xjp
Sl
p=1,3
(1.4)
(for all adjacent nodes i and j) In this traditional form, the model has 15 variables and 26 constraints. To
18
Metaheuristics: Progress as Real Problem Solvers
recast this problem into the form of BQP, we use Transformation 1 on the equations of (1.3) and Transformation 2 on the inequalities of (1.4). Arbitrarily choosing the penalty P to be 4, we get the equivalent problem:
BQP(Pen) :min XQX A
where the
Q matrix is:
A
Solving this unconstrained model, xQx ,yields the feasible coloring:
This approach to coloring problems has proven to be very effective for a wide variety of coloring instances from the literature. An extensive presentation of the xQx approach to a variety of coloring problems, including a generalization of the K-coloring problem considered here, is given in Kochenberger, Glover, Alidaee and Rego (2002) Solution Approaches to BQP Due to its computational challenge and application potential, BQP has been the focus of a considerable number of research studies in recent years, including both exact and heuristic solution approaches. Recent papers report on the branch and bound (exact) approaches as well as a variety of modern
Metaheuristic Agent Processes (MAPS)
19
heuristic methods including simulated annealing, genetic algorithms, tabu search, and scatter search. (See Kochenberger, et. al. (2004) for references to these and other works.) Each of these approaches exhibits some degree of success. However, the exact methods degrade rapidly with problem size, and have meaningful application to general BQP problems with no more than 100 variables. (A notable exception to this for the Ising spin glass problem is discussed in De Simone, et. al. (1995). For larger problems, heuristic methods are usually required. Several proposed heuristics, including the DDT method of Boros, Hammer and Sun (1989) and the "one-pass" procedures of Glover, Alidaee, Rego and Kochenberger (2002) have proven to be effective in certain instances. Two methods we have found to be particularly successM for a wide variety of problems are based on tabu search (see Glover and Laguna (1997), Glover, et. al. (1999) and Glover, et. al. (1998)) and on the related evolutionary strategy scatter search of Glover (1998). In the following section we highlight our tabu search approach which was used to produce the computational results referenced later in this paper. Although not pursued by us here, we note that an alternative approach is to solve BQP as a continuous non-linear optimization problem within the unit cube. This allows other heuristic/approximation methods based on continuous optimization methodologies to be applied (see Boris and Hammer (1991), Boris and Prekopa (1989) and Rosenberg (1972)). Tabu Search Overview as a MAP process Our TS method for BQP is centered around the use of strategic oscillation, which constitutes one of the primary strategies of tabu search. We offer the description below as an example of a MAP solution process that operates via the interaction of several functional agents. The method alternates between constructive phases that progressively set variables to 1 (whose steps we call "add moves") and destructive phases that progressively set variables to 0 (whose steps we call "drops moves"). The add moves are created by a "constructive agent" who identifies high quality potential add moves from an environment of available options. In a similar fashion, drop moves are created and managed by a "destructive agent." To control the underlying search process, we use a memory structure that is updated at critical events, characterized by conditions that generate a subclass of locally optimal solutions. Solutions corresponding to critical events are called critical solutions. These functions are handled by a "critical
20
Metaheuristics: Progress as Real Problem Solvers
event agent" that identifies when critical events occur and then performs the appropriate updates of memory. A parameter span is used to indicate the amplitude of oscillation about a
critical event. The operations involving this parameter are managed by a "span agent" that begins by setting span equal to 1 and gradually increases it to some limiting value. For each value of span, the span agent directs the constructive and destructive agents to perform a series of constructive and destructive phases, in alternation, before progressing to the next value. When span reached its limiting point, its guiding agent reverses the process so that span is gradually decreased in value, once again accompanied by invoking a series of alternating constructive and destructive phases. When span reaches a value of 1, a complete span cycle has been completed and the span agent launches the next cycle. Information stored at critical events is used by a "tabu neighborhood restriction agent" (or simply "tabu agent," for short) to influence the search process by penalizing potentially attractive add moves during a constructive phase and inducing drop moves during a destructive phase. These penalties and inducements are associated with assignments of values to variables in recent critical solutions. The tabu agent also uses cumulative critical event information to introduce a subtle long term bias into the search process by means of additional penalties and inducements similar to those discussed above. The activities of these agents are orchestrated by the direction of a "macro managing agent" that provides the coordination required for a successful search process. A complete description of the framework for our metaheuristic method is given in Glover, Kochenberger, Alidaee and Amini (1999). Relevance of the MAP Interpretation for the BQP Problem
Evidently, the tabu search procedure for the BQP problem can be described without reference to a MAP framework, as in the case of other metaheuristic agent processes, and indeed as in the case of agent-based processes generally, which can readily be formulated as distributed computational designs where the activities of the agents are simply the functions of various subroutines. However, there is a virtue in the agent-based formulation that comes from its emphasis on processes that have a natural interpretation as being carried out by certain guiding entities that the literature has come to label with the agent terminology. Such an emphasis invites the designers of the associated methods to organize them in certain modularly structured ways that proves
Metaheuristic Agent Processes ( ' P s )
21
useful for visualizing their function and for extending them to create more advanced versions. For example, a new function can be provided by introducing a new agent, together with rules for interacting with the problem environment and selected other agents. (The agent-based literature often refers to agent-based processes as if the agents operate in complete autonomy from each other. This is an oversimplification that applies only under restricted circumstances.) The advantages that come from using an agent-based orientation to describe and structure various computational processes lead us to anticipate that advantages may also accrue to ferreting out structures within mathematical models that can be interpreted from an agent-based perspective, as we have done with the BQP model. We now describe the outcomes that further suggest the BQP model may occupy a privileged position among the realm of models to which an agent-based interpretation can be usefilly applied. Computational Experience Our results of applying the tabu search and associated scatter search metaheuristics to combinatorial problems recast in BQP form have been uniformly attractive in terms of both solution quality and computation times. Although our methods are designed for the completely general form of BQP, without any specialization to take advantage of particular types of problems reformulated in this general representation, our outcomes have typically proved competitive with or even superior to those of specialized methods designed for the specific problem structure at hand. By way of illustration, we present some representative results for a set of max 2-SAT test problems taken from the literature. Details of our experience with other problems will appear in future papers. Max 2-SAT Results Several authors (Hammer and Rudeanu (1968), Hansen and Jaumard (1990), Boros and Hammer (2002)) have established the connection between SAT problems and nonlinear penalty functions. The special case of Max 2-SAT is particularly well suited for this approach as it leads naturally to an xQx representation. Our experience, as shown below, indicates that this is a very attractive way to approach this class of problems. For a 2-SAT problem, a given clause can have zero, one, or two negations, each with a corresponding (classical) linear constraint. Each linear constraint, in turn, has an exact quadratic penalty that serves as an alternative to the
Metaheuristics: Progress as Real Problem Solvers
linear constraint. The three possibilities and their constraint/penalty pairs are: (a) No negations: Classical constraint: xi + xj 2 1 Exact Penalty: (1 - xi - x j + xixj) (b) One negation: Classical constraint: xi + Tj 2 1 Exact Penalty: (xj - xixj) (c) Two negations: Classical constraint: Ti + 5 2 1 Exact Penalty: (xixj ) It is easy to see that the quadratic penalties shown are zero for feasible solutions and positive for infeasible solutions. Thus, these special penalties can be used to readily construct a penalty function of the form of xQx simply by adding the penalties together. We have found this approach to be very effective. Table 1.1 shows the results we obtained via this approach on a set of test problems from the literature.
As shown in the table, by re-casting each Max 2-SAT instance into the form of xQx and solving the resulting unconstrained quadratic binary program with our Tabu Search heuristic, we were able to find best known solutions very quickly to all test problems considered. By way of contrast, the method of Borchers and Furman took a very long time on several problems and was unable to find best known results for several instances in the allotted 12 hour time limit. In addition to the problems of Table 1.1 above, we have successfully applied this approach to randomly generated problems with as many as 1000 variables and more than 10,000 clauses where best known results are found in roughly one minute of computation time. The results shown in Table 1.1 above serve as strong evidence of the attractiveness of the xQx approach for the problems considered. Considering both solution quality and the time taken to produce these solutions, this approach is very competitive with special purpose methods constructed specifically for max 2-Sat problems. We note in passing that similar performance relative to special purpose methods has been obtained for the other problem classes singled out earlier in the paper as well.
Metaheuristic Agent Processes ( ' P s ) Table 1.1. Problems from Borchers & Furman (1999)
n
m
Best known solution
xQx solution
xQx time
ax sat^ solution
Maxsat time
Remarks: All times in seconds unless noted otherwise. Maxsat is an exact method developed by Borchers & Furman Maxsat results obtained on IBM RS/6000-590 xQx results obtained on a 1.6 MHz PC. Each xQx run was for 50 SPAN cycles Problem 100-600 was previously unsolved.
Summary We have demonstrated how a variety of disparate combinatorial problems can be solved by first re-casting them into the common modeling framework of the unconstrained quadratic binary program. Once in this unified form, the problems can be solved effectively by adaptive memory tabu search metaheuristics and associated evolutionary (scatter search) procedures. We are currently solving problems via BQP with more than 50,000 variables in the quadratic representation and are working on enhancements that will permit larger instances to be solved.
24
Metaheuristics: Progress as Real Problem Solvers
Our findings challenge the conventional wisdom that places high priority on preserving linearity and exploiting specific structure. Although the merits of such a priority are well-founded in many cases, the BQP domain appears to offer a partial exception. In forming BQP(PEN), we destroy any linearity that the original problem may have exhibited. Moreover, any exploitable structure that may have existed originally is "folded into" the Q matrix, and the general solution procedure we apply takes no advantage of it. Nonetheless, our solution outcomes have been remarkably successful, yielding results that rival the effectiveness of the best specialized methods. This combined modeling/solution approach provides a unifying theme that can be applied in principle to all linearly constrained quadratic and linear programs in bounded integer variables, and the computational findings for a broad spectrum of problem classes raises the possibility that similarly successful results may be obtained for even wider ranges of problems. As our methods for BQP continue to improve with ongoing research, the BQP model offers a representational tool of particular promise. The novel fact that this model has a natural connection with agent-based systems, and provides an idealized instance of a MAP model, invites its exploration within alternative contexts that exploit the links to agent-based processes in additional ways.
REFERENCES Amini, M. (2003) "Computational Study of Solving Fixed Charge Transportation Problems Using Ghost Image Processes," School of Business, University of Memphis, TN. Axelrod, R, and Bennett, S, "A Landscape Theory of Aggregation," British Journal of Political Science, 1993,23,211-233. April, J., F. Glover and J. Kelly (2003a) "Optfolio - A Simulation Optimization System for Project Portfolio Planning," Proceedings of the 2003 Winter Simulation Conference, S. Chick, F. Sanchez, D. Ferrin and D. Morrice, eds. April, J., F. Glover, J. Kelly and M. Laguna (2003b) "Practical Introduction to Simulation Optimization," Proceedings of the 2003 Winter Simulation Conference, S. Chick, F. Sanchez, D. Ferrin and D. Morrice, eds.
MetaheuristicAgent Processes ( ' P s )
25
Borchers, B. and J. Furman, "A Two-Phase Exact Algorithm for Max-SAT and Weighted Max SAT," J. of Combinatorial Optimization, 2,299306 (1999). Boros, E., and P. Hammer, "The Max-Cut Problem and Quadratic 0-1 Optimization, Polyhedral Aspects, Relaxations and Bounds," Annals of OR, 33, 151-225 (1991). Boros, E. and P. Hammer, " Pseudo-Boolean Optimization," Discrete Applied Mathematics, l23(1-3), 155-225 (2002). Boros, E, P. Hammer, and X, Sun, "The DDT Method for Quadratic 0-1 Minimization," RUTCOR Research Center, RRR 39-89, 1989. Boros, E. and A. Prekopa, "Probabilistic Bounds and Algorithms for the Maximum Satisfiability Problem," Annals of OR, 21 (1989), pp. 109-126. Crainic, T.G. and M. Toulouse (2003) "Parallel Strategies for MetaHeuristics," Chapter 17 of Handbook of Metaheuristics, G. Kochenberger and F. Glover, eds., Kluwer Academic Publishers. Crowston, W., F. Glover, G. Thompson and J. Trawick (1963) "Probabilistic and Parametric Learning Combinations of Local Job Shop Scheduling Rules," ONR Research Memorandum No. 117, GSIA, Carnegie-Mellon University, Pittsburgh, PA. De Simone, C. M. Diehl, M. Junger, P. Mutzel, G. Reinelt, and G. Rinaldi, "Exact Ground State4s of Ising Spin Glasses: New Experimental Results with a Branch and Cut Algorithm," Journal of Statistical Physics, 80,487-496 (1995). Dorigo, M. and T. Stutzle (2003). "The Ant Colony Optimization Metaheuristic: Algorithms, Applications, and Advances," Chapter 9 of Handbook of Metaheuristics, G. Kochenberger and F. Glover, eds., Kluwer Academic Publishers. Gendreau, M. (2003) "An Introduction to Tabu Search," Chapter 2 of Handbook of Metaheuristics, G. Kochenberger and F. Glover, eds., Kluwer Academic Publishers. Glover, F, and M. Laguna, "Tabu Search," Kluwer Academic Publishers, 1997. Glover, F., "A Template for Scatter Search and Path Relinking," School of Business, University of Colorado, Technical Report, February 1998.
26
Metaheuristics: Progress as Real Problem Solvers
Glover, F., B. Alidaee, C. Rego, and G. Kochenberger, "One-Pass Heuristics for Large-Scale Unconstrained Binary Quadratic Programs," EJOR 137, pp. 272-287,2002. Glover, F., G. Kochenberger, B. Alidaee, and M.M. Amini, "Tabu with Search Critical Event Memory: An Enhanced Application for Binary Quadratic Programs," In: MetaHeuristics: Advances and Trends in Local Search Paradigms for Optimization, (Eds.) S. Voss, S. Martello, I. Osman, and C. Roucairol. Kluwer Academic Publisher, Boston, 1999. Glover, F., G. Kochenberger., and B. Alidaee, "Adaptive Memory Tabu Search for Binary Quadratic Programs," Management Science, 44:3, 336-345, 1998. Glover, F. (1963) "Parametric Combinations of Local Job Shop Scheduling Rules," Chapter IV, ONR Research Memorandum No. 117, GSIA, Carnegie-Mellon University, Pittsburgh, PA. Glover, F. (1996) "Tabu Search and Adaptive Memory Programming Advances, Applications and Challenges," Interfaces in Computer Science and Operations Research, R. Barr, R. Helgason and J. Kennington (eds.). Kluwer Academic Publishers, pp. 1-75. Glover, F. (1998) "A Template for Scatter Search and Path Relinking," Artificial Evolution, Lecture Notes in Computer Science, 1363, J.-K. Hao, E. Lutton, E. Ronald , M. Schoenauer and D. Snyers, Eds. Springer, pp. 13-54. Glover, F. (2003) "Tutorial on Surrogate Constraint Approaches for Optimization in Graphs," Journal of Heuristics, Volume 9, No. 3., pp. 175-227. Glover, F. and M. Laguna (1997) Tabu Search. Kluwer Academic Publishers. Glover, F., M. Laguna and R. Marti (2000) "Fundamentals of Scatter Search and Path Relinking," Control and Cybernetics, Volume 29, No 3, pp. 653-684. Glover, F., M. Laguna and R. Marti (2003) "Scatter Search and Path Relinking: Advances and Applications," Chapter 1 of Handbook of Metaheuristics, G. Kochenberger and F. Glover, eds., Kluwer Academic Publishers. Greistorfer, P., C. Rego and B. Alidaee (2003) "A Filter-and-Fan Aproach for the Facility Location Problem," Proceedings of M7C2OO3.
Metaheuristic Agent Processes (&UPS)
27
Hammer, P., and S. Rudeanu, Boolean Methods in Operations Research, Springer-Verlag,New York, 1968. Hansen, P.B., "Methods of Nonlinear 0-1 Programming," Annals Discrete Math, vol. 5, pp.53-70, 1979. Hansen, P, B. Jaumard., and V. Mathon, "Constrained Nonlinear 0-1 Programming," INFORMS Journal on Computing, 5 :2, 97- 119, 1993. Hansen, P. and B. Jaumard, "Algorithms for the Maximum Satisfiability Problem," Computing, 44,279-303 (1990). Hansen, P. and M. Mladenovic (2003) "Variable Neighborhood Search," Chapter 6 of Handbook of Metaheuristics, G. Kochenberger and F. Glover, eds., Kluwer Academic Publishers. Hao, J.K., F. Lardeux and F. Saubion (2003) "Evolutionary Computing for the Satisfiability Problem," Lecture Notes in Computer Science, Volume 261 1, pp. 258-268, Springer. Kelly, J. and M. Laguna (1999) "New Advances Wedding Simulation and Optimization," Proceedings of the 1999 Winter Simulation Conference, D. Kelton, ed. Kochenberger, G., F. Glover, B. Alidaee, and C. Rego, "A Unified Modeling and Solution Framework for Combinatorial Optimization Problems," OR Spectrum, 26, pp. 237-250, (2004). Kochenberger, G., F. Glover, B. Alidaee, and C. Rego, " An Unconstrained Quadratic Binary Programming Approach to the Vertex Coloring Problem," Working Paper, University of Colorado at Denver, 2002. Kochenberger, G., F. Glover, B. Alidaee and C. Rego (2003) "Solving Combinatorial Optimization Problems via Reformulation and Adaptive Memory Metaheuristics," Revolutionary Visions in Evolutionary Computation, A. Menon and D. Doldberg, eds., Kluwer Academic Publishers, forthcoming. Laguna, M. and R. Marti (2002) "The OptQuest Callable Library," Optimization Sofiare Class Libraries, Stefan Voss and David L. Woodruff (eds.), Kluwer Academic Publishers, Boston, pp. 193-2 18. Levinthal, D (1997) "Adaptation on Rugged Landscapes," Management Science, 43,934-950. Mautor, T, and P. Michelon (1998) "A neglected meta-heuristic: Referent Domain Optimization", 16th European Conference on Operational
Metaheuristics: Progress as Real Problem Solvers Research (EURO XVI), Bmelles. Pardalos, P, and J. Xue, "The Maximum Clique Problem," The Journal of Global Optimization, 4,301-328, 1994. Resende, M.G.C. and C.C. Ribeiro (2005) "GRASP with path relinking: recent advances and applications," Metaheuristics: Progress as Real Problem Solvers, T. Ibaraki, K. Nonobe and M. Yagiura, (Eds.), Kluwer Academic Publishers. Rosenberg, I.G., "0-1 Optimization and Non-linear Programming." Revue Francaise d 'Automatique, d'lnformatiqu et de Rescherche Operationnelle, (Serie Blueu) 2,95-97, (1972). Solow, D, Vairaktarakis,G, Piderti, S.K, Tsai, M-C, " Managerial Insights into the Effects of Interactions on Replacing Members of a Team," Management Science, 2002,48, 1060-107. Yagiura, M., T. Ibaraki and F. Glover (2002) "A Path Relinking Approach for the Generalized Assignment Problem," Proc. Int. Sym. on Scheduling, pp. 105-108 (longer version available from http://www-or.amp.i.kyoto-u.ac.jp/-yagiudpapers/prgap~abst.html).
Chapter 2
GRASP WITH PATH-RELINKING: RECENT ADVANCES AND APPLICATIONS Mauricio G.C. Resende1 and Celso C. Ribeiro2
'internet and Network Systems Research, AT&T Labs Research, 180 Park Avenue, Room C241, Florham Park, NJ 07932 USA. ' ~ e ~ a r t m e of n tComputer Science, Catholic University of Rio de Janeiro, Rua Marques de Sio Vicente, 225, Rio de Janeiro, RJ 22453-900 Brazil
[email protected]
Abstract: Path-relinking is a major enhancement to the basic greedy randomized adaptive search procedure (GRASP), leading to significant improvements in solution time and quality. Path-relinking adds a memory mechanism to GRASP by providing an intensification strategy that explores trajectories connecting GRASP solutions and the best elite solutions previously produced during the search. This paper reviews recent advances and applications of GRASP with path-relinking. A brief review of GRASP is given. This is followed by a description of path-relinking and how it is incorporated into GRASP. Several recent applications of GRASP with path-relinking are reviewed. The paper concludes with a discussion of extensions to this strategy, concerning in particular parallel implementations and applications of path-relinking with other metaheuristics. Keywords: Metaheuristics, GRASP, path-relinking.
2.1
INTRODUCTION
GRASP (Greedy Randomized Adaptive Search Procedure) is a metaheuristic for finding approximate solutions to combinatorial optimization problems formulated as min f ( x ) subject to x E X,
30
Metaheuristics: Progress as Real Problem Solvers
where f (.) is an objective function to be minimized and X is a discrete set of feasible solutions. It was first introduced by Feo and Resende [14] in a paper describing a probabilistic heuristic for set covering. Since then, GRASP has experienced continued development [15,431 and has been applied in a wide range of problem areas [18].
2.1.1
Multi-start local search
GRASP can be thought of as a search method that repeatedly applies local search from different starting solutions in X. At each step of local search, the neighborhood N(x) of the current solution x is searched for a solution y E N(x) such that f (y) < f (x). If such an improving solution is found, it is made the current solution and another step of local search is done. If no improving solution is found, the procedure stops with x as a locally optimal solution. An obvious initial solution for local search is a solution generated by a greedy algorithm. Greedy algorithms construct a solution one element at a time. For example, a tree is built one edge at a time; a schedule is built one operation at a time; a vertex partition is built one vertex at a time. At each step of a greedy algorithm, a set of candidate elements C contains all elements that can be added to extend the partial solution. Greedy algorithms make use of a greedy function g(e) that measures the incremental cost of adding element e E C to the current partial solution. For a minimization problem, the element e* = argmin{g(e) : e E C) is chosen to be added to the partial solution. The addition of e* to the partial solution usually restricts the set of candidates elements, which is reflected by the reduction of its cardinality. The procedure ends when a complete solution is built, i.e. when C = 0. The drawback of using a greedy algorithm as an initial solution for local search is that if a deterministic rule is used to break ties, a greedy algorithm will produce a single solution and therefore local search can only be applied once. Even when a probabilistic tie breaking rule is used, the diversity of purely greedy solutions is usually low. The other extreme is to repeatedly start local search from randomly generated solutions. Though this approach produces a high level of diversity in the starting solutions, the average quality of these random solutions is usually much worse than that of a greedy solution. F'urthermore, the time local search takes to converge to a locally optimal solution is, on average, much longer than when a greedy initial solution is used. GRASP blends greedy and random construction either by using greediness to build a restricted candidate list (RCL) and randomness to select
GRASP with path-relinking
31
an element from the list, or by using randomness to build the list and greediness for selection. Candidate elements e E C are sorted according to their greedy function value g(e). In a cardinality-based RCL, the latter is made up by the k top-ranked elements. In a value-based construction, the RCL consists of the elements in the set {e E C : g* g(e) g*+a.(g*-g,)), where g, = min{g(e) : e E C), g* = max{g(e) : e E C), and a is a parameter satisfying 0 5 a 5 1. Since the best value for a is often difficult to determine, it is often assigned a random value for each GRASP iteration. Algorithm 2.1 shows the pseudo-code for a pure greedy randomized adaptive search procedure. The value of the best solution is stored in f * and i, GRASP iterations are done. Each iteration consists of a greedy randomized construction phase, followed by a local search phase, starting from the greedy randomized solution. If the solution resulting from the local search improves the best solution so far, it is stored in x*.
<
<
D a t a : Number of iterations i, Result: Solution x* E X f * t 00; for i = 1,.. . ,im, d o x t GreedyRandomizedConstruction(); x t LocalSearch(x); if f(x) < f * t h e n
1
x* x; f* t tf(x); end end Algorithm 2.1: A basic GRASP for minimization. Figure 2.1 displays results for an instance of the maximum covering problem [36], showing the distribution of objective function values for the construction phase and the local search phase of a purely random multi-start algorithm (followed by local search) and a GRASP with the parameter a fixed at 0.85. In both plots, the iterates have been sorted by the objective function value of the solution found by local search. The plots show that the GRASP construction achieves a reasonably amount of diversity in terms of solution values, while producing starting solutions for local search that have much better objective function values. The objective function values are situated around 3.5 for the random construction and 9.7 for GRASP construction, while the value obtained by local search are around 9.9. Consequently, the local search times are much smaller for GRASP than for the purely random multi-start algorithm.
Metaheurzstics: Progress as Real Problem Solvers Random construction with local search
I
local search
10.00
2.00
1
0
500
1000
1500
2000
2500
3000
3500
4000
Sorted iterates (sorted by local search value) GRASP constructionwith local search
10.00 localsearch
9.95 -
-
9.90 -
9.50 0
500
1000
1500
2000
2500
3000
3500
4000
Sorted GRASP iterates (sorted by local search value)
Fzgure 2.1. Random multi-start vs. GRASP on an instance of maximum covering problem.
Figure 2.2 shows, with results for 100 runs on the same instance of a maximum satisfiability problem, the benefit of using GRASP instead of repeatedly restarting local search with a randomly generated solution and a greedy solution. Two curves compare objective function value (best and average over the 100 runs) for different values of the RCL
GRASP with path-relinking
33
parameter a. Two other curves compare solution times (average total time and average local search time) for different values of a. Since this is a maximization problem, a = 0 corresponds to random construction, while a = 1 corresponds to greedy construction. While the average solution improves as we move from random to greedy, the best solution (what we are really interested in) improves as we move away from random construction, but reaches a maximum before reaching a = 1, and then decreases after that. As the mean solution increases, the spread of solutions decreases. The combination of the increase in mean solution value and the presence of enough spread contribute to produce the best solution with a = -8. Solution times decrease as one moves from random to greedy and this is mainly due to the decrease in time for local search. 445000
I
I
I
I1
best solution found
avg. local search time '....L1 >t
415000
I 0
0.2
0.4 0.6 RCL parameterALPHA
0.8
1
Figure 2.2. Average versus best solution found and total running time versus local search time as a function of the RCL parameter a on 100 runs on an instance of maximum satisfiability.
2.1.2
Memory-based mechanisms
If GRASP iteration i uses the random number generator seed si, then the iterations are memoryless, i.e. they produce the same result independently of the order in which they are run. In the remainder of this section, we review how the use of memory was introduced into GRASP. Memory can be used to avoid doing redundant work. For example, one can store in a hash table all solutions constructed and used as initial
34
Metaheuristics: Progress as Real Problem Solvers
solutions for local search [30]. Every time a new solution is constructed, it will only be used as an initial solution in the local search phase if it is not present in the hash table. Filtering of constructed solutions [16, 30, 341 avoids applying local search to low-quality solutions, where local search will probably take long to converge to a low-quality local optimum. Fleurent and Glover [19] introduced a long-term memory mechanism in GRASP construction that makes use of a set of elite solutions found during the GRASP iterations. Their mechanism favors (strongly determined) variables that cannot be changed without eroding the objective or changing significantly other variables and (consistent) variables that receive a particular value in a large portion of the elite solutions. Prais and Ribeiro [34] introduced another learning mechanism for GRASP construction, which they named reactive GRASP. Recall that in a value-based restricted candidate list a parameter a determines the level of randomness or greediness used to make up the RCL. Instead of using a fixed value for a, reactive GRASP selects a value, at random, from a discrete set of values {al,a a , . .. ,a,). Each value ai has associated with it a probability pi that it will be selected ( C E l p i = 1). The idea in reactive GRASP is to change these probabilities as the iterations proceed, to favor values that have led to better solutions in previous GRASP iterations. Laguna and Marti [28] introduced another strategy for using longterm memory consisting of a set of elite solutions. At each GRASP iteration, this strategy combines the GRASP solution with a randomly selected elite solution, using path-relinking [23]. This is the subject of the next section.
2.2
PATH-RELINKING
Path-relinking was originally proposed by Glover [23] as an intensification strategy exploring trajectories connecting elite solutions obtained by tabu search or scatter search [24-261. Starting from one or more elite solutions, paths in the solution space leading toward other elite solutions are generated and explored in the search for better solutions. To generate paths, moves are selected to introduce attributes in the current solution that are present in the elite guiding solution. Path-relinking may be viewed as a strategy that seeks to incorporate attributes of high quality solutions, by favoring these attributes in the selected moves. Algorithm 2.2 illustrates the pseudo-code of the path-relinking procedure applied to a pair of solutions x, (starting solution) and xi (target solution).
GRASP with path-relinking Data : Starting solution x, and target solution xt Result: Best solution x* in path from x, to xt Compute symmetric differenceA(x,, xt); f * min{f (4, f (xt)); x* argmin{f (4, f (xt)); x +- x,; while A(x, xt) # 0 do m* t argmin{f (x @ m) : m E A(x, xt)); A(%@ m*, xt) +- A(x, xt) \ {m*); xtx@m*; if f(x) < f * then +
+
I
x* t x; f*+-f(x); end end Algorithm 2.2: Path-relinking. The procedure starts by computing the symmetric difference A(x,, xt) between the two solutions, i.e. the set of moves needed to reach xt (target solution) from x, (initial solution). A path of solutions is generated linking x, and xt. The best solution x* in this path is returned by the algorithm. At each step, the procedure examines all moves m E A(%,xt) from the current solution x and selects the one which results in the least cost solution, i.e. the one which minimizes f (x @ m), where x @ m is the solution resulting from applying move m to solution x. The best move m* is made, producing solution x @ m*. The set of available moves is updated. If necessary, the best solution x* is updated. The procedure terminates when xt is reached, i.e. when A(x, xt) = 0. We notice that path-relinking may also be viewed as a constrained local search strategy applied to the initial solution x,, in which only a limited set of moves can be performed and where uphill moves are allowed. Several alternatives have been considered and combined in recent implementations of path-relinking [I-3, 7, 48, 50, 521: periodical relinking: path-relinking is not systematically applied, but instead only periodically; forward relinking: path-relinking is applied using the worst among x, and xt as the initial solution and the other as the target solution; backward relinking: the roles of x, and xt are interchanged, pathrelinking is applied using the best among x, and xt as the initial solution and the other as the target solution;
Metaheuristics: Progress as Real Problem Solvers back and forward relinking: two different trajectories are explored, the first using x, as the initial solution and the second using xt in this role; mixed relinking: two paths are simultaneously explored, the first emanating from x, and the second from xt, until they meet at an intermediary solution equidistant from x, and xt; randomized relinking: instead of selecting the best yet unselected move, randomly select one from among a candidate list with the most promising moves in the path being investigated; and truncated relinlcing: the full trajectory between x, and xt is not investigated, but instead only part of it. All these alternatives involve trade-offs between computation time and solution quality. Ribeiro et al. [50] observed that exploring two different trajectories for each pair (x,, st) takes approximately twice the time needed to explore only one of them, with very marginal improvements in solution quality. They have also observed that if only one trajectory is to be investigated, better solutions are found when the relinking procedure starts from the best among x, and xt. Since the neighborhood of the initial solution is much more carefully explored than that of the guiding one, starting from the best of them gives the algorithm a better chance to investigate in more detail the neighborhood of the most promising solution. For the same reason, the best solutions are usually found closer to the initial solution than to the guiding solution, allowing the pruning of the relinking trajectory before the latter is reached.
2.3
GRASP WITH PATH-RELINKING
Path-relinking is a major enhancement to the basic GRASP procedure, leading to significant improvements in solution time and quality. The use of path-relinking within a GRASP procedure, as an intensification strategy applied to each locally optimal solution, was first proposed by Laguna and Marti [28]. It was followed by several extensions, improvements, and successful applications [3, 9, 43, 45, 501. Two basic strategies are used: path-relinking is applied to all pairs of elite solutions, either periodically during the GRASP iterations or after all GRASP iterations have been performed as a post-optimization step; and path-relinking is applied as an intensification strategy to each local optimum obtained after the local search phase.
GRASP with path-relinking
37
Applying path-relinking as an intensification strategy to each local optimum seems to be more effective than simply using it only as a post-optimization step. In general, combining intensification with postoptimization results in the best strategy. In the context of intensification, path-relinking is applied to pairs (x, y) of solutions, where x is a locally optimal solution produced by each GRASP iteration after local search and y is one of a few elite solutions randomly chosen from a pool with a limited number Maxxlite of elite solutions found along the search. Uniform random selection is a simple strategy to implement. Since the symmetric difference is a measure of the length of the path explored during relinking, a strategy biased toward pool elements y with high symmetric difference with respect to x is usually better than one using uniform random selection [45]. The pool is originally empty. Since we wish to maintain a pool of good but diverse solutions, each locally optimal solution obtained by local search is considered as a candidate to be inserted into the pool if it is sufficiently different from every other solution currently in the pool. If the pool already has Maxllite solutions and the candidate is better than the worst of them, then a simple strategy is to have the former replaces the latter. Another strategy, which tends to increase the diversity of the pool, is to replace the pool element most similar to the candidate among all pool elements with cost worse than the candidate's. If the pool is not full, the candidate is simply inserted. Post-optimization is done on a series of pools. The initial pool Po is the pool P obtained at the end of the GRASP iterations. The value of the best solution of Po is assigned to f; and the pool counter is initialized k = 0. At the k-th iteration, all pairs of elements in pool Pk are combined using path-relinking. Each result of path-relinking is tested for membership in pool Pk+lfollowing the same criteria used during the GRASP iterations. If a new best solution is produced, i.e. fl+l< fl,then k t k 1 and a new iteration of post-optimization is done. Otherwise, post-optimization halts with x* = argmin{f (x) I x E Pk+l)as the result. Algorithm 2.3 illustrates such a procedure. Each GRASP iteration has now three main steps:
+
Construction phase: a greedy randomized construction procedure is used to build a feasible solution; Local search phase: the solution built in the first phase is progressively improved by a neighborhood search strategy, until a local minimum is found; and
Metaheuristics: Progress as Real Problem Solvers Path-relinking phase: the path-relinking algorithm using any of the strategies described in Section 2.2 is applied to the solution obtained by local search and to a randomly selected solution from the pool. The best solution found along this trajectory is also considered as a candidate for insertion in the pool and the incumbent is updated. At the end of the GRASP iterations, a post-optimization phase combines the elite solutions in the pool in the search for better solutions..
Data : Number of iterations i, Result: Solution x* E X
Pt0; f * + 00; for i = 1 , . . . ,ima do xtGreedyRandomizedConstruction(); x t LocalSearch(x); if i 2 2 then Choose, at random, pool solutions y P to relink with x; for y E Y do Determine which (x or y) is initial x, and which is target xt; x, t PathRelinking(x,, xt); Update the elite set P with xp; if f (x,) < f * then
f * f b,); x* t xP; end end end end P = ~ostOptimize{P); x* = argmin{f (x), x E P); Algorithm 2.3: A basic GRASP with path-relinking heuristic for minimization. Aiex [I] and Aiex et al. [4] have shown experimentally that the solution times for finding a target solution value with a GRASP heuristic fit a two-parameter exponential distribution. Figure 2.3 illustrates this result, depicting the superimposed empirical and theoretical distributions observed for one of the cases studied in the computational experiments reported by the authors, which involved 2400 runs of GRASP
GRASP with path-relinking
0
2
4 6 8 time to target value (seconds)
10
12
Figure 2.3. Superimposed empirical and theoretical distributions (times to target values measured in seconds on an SGI Challenge computer with 28 processors).
procedures for each of five different problems: maximum independent set [16, 371, quadratic assignment [29, 381, graph planarization [40, 471, maximum weighted satisfiability [39], and maximum covering [36]. The same result still holds when GRASP is implemented in conjunction with a path-relinking procedure 121.
2.4
APPLICATIONS
Path-relinking has been successfully used together with GRASP in a variety of applications, such as the three index assignment problem [I,31, the problem of routing private circuits in communication networks [41], the 2-path network design problem [48],the pmedian problem [44], the Steiner problem in graphs [50], the job-shop scheduling problem [I, 21, the prize-collecting Steiner tree problem [9], the quadratic assignment problem [32], the MAX-CUT problem [17], and the capacitated minimum spanning tree problem [53]. Some of these applications will be reviewed in the remainder of this section. Before we review some of these applications, we first describe a plot used in several of our papers to experimentally compare different randomized algorithms or different versions of the same randomized algorithm [I, 41. This plot shows empirical distributions of the random variable time to target solution value. To plot the empirical distribution, we fix a solution target value and run each algorithm T independent
Metaheuristics: Progress as Real Problem Solvers
time to target value (seconds)
Figure 2.4. Empirical distributions of the random variables time to target solution for a pure GRASP and a GRASP with path-relinking for MAX-CUT instance GI1 with target value of 552 [17]. Two hundred independent runs of each algorithm were used to make the plots.
times, recording the running time when a solution with cost at least as good as the target value is found. For each algorithm, we associate with the i-th sorted running time (ti) a probability pi = (i - ;)IT, and plot the points zi = (ti,pi), for i = 1,.. . ,T. Figure 2.4 shows one such plot comparing a pure GRASP with a GRASP with path-relinking for MAX-CUT instance GI1 with target solution value of 552. The figure shows clearly that GRASP with path-relinking (GRASP+PR) is much faster than pure GRASP to find a solution with weight 552 or more. For instance, the probability of finding such a solution in less than 5 seconds is over 80% with GRASP with path-relinking, while it is about 2% with pure GRASP. Similarly, with probability 50% GRASP with path-relinking finds such a target solution in less than 2.5 seconds, while for pure GRASP, with probability 50% a solution is found in less than 122 seconds.
2.4.1
Private virtual circuit routing
A frame relay service offers virtual private networks to customers by provisioning a set of long-term private virtual circuits (PVCs) between customer endpoints on a large backbone network. During the provisioning of a PVC, routing decisions are made without any knowledge of
GRASP with path-relinking
41
future requests. Over time, these decisions can cause inefficiencies in the network and occasional offline rerouting of the PVCs is needed. Resende and Ribeiro [43] formulate the offline PVC routing problem as an integer multi-commodity flow problem with additional constraints and with an objective function that minimizes propagation delays and/or network congestion. They propose variants of a GRASP with path-relinking heuristic for this problem. Experimental results for realistic-size problems show that GRASP benefits greatly from path-relinking and that the proposed heuristics are able to improve the solutions found with standard routing techniques. Let G = (V, E) be an undirected graph representing the frame relay network. Denote by V = (1,. ..,n } the set of backbone nodes where switches reside, while E is set of trunks (or edges) that connect the backbone nodes, with [El = m. Parallel trunks are allowed. Since G is an undirected graph, flows through each trunk (i, j) E E have two components to be summed up, one in each direction. However, for modeling purposes, costs and capacities will always be associated only with the ordered pair (i, j) satisfying i < j. For each trunk (i,j) E E, denote by bij its maximum allowed bandwidth (in kbitslsecond), while cij denotes the maximum number of PVCs that can be routed through it and dij is the propagation, or hopping, delay associated with the trunk. Each commodity k E K = (1,. . .,p} is a PVC to be routed, associated with an origin-destination pair and with a bandwidth requirement (or demand, also known as its effective bandwidth) r k . The latter takes into account the actual bandwidth required by the customer in the forward and reverse directions, as well as an overbooking factor. Let x$ = 1 if and only if edge (i, j) E E is used to route commodity k E K. The cost function g5v(x:j,. . . ,$, x:,, . . . , associated with each trunk (i,j) E E with i < j is the linear combination of a trunk propagation delay component and a trunk congestion component. The propagation delay component is defined as
qi)
where coefficients pk are used to model two plausible delay functions: If pk = 1, then this component leads to the minimization of the number of hops weighted by the propagation delay on each trunk. If pk = r k , then the minimization takes into account the effective bandwidth routed through each trunk weighted by its propagation delay.
Metaheuristics: Progress as Real Problem Solvers
t ~ n utillzaUon k rate
Figure 2.5. Piecewise linear congestion cost component associated with each trunk.
w
Let = CkEK rk(x$+xfi) be the total flow through trunk (i,j ) E E with i < j. The trunk congestion component depends on the utilization rates uij = yij/bij of each trunk (i, j ) E E with i < j. It is taken as the piecewise linear function proposed by Fortz and Thorup [20] and depicted in Figure 2.5, which increasingly penalizes flows approaching or violating the capacity limits:
For PVC routing, Resende and Ribeiro used the cost function
GRASP with path-relinking
43
associated with each trunk (i,j) E E with i < j, where weights (1 - 6) and 6 correspond respectively to the propagation delay and the network congestion components, with 6 E [O,l]. In the construction phase of GRASP, the routes are determined, one at a time. A new PVC is selected to be routed in each iteration. To reduce the computation times, we used a combination of the strategies usually employed by GRASP and heuristic-biased stochastic sampling. We create a restricted candidate list with a fixed number of elements n,. At each iteration, it is formed by the n, unrouted PVC pairs with the largest demands. An element t is selected at random from this list with rk. probability 71-(t) = re/ CkERCL Once a PVC !E K is selected, it is routed on a shortest path from its origin to its destination. The bandwidth capacity constraints are relaxed and handled via the penalty function introduced by the trunk congestion component (2.2) of the edge weights. The constraints on the limit of PVCs routed through each trunk are explicitly taken into account by forbidding routing through trunks already using its maximum number of PVCs. The weight of each edge (i,j) E E is given 1 . . . ,
&
&
gi).
gj
(G,
-
~ q + g 5 ~ ~ ( ~,..., : ~ q j , e i ,...,$ 3% . ) + ( x $3 1 -237
. - - -%j> 2 Zji, - - - > -3% 2.). 7
(2.4) The enforcement of the constraints that limit the number of P V C ~ routed through each trunk may lead to unroutable demand pairs. In this case, the current solution is discarded and a new construction phase starts. Each solution built in the first phase may be viewed as a set of routes, one for each PVC. The local search procedure seeks to improve each
44
Metaheuristics: Progress as Real Problem Solvers
route in the current solution. For each PVC k E K , start by removing units of flow from each edge in its current route. Next, compute incremental edge weights associated with routing this demand through each trunk (i,j ) E E according to (2.4). A tentative new shortest path route is computed using the incremental edge weights. If the new route improves the solution, it replaces the current route of PVC k. This is continued until no improving route can be found. In the proposed path-relinking strategy, the set of moves corresponding to the symmetric difference A(xl, x2) between any pair {xl, x2) of solutions is the subset K,,,,, C K of PVCs routed through different routes in xl and 2 2 . Without loss of generality, suppose that pathrelinking starts from any elite solution z in the pool and uses the locally optimal solution y as the guiding solution. The best solution jj along the new path to be constructed is initialized with z. For each PVC k E K,,,, the same shortest path computations described for construction and local search are used to evaluate the cost of the new solution obtained by rerouting the demand associated with PVC k through the route used in the guiding solution y instead of that used in the current solution originated from z. The best move is selected and removed from Ky,z. The new solution obtained by rerouting the above selected PVC is computed, the incumbent jj is updated, and a new iteration resumes. These steps are repeated, until the guiding solution y is reached. The incumbent jj is returned as the best solution found by path-relinking and inserted into the pool if it is better than the worst solution currently in the pool. Figure 2.6 illustrates the comparison of the four algorithms: pure GRASP (GRASP), GRASP with forward path-relinking (GRASP+PRf, in which a locally optimal solution is used as the initial solution), GRASP with backward path-relinking (GRASP+PRb, in which an elite solution is used as the initial solution), and GRASP with backward and forward path-relinking (GRASP+PRfb, in which path-relinking is performed in both directions) on PVC routing instance f ri'5Oa (60 nodes, 498 arcs, and 750 commodities). For a given computation time, the probability of finding a solution at least as good as the target value increases from GRASP to GRASP+PRf, from GRASP+PRf to GRASP+PRfb, and from GRASP+PRfb to GRASP+PRb. For example, there is 9.25% probability for GRASP+PRfb to find a target solution in less than 100 seconds, while this probability increases to 28.75% for GRASP+PRb. For GRASP, there is a 8.33% probability of finding a target solution within 2000 seconds, while for GRASP+PRf this probability increases to 65.25%. GRASP+PRb finds a target solution in at most 129 seconds with 50% probability. For the
rk
GRASP with path-relinking
J 10
100
1000 I0000 time to target value (seconds)
100000
le+06
Figure 2.6. Empirical distributions of time to target solution for GRASP, GRASP with forward path-relinking, GRASP with backward path-relinking, and GRASP with back and forward path-relinking for private virtual circuit routing instance fr750a. Two hundred independent runs were done for each algorithm. Target solution value used was 479000.
same probability, this time increases to 172, 1727, and 10933 seconds, respectively, for variants GRASP+PRfb, GRASP+PRf, and GRASP. These results suggest that variant GRASP+PRb, which performs pathrelinking backward from an elite solution to a locally optimal solution, is the most effective. Another experiment comparing the four variants was done on PVC routing instance att (90 nodes, 274 trunks, 272 commodities). Ten independent runs of each algorithm were done for 100 seconds on a 196 MHz SGI Challenge computer. Table 2.1 summarizes these results. For each variant, this table lists the best and average solution values found after 10 seconds and after 100 seconds. The results point to GRASP+PRb and GRASP+PRfb as the two best heuristics. It is interesting to note that even if given 100 seconds, GRASP finds solutions of worse quality than those found by GRASP+PRb and GRASP+PRfb in only 10 seconds.
2.4.2
2-path network design
Let G = (V, E) be a connected undirected graph, where V is the set of nodes and E is the set of edges. A k-path between nodes s,t E V is a sequence of at most k edges connecting them. Given a non-negative
46
Metaheuristics: Progress as Real Problem Solvers
Table 2.1. Comparison of GRASP, GRASP with forward path-relinking, GRASP with backward path-relinking, and GRASP with back and forward path-relinking for private virtual circuit routing instance att. Ten independent runs of 100 seconds were done for each algorithm. 10 runs Variant
GRASP
10 seconds best average 126603 1 126695
1
100 seconds best I average 126228 1 126558
weight function w : E -+ R+ associated with the edges of G and a set D of pairs of origin-destination nodes, the 2-path network design problem (2PNDP) consists in finding a minimum weighted subset of edges E' G E containing a 2-path between every origin-destination pair. Applications can be found in the design of communication networks, in which paths with few edges are sought to enforce high reliability and small delays. Dahl and Johannessen [13] proved that the decision version of 2PNDP is NP-complete. Rosseti [52] and Ribeiro and Rosseti [48] described sequential and parallel implementations of GRASP with path relinking for the 2-path network design. The construction of a new solution begins by the initialization of modified edge weights with the original edge weights. Each iteration of the construction phase starts by the random selection of an origin-destination pair still in D. A shortest 2-path between the extremities of this pair is computed, using the modified edge weights. The weights of the edges in this 2-path are set to zero until the end of the construction procedure, the origin-destination pair is removed from D, and a new iteration resumes. The construction phase stops when 2-paths have been computed for all origin-destination pairs. The local search phase seeks to improve each solution built in the construction phase. Each solution may be viewed as a set of 2-paths, one for each origin-destination pair in D. To introduce some diversity by driving different applications of the local search to different local optima, the origin-destination pairs are investigated at each GRASP iteration in a circular order defined by a different random permutation of their original indices. Each 2-path in the current solution is tentatively eliminated. The weights of the edges used by other 2-paths are temporarily set to zero, while those which are not used by other 2-paths in the current solution are restored to their original values. A new shortest 2-path be-
GRASP with path-relinlcing
47
tween the extremities of the origin-destination pair under investigation is computed, using the modified weights. If the new 2-path improves the current solution, then the latter is modified; otherwise the previous 2-path is restored. The search stops if the current solution was not improved after a sequence of ID\iterations along which all 2-paths have been investigated. Otherwise, the next 2-path in the current solution is investigated for substitution and a new iteration resumes. Each GRASP iteration performs an intensification phase using pathrelinking, in which the newly generated solution obtained at the end of the local search phase is combined with a randomly selected solution from the pool of elite solutions. Path-relinking starts by determining all origin-destination pairs whose associated 2-paths are different in the two solutions. These computations amount to determining the set of moves which should be applied to the initial solution to reach the guiding one. Each move is characterized by a pair of 2-paths, one to be inserted and the other to be eliminated from the current solution. At each pathrelinking iteration the best yet unselected move is applied to the current solution and the best solution found along the path connecting the two solutions is updated. The incumbent best solution found along the pathrelinking step is inserted into the pool if it is better than the worst solution currently in the pool. Several strategies for the implementation of the path-relinking step have been investigated in [49, 521: pure GRASP (GRASP), GRASP with forward path-relinking (GRASP+PR~, in which a locally optimal solution is used as the initial solution), GRASP with backward path-relinking (GRASP+PR~, in which an elite solution is used as the initial solution), GRASP with backward and forward path-relinking (GRASP+PRfb, in which path-relinking is performed twice, once in each direction), and GRASP with mixed path-relinking (GRASP+ PRm, in which two paths in opposite directions are simultaneously explored). The results displayed in Table 2.2 illustrate the behavior of these five variants on randomly generated instances [52] on complete graphs with 100, 200, 300, 400, and 500 nodes. For each instance, we give the best and average solution values found over ten independent runs of each algorithm. For each problem size, the processing time is limited at that observed for 200 iterations of the pure GRASP procedure on the first instance in the group. Algorithms GRASP+PRfb and GRASP+PRm performed better than the other variants, as far as together they found the best solutions and the best average solutions for all instances in the table. GRASP with backward path-relinking usually performs better than the forward path-relinking variant, due to the fact that it starts
Metaheuristics: Progress as Real Problem Solvers
48
Table 2.2. Results for ten runs of each algorithm on randomly generated instances of 2-path network design problems with limited processing time. GRASP best avg. 779 784.3 762 769.6 773 779.2 746 752.0 756 762.3 1606 1614.7 1601 1608.8 1564 1578.2 1578 1585.6 1577 1599.6 2459 2481.9 2520 2527.7 2448 2463.5 2462 2482.1 2450 2458.8 3355 3363.8 3393 3417.5 3388 3394.4 3396 3406.0 3416 3429.3 4338 4350.1 4353 4369.6 4347 4360.7 4317 4333.8 4362 4370.4
GRASP+PRf best avg. 760 772.8 730 749.4 762 769.3 732 738.4 742 749.7 1571 1584.4 1557 1572.8 1523 1541.9 1531 1553.3 1567 1575.4 2408 2425.0 2453 2469.7 2381 2403.1 2413 2436.2 2364 2402.5 3267 3285.5 3324 3338.2 3311 3322.4 3316 3326.5 3335 3365.5 4209 4247.1 4261 4278.6 4239 4257.8 4222 4238.6 4263 4292.0
GRASP+PRb best avg. 763 769.3 735 746.0 756 766.1 723 736.7 739 746.5 1540 1568.0 1559 1567.9 1516 1531.9 1518 1538.1 1543 1563.5 2377 2401.3 2419 2449.1 2339 2373.8 2373 2409.3 2328 2368.6 3238 3257.0 3283 3306.8 3268 3291.9 3249 3292.0 3267 3327.7 4176 4207.6 4180 4233.7 4187 4224.8 4157 4197.4 4203 4294.0
GRASP+PRfb best avg. 749 762.7 729 741.7 757 763.6 719 730.4 737 742.9 1526 1562.0 1537 1558.9 1508 1519.9 1510 1532.2 1529 1556.3 2355 2399.2 2413 2438.9 2356 2375.3 2369 2400.9 2347 2373.9 3221 3239.4 3220 3292.2 3227 3275.1 3256 3284.8 3270 3313.9 4152 4196.1 4166 4219.6 4170 4201.9 4156 4182.2 4211 4236.8
GRASP+PRm best avg. 755 765.3 736 745.7 754 765.1 717 732.2 728 743.7 1538 1564.3 1545 1563.3 1509 1528.7 1513 1534.7 1531 1556.1 2366 2393.6 2405 2439.4 2338 2370.3 2350 2401.0 2322 2365.4 3231 3252.2 3271 3301.4 3257 3273.2 3246 3287.9 3259 3323.5 4175 4206.2 4175 4226.3 4187 4217.9 4159 4197.1 4200 4240.2
from an elite solution that is often better than the current local optimum, fully exploring the neighborhood of the former. The results observed for variant GRASP+PRm are very encouraging: this algorithm found better solutions than the other variants for 40% of the instances. To further illustrate and compare these five variants, we display in Figure 2.7 a plot of the empirical probability distribution of the time to target solution value for each algorithm, computed from 200 independent runs. These plots show that the probability of finding a solution at least as good as a target value increases from GRASP to GRASP+PRf to GRASP+PRb to GRASP+PRfb, and finally to GRASP+PRm. These results confirms an observation first noticed by Ribeiro et al. [50] and later by Resende and Ribeiro [42],suggesting that the backward strategy performs
GRASP with path-relinking
49
a major role in successful implementations of path-relinking. Moreover, they also indicate that the mixed path-relinking strategy proposed by Rosseti [52] is very effective.
Figure 2.7. Empirical distributions of time to target solution for GRASP, GRASP with forward path-relinking, GRASP with backward path-relinking, GRASP with back and forward path-relinking, and GRASP with mixed path-relinking for a 2-path network design instance with 80 nodes. Two hundred independent runs were done for each algorithm. Target solution value used was 588.
2.4.3
p-median problem
In the pmedian problem, we are given a set F of m potential facilities, a set U of n users (or customers), a distance function d : U x F t R, and a constant p 5 m, and want to determine which p facilities to open so as to minimize the sum of the distances from each user to its closest open facility. It is a well-known NP-hard problem [27]. Resende and Werneck [45] describe a GRASP with path-relinking for the pmedian problem. Empirical results on instances from the literature show that the algorithm is robust and that it performs at least as well as other methods, and often better in terms of both running time and solution quality. In all cases the solutions obtained by the GRASP with path-relinking were within 0.1% of the best known upper bounds. For a large number of instances new best known solutions were produced by the new algorithm.
50
Metaheuristics: Progress as Real Problem Solvers
The standard greedy algorithm for the pmedian problem [lo, 551 starts with an empty solution and adds facilities one at a time, choosing the most profitable in each iteration (the one whose insertion causes the greatest drop in solution cost). The construction procedure proposed in [45] is similar to the greedy algorithm, but instead of selecting the best among all possible options, it only considers q < m possible insertions (chosen uniformly at random) in each iteration. The most profitable among those is selected. The running time of the algorithm is O(m pqn). The idea is to make q small enough so as to significantly reduce the running time of the algorithm (when compared to the pure greedy one) and to ensure a fair degree of randomization. In tests, the value q = rlog2(m/p)l was determined to be suitable. The standard local search procedure for the pmedian problem, originally proposed by Teitz and Bart [54], is based on swapping facilities. Given an initial solution S, the procedure determines, for each facility f @ S, which facility g E S (if any) would improve the solution the most iff and g were interchanged (i.e., iff were opened and g closed). If there is one such improving move, f and g are interchanged. The procedure continues until no improving interchange can be made, in which case a local minimum will have been found. The complexity of this swap-based local search is O(pmn) per iteration. Whitaker [55] proposed an efficient implementation of this method, which he called fast interchange, for which the bound on the running time of each iteration is reduced to O(mn). Resende and Werneck [35] have recently proposed an alternative implementation. Although it has the same worst-case complexity as Whitaker's, it can be substantially faster in practice. The speedup (of up to three orders of magnitude) results from the use of information gathered in early iterations of the algorithm to reduce the amount of computation performed in later stages. Though this implementation can require a greater amount of memory, with the use of some programming techniques (e.g. sparse matrix representation and cache), the additional memory requirements can be minimized. Intensification (via path-relinking) occurs in two different stages. First, every GRASP iteration contains an intensification step, in which the newly generated solution is combined with a solution from the pool. Then, in the post-optimization phase, solutions in the pool are combined among themselves. Let S1 and S2 be two valid solutions, interpreted as sets of (open) facilities. The path-relinking procedure starts with one of the solutions (say, Sl) and gradually transforms it into the other (S2)by swapping in elements from Sz\ S1and swapping out elements from S1\ S2.The total number of swaps made is I S2\ S1I, which is equal to IS1\ S2I . The choice
+
GRASP with path-relinking
51
of which swap to make in each stage is greedy: the most profitable (or least costly) move is made. The outcome of path-relinking is the best local minimum in the path. A local minimum in this context is a solution that is both succeeded (immediately) and preceded (either immediately or through a series of same-value solutions) in the path by strictly worse solutions. If the path has no local minima, one of the original solutions (S1or S2)is returned with equal probability. When there is an improving solution in the path, this criterion matches the traditional one exactly: it simply returns the best element in the path. It is different only when the standard pathrelinking is unsuccessful, in which case it tries to increase diversity by selecting a solution other than the extremes of the path. Note that path-relinking is very similar to the local search procedure described earlier, with two main differences. First, the number of allowed moves is restricted: only elements in S2 \ Slcan be inserted, and only those in S1\ S2can be removed. Second, non-improving moves are allowed. These differences are easily incorporated into the basic implementation of the local search procedure. The intensification procedure is augmented by performing a full local search on the solution produced by path-relinking. Because this solution is usually very close to a local optimum, this application tends to be much faster than on a solution generated by the randomized constructive algorithm. A side effect of applying local search at this point is increased diversity, since one is free to use facilities that did not belong to any of the original solutions. The plots in Figure 2.8 compare GRASP with path-relinking and pure GRASP on the 1400-facility, 1400-user TSPLIB instance f11400. The plot on the left shows quality of the best solution found as a fraction of the average value of the first solution for GRASP with path-relinking and pure GRASP for p = 500. Times are given as multiples of the average time required to perform one multi-start iteration. Smaller values are better. The plot on the right shows ratios between partial solutions found with and without path-relinking for different values of p. Ratios smaller than 1.000 favor the use of path-relinking. The plots show that GRASP benefits from path-relinking, in particular for large values of p.
2.4.4
Three index assignment problem
The three-index assignment problem (AP3) was introduced by Pierskalla [33] as an extension of the classical two-dimensional assignment problem. Consider a complete tripartite graph Kn,,,, = (IU J U K , (Ix J) U (I x K ) U (J x K)),where I,J, and K are disjoint sets of size n.
Metaheuristics: Progress as Real Problem Solvers
10 centers 25 centers ....... 50 centers ........ 75 centers ........... 100 centers 250 centers .... 500 centers ........ 1.002 1.001
f
,a -
: .--- -- - ----.
1.000
m
.
u
_ __ .._.. ... .. . . 0.997
........
.....................
..
i
.......:........ .:
%
........................................................................... "
I"
..,, . .. ... .. ....'..... .......................................................
,
o.998
0.995
2
20
40
60
.............
.......................... 80
100
relative time
Figure 2.8. GRASP with path-relinking versus pure GRASP on TSPLIB instance f11400.
If a cost ~ , j , kis associated with each triplet (i,j , k) E I x J x K , then the AP3 consists of finding a subset A E I x J x K of n triplets such that every element of I U J U K occurs in exactly one triplet of A, and the sum of the costs of the chosen triplets is minimized. The AP3 is
GRASP with path-relinlcing NP-hard [21, 221. A permutation-based formulation for AP3 is
where TN denotes the set of all permutations of the set of integers N = {1,2,.. . ,n}. Aiex [I] and Aiex et al. [3] describe a GRASP with path-relinking for AP3. Computational results show clearly that this GRASP for AP3 benefits from path-relinking and compares well with previously proposed heuristics for this problem. GRASP with path-relinking was able to improve the solution quality of heuristics proposed by Balas and Saltzman [6], Burkard et al. [8], and Crama and Spieksma [ll]on all instances proposed in those papers. The GRASP construction phase builds a feasible solution S by selecting n triplets, one at a time. The solution S is initially empty and the set C of candidate triplets is initially the set of all triplets. To select the pth triplet (p = 1,. . . ,n - 1) to be added to the solution, a restricted candidate list C' is defined to include all triplets (i,j, k) in the candidate c a(E- c), where set C having cost cijk I
+
c = min{cijk -
I (i,j, k) E C)
I
and E = max{cijk (i,j, k) E C).
Triplet (i,, j,, k,) E C' is chosen at random and is added to the solution, i.e. S = SU{(i,, j,, k,)). Once (i,, j,, k,) is selected, the set of candidate triplets must be adjusted to take into account that (i,, j,, Ic,) is part of the solution. Any triplet (i, j, k) such that i = i, or j = j, or k = kp is removed from the current set of candidate triplets. After n - 1 triplets have been selected, the set C of candidate triplets contains one last triplet which is added to S, thus completing the construction phase. In the local search procedure, the current solution is improved by searching its neighborhood for a better solution. The solution of the AP3 can be represented by a pair of permutations (p, q). For a solution p, q E TN, the 2-exchange neighborhood is N2(p,q) = {p', q' I d(p,pl) d(q, q') = 2)) where d(s, s') = I {i I s(i) # sl(i))l. In the local search, each cost of a neighborhood solution is compared with the cost of the current solution. If the cost of the neighbor is lower, then the solution is updated, the search is halted, and a search in the new neighborhood is initialized. The local search ends when no neighbor of the current solution has a lower cost than the current solution. Path-relinking is done between an initial solution
+
54
Metaheuristics: Progress as Real Problem Solvers
and a guiding solution
Let the symmetric difference between S and T be defined by the following two sets of indices:
and
S K = { i = 1,..., n
I @#@}.
An intermediate solution of the path is visited at each step of pathrelinking. Two elementary types of moves can be carried out. In a type-one move, triplets
are replaced by triplets
In a type-two move, triplets
Set S J guides type-one moves, while SK guides type-two moves. For all i E SJ, let q be such that j: = j f . A type-one move replaces triplets
For all i E SK, let q be such that IC? = @. A type-two move replaces triplets -s S .S s {(i,& M q J q ,kq)}
At each step, the move that produces the least costly solution is selected and the corresponding index is deleted from either S J or SK. This process continues until there are only two move indices left in one of the sets S J or SK. At this stage, any of these two moves results in the
GRASP with path-relinking Balas 8 Salhman24.1
time (seconds) Balas 8 Salkman 24.1
time (seconds)
Figure 2.9. The plot of the left shows empirical probability distributions of time to target value for GRASP and GRASP with path-relinking (random selection of one guiding solution from elite set). The plot of the right shows empirical probability distributions of time to target value for different variants of GRASP with path-relinking.
guiding solution and, therefore, are not carried out. The best solution found in the path is returned by the procedure. The plots in Figure 2.9 illustrate how GRASP with path-relinking compares with pure GRASP and how different variants of GRASP with path-relinking compare. The variants of GRASP with path-relinking tested were: random selection of one guiding solution [GPR(RAND)]; random selection of one guiding solution and periodic relinking of all elements in pool [GPR(RAND,INT)];selection of all pool elements as guid-
56
Metaheuristics: Progress as Real Problem Solvers
ing solutions [GPR(ALL)]; and selection of all pool elements as guiding solutions with periodic relinking of all elements in pool [GPR(ALL,INT)]. The algorithms were run 200 times (using different initial seeds for the random number generator) on instance 24.1 of Balas and Saltzman [6], stopping when a solution value better than a given target value was found. The experiment comparing pure GRASP with GRASP with path-relinking used a target value of 17, while the one comparing the different variants of GRASP with path-relinking used a more difficult target value of 7. The plot on the left shows the benefit of using pathrelinking in GRASP. The plot on the right shows that the variants using path-relinking with all elite solutions have a higher probability of finding a target solution in a given amount of time than the variants that use path-relinking with a single randomly selected elite solution. The use of periodic intensification does not appear to influence the distributions as much.
2.5
CONCLUSIONS AND EXTENSIONS
This paper reviewed recent advances and applications of GRASP with path-relinking. By providing a short discussion of each component of GRASP with path-relinking and showing examples of how such heuristics can be implemented for combinatorial optimization problems such as PVC routing, 2-path network design, 3-index assignment, and pmedian, we hope this paper will serve as a guide for the reader to put together other GRASP with path-relinking heuristics. Path-relinking is a major enhancement to the basic greedy randomized adaptive search procedure (GRASP), leading to significant improvements in both solution time and quality. It adds an effective memory mechanism to GRASP by providing an intensification strategy that explores trajectories connecting GRASP solutions and the best elite solutions previously produced during the search. The numerical results summarized for the four problems listed above clearly illustrate the benefits obtained by the combination of GRASP with path relinking. In evolutionary path-relinkzng used in the post-optimization intensification phase, a new generation of elite solutions is generated from the current population in the pool of elite solutions by applying pathrelinking between all pairs of solutions in this population. Solutions obtained by each path-relinking operation are tested for inclusion in the population of the next generation following the usual rules used in pool management. This strategy was successfully used for the Steiner problem in graphs by Ribeiro et al. 1501, for the pmedian problem by Resende
G R A S P with path-relinking
57
and Werneck [44], and for the uncapacitated facility location problem by Resende and Werneck [46]. Path-relinking may also be used as a solution extractor for population methods. In particular, path-relinking was recently successfully applied as a generalized crossover strategy to generate optimized offsprings in the context of a genetic algorithm for the phylogeny problem [51]. The fact that the computation time to find a target solution value using GRASP with path-relinking fits a two-parameter exponential distribution (cf. Section 2.3, see [I,2, 41) has a major consequence in parallel implementations of GRASP with path-relinking: linear speedups proportional to the number of processors can be easily observed in parallel independent strategies. Additionally, path-relinking offers a very effective mechanism for the implementation of parallel cooperative strategies [12]. In this case, inter-processor cooperation is enforced by a master processor which stores and handles a common pool of elite solutions which is shared by all slave processors performing GRASP with path-relinking. Careful implementations making appropriate use of the computer resources may lead to even larger speedups and to very robust parallel algorithms, see e.g. [31, 48, 49, 521. Results obtained for the 2-path network design problem are illustrated in Figure 2.10, showing the speedup obtained by the cooperative strategy with respect to the independent one on a cluster of eight processors. Much larger improvements can be obtained with more processors. Finally, we notice that path-relinking can also be successfully used in conjunction with implementations of other metaheuristics such as VNS and ant colonies, as recently reported e.g. in [5, 171.
ACKNOWLEDGMENTS Most of this work is part of their dissertations and was jointly done with the following currently and former M.Sc. and Ph.D. students from the Catholic University of Rio de Janeiro, Brazil, which are all gratefully acknowledged: R.M. Aiex, S.A. Canuto, S.L. Martins, M. Prais, I. Rosseti, M.C. Souza, E. Uchoa, D.S. Vianna, and R.F. Werneck.
REFERENCES [I] R.M. Aiex. Uma investigap?~experimental da distribui@io de probabilidade de tempo de s o l u ~ 6 oe m heum'sticas G R A S P e sua aplicapZo nu ancilise de implementa~6esparalelas. PhD thesis, Department
58
Metaheuristics: Progress as Real Problem Solvers
Figure 2.10. Probability distributions of time-to-target-value on an instance of the 2-path network design problem for cooperative and independent parallel implementations of GRASP with path-relinking on a Linux cluster with eight processors.
of Computer Science, Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil, 2002. [2] R.M. Aiex, S. Binato, and M.G.C. Resende. Parallel GRASP with path-relinking for job shop scheduling. Parallel Computing, 29:393430, 2003. [3] R.M. Aiex, M.G.C. Resende, P.M. Pardalos, and G. Toraldo. GRASP with path relinking for the three-index assignment problem. Technical report, AT&T Labs Research, Florham Park, NJ 07733, 2000. To appear in INFORMS J. on Computing. [4] R.M. Aiex, M.G.C. Resende, and C.C. Ribeiro. Probability distribution of solution time in GRASP: An experimental investigation. Journal of Heuristics, 8:343-373, 2002. [5] D.J. Aloise, D. Aloise, C.T.M. Rocha, C.C. Ribeiro, Jos6 C. Ribeiro Filho, and Luiz S.S. Moura. Scheduling workover rigs for onshore oil production. Discrete Applied Mathematics, to appear. [6] E. Balas and M.J. Saltzman. An algorithm for the three-index assignment problem. Oper. Res., 39: 150-161, 1991.
GRASP with path-relinking
59
[7] S. Binato, H. Faria Jr., and M.G.C. Resende. Greedy randomized adaptive path relinking. In J.P. Sousa, editor, Proceedings of the I V Metaheuristics International Conference, pages 393-397, 2001. [8] R.E. Burkard, R. Rudolf, and G.J. Woeginger. Three-dimensional axial assignment problems with decomposible cost coefficients. Discrete Applied Mathematics, 65:123-139, 1996. [9] S.A. Canuto, M.G.C. Resende, and C.C. Ribeiro. Local search with perturbation for the prize-collecting Steiner tree problems in graphs. Networks, 38:50-58, 2001. [lo] G. Cornuejols, M. L. Fisher, and G. L. Nemhauser. Location of bank accounts to optimize float: An analytical study of exact and approximate algorithms. Management Science, 23:789-810, 1977. [ll]Y. Crama and F.C.R. Spieksma. Approximation algorithms for
three-dimensional assignment problems with triangle inequalities. European Journal of Operational Research, 60:273-279, 1992. [12] V.-D. Cung, S.L. Martins, C.C. Ribeiro, and C. Roucairol. Strategies for the parallel implementation of metaheuristics. In C.C. Ribeiro and P. Hansen, editors, Essays and Surveys in Metaheuristics, pages 263-308. Kluwer Academic Publishers, 2002. [13] G. Dahl and B. Johannessen. The 2-path network problem. Networks, 43:190-199, 2004. [14] T.A. Feo and M.G.C. Resende. A probabilistic heuristic for a computationally difficult set covering problem. Operations Research Letters, 8:67-71, 1989. [15] T.A. Feo and M.G.C. Resende. Greedy randomized adaptive search procedures. Journal of Global Optimization, 6:109-133, 1995. [16] T.A. Feo, M.G.C. Resende, and S.H. Smith. A greedy randomized adaptive search procedure for maximum independent set. Operations Research, 42:860-878, 1994. [17] P. Festa, P.M. Pardalos, M.G.C. Resende, and C.C. Ribeiro. Randomized heuristics for the max-cut problem. Optimization Methods and Software, 7:1033-1058, 2002. [18] P. Festa and M.G.C. Resende. GRASP: An annotated bibliography. In C.C. Ribeiro and P. Hansen, editors, Essays and surveys on metaheuristics, pages 325-367. Kluwer Academic Publishers, 2002. [19] C. Fleurent and F. Glover. Improved constructive multistart strategies for the quadratic assignment problem using adaptive memory. INFORMS Journal on Computing, 11:198-204, 1999.
60
Metaheuristics: Progress as Real Problem Solvers
[20] B. Fortz and M. Thorup. Internet traffic engineering by optimizing ospf weights. In Proc. IEEE INFOCOM 2000 - The Conference on Computer Communications, pages 519-528, 2000. [21] A.M. Frieze. Complexity of a 3-dimensional assignment problem. European Journal of Operational Research, 13:161-164, 1983. [22] M.R. Garey and D.S. Johnson. Computers and intractability - A guide to the theory of NP-completeness. W.H. Freeman and Company, 1979. [23] F. Glover. Tabu search and adaptive memory programing - Advances, applications and challenges. In R.S. Barr, R.V. Helgason, and J.L. Kennington, editors, Interfaces in Computer Science and Operations Research, pages 1-75. Kluwer, 1996. [24] F. Glover. Multi-start and strategic oscillation methods - Principles t o exploit adaptive memory. In M. Laguna and J.L. GonzblesVelarde, editors, Computing Tools for Modeling, Optimization and Simulation: Interfaces in Computer Science and Operations Research, pages 1-24. Kluwer, 2000. [25] F. Glover and M. Laguna. Tabu Search. Kluwer, 1997. [26] F. Glover, M. Laguna, and R. Marti. Fundamentals of scatter search and path relinking. Control and Cybernetics, 39:653%684, 2000. [27] 0. Kariv and L. Hakimi. An algorithmic approach to nework location problems, Part 11: The pmedians. SIAM Journal of Applied Mathematics, 37:539-560, 1979. [28] M. Laguna and R. Marti. GRASP and path relinking for 2-layer straight line crossing minimization. INFORMS Journal on Computing, 11:44-52, 1999. [29] Y. Li, P.M. Pardalos, and M.G.C. Resende. A greedy randomized adaptive search procedure for the quadratic assignment problem. In P.M. Pardalos and H. Wolkowicz, editors, Quadratic assignment and related problems, volume 16 of DIMACS Series on Discrete Mathematics and Theoretical Computer Science, pages 237-261. American Mathematical Society, 1994. [30] S.L. Martins, P.M. Pardalos, M.G.C. Resende, and C.C. Ribeiro. Greedy randomized adaptive search procedures for the steiner problem in graphs. In P.M. Pardalos, S. Rajasekaran, and J. Rolim, editors, Randomization methods in algorithmic design, volume 43 of DIMACS Series on Discrete Mathematics and Theoretical Computer Science, pages 133-145. American Mathematical Society, 1999.
GRASP with path-relinking
61
[31] S.L. Martins, C.C. Ribeiro, and I. Rosseti. Applications and parallel implementations of metaheuristics in network design and routing. Lecture Notes in Computer Science, 3285:205-213, 2004. [32] C.A. Oliveira, P.M. Pardalos, and M.G.C. Resende. GRASP with path-relinking for the QAP. In Toshihide Ibaraki and Yasunari Yoshitomi, editors, Proceedings of the Fifth Metaheuristics International Conference, pages 57-1 - 57-6, 2003. [33] W.P. Pierskalla. The tri-subsitution method for the threemultidimensional assignment problem. CORS J., 5:71-81, 1967. [34] M. Prais and C.C. Ribeiro. Reactive GRASP: An application to a matrix decomposition problem in TDMA traffic assignment. INFORMS Journal on Computing, 12:164-176, 2000. [35] M. G. C. Resende and R. F. Werneck. On the implementation of a swap-based local search procedure for the pmedian problem. In R. E. Ladner, editor, Proceedings of the Fifth Workshop on Algorithm Engineering and Experiments (ALENEX'O3), pages 119-127. SIAM, 2003. [36] M.G.C. Resende. Computing approximate solutions of the maximum covering problem using GRASP. Journal of Heuristics, 4:161171, 1998. [37] M.G.C. Resende, T.A. Feo, and S.H. Smith. Algorithm 787: Fortran subroutines for approximate solution of maximum independent set problems using GRASP. ACM Transactions on Mathematical Software, 24:386-394, 1998. [38] M.G.C. Resende, P.M. Pardalos, and Y. Li. Algorithm 754: Fortran subroutines for approximate solution of dense quadratic assignment problems using GRASP. ACM Transactions on Mathematical Software, 22:104-118, 1996. [39] M.G.C. Resende, L.S. Pitsoulis, and P.M. Pardalos. Fortran subroutines for computing approximate solutions of MAX-SAT problems using GRASP. Discrete Applied Mathematics, 100:95-113, 2000. [40] M.G.C. Resende and C.C. Ribeiro. A GRASP for graph planarization. Networks, 29:173-189, 1997. [41] M.G.C. Resende and C.C. Ribeiro. A GRASP with path-relinking for private virtual circuit routing. Networks, 41:104-114, 2003. [42] M.G.C. Resende and C.C. Ribeiro. GRASP and path-relinking: Recent advances and applications. In Toshihide Ibaraki and Yasunari Yoshitomi, editors, Proceedings of the Fifth Metaheuristics International Conference, pages T6-1 - T6-6, 2003.
62
Metaheuristics: Progress as Real Problem Solvers
[43] M.G.C. Resende and C.C. Ribeiro. Greedy randomized adaptive search procedures. In F. Glover and G. Kochenberger, editors, Handbook of Metaheuristics, pages 219-249. Kluwer Academic Publishers, 2003. [44] M.G.C. Resende and R.F. Werneck. A GRASP with path-relinking for the p-median problem. Technical Report TD-5E53XL, AT&T Labs Research, 2002. [45] M.G.C. Resende and R.F. Werneck. A hybrid heuristic for the pmedian problem. Journal of Heuristics, 10:59-88, 2004. [46] M.G.C. Resende and R.F. Werneck. A hybrid multistart heuristic for the uncapacitated facility location problem. European Journal of Operational Research, to appear. [47] C.C. Ribeiro and M.G.C. Resende. Algorithm 797: Fortran subroutines for approximate solution of graph planarization problems using GRASP. ACM Dansactions on Mathematical Software, 25:341352, 1999. [48] C.C. Ribeiro and I. Rosseti. A parallel GRASP for the 2-path network design problem. Lecture Notes in Computer Science, 2004:922-926, 2002. [49] C.C. Ribeiro and I. Rosseti. Efficient parallel cooperative implementations of GRASP heuristics. Technical report, Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil, 2005. [50] C.C. Ribeiro, E. Uchoa, and R.F. Werneck. A hybrid GRASP with perturbations for the Steiner problem in graphs. INFORMS Journal on Computing, 14:228-246, 2002. [51] C.C. Ribeiro and D.S. Vianna. A genetic algorithm for the phylogeny problem using an optimized crossover strategy based on path-relinking. Revista Tecnologia da Informaqa"~,3(2):67-70,2003. [52] I. Rosseti. Heum'sticas para o problema de sintese de redes a 2caminhos. PhD thesis, Department of Computer Science, Catholic University of Rio de Janeiro, Rio de Janeiro, Brazil, July 2003. [53] M.C. Souza, C. Duhamel, and C.C. Ribeiro. A GRASP with pathrelinking heuristic for the capacitated minimum spanning tree problem. In M.G.C. Resende and J. Souza, editors, Metaheuristics: Computer Decision Making, pages 627-658. Kluwer Academic Publishers, 2003. [54] M. B. Teitz and P. Bart. Heuristic methods for estimating the generalized vertex median of a weighted graph. Operations Research, 16:955-961, 1968.
GRASP with path-relinking
63
[55] R. Whitaker. A fast algorithm for the greedy interchange of largescale clustering and median location prolems. INFOR, 21:95-108, 1983.
Chapter 3
A TABU SEARCH HEURISTIC FOR A UNIVERSITY TIMETABLING PROBLEM Halvard Arntzen and Arne Lokketangen Department of Informatics, Molde College, Box 2110, 6402 Molde, Norway (halvard.arntzen,arne.lokketangen)@hirnolde.no
Abstract: This paper describes a heuristic algorithm designed in connection with the 2003 International Timetabling Competition organized by the Metaheuristics Network. The problem posed in the competition was to develop an algorithm for solving university timetabling problems as described below. 20 test instances were provided and the competing algorithms were evaluated according to the overall performance on these 20 cases. Our algorithm uses an adaptive memory search to improve the quality of an initial solution. The search is guided by adaptive tabu search mechanisms. In addition to a description of our method we focus on the observed effectiveness of some of the mechanisms that we employ. Behavioral aspects and computational results are reported.
Keywords: Timetabling, combinatorial optimization, tabu search.
3.1
INTRODUCTION
Practical scheduling and timetabling problems frequently lead to very hard combinatorial optimization problems, where one has to rely on heuristic solution methods. Tabu search (Glover and Laguna (1997)) has been used successfully in a variety of timetabling problems. General references to various practical and theoretical aspects of timetabling are the proceedings from the PATAT conferences, edited by Burke et. al. The 2003 timetabling competition was announced in 2002 by the Metaheuristics Network (http://www.metaheuristics.net/). The given challenge was to develop an algorithm for solving instances from a class of course timetabling problems within a fixed time limit. Ten test in-
66
Metaheuristics: Progress as Real Problem Solvers
stances were available from the beginning, and another ten were released two weeks before the deadline. All details about the competition and the test instances can be found on the competition homepage: http://www.idsia.ch/Files/ttcomp2002/. There were 21 participants who succeeded in finding feasible solutions to all test instances. The results we submitted gave us the fifth place in the competition, but we were at that time not satisfied with the performance of the algorithm. In this paper we present a strongly improved algorithm for the same problem and new results for the 20 test instances. The presentation focuses on a description of the method and a study of certain aspects of the behavior of the method. In particular, we have tested the efficiency of two particular local search mechanisms, and report results of these tests. The paper is organized as follows. Section 3.2 specifies the general form of the problem. Section 3.3 overviews the method we use. In section 3.4 a description of an initial solver is given together with some results on the behavior of this solver. In section 3.5 the different components of the tabu search method is presented. We present results from tests of two mechanisms in section 3.6, and general computational results are given in section 3.7. Finally there are concluding remarks in section 3.8.
3.2
PROBLEM DESCRIPTION
The problem we consider is to find a best possible (to be made precise after the definition~below) timetable within the following framework. There are 45 available timeslots, TI, T2,. . . ,Td5, nine for each day in a five day week. At any timeslot, there are NR available rooms R1, R2,. . . ,RNR . Each room has a given size, which is the maximum number of students the room can take. We are given a set of NE events El, E2,.. . ,ENE.Each event Ej has a set of attending students, Sj . Finally there is a set of room features Fl,F2,. . . ,FNF.Each room possesses some of these features, whereas each event requires some features. We will use the term place when we speak of a timeslot/room combination, i.e. a place is a pair P = (Tk,Rj). With this terminology, we seek to assign each event to a suitable place. We have a feasible solution to the problem if we have assigned all events to places, such that the following four hard constraints are satisfied: (Cl) No student attends more than one event in the same timeslot. (C2) No event has more students than allowed in the chosen room. (C3) All features required by an event are possessed by the chosen room. (C4) No place has more than one event assigned to it.
Tabu search for timetabling problem
67
To measure the quality of a feasible solution there are three soft constraints. Each violation of each of these gives a penalty point to the solution. The three possible violations are
(Vl) A student has a class in the last timeslot on a day. (V2) A student has more than two classes in a row. (V3) A student has only a single class in a day. Concerning (V2), a student has " k classes in a row" if the student attends events assigned to k consecutive timeslots. Violations of type (V2) are counted as follows. If we have a solution where a student somewhere has three classes in a row we count this as one violation. If a student somewhere has four classes in a row we count this as two violations etc. We will refer to the three types of violations as lastslot violations, serial violations, and once-in-a-day violations. The value of a feasible solution is the total number of soft constraint violations in the solution. This of course means that a solution with a lower value is better. The problem may now be precisely formulated: Given rooms, events, etc. as described above, find the best possible feasible solution within a given time limit. The rest of this paper describes a heuristic algorithm designed to solve this timetabling problem, and some computational results obtained with it.
Test instances. In the contest instances there are typically 10 rooms, hence there are 450 available places. There are typically 350400 events, 5 -10 features and 200 - 300 students. In some instances all rooms are almost equal in size and in some others the sizes vary much, for example ranging from 3 to 43 in one instance. Data for some of the test instances are given in table 3.1. Here NE,NS,NR and NF denotes the number of events, students, rooms and features respectively. Some of the events in some instances are empty, i.e. without students. It was known in advance that all the test instances has solutions with no soft constraint violations.
3.3
SOLUTION ALGORITHM
The algorithm consists basically of two parts. The first part builds a feasible solution from scratch. After an initial feasible solution is found, we employ an adaptive tabu search method to improve the solution quality by moving events around.
68
Metaheuristics: Progress as Real Problem Solvers
Table 3.1. Data for some test instances.
Definitions. The following definitions are used when we describe the details of the algorithm. For a given event E we say that a place P = (T,R) is a possible place for E, if E can be assigned to P without violating any hard constraints. For a given place P we say that an event E is a fitting event for P if E can be assigned to P without violating any of the three first hard constraints. This of course means that P is a possible place for E if and only if E is a fitting event for P and P is not occupied by another event.
3.4
CONSTRUCTIVE SOLVER
Our method requires that we must first find an initial feasible solution as a starting point for the local search. The initial solution is constructed by sequential assignment of events to places. The most important aspect of this phase is to obtain feasibility, although the constructive method also have a focus on solution quality. In particular we found that which kind of soft constraint violation was dominant in the initial solution could be controlled to some extent by changing the parameter settings used for the initial solver. The scheme for the construction is as follows.
1. Make a list L containing all unassigned events. (At first L contains all events.) 2. Pick the event E in L with fewest possible places. If there is not a unique event having fewest possible places, choose randomly among the events with fewest possible places. 3. Find a place for E. This is done as follows. Let K be the list of all possible places for E. for each P E K let q = (ql, 92,. . . ,q5) be defined as follows: ql = The number of unassigned fitting events for P. q:! = The number of taken rooms in the same timeslot as P.
Tabu search for timetabling problem q3 = The change in the number of lastslot violations created by assigning E to P. q4 = The change in the number of serial violations created by assigning E to P. q5 = The change in the number of once-in-a-day violations created by assigning E to P. One should note that q5 may be negative, since assigning E to P may actually remove once-in-a-day violations. The other numbers qj will always be nonnegative. For a vector w = (wl, w2,. . . ,w5) of weights, pick the place P E K that minimizes
If no unique P minimizes wq, a random selection is made from the minimizing places. 4. Assign E to the chosen place P. Update information about possible places and fitting events. Remove E from the list L. If L is not empty, return to step 2. If L is empty, we have a feasible solution.
5. If the process outlined in steps 1-4 fails, in the sense that at some point we have an unassigned event E with no possible place, the process is restarted, with a different random seed. The weights used in the selection above gives some control on the sequence of assignments made. Note that the weights fall naturally in two categories. The first two, wl, w2 are related to feasibility of the resulting solution, whereas wg, wq, w5 are related to the quality of the solution. We use the terms guidance weights for wl, w2 and penalty weights for w3, w4, w5.
Deciding parameter values. The values of the solutions found with the initial solver is strongly dependent on the parameter values used, so some testing was done to find parameter values that give good initial solutions for all the 20 test cases. First a test was conducted to determine values for the penalty weights w3, w4, w5. With wl = w2 = 1 fixed we varied the penalty weights using every combination of the values 0,1,3,7,30,100, lo4, lo6. For each combination, 10 runs were executed with different random seed. This was repeated on a selection of test cases. In all cases we observed large variation of the resulting values. The general pattern we saw was that better values tended to come in runs where w3 and w4 was both larger than 30 while ws was less than 10% of
70
Metaheuristics: Progress as Real Problem Solvers
the smallest of w3 and w4. For the runs where ws = 1 we tended to get very similar results with the other two weights being either 30,100, lo4 or lo6. Based on this we decided to use values 50, 50, 1 for w3, w4, ws. Then a similar test was used to determine good values for the guidance weights, and we ended up with wl = 1 and w2 = 0. The parameter w2 could not be seen to have any significant impact on the value of the initial solution, thus we decided on the value w2 = 0. It could well be that this parameter turns out to be important if the initial solver is tried on denser test cases, where the feasibility problem is harder. This is one reason for keeping the parameter in the method, even though it was not important for the given test cases.
General results on the initial solver. The scheme outlined above usually finds a feasible solution in less than a second. A restart of the method is required in less than 5% of the runs. There is one reason why the initial solver is so successful in finding feasible solutions. Note that all test instances has feasible solutions not using the last-in-a-day timeslots at all. Hence, when initially we allow the use of all timeslots, we have a feasibility problem which is usually much easier. For denser or more constrained problems there is a possibility to modify the initial solver so that information gathered in a failed attempt at creating a complete timetable can be used in subsequent restarts. See LQkketangenand Glover (1997) for examples of such strategies. With the parameter settings above, the value of our initial solutions range from approximately 350 for the easier instances up to about 700 for the harder ones. When performing many runs with different random seed on the same test instance we find solution values varying about a mean, with a standard deviation less than 10% of this mean value. The distribution of penalties between the three types of violations is also instance dependent. We find that the contribution from lastslot violations ranges from 5 to 50%, serial violations contribute with 40 to 70% and once-in-a-day violations contribute with 5 to 20% of the total penalty in the initial solution. Moreover, when a series of runs are performed on a fixed instance with different random seed, there is still large difference between the distribution of violations for different solutions. Figure 3.1 shows the observed proportions of penalties due to the three kinds of violations for 20 runs on each of the first 8 test instances. The plots show how these proportions vary between the instances, and also between individual runs. For the sake of comparison, also a plot of these proportions in solutions obtained after 480 seconds of local search is included in figure 3.2. There is on the average a slightly larger proportion of serial violations in the final solutions, and slightly lower proportions
Tabu search for timetabling problem Pmpmtion of b l o t violations in initial solution
Propmiion of&l initial solution
I
71 violations in
0,8
propdon o f o m m a d a y violations
I
Figure 3.1. Proportions of soft constraint violations in the initial solution. Pmpoaionof b l o t violationsin final solution
f,
Pmpmtim of mcsin-aday violations infinal solutim
Propntionof serial violations in 1#
, final solutim
I
I
,: ' :
0.1
! :
0.0 1
2
3
4
5
0
1
8
Ins$nce
Figure 3.2. Proportions of soft constraint violations in the final solution.
of lastslot- and once-in-a-day violations. The proportions seems to be even more variable in the final solution when comparing different runs on the same instance.
Using parameters to control violations. The fact that the weights w3, w4, w5 directly penalizes the creation of each of the three types of violations gives an option to control to some extent the distribution of the violation types by playing with these parameters. As a simple illustration of this we used the constructive solver on instance 4 using first w3 = 30, w4 = 1 and then w3 = 30, w4 = 10000, in both cases keeping the other three weights fixed at low values. In figure 3.3 the distribution of lastslot violations in the initial solution is shown for a series of runs. The left histogram corresponds to w3 = 30, w4 = 1 and the right one corresponds to w3 = 30, w4 = 10000. In figure 3.4 we show the distribution of serial violations, where the left and right histogram corresponds to the same parameter values as in figure 3.3. We see that the ratio between the parameters w3 and w4 has substantial impact on the presence of the two kinds of violations in the initial solution found. The measure of solution quality that we use gives exactly the same penalty for all three kinds of violation, but one can easily
Metaheuristics: Progress as Real Problem Solvers
I
lastslot violations
lastslot violations
Figure 3.3. Lastslot violations. Left: w3 = 30, w4 = 1, right: w3 = 30, w4 = lo4
imagine that other (real world) problems involve a measure of solution quality where penalties are different for the different type of violation, based on the preferences or needs of the decision maker. In such problems it would of course be desirable to try to avoid in particular the hardest penalized violation. We have in fact obtained initial solutions completely free from lastslot violations, but only in a very few runs on one of the instances. Another use of this option to control the distribution of violation type is that it makes it possible to rapidly produce a set of initial solutions, containing substantially different solutions. This could be useful for multistart approaches, and possibly also for population based methods where it can be important to have a diverse initial population. Scatter search (Laguna and Marti (2003)) and genetic algorithms are examples of population based methods. For applications of genetic algorithms to course timetabling see Carrasco and Pato (2000) and Erben and Keppler (1995). Let us finally remark that hard penalizing of the once-in-a-day violations by using a large value for w5, tend to give significantly poorer solutions, compared to using moderate or no penalizing. In particular, also the number of once-in-a-day violations increases substantially when w5 is the dominant weight. Relation between initial and final values. One may ask whether the value of the initial solution really affects the value of the overall best solution found after the local search phase. For our method there seems to be very little dependency between the initial and final value if we let the search go on for some time. The plot in figure 3.5 shows values of the best solution found after 90 seconds of local search plotted against the values for the corresponding initial solution, for test instance nr. 1.
Tabu search for timetabling problem
I
serial violations
serial violations
Figure 3.4. Serial violations. Left: ws = 30, w4 = 1, right: w3 = 30, w4 = lo4
Final values versus initial values 1901
LL --. 2
300
400
500
600
700
I
8
800
900
-___,-A 1000
1100
1200
Initial value
Figure 3.5. Instance 1.
The large difference in initial values here is due to the use of a variety of values for the parameters of the initial solver. The plot shows that there are virtually no dependence between the initial values and values after 90 seconds of local search. The reason for this is that the first phase of the local search rapidly improves solution quality even for the best initial solutions we find. As an example, for test instance 1,we get initial values ranging from 350 up to 1300. When applying the local search, we see that solution values are quickly decreasing to about 200, where there seems to be a limit for the very rapid improvement of solution quality. This behavior is typical regardless of initial value, the only difference is of course that it takes some more time to go from 1300 to 200 than from 350 to 200.
74
Metaheuristics: Progress as Real Problem Solvers
3.5
LOCAL SEARCH
To improve upon the initial solution we use an adaptive tabu search variant. We use two types of moves, and a reactive procedure to adjust the tabu tenure. The overall structure of the search is as follows. 1 Start with an initial solution s.
2 Examine solutions s' in a neighborhood N ( s ) of s. 3 Move to a selected solution s' E N ( s ) .
4 Set s = s' and register if s is the best solution found so far. 5 Regularly inspect the recent history of the search to detect signs of stagnation or rapid fluctuation in solution values. Adjust the tabu tenure based on what signs are found. If the process runs for a long time without making improvements, adjust other relevant search parameters. 6 If there is more time left, return to step 2.
7 At the end of the time limit, return to the best found solution and do a greedy search from there. The various components of the method are discussed in the following paragraphs.
Moves and move neighborhood. We denote by s a feasible solution to the problem, that is, a complete timetable satisfying all hard constraints. To examine a part of the solution space surrounding s we use the following types of moves. Relocate move: Take one event E and move to a different place. Swap move: Take two events Ei,Ej and interchange their places.
A move is then either a relocate move or a swap move. Only moves preserving feasibility are considered throughout the search. For a solution s we have different neighborhoods:
Nrel( s ) ,consisting of all solutions reachable from s by one relocate move. NSwq(s),consisting of all solutions reachable from s by one swap move, and N ( s ) = Nrel( s )U Nswq ( s )consisting of all solutions reachable from s by one move of either type.
Tabu search for timetabling problem
75
Let V(s) denote the value of a solution s. When performing a move, we get a different solution sf. The value of the move is the change in solution value i.e. V(sl) - V(s). This means for example that a move with value -1 slightly improves solution quality.
Tabu criterion. To keep the search process from getting stuck in local minima we employ a tabu criterion for events using a variable tabu tenure. One basic component of this is what we call the dynamic tabu tenure Td. This value is adjusted frequently, using rules discussed below. If an event E is involved in a relocate move we assign to it an event specijk tabu tenure TE which is simply TE = Td + r where r is a random integer in the range [-10,101. If two events Ei,Ej are involved in a swap move, we assign to them event specific tabu tenures by the rule TEi = Td r, TEj = Td - r. When the event E is given the tabu tenure TE, we mark the event as tabu until TE new moves are performed. The tabu status is used to exclude recently moved events from being involved in new moves in the following way.
+
Relocate move: If an event E is marked tabu, it can not be involved in a relocate move, unless a relocate move leads to a new overall best solution. Swap move: If both events Ei,Ej are marked tabu, they can not be swapped. This means that relocate moves can be selected by the aspiration criterion of finding a new best solution, and that a tabu marked event Ei can be involved in a swap move only if it swaps with a nontabu event Ej.
Move selection. At each iteration we select what move(s) to do as follows. (Here "best move" means the move with lowest move value) 1 For each event E evaluate all possible relocate moves involving E and register the best relocate move for E. Ignore moves that place E in the last timeslot of a day. If more than one move gives the best value, make a random choice between the best moves. 2 Make a list RelocCand containing, for each event, the best relocate move found. This list normally also contains moves with events marked tabu.
3 For each event E evaluate all possible swap moves involving E and register the best swap move for E. If more than one move gives the best value, make a random choice between the best moves.
Metaheuristics: Progress as Real Problem Solvers 4 Make a list SwapCand containing for each event, the best possible swap move found. This list contains only swaps with at most one event marked tabu. 5 Select a relocate move BestRelMove from RelocCand. This is either the overall best move in RelocCand, if this improves on the current best solution value. Otherwise it is the best move in RelocCand involving a nontabu event. (Using random selection if there are several equally good moves.)
6 Select a swap move BestSwapMove from SwapCand. This is simply the best move in SwapCand. (Using random selection if there are several equally good moves.) 7 There are two places Pfr, and Ptoassociated with BestRelMove and two places PA,PB associated with BestSwapMove. If Pfrom and Pto are in other days than PA,PB, select both moves. If the days collide, select BestSwapMove if it is strictly better than BestRelMove. Otherwise select BestRelMove.
Remark: The move selection scheme implements two particular mechanisms to possibly improve the efficiency of the search. In point 1, note that any relocate move taking an event to a timeslot in the end of a day is prohibited. We call this lastslot locking. In point 7, note that under certain circumstances we perform two moves after one round of move evaluations. We call this a double move option. If the two moves involve separate days, it is easy to update solution value based on the values of the two moves, otherwise the whole resulting solution would have to be (timeconsumingly) re-evaluated. This is the reason for not always performing both moves. Each time a move is performed, an iteration counter is increased by 1, and when the double move option is used, the iteration counter is increased by 2.
Adjusting the dynamic tabu tenure. The value of the dynamic tabu tenure Td is updated every Ntt iterations, and the adjustment is based on the behavior of the search for the last Ntt iterations. The idea is simply that we increase Td if the variation of solution values seen over the last Ntt moves is smaller than some limit, otherwise we decrease Td. The basic motivation for this strategy is simply that a small variation of solution values over a time interval indicates that the search is stagnating, possibly cycling near a local minimum or exploring a "flat" region of the solution space. Increasing the tabu tenure can force the search to be less repetitive in its behavior, possibly escaping local minima. On the other hand, if the variation in solution values is large, we have an
Tabu search for timetabling problem
77
indication that the search is in a phase where solution values are either deteriorating rapidly or improving rapidly. In any case, something interesting is going on, and the tabu tenure is reduced to help focus the search in this phase. It is not at all clear what should be taken as a "small" or "large" variation in this setting. The adjustment procedure below implements a dynamic limit between "small" and "large" variation. This limit depends on the current best solution value found, the number of tabu tenure adjustments already performed and also on eventual long term stagnation of the search. One very important result of using this adaptive procedure is that it allows the average tabu tenure used on different test instances to be very different, typically it can be 40 for one instance and 90 for another one. This seems to be highly important, as all our experiments with a fixed tabu tenure gives very poor performance on some of the test instances. Some definitions are appropriate to explain the method. To ease the reading of this, we give some approximate values for certain parameters. The actual values given are not a part of the definition of the method, but they should give the reader a better idea of what the different parameters are for. Ntt x 200 is the number of iterations between tabu tenure adjustments. span is the difference between the highest and lowest solution value seen in the last Ntt iterations. (See figure 3.6) Nu is the number of times Td has been updated. M and m are fixed limits for the span, m x 20, M x 100. L, is the limit for the span used in the current update. a x 0.2,P x 0.9, y x %,Tadd x 10 and TWlt x 0.75 are fixed parameters for the search.
Cb is the current best solution value found. The adjustment is carried out as follows. At the start of the search, Td is assigned an initial value Tinit = 80. Every Ntt iterations, 1 Calculate the span
2 Compute the number Lo = Cba(l
+ yPNu).
3 Let L, = max(m, min(Lo, M)). (i.e. if m 5 Lo 5 M we get L, = Lo.)
Metaheuristics: Progress as Real Problem Solvers
l rooo
200
400
Iterations 1600
8W
1000
0 12w
Figure 3.6. Visualizing the span.
+
4 If span < L, let Td= Td Tadd(increase). Otherwise, let Td= TmultTd (reduce).
Remark. The limit Lo is a certain percentage of Cb,and this percentage is reduced gradually as Nu increases. The motivation for this is that in the start of the search we have a relatively poor solution, and we want the search to bypass all local minima close to this solution. Thus, we initially try to force the search to exhibit large variation in the values of visited solutions. After some time we are hopefully in more promising regions of the solution space where we want to focus the search. This we try to achieve by reducing the limit Lo gradually as described. If a large number NStag of iterations are seen without improvement of the solution value, Nu is reset to 0, and the percentage starts at its original value again. This is assumed to help diversifying the search. Parameter values for the local search. A series of tests were performed in order to tune the parameter values. These tests are simple in the sense that each test consists of performing a number of runs varying a few of the parameters, and then fixing values for these parameters that gives the best average behavior of the search. In this way parameter values are determined successively, based on other already fixed parameter values. This method of testing may leave some potentially good combinations of parameter values untested, but our preliminary testing and experience with the algorithm together with the tuning tests indicate that the found parameter values are not far from optimal. One should also bear in mind that the determination of parameter values for
Tabu search for timetabling problem
79
the algorithm is a problem that depends heavily on the time limit used. The parameter values given below are all based on tests with a time limit of 300 seconds. These are the values resulting from the testing.
Looking back at the adjustment scheme, the chosen parameter values determine the important value Lo which is used as a limit for the observed span. At the start of the search, we get Lo = Cb0.15(1+2) = 0.45Cb. After 2500 moves we have Nu = 10 and Lo is now Cb0.15(1 2 . (0.90)'~)= 0.255Cb. For each 250 iterations Lo is reduced, until we see Nstag= 5000 moves without improvement of the current best solution found. Then Lo is set back to 0.45Cb and the search goes on with a call for larger variation in the values of visited solutions.
+
Typical search behaviour. The two graphs in figure 3.7 and 3.8 are included to give an illustration of the progress of the local search. These are runs of 15 minutes which is about twice the time allowed for the competition. The trajectory in figure 3.7 is very typical. At first there is a steep descent stopping at some instance specific level after about 500 - 1000 moves. Thereafter the search may have to climb uphill a bit to find new promising areas. For the next 10 000 moves or so improvement comes in smaller chunks, until stagnation sets in. In the specific run shown, the stagnation limit at 5000 nonimproving moves is reached at about 14 000 iterations. At this point the adjustment method is reset to call for greater variation in solution values. After a climb going above the initial stagnation value, some new better solutions are found. The trajectory in figure 3.8 is less typical in that improvement in small chunks goes on for a relatively long time. There are several high climbs, and the climbs at about 15 000 and 27 000 moves are preceded by a reset of the adjustment method due to long term stagnation. These climbs are eventually followed by some improvement in solution value.
3.6
COMPARING EFFICIENCY
This section contains results of tests carried out in order to examine the efficiency of some of the implemented mechanisms.
Metaheuristics: Progress as Real Problem Solvers
80
Figure 3.7. Instance 2, 15 min.
Figure 3.8. Instance 5, 15 min.
Table 3.2. Mean values withlwithout double move, 300 sec. Instance DMoff DMon Gain in %
1 98.6 92.0 6.7
2 82.7 72.2 12.6
4 261.5 242.8 7.2
Double move option.
5 270.2 239.4 1.3
6 146.4 138.7 5.2
7 157.1 134.1 14.6
12 190.6 172.4 9.5
17 182.7 179.6 1.7
In the paragraph on move selection above, an option to execute both a relocate move and a swap move, based on one round of move evaluation is described. The simple idea behind this is that both the selected moves will normally be "good" moves, and the double move option thus allows the execution of more moves in a fixed time. It is not obvious that this has any positive effect, hence testing is appropriate. For investigation, 8 of the test instances were chosen for this test, which simply consisted in running the search a number of times with the option enabled or disabled, and comparing the resulting values. It is also conceivable that the option may be effective when the time limit is short, but not when there is more time available. Thus the tests were performed with time limits 60, 300 and 600 seconds. For each instance and each time limit5 10 runs with and 10 without the double move option were executed. The results clearly shows that the double move option is significantly improving the search efficiency for all the three time limits tried. Table 3.2 shows the mean of the values obtained in 10 runs, using 300 seconds as the time limit. Here "DM off' are the runs without the double move option, "DM on" are the runs with it. The last row shows the improvement in mean values given in percent.
Tabu search for timetabling problem Double move
+ Not used
+
I
'
I
5 6 instance
Figure 3.9. Effect of using double move option in runs of 300 seconds.
In figure 3.9 the values from the individual runs on the 8 instances are shown. The mean values in table 3.2 are based on these individual values.
Lastslot locking. When selecting a relocate move, the move selection procedure described above implements what we call lastslot locking. This means that any relocate move attempting to move an event to the last timeslot of a day is prohibited, unless the event has no students. The motivation for this mechanism is simply that the moves we prohibit in this way are always giving a solution with more lastslot violations, and by excluding these moves directly we save some time on move evaluation, and in addition we ensure that no more lastslot violations are created. On the other hand, lastslot locking clearly gives fewer relocate moves to choose between, and we risk to lose efficiency by making the search less flexible. To examine the effect of lastslot locking, a test similar to what we did for the double move option was conducted. With the same 8 instances, the search was run for 300 seconds, 10 times with lastslot locking, and 10 times without. The values we obtained does not show any significant difference in the performance of the search when the lastslot locking is enabled or disabled. Thus it appears that this mechanism has little or no impact on search efficiency for our method. From experiments we find that the number of moves executed in a fixed time is usually higher with lastslot locking enabled, but it also happens that even when starting from the same initial solution, more moves are executed when running with lastslot locking disabled. This means that the lastslot locking can actually slow down the search, which is the opposite of one of the main motivations for using it in the first place.
82
Metaheuristics: Progress as Real Problem Solvers
We also examined whether the use of the lastslot locking had any impact on the proportion of lastslot violations in the final solution. Again it was not possible to find significant difference in this proportion, when comparing solutions obtained with and without the locking enabled. A reasonable explanation for this is that when the locking is enabled, there is an active prohibition against creating new lastslot violations, but there is no extra effort set in to remove existing such violations.
3.7
COMPUTATIONAL RESULTS
We present results from our algorithm together with the best results reported in the timetabling competition. The participants in the competition were allowed to run their algorithm on each instance as many times they wanted with different random seed and report their best result. This clearly makes comparison of the quality of the algorithms difficult, since the competition results are in effect the results obtained by using a multi-start algorithm with no limit on (or report of) the total running time. Our results here are obtained as follows. The algorithm was run 20 times on each of the 20 test instances, with fixed parameter settings as given above. Each run was performed on a PC with a 2.6 Ghz pentium IV processor, and the time limit was set to 8 minutes, the same as for the competition runs. We report the best result and the mean result obtained on each instance with the present version of our algorithm in these 20 runs. We believe this is a meaningful way of reporting results, not exploiting the possibility of improving results by conforming to the competition rules. The winning algorithm uses an initial solver based on graph coloring techniques, followed by a local search using a variant of simulated annealing for guidance. It was developed by Philip Kostuch at the University of Oxford. On 13 of the 20 instances his algorithm found the best result of all participants. Descriptions of his and other algorithms can be found on the competition homepage. In second place came an algorithm developed by Jean-Franqois Cordeau, Brigitte Jaumard and Rodrigo .Morales (JCM). They use an initial solver developed by Jonker and Volgenant for general assignment problems. Then, to improve on the initial solution they use a tabu search which contrary to our method also allows visiting infeasible solutions. The third place was taken by Yuri Bykov, using an algorithm called "The great deluge local search", and the fourth place was occupied by Luca Di Gaspero and Andrea Schaerf (GS), who also used a tabu search method with a dynamic tabu tenure. Also results comparable to those of Kostuch was found by a group connected to the metaheuristic network, who were not allowed
Tabu search for timetabling problem Table 3.3. Best results, instance for instance.
Table 3.4. Mean scores. Method Mean score
I 1
Kostuch 50
1 1
JCM 76
I Bykov I
GS
77
106
1
1
I AL 1
97
to participate, being too closely associated with the organization of the contest. Table 3.3 shows results instance for instance for Kostuch and JCM, compared to our new results (AL). The table also includes our mean result on the 20 runs on each instance (AL mean). Table 3.4 shows the mean result for all 20 test instances obtained with the different algorithms, and figure 3.10 shows all results for the five algorithms mentioned.
3.8
CONCLUSIONS
We have implemented and tested a tabu search heuristic for a class of timetabling problems. For the 20 test instances we obtain good solutions, comparable to the other tabu search algorithms in the competition. The best known results for the test cases are still substantially better than ours. Our initial solver has proven to be reliable and fast for finding feasible initial solutions. We see that the internal distribution of violation types in the initial solution can be controlled by selecting the right parameter value combination. Some potential benefits from this are mentioned in section 3.4. The local search method we propose is able to improve significantly on solution quality, and it is successful in escaping poor local optima. The search method is robust in the sense that finding a good final solution is not dependent on having a good initial solution. The implementation of an adaptive adjustment scheme for a dynamic tabu tenure makes the search perform well on all test instances, in particular
Metaheuristics: Progress as Real Problem Solvers
Comparison of results
JCM Kostuch
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
~
1 2 3 4 5 6 7 8 91011121314151617181920
Instance Figure 3.10. Overall results
it allows the average tabu tenure during the search to be different for different instances. More experimental research remains to be done to find possibly more effective and robust schemes for adjusting the tabu tenure. We have specifically tested two components of the search method. These tests revealed that the option to the execute two noninterfering moves in one iteration step had a significant effect on search efficiency. The use of an active prohibition against moving events to end-of-a-day timeslots could not be seen to have any effect on search efficiency.
REFERENCES Burke, E., Carter, M. De Causemacker, P., Erben, W. and Ross, P. (Eds.): Proceedings of the International Conference on the Practice and Theory of Automated Timetabling I-IV, (4 vols.), Springer Verlag. Carrasco M. P. and Pato, M. V. (2000): A Multiobjective Genetic Algorithm for the Class/Teacher Timetabling Problem. In: Proceedings of the 3rd International Conference on the Practice and Theory of automated Timetabling, Springer Verlag, pp. 3-17. Erben W. and Keppler J. (1995): A Genetic Algorithm Solving a Weekly Course-Timetabling Problem. In: Proceedings of the 1st International Conference on the Practice and Theory of automated Timetabling, Springer Verlag, pp. 198-211.
Tabu search for timetabling problem
85
Glover, F. and Laguna, M. (1997): Tabu Search. Kluwer Academic Publishers. Laguna M. and Marti R. (2003): Scatter Search - Methodology and Implementations in C. Kluwer Academic Publishers. Lgkketangen, A. and Glover F. (1997) Surrogate Constraint Analysis - New Heuristics and Learning Schemes for Satisfiability Problems. In: Satisfiability problems: Theory and Applications. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, vol. 35.
Chapter 4 AN INVESTIGATION OF AUTOMATED PLANOGRAMS USING A SIMULATED ANNEALING BASED HYPER-HEURISTIC
Ruibin Bai and Graham Kendall Automated Scheduling, Optimisation and Planning (ASAP) Research Group, School of Computer Science & IT, University of Nottingham Nottingham NG8 IBB, UK
Abstract: This paper formulates the shelf space allocation problem as a non-linear function of the product net profit and store-inventory. We show that this model is an extension of multi-knapsack problem, which is itself an NP-hard problem. A two-stage relaxation is carried out to get an upper bound of the model. A simulated annealing based hyper-heuristic algorithm is proposed to solve several problem instances with different problem sizes and space ratios. The results show that the simulated annealing hyper-heuristic significantly outperforms two conventional simulated annealing algorithms and other hyper-heuristics for all problem instances. The experimental results show that our approach is a robust and efficient approach for the shelf space allocation problem. Key words:
Hyper-heuristics, simulated annealing, shelf space allocation, planograms.
4.1 INTRODUCTION The retailing sector in the UK is an extremely competitive arena. We only need to consider some high profile companies to show that this is the case. A particular example is provided by the recent decline of Marks and Spencer, who were the leading high street retailer (and in recent years they are starting to show an improvement in their profitability). A M h e r example is given by C&A's decision to close all of its high street outlets. Yet another example is the decline of J Sainsburys from its position as the
88
Metaheuristics: Progress as Real Problem Solvers
leading food retailer in the UK in the 1990's (in 1996, Tesco opened up a 2% lead over their rivals and continue to maintain an advantage). Asda, after merging with Wal-Mart, increased its market share dramatically and overtook Sainsbury's as the second biggest supermarket in the UK. In July 2003, Asda had gained 17% of market share, while Sainsbury's had slipped from 17.1% to 16.2%. Tesco retains the top spot with 27% of the overall market share. Finally, there was a battle over Safeways, which was recently up for sale. This level of competitiveness is unlikely to decline. On the contrary, the high street (or more likely, out of town shopping centres) is likely to become even more competitive. b ,
. ~
,-
,
. -'.
.-I'
..
-
.-... '--.,,,,,: ~
'
:....I
1 ..-.I.,
1
~~-
.- -. --
,
*.," ,.,. ,
~.,.....,.~,~.,",x, ..,.,,,,.... "," . - , -3
*,.,w"
~
~
~
.
p i r r r l m =
.c-u..: .v4- --.. -
-
.
''
.
&--I
-,-
-
Figure 4.1. An example of a simple planogram
Several factors are used to influence consumers' purchases, including product assortment (which merchandise to sell), store layout and space planning, merchandise pricing, services offered, advertising and other promotional programs [21]. Store layout and space planning focuses on the improvement of the visual effect of the shopping environment and space productivity. Planograms (see figure 4.1 for an example) are used to show exactly where and how many facings of each item should physically be placed onto the store shelves. Due to the limited shelf space, planograms are one of the most important aspects that are used to improve financial performance [31]. Electronic planograms can be also used for inventory control and vendor relation improvement [21]. However, generating planograms is a challenging and time-consuming process because the simplest form of planogram problem (ignoring all marketing and retailing variables) is already a multi-knapsack problem, a well-known NP-hard problem which is very difficult to solve. The difficulty is further increased when we consider other merchandise, such as fresh food, clothing and frozen food. This is due to their special display requirements and the fact that they do not use standard shelf fitments. Currently, producing planograms is largely a manual process (there is software assistance available (e.g.
Investigation of automatedplanograms using SA based hyper-heuristic
89
Galaxxi) but it involves significant human interaction and does not provide any guidance or suggestions in deciding a good quality layout) and the shelf space allocation is mainly based on historical market share. However, this approach may lose substantial sales [2] as the display space may have different sales influence with respect to different items [ l l , 12, 14, 201. Using the same display space, different items may obtain different sales and hence affect the profits of the organisation. A recent publication [31] conducted a survey of the area. This work demonstrated the lack of academic work that has been conducted in this domain. Only twelve references were cited. Five of these date back to the 197OYs,four were drawn from the 1980's and only three were from the 1990's. It seems timely that this area should receive research attention, given the recent advances in A1 search techniques. At present, commercial systems use simple heuristic rules to allow retailers to plan their shelf space allocation [32]. Some research [2, 261 has proposed models which integrate product assortment, inventory control management and shelf space allocation. However, these models are too complicated to put into practice. Yang [30] used a model based on a knapsack problem and presented a heuristic to solve some numerical instances of shelf space allocation problems. However, the linear objective function assumption does not fit well with the real world retailing environment. Planograms are a subset of the wider domain of space planning which includes more well known research areas such as bin packing and knapsack problems [31]. Some of techniques that have already been successfully applied to problems within this wider domain may also be promising to shelf space allocation problems.
4.2 RELATED WORK 4.2.1
Experiments and studies
Due to the scarcity of space within stores, some researchers have concentrated on studying the relationship between the space allocated to an item and the sales of that item. Most have reached a common conclusion that a weak link exists between them and the significance depended on the type of items [l 1, 12, 14, 16, 201. Earlier, in 1969, Kotzan and Evanson [20] began to investigate the relationship between the shelf space allocated to an item and the sales of that item and found that a significant relationship existed within the three tested drug stores. Cox's research [ l l ] found that
90
Metaheuristics: Progress as Real Problem Solvers
this relationship was very weak and depended on the category of products. However, his experimental results may be affected by limited experiment brand samples (only two brands are measured for each of the two categories). Curhan [12] defined the space elasticity as "the ratio of relative change in unit sales to relative change in shelfspace" and argued that there existed a small, positive space elasticity for each item but the value depended on the products, stores and in-store layout [13]. Drkze et al. [16] carried out a series of experiments to evaluate the effectiveness of shelf space management and cross-category merchandise reorganisation. The shelf space manipulation included changing product facings, deletion of slow moving items, changes of shelf height, etc. Cross-category merchandise reorganisation included manipulation to enhance the complementary shopping within merchandise assortment and easier shopping. The results showed that, compared with the number of facings assigned to a brand, location had a larger impact as long as a minimum inventory (to avoid outof-stocks) was guaranteed. On the contrary, recent research [14] showed that direct space elasticities were significantly non-zero and varied considerably through different categories. Costume jewellery, fruit and vegetables, underwear, shoes were among the highest space elasticities while textile, kitchen and do-it-yourself products had low values. If the products are always available and the consumers would never switch to another brand, the change of space allocated to an item has no effect on its sales [2]. However, in fact, nearly half of the consumers would switch to other stores or change their previous choice to an alternative brand if their first choice is out-of-stock [28]. On the other hand, the purchase of some merchandise could increase the possibility of buying other merchandise with the complementary h c t i o n s (for example, a customer who bought a toothbrush may also buy toothpaste). Cross elasticities were introduced to evaluate the interdependence between two different items in Corstjens and Doyle's model [7]. Borin et al. [2] and Urban [26] also used cross elasticities in their models but with different definitions. In Borin et al.'s model, the cross elasticities were in the range [-I, 01. Urban extended the range of cross elasticities to [-I, 11. It was positive if two items were complementary and negative if they could be substituted for each other. Although cross elasticities are helpful in revealing the relationships between different items, it is quite difficult to obtain a reliable estimation of so many values ( n x n for n items) due to the complicated merchandise relationships. Therefore, recent researchers disregarded it in their models [14,27]. Display location is another factor that has been studied. Campo et al. [5] investigated the impact of location factors on the attractiveness of product categories and stated that the sales of the whole store were dependent on the intrinsic attractiveness based on category, store and trading area
Investigation of automated planograms using SA based hyper-heuristic
91
characteristics as well as cross elasticities between the categories. However, the model did not consider the difference in visibility or prominence between various locations in the store.
4.2.2
Shelf space allocation models and searching methods
Several space allocation models have been proposed by market researchers. Most formulated the demand rate of an item as a function of the space allocated to the item, of which a classic model appears as a polynomial form proposed by Baker and Urban [I]:
where D(x) is the demand rate of the product, x is the number of facings or the displayed inventory. a is a scale parameter and P is the space elasticity of the product. The advantageous characteristics of this model include the diminishing returns (the increase in the demand rate decreased as the space allocated to this shelf increased), inventory-level elasticity (the shape parameter represents the sensitivity of the demand rate to the changes of the shelf space), intrinsic linearity (the model can be easily transformed to a linear function by a logarithmic transformation and parameters can then be estimated by a simple linear regression) and its richness. Corstjens and Doyle [7] formulated their model as a multiplicative form and incorporated both the space elasticities and cross elasticities. The inventory and handling cost effects were also considered. The model allowed different product profit margins corresponding to different locations and hence captured the location impact on the sales. However, due to the characteristic of the polynomial function, this model tends to scatter the facings of each item into different locations in order to obtain a larger objective function value. Based on this model, some non-space factors were also taken into account by Zufjrden's model [32], such as price, advertisement, promotion, store characteristics, etc. A dynamic programming approach was proposed to solve this model. However, this approach ignored the integer nature of the number of facings of the items and hence only produced suboptimal solutions. Some integrated models were also proposed based on the correlation of retailing decision process [2, 261. Borin et al. [2] developed a different model which tried to maximise the category return on inventory. This model was supposed to help the retailer to decide which products to stock (products assortment) and how much space should be allocated to them. The demand function was formulated into three components: unmodified demand, modified demand and acquired demand. Unmodified demand represented the customers' direct preference of an item and was calculated according to its
92
Metaheuristics: Progress as Real Problem Solvers
market share. Modified demand took account of the interdependence and substitution of different merchandise. Acquired demand represented the indirect demand captured from those products which were excluded from the assortment. A heuristic procedure, based on simulated annealing, was employed to optimise the model. The neighbourhood was defined by exchanging one facing of two random items. The result showed that simulated annealing was more efficient and flexible compared with the shelf allocation rule based on the share of sales (a common space allocation rule). The above-mentioned models used the number of facings to foresee the demand quantity of that item. However, the effect of part-stocked items (some facings are missing) was not explicitly reflected. Urban [26] replaced the number of facings with average inventory in his model which integrated existing inventory-control model, product assortment model and shelf-space allocation model. A greedy heuristic and a genetic algorithm (GA) were proposed to solve the problem. A GA chromosome represented a given product assortment vector (i.e. "0":excluded, "1": included). The violations of some constraints were allowed in the initial solutions and then repaired by scaling down the number of facings of each item and their order quantities. However, the GA operations (crossover and mutation) were applied to only produce a good product assortment based on the given objective function. No procedure was carried out to evolve a good space allocation decision. The drawback mainly results from the fact that the model includes many parameters and is difficult to be optimised by current A1 search techniques. In fact, Yang [30] argued that: "$or commercial models, a very important criterionfor selecting a space allocation method is the simplicity and ease of operation of the method". He proposed a simpler linear model based on Zufjrden's work [32], by assuming that total net profit was linear with the number of facings of an item. However, this is unrealistic for the real world retail environment. A greedy algorithm, in conjunction with three simple heuristics, was proposed to optimise the model. However, only several numerical examples were used to justify the algorithm and they are far from the real world shelf space allocation problems which are usually much larger and more complicated. In addition, the three heuristics rejected all "bad moves" (a decrease in the objective value for a maximisation problem). The algorithm, in fact, worked in a random greedy fashion and was easily trapped in local optima.
Meta-heuristics have been intensively investigated and applied to a wide variety of applications in the last twenty years, including scheduling, production planning, resource assignment, supply chain management,
Investigation of automated planograms using SA based hyper-heuristic
93
decision support systems and bio-informatics [18, 241. Most of these applications require a thorough study of the problem and a fixed problem definition. Many of the publications also reported that these algorithms perform very well in solving their specific problems. However, once the problem changes (even slightly), the performance of the already developed meta-heuristic may decrease dramatically for the new problem. Significant parameter tuning may need to be carried out for the purpose of adapting the algorithms to the new problem or the new problem instance. It should also be recognised that real-world problems are subject to changes due to them reflecting changes in the business requirements either by management decisions or other factors, such as trading conditions, research and development, employing new technology etc. The "No Free Lunch Theorem" [29] showed that there is no one algorithm that could beat all other algorithms in all classes of problems. If an algorithm outperforms other algorithms on a specific class of problems, there must exist another class of problems on which this algorithm is worse than the others. Hence, a good way to raise the generality of meta-heuristics is to apply different (meta-)heuristics at different times of the search. In this context, a generalised approach (termed hyper-heuristics) is proposed [3] which "broadly describes the process of using (meta-)heuristics to choose (meta-)heuristics to solve the problem in hand'. This approach differs from the more usual meta-heuristic approach, which operates over the solution space directly. A hyper-heuristic approach operates over the solution space indirectly by searching the heuristic space. In this approach, there is a set of "low-level heuristics" that are designed for the problem to be solved. Another heuristic, a high-level heuristic, operates over the low-level heuristics. From an initial solution, the high-level heuristic leads the search to a good quality solution by making calls to the low-level heuristics. The benefit of this approach is two-fold. Firstly, once the high-level heuristic algorithm has been developed, a new problem can be solved by replacing the set of low-level heuristics and the objective function, which is used to evaluate the quality of the solutions. Secondly, the high-level heuristic can adapt itself in order to tune to the new problem, or even a new problem instance. The application of hyper-heuristic approaches can be traced back to the 1960's although the term "hyper-heuristic" was not used. Fisher and Thompson [17] used an unbiased random process to combine two rules/heuristics to solve a job-shop scheduling problem and the results showed that even this simple combination of rules produced much better results than any of them used separately. Recently, Hart et al. [19] solved a real world chicken factory scheduling problem using a GA based hyperheuristic. The problem involved scheduling the collection and delivery of chicken from farms to its processing factories. The problem was
94
Metaheuristics: Progress as Real Problem Solvers
decomposed into two stages and two separate GAS were used to tackle the problem. In the first stage, the orders were split into suitable tasks and these tasks were then assigned to different "catching squads". The second stage dealt with the schedule of the arrival of these squads. The GA chromosome in the first stage represented a sequence of orders, a set of heuristics to split each order into suitable sized tasks and another set of heuristics to assign these tasks to the different "catching squads". The GA was used to evolve a strategy of building a good solution instead of finding the solution directly. The experimental results showed this approach is fast and robust and easy to implement. Another GA based hyper-heuristic framework was also proposed by Cowling et al. [9] in solving a trainer scheduling problem. Here, a GA chromosome represented an ordering of the low-level heuristics that were going to be applied to the current state. A good sequence was evolved during the search corresponding to the given problem instance. The computational results showed that the GA based hyper-heuristic outperformed both a conventional genetic algorithm and a memetic algorithm which directly encoded the problem as a chromosome. Recently, Ross et al. [25] proposed a different type of hyper-heuristic based on a genetic algorithm. The problem is one dimensional bin packing. Instead of working on feasible solutions as the hyper-heuristics mentioned above do, the proposed hyper-heuristic in this paper operates on a partial solution and gradually constructs the solution using different rules (heuristics) until a feasible solution is obtained. The heuristic selection is based on the state of current partial solution. Each state associates a rule or heuristic whose relationship with solution states is evolved by a genetic algorithm. The chromosomes of their GA are defined as a set of blocks and each block contains a set of parameters which is used to define a solution state and its corresponding heuristics. The algorithm is firstly trained on parts of benchmark problems. After the training, the fittest chromosome is then applied to every benchmark problem, 80% of which are solved to optimality. Yet another kind of hyper-heuristic used the ideas of reinforcement learning to guide the choice of the heuristics during the search [8,231. In [8], a sales summit scheduling problem was solved by a "choice function" based hyper-heuristic, in which the choice function dynamically selected suitable heuristics at each decision point. The computational results showed that the choice function based hyper-heuristic performed better than applying the heuristics randomly. Nareyek [23] used a non-stationary reinforcement learning procedure to choose heuristics in solving the Orc Quest problem and the Logistics Domain problem. The author discussed the advantages of the hyper-heuristic approach, especially in solving complex real-world problems in which the computational cost is expensive. Burke et al. [4] applied a tabu search based hyper-heuristic to a nurse rostering problem and a university course timetabling problem, in which the set of
Investigation of automatedplanograms using SA based hyper-heuristic
95
heuristics were ranked according to their performances in the search history. A tabu list is also incorporated to prevent the selection of some heuristics at certain points in the search. The remainder of this paper is organised as follows: in the section 4.3, we give a description of the problem and formulate it as a non-linear combinatorial maximisation model. Section 4.4 will focus on the implementation of our simulated annealing hyper-heuristic. Section 4.5 gives the experimental results, together with some analysis. Section 4.6 concludes the paper.
4.3 MODEL FORMULATION
4.3.1
Model formulation
The problem we are solving is the assignment of appropriate shelf space to every stock-keeping unit (SKU) in a given product category, without violating the given constraints, whilst maximising the overall profit. Each stock-keeping unit is defined by a five-tuple ( 1, ,pi ,Pi ,L, ,Ui ) where 1, (respectively, pi , Pi , Li , Ui ) is the length (respectively, profit, space elasticity, lower bounds, upper bounds) of item i. The length of shelf j is denoted by Ti . We assume that: 1) Retailers prevent out-of-stock occurrences. 2) The total profit of item i is proportional to its unit profit p i . 3) We ignore the physical constraints in the other two dimensions (height and depth). We employ Urban's [26] demand function and disregard the cross elasticities not only because they are quite small compared with space elasticities but also because it is quite difficult to obtain a reliable estimation of them. Based on the assumptions we discussed earlier, we have the following space allocation model Maximise P = subject to:
xi"_,
(p,aix,P' )
96
Metaheuristics: Progress as Real Problem Solvers
where m is the number of shelves and n is the number of items. The decision variables are x,, representing the number of facings of item i on shelf j and xi = x L , x , is the total number of facings of item i. ai is a scale parameter and ai>O. Constraint (4.3) ensures that the length of a shelf is greater than the total length of the facings assigned to this shelf. Constraint (4.4) ensures that the lower and upper bounds of the number of facings for each item are satisfied. Constraint (4.5) ensures that the number of facings for each item is an integer. The objective is to maximise the overall profit without violating the given constraints. The model is a non-linear, multiconstraints optimisation problem. If Pi+ 1 , the model degenerates into a multi-knapsack problem.
4.3.2
Upper bound of the model
As shelf space allocation cannot be solved to optimality in polynomial time [2], we usually do not know the optimal solution and hence cannot evaluate the quality of a given solution by comparing it with the optimal solution. Yang [30] compared his results with the optimal solution obtained by carrying out a complete enumeration. However, this method is only suitable for very small problem instances. For a shelf space allocation problem with n items (each item has an upper bound of facings U ) and m shelves, it requires Urn""iterations to find the optimal solution using an exhaustive search. Even for a small problem instance: n=6, m=3, U=6, this could take around 40 years, an extremely unrealistic computing time for a practical application. Another common method is to relax the problem to a simpler one and obtain the upper bound of the objective. In this paper, we use a two-stage relaxation to get an upper bound of the model:
0
1 2 3 4
5 6 7 8
9101112
Figure 4.2. Approximate objective with a linear function
Stage 1: we first relax our non-linear model to be a linear model. This is accomplished by applying a linear Taylor expansion at the point 7
Investigation of automatedplanograms using SA based hyper-heuristic
97
( L , IF.5 U,)(as illustrated in figure 4.2). The model hence becomes an integer programming (IP) problem: maximise
=
zn r=l
pi a, . (Pi -
or maximise
4, =
4Pi-O
X,
. (xi-X,)+-X,")
(4.6)
x:=,
(AX,+ B, )
subject to the constraints (4.3), (4.4) and (4.5), where A, = p i.ai.pi .$'-I) . . Suppose X*= (x;, x; ,..., x:) is and Bi = pi - a, .qSi- pi .a, .pi . the optimal solution for the original model (4.2) and P*is its corresponding optimal objective value. 4; is the optimal objective value for the IP model (4.7). From figure 4.2, we have:
hence, the gap between f$ and P* is no less than:
From equation (4.9), we can see that the closer is to x;, the smaller the gap is. In order to keep Gl as a small value, we let 3 = xi where X'= (xi, xi ,...,x:) is the best solution found by the algorithms (see section 4.5). Stage 2: based on the approximation from stage 1, we ignore the integer constraint (4.5) in the IP model and the model becomes a linear programming (LP) model. We use "lp-solve " (a free LP software package) to obtain the optimal objective (denoted b y e p ) of this LP model. We take this value as the relaxed upper bound of our shelf space allocation model p u b ,i.e. pub= P; .
98
Metaheuristics: Progress as Real Problem Solvers
4.4 SIMULATED ANNEALING HYPER-HEURISTIC 4.4.1
Simulated annealing
Simulated annealing is a local search method inspired by the process to simulate the physical cooling process. From an initial solution, SA repeatedly generates a neighbour of the current solution and transfers to it according to some strategy with the aim of improving the objective function value (we are assuming we are trying to maximise the objective function). During this process, SA has the possibility to visit worse neighbours in order to escape from a local optimum. Specifically, a parameter, called temperature t, is used to control the possibility of moving to a worse neighbour solution. The algorithm, starting from a high temperature, repeatedly decreases the temperature in a strategic manner (usually called a cooling schedule) until the temperature is low enough or some other stopping criteria is satisfied. In each iteration, the algorithm accepts all "good" moves and some of the "bad" moves according to the Metropolis probability, defined by exp(-Slt) where S is the decrease in the objective function value. Simulated annealing has been shown to be a powerful tool in solving a variety of combinatorial optimisation problems [15]. However, the drawback of SA is that the algorithms performance is sensitive to the parameters and problem instance. Many experiments need to be carried out in order to tune the parameters to the problem.
4.4.2
Simulated annealing hyper-heuristic
Hyper-heuristics were proposed to be a more general approach for most combinatorial optimisation problems and they have the ability to adapt themselves to different problems or problem instances. Here, we propose another type of hyper-heuristic: a simulated annealing based hyper-heuristic. The basic idea behind this approach is that we use simulated annealing to guide the selection and acceptance of the low-level heuristics (or neighbourhood functions, see section 4.3), instead of controlling the moves between neighbours. From an initial solution, simulated annealing leads the search in a promising direction by making calls to the appropriate low-level heuristics. Specifically, for a maximisation problem, the algorithm works as follows: Define an objective hnction f and a set of heuristics H; Define a cooling schedule: starting temperature t, > 0, a temperature reduction function p and a number of iterations for each temperature nrep ;
Investigation of automatedplanograms using SA based hyper-heuristic
99
Select an initial solution so; Repeat Randomly select a heuristic h E H ; iteration-count = 0; Repeat iteration-count+ +; Applying h to so,get a new solution s, ; 6=f(s,)-f(so> if ( 6 2 0 ) then so= s, ; else Generate a random x uniformly in the range (0,l); if x < exp(6 It) then so= s, ; Until iteration-count = nrep; set t = p(t) ; Until the stopping criteria = true. It should be noted that simulated annealing would normally only have access to one heuristic or neighbourhood function (e.g. 2-opt in a travelling salesman problem), but here we give it access to a set of heuristics which allows it to adapt itself to a given problem (instance) by utilising different heuristics. In the above algorithm, we have stated that we need to define a cooling schedule. In fact, we would like to do this automatically so that we have an adaptively parameterised algorithm. Compared with a geometric cooling, Lundy and Mees's cooling schedule [22] has one less parameter because at each temperature only one iteration was performed. The temperature is reduced according to t +t 1(1+ Pt) . Hence, we use this cooling function in this paper. Suppose we allow Turned seconds for the search and the average time spent for one iteration was Toerage,we have the total number of the iterations K = Lowed I Tmrage. After the mathematical derivation, we have
where ts (respectively t f ) is the starting temperature (respectively stopping temperature). In this paper, the algorithms stops when the temperature ( t f ) decreases to 0.1. Two different methods were used to determine the starting temperature (corresponding to two kinds of simulated annealing hyperheuristics, denoted as SAHH and SAHH-adpt respectively) in order to investigate the sensitivity of parameters in our simulated annealing based hyper-heuristic. In SAHH, after preliminary experiments, we let ts =0.3f(so) where f(so) is the objective function value of the initial solution. To automate the decision of ts , in SAHRadpt , we use a similar method described in [6]. K/100 random solutions were sampled from the
100
Metaheuristics: Progress as Real Problem Solvers
initial solution to approximately determine the maximum objective difference 6,, . The starting temperature was then set to a value such that 85% of "bad moves would be accepted. According to the Metropolis probability function, we have t, = -S,, 1ln(O.85).
4.4.3
Low-level heuristics
Before we describe the low-level heuristics which are used in the hyperheuristics, we first define three order lists.
-
P,, : item-contribution-list: item list ordered by pi .aiIlli decreasingly. P,, :item-length-list: item list ordered by length li increasingly; So:shelffreelength-list: shelf list sorted by the current free shelf space decreasingly.
Twelve low-level heuristics are used. They are categorised into four types: add product(s), delete product(s), swap and interchange: Add-random: this heuristic adds one facing of a random item to the first shelf of So. Add-exact: this heuristic searches and adds one facing of the biggest possible item to all shelves (begins from the first shelf of So)until all shelves cannot be assigned any more items. Add-best-contribution: this heuristic repeatedly selects a shelf from So(begins from the first shelf of So), repeatedly searches and adds as many as possible facings of an item from P,, (begins from the first item of P,, ) until all shelves cannot be allocated any more items. Add-best-improvement: this heuristic selects the first shelf of So and allocates one facing space to the item which gives the best improvement to the evaluation h c t i o n . Delete-random: this heuristic deletes one facing of a random item from a random shelf. Delete-least-contributionl: this heuristic deletes one facing of the item with the least contribution value ( p i .ai/Ii) from a random shelf. Delete-least-contribution2: this heuristic deletes one facing of the item with the least contribution value from all shelves. Delete-least_improvement: this heuristic deletes one facing of the item that causes the least decrease in the objective value from a random shelf. Swap-random: this heuristic randomly deletes one facing of an item from a random shelf and adds as many possible facings of another randomly selected item. Swap-best: this heuristic repeatedly selects a shelf from So,deletes one
Investigation of automated planograms using SA based hyper-heuristic 101 facing of the item with the lowest contribution value, adds one facing of another item with a higherhighest contribution value, until the last shelf is swapped. - Interchange-improvement: this heuristic randomly selects two different items from two random shelves and interchanges one facing or multiple facings of two items. The basic idea behind this heuristic is that the small free space can be transferred to the shelf with a larger free space so that another facing could be added to that shelf later. - Interchange-random: this heuristic selects two different items from two random shelves and exchanges one facing of the two items. Note that each of above low-level heuristic is enforced to generate a feasible solution from the incumbent solution. If a low-level heuristic cannot produce a new feasible solution, the incumbent solution is returned.
4.5 EXPERIMENTAL RESULTS As there is no real-world data available due to commercial confidentiality and neither is there any benchmark data available from the literature, a number of simulated problems were generated. The length of the products conformed to a uniform distribution between 25 and 60. The net profit of the products were created randomly by a normal distribution in the same way as described in [30]. ai,Pi ,Li, Uiand Tj have uniform distributions in the ranges of [l, 21, [0.1, 0.41, [2, 31, [7,10] and [300, 4501 respectively. In the light of Yang's [30] experimental results which show that the problem size is a potential factor affecting algorithm performance, in this paper, five problem instances with different problem sizes were generated to test this relationship. We also take into account the influence of space availability in the performance of the algorithms. Because each item has a lower bound and an upper bound of facings, the available shelf space of a problem must be greater than a minimal space value to satisfy the lower bound of facings and meanwhile it should not exceed a maximal space value in case that all items' facings reach the upper bounds and no optimisation is required. Two parameters, r-min and r-max, were introduced to describe the space availability. r-min represents the ratio of the minimal space to the available space and r-max is the ratio of the available space to the maximal space. Hence both r-min and r-max are in the range of (0, 1). Seven problem instances with different r-min and r-max values were also generated to test the corresponding algorithms performance. Two simple hyper-heuristics, RHO1 (Random Heuristics Only Improving) and RHAM (Random Heuristics All Moves), were also applied
102
Metaheuristics: Progress as Real Problem Solvers
to the problems for the purpose of comparison. RHO1 repeatedly selects a random low-level heuristic and applies it to the current solution until some stopping criteria is met, during which only those heuristics that can improve the objective function value are accepted. RHAM works in the similar way but all moves are accepted. We also experimented with a "Choice Function" based hyper-heuristic which was proposed in [lo]. In this approach, the selection of the low-level heuristics is guided by a "Choice Function", which considers recent performance of each low-level heuristic ( A ) , recent improvement for consecutive pairs of low-level heuristics (f,)and the amount of time elapsed since the given heuristic has been called (f,). Overall, the function is defined as
Both A and f, are used as a method to intensify the search and f, is used as a diversification strategy. r,, r2 and r3 are scaling parameters to weight the different terms. Values of these parameters are changed adaptively according to the magnitude of recent improvement in the objective function. A more detailed description is provided in [lo]. Two conventional simulated annealing algorithms, SA-swap and SA-interchange, were also applied to the problems. Both of the algorithms employ the same cooling schedule that is used in SAHH but utilising different neighbourhood structures. In SA-swap, the neighbourhood structure was defined by randomly swapping one facing of two different items on a random shelf. However, the neighbourhood in SA-interchange was generated by: randomly selecting two different items from two random shelves, interchanging one facing of the two items, and then adding as many facings as possible of the item with the largest possible item-contribution value to the shelf that has the largest free space. All algorithms were coded in Microsoft Visual C++ version 6.0 and all experiments were run on a PC Pentium IV 1.8GHZ with 256MB RAM running Microsoft Windows 2000 professional Version 5. All algorithms started from a solution produced by a greedy heuristic (the greedy heuristic repeatedly adds the item with the largest possible item-contribution value) and allowed 600 seconds computation time for a fair comparison. The algorithms' performance was evaluated by the ratio of best objective value ( ph) obtained by the different algorithms to the relaxed upper bound ( pub). All results were averaged over 5 runs. In the first round experiments, seven problem instances with different space ratios were solved by the algorithms. Figure 4.3 shows the results. We can
Investigation of automatedplanograms using SA based hyper-heuristic 103
-
0.95 10.33 0.85 10.35 0.710.46
+Greedy
- -A - SAHH-Adpt
+SA-swap
0.6 10.53
---O--CFHH RHO1 ISA-interchange
-
0.5 10.66 0.4 10.79 0.34 10.95
r-min l r-max
Jt SAHH RHAM
Figure 4.3. Algorithms performance for different space ratios
see that all types of hyper-heuristics have greatly improved over the initial greedy heuristic. SA-swap also produced good quality solutions while SA-interchange performed much worse. This shows that the performance of the simple simulated annealing algorithm is greatly dependent on the neighbourhood structure. We can also see that our simulated annealing based hyper-heuristics outperformed all other algorithms in all cases with surprising high solution quality. Both types of simulated annealing hyperheuristics obtained over 98.5% of the upper bound (calculated by the twostage relaxation). The performance of SA based hyper-heuristic slightly decreased when r-min and r-max reached the middle of their ranges. This is probably because that, when the r-min is large while r-max is small, the shelf space is very scare, the optimal solution is near the lower bound and hence is relatively easier to obtain. Similarly, when r-min is small and r-max is large, the space is so ample that the optimal solution is almost the upper bound. However, when the available shelf space belongs to none of these two cases, the problem becomes harder to solve.
104
Metaheuristics: Progress as Real Problem Solvers
G r e e d y RHO1 SA-interchange
+
+
-
-+ SAHH RHAM CFHH
- A - SAHH-adpt
+SA-swap
Figure 4.4. Algorithms performance for different problem sizes
To test the influence of the problem size, we also generated five problem instances with different problem sizes in terms of the number of the shelves and the number of the items. In case of the influence of the space availability, we let all the problems have almost the same space ratio (r-min = 0.95, r-max = 0.24). Figure 4.4 and table 4.1 show the corresponding experimental results and comparison. We can see that SAHH and SAHH-adpt outperformed all other algorithms, including the two simple simulated annealing algorithms. The results also show that our simulated annealing hyper-heuristic performed slightly worse when the problem size increased but still obtained more than 97% of the relaxed upper bound for a very large problem (m=40, n=100). From both figure 4.3 and table 4.1, we can see that S A M and SAM-adpt had almost the same performance. This shows that our simulated annealing hyper-heuristic is not sensitive to the change of the starting temperature and hence is a robust framework. In contrast, in figure 4.4, we can see that both SA-swap and SA-interchange are very sensitive to the change of the problem instances. For small problem sizes, SA-swap performed better than SA-interchange. However, for the large problem sizes, SA-interchange performed better than SA-swap. This demonstrates that, for conventional SAYa good neighbourhood structure for
Investigation of automatedplanograms using SA based hyper-heuristic 105 a given problem instance does not guarantee good performance for another problem instance. However, SA based hyper-heuristics can synergise several neighbourhood functions (or low-level heuristics) according to the characteristics of different problem instances. Table 4.1. Algorithms performance for different problem sizes
4.6 CONCLUSION In this paper, we have used a practical shelf space allocation model to generate automatic planograms. Several hyper-heuristic approaches were applied to solve this problem. As an extension of the multi-knapsack problem, the planograrn problem is difficult to solve. We provided a set of simple low-level heuristics which have been shown to be very successful in bin packing and knapsack problems. A simulated annealing based hyperheuristic framework was proposed to solve the problem. In this approach, simulated annealing was used to guide the selection and acceptance of the appropriate heuristics at different search stages instead of controlling moves among neighbours. To give a better evaluation of the solution quality
106
Metaheuristics: Progress as Real Problem Solvers
obtained by different algorithms, the upper bound of the objective function was also derived by a two-stage relaxation. The experimental results show that the simulated annealing based hyper-heuristics used in this paper produced high quality solutions in different problem situations and outperformed three other hyper-heuristics and two versions of the conventional simulated annealing algorithms. The simulated annealing hyper-heuristic does not seem parameter sensitive, which has always been a problem for the conventional simulated annealing algorithms. Simulated annealing hyper-heuristic is a very promising technique for combinatorial optimisation problems. In the future, we will also investigate different problems in an attempt to demonstrate the generalisation of this approach.
REFERENCES Baker, R. C. and Urban, T. L., A Deterministic Inventory System with an Inventory-Level-Dependent Demand Rate. Journal of the Operational Research Society, 39(9): 823-83 1, 1988. Borin, N., Farris, P. W. and Freeland, J. R., A Model for Determining Retail Product Category Assortment and Shelf Space Allocation. Decision Sciences, 25(3): 359-384, 1994. Burke, E., Hart, E., Kendall, G, Newall, J., Ross, P, and Schulenburg, S., "Hyper-Heuristics: An Emerging Direction in Modern Search Technology" in Handbook of Meta-Heuristics (Glover F. and Kochenberger, G. eds.), Kluwer, ISBN: 1-4020-7263-5,457-474,2003. Burke, E., Kendall, G. and Soubeiga, E., A Tabu-Search Hyperheuristic for Timetabling and Rostering. Journal of Heuristics, 9: 45 1-470,2003. Campo, K., Gijsbrechts, E., Goossens, T. and Verhetsel, A., The Impact of Location Factors on the Attractiveness and Optimal Space Shares of Product Categories. International Journal of Research in Marketing, 17: 255-279,2000. Connolly, D. T., An Improved Annealing Scheme For the QAP. European Journal of Operational Research, 46: 93-100, 1990. Corstjens, M. and Doyle, P., A Model for Optimaizing Retail Space Allocations. Management Science, 27(7): 822-833,198 1. Cowling, P., Kendall, G. and Soubeiga, E., Adaptively Parameterised Hyperheuristics for Sales Summit Scheduling. 4th Metahuristics International Conference [MIC 200 11,2001. Cowling, P., Kendall, G . and Han, L., An Investigation of a Hyperheuristic Genetic Algorithm Applied to a Trainer Scheduling
Investigation of automatedplanograms using SA based hyper-heuristic
107
Problem. Proceedings of Congress on Evolutionary Computation (CEC2002), Hilton Hawaiian Village Hotel, Honolulu, Hawaii, 11851190,2002. 10 Cowling, P., Kendall, G. and Soubeiga, E., A Parameter-free Hyperheuristic for Scheduling a Sales Summit. Proceedings of the 4th Metaheuristic International Conference[MIC 20011, 127-131,2001. 11 Cox, K., The EfSect of Shelf Space Upon Sales of Branded Products. Journal of Marketing Research, 7: 55-58, 1970. 12 Curhan, R., The Relationship Between Space and Unit Sales in Supermarkets. Journal of Marketing Research, 9: 406-412, 1972. 13 Curhan, R., Shelf Space Allocation and Pro@ Maximization in Mass Retailing. Journal of Retailing, 37: 54-60, 1973. 14 Desmet, P. and Renaudin, V., Estimation of Product Category Sales Responsiveness to Allocated Shelf Space. International Journal of Research in Marketing, 15: 443-457, 1998. 15 Dowsland, Kathryn A., "Simulated Annealing" in Modem Heuristic Techniques for Combinatorial Problems (Reeves, C. R. ed.), McGrawHill, ISBN: 0-07-709239-2,2 1-69, 1995. 16 Drbze, X., Hoch, S. J. and Purk, M. E., Shelf Management and Space Elasticity. Journal of Retailing, 70(4): 30 1-326, 1994. 17 Fisher, H. and Thompson, G. L., Probabilistic Learning Combinations of Local Job-shop Scheduling Rules. Factory Scheduling Conference, Carnegie Institute of Technology, May: 10-12, 1961. 18 Glover, F. and Kochenberger, G. A., Handbook of Meta-Heuristics., Kluwer, ISBN: 1-4020-7263-5,2003. 19 Hart, E., Ross, P. and Nelson, J. A., Solving a Real-World Problem Using An Evolving Heuristically Driven Schedule Builder. Evolutionary Computing, 6(1): 61-80, 1998. 20 Kotzan, J. and Evanson, R., Responsiveness of Drug Store Sales to Shelf Space Allocations. Journal of Marketing Research, 6: 465-469, 1969. 21 Levy, Michael and Weitz, Barton, Retailing Management, Homewood, IL., ISBN: 0-256-05989-6, 1992. 22 Lundy, M. and Mees, A., Convergence of An Annealing Algorithm. Mathematical Programming, 34: 111- 124, 1986. 23 Nareyek, A., Choosing Search Heuristics by Non-Stationary Reinforcement Learning. Metaheuristics: Computer Decision-Making (Resende, M.G.C., and de Sousa, J.P.ed.).Kluwer, 523-544,2003.
108
Metaheuristics: Progress as Real Problem Solvers
24 Reeves, Colin R., Modern Heuristic Techniques For Combinatorial Problems, McGraw-Hill, ISBN: 0-07-709239-2, 1995. 25 Ross, P., Marin-Blazquez, J. G., Schulenburg, S. and Hart, E., Learning a Procedure That Can Solve Hard Bin-Packing Problems: A New GABased Approach to Hyper-heurstics. Proceeding of the Genetic and Evolutionary Computation Conference, GECC02003, Berlin, Germany: 1295-1306,2003. 26 Urban, T., An Inventory-Theoretic Approach to Product Assortment and Shelf-Space Allocation. Journal of Retailing, 74(1): 15-35, 1998. 27 Urban, T., The interdependence of inventory management and retail shelf management. International Journal of Physical Distribution & Logistics Management, 32(1): 41-58,2002. 28 Verbeke, W., Farris, P. and Thurik, R., Consumer Response to the Preferred Brand Out-of-Stock Situation. European Journal of Marketing, 32(11/12): 1008-1028, 1998. 29 Wolpert, D. and MacReady, W. G., No Free Lunch Theorems for Optimization. IEEE Transactions on Evolutionary Computation, l(1): 67-82, 1997. 30 Yang, M.-H., An Eficient Algorithm to Allocate ShelfSpace. European Journal of Operational Research, 131: 107-118,200 1. 31 Yang, M.-H. and Chen, W.-C., A Study on shelfSpace Allocation and Management. International Journal of Production Economics, 60(6 1): 309-317, 1999. 32 Zufryden, F., A Dynamic Programming Approach for Product Selection and Supermarket Shelf-Space Allocation. Journal of Operations Research Society, 37(4): 413-422, 1986.
Chapter 5
VALIDATION AND OPTIMIZATION OF AN ELEVATOR SIMULATION MODEL WITH MODERN SEARCH HEURISTICS Thomas Bartz-Beielstein,' Mike Preussl and Sandor
' Universtitht Dortmund
s ark on^
0-44221 Dortmund, Germany {tom, preuss)@~~ll.cs.uni-dortmund.de
FUJITEC Co.Ltd. World Headquarters 28-10, Shoh 1-chome, Osaka, 567-8511 Japan
[email protected]
Abstract: Elevator supervisory group control (ESGC) is a complex combinatorial optimization task that can be solved by modern search heuristics. To reduce its complexity and to enable a theoretical analysis, a simplified ESGC model (S-ring) is proposed. The S-ring has many desirable properties: Fast evaluation, reproducibility, scalability, and extensibility. It can be described as a Markov decision process and thus be analyzed theoretically and numerically. Algorithm based validation (ABV), as a new methodology for the validation of simulation models, is introduced. Based on ABV, we show that the S-ring is a valid ESGC model. Finally, the extensibility of the S-ring model is demonstrated. Keywords: Elevator group control, optimization, discrete-event simulation models, validation, search heuristics, evolutionary algorithms, Markov decision processes.
5.1
INTRODUCTION
Today's urban life cannot be imagined without elevators. The central part of an elevator system, the elevator group controller, assigns elevator cars to service calls in real-time while optimizing the overall service quality, the traffic throughput, and/or the energy consumption. The elevator supervisory group control (ESGC) problem can be classified as a combinatorial optimization problem (Barney, 1986; So and
110
Metaheuristics: Progress as Real Problem Solvers
Chan, 1999; Markon and Nishikawa, 2002). It reveals the same complex behavior as many other stochastic traffic control problems, i.e. materials handling systems with automated guided vehicles (AGVs). Due to many difficulties in analysis, design, simulation, and control, the ESGC problem has been studied for a long time. First approaches were mainly based on analytical methods derived from queuing theory, whereas currently computational intelligence (CI) methods and other heuristics are accepted as state of the art (Crites and Barto, 1998; Schwefel et al., 2003). In this article we propose a simplified ESGC system, the sequential ring (S-ring). The S-ring is constructed as a simplified model of an ESGC system using a neural network (NN) to control the elevators. Some of the NN connection weights can be modified, whereby testing different weight settings and their influence on the ESGC performance is enabled. The performance of one specific NN weight setting Z is based on simulations of specific traffic situations, which automatically lead to stochastically disturbed (noisy) objective function values f"(5').Since it is difficult for an optimization algorithm to judge the fitness f (5')of one ESGC configuration, the determination of the optimal weight setting Z* is not trivial. Direct search methods that rely on the direct comparison of function values face the problem of modifying the weights without generating too many infeasible solutions. The S-ring was introduced as a benchmark problem to enable a comparison of ESGC algorithms, independently of specific elevator configurations (Markon et al., 2001; Markon and Nishikawa, 2002). Results from the S-ring, obtained with low computational costs, should be transferable to more complex ESGC models. In the following, we will present different techniques to answer the question whether the S-ring is a simplified, but valid ESGC simulation model. We propose a new validation methodology that takes the optimization algorithm for the simulation model into account. Tuning the optimization algorithm for the simplified simulation model results in a good parameter setting of the optimization algorithm. This setting is also applicable to the complex simulation model. It is generally assumed that the performance of an algorithm depends on the structure of the search space. (Reeves and Yamada, 1998) observed that local optima of randomly generated instances of an optimization problem are distributed in a 'big-valley7 structure. For example, better local optima tend to be closer to the global optimum. This big-valley structure is convenient for many search algorithms. But do real-world problem instances - as opposed to randomly generated problem instances - possess a big-valley structure? Experiments indicate
Elevator Optimization
111
that this is not the case. As (Whitley et al., 2002) write: 'Local optima are generally members of large plateaus of equally-fit solutions.' This plateau-like distribution has also been observed while optimizing the S-ring and real ESGC problems alike. Additionally, knowledgeable persons have evaluated the model output for reasonableness. Thus, improved algorithm parameter settings obtained from simulation results on the S-ring should be transferable to real ESGC problems. S-ring simulations might give valuable hints for the optimization of highly complex elevator group controller optimization tasks. The rest of this article is organized as follows: In section 5.2, we introduce the elevator group control problem. Section 5.3 discusses S-ring basics, whereas section 5.4 presents simulation and analysis techniques. Section 5.5 demonstrates the validity of this model simplification. The extensibility of the S-ring model is demonstrated in section 5.6. The final section combines a summary with an outlook.
5.2
THE ELEVATOR SUPERVISORY GROUP CONTROLLER PROBLEM
The elevator group controller determines the floors where the cars should go to. Additional elevator controllers handle the functions inside the car, such as door control, measurement of the car load, and car calls. Since the group controller is responsible for the allocation of elevators to hall calls, a control strategy to perform this task in an optimal manner is required. The main goal in designing a better controller is to minimize the time passengers have to wait until they can enter an elevator car after having requested service. This time-span is called the waiting time. The secalled service time additionally includes the time a passenger stays within the elevator car. An important aspect is the changing traffic pattern we can observe throughout the day in an office building (Markon, 1995). There is 'uppeak' traffic in the morning when people start to work and symmetrically we observe 'down-peak' traffic in the evening. Most of the day there is 'balanced' traffic with much lower intensity than at peak times. 'Lunchtime' traffic consists of two - often overlapping - phases where people first leave the building for lunch or head for a restaurant floor, and then get back to work. The ESGC problem subsumes the following problem: How to assign elevators to passengers in real-time while optimizing different elevator configurations with respect to overall service quality, traffic throughput, energy consumption etc. Fujitec, one of the world's leading elevator manufacturers, developed a controller that is trained by use of a set of fuzzy controllers. Each con-
112
Metaheuristics: Progress as Real Problem Solvers
troller represents control strategies for different traffic situations (Markon, 1995). The NN structure and the neural weights determine a concrete control strategy. The network structure as well as many of the weights remain fixed, only some of the weights on the output layer can be modified and optimized. A discrete-event based elevator group simulator permits computing the controller's performance. This highly complex ESGC simulation model will be referred to as the 'lift model' (or simply 'lift') throughout the rest of this paper. The identification of globally optimal NN weights is a complex optimization problem. The distribution of local optima in the search space is unstructured and there are many local minima on flat plateaus. The objective function values are stochastically disturbed due to the nondeterminism of service calls, and dynamically changing with respect to traffic loads. (Arnold and Beyer, 2003) compared evolution strategies (ES) with other search methods in the presence of noise. Their results indicate that gradient based optimization techniques cannot be applied successfully to this optimization problem. (Beielstein et al., 2003) applied evolution strategies to determine optimal NN weights. Their lift model has been implemented as follows: The objective function considers different time dependent traffic patterns as described above. Let the handling capacity of an elevator system be defined as the maximum number of customers an elevator system is able to serve per hour without exceeding an average waiting time. We considered handling capacities at 30, 35, and 40 seconds. This results in a multi-criteria optimization problem. The different objectives are aggregated to obtain a single-criteria optimization problem by averaging handling capacities and then subtracting from 3,000 pass./h to obtain a minimization problem. The latter value was empirically chosen as an upper bound for the given scenario. The resulting fitness function reads: F(2)= 3000.0 - 7,-(2), where 7,-is the average handling capacity (pass./h), d is the parameter design of the evolution strategy optimization algorithm, and 2 is a 36 dimensional vector that specifies the NN weights. F(2) is called the 'inverse handling capacity'. The computational effort for single simulator runs limits the maximum number of fitness function evaluations to the order of magnitude lo4. In general, ESGC research results are incomparable, since the elevator group control per se is not appropriate as a 'benchmark problem': - Elevator systems have a very large number of parameters that differ widely among buildings, elevator models, manufacturers etc. - Elevator cars have complex rules of operation, and even slight differences, e.g. in door operation or in the conditions for changing the traveling direction, can affect the system performance significantly. Even
Elevator Optimization
113
the smallest elevator system has a very large state space, making direct solution infeasible, thus no exact solutions are available for comparison. - The sophisticated ESGC rules are usually trade secrets of the manufacturers, and cannot made commonly available for research. In principle, the optimization practitioner can cope with the enormous complexity of the ESGC problem in two different ways: The problem can be simplified or resources can be used extensively (i.e. parallelization, see, e.g. (Beielstein et al., 2003~)). We will concentrate on the first strategy and present a simplified ESGC model. Ideally, a simplified ESGC model should comply with the following requirements: It enables fast and reproducible simulations and is applicable to different building and traffic configurations. Furthermore it must be a valid simplification of a real elevator group controller and thus enable the optimization of one specific controller policy and the comparison of different controller policies. The simplified model should be scalable to enable the simulation of different numbers of floors or servers. It should be extensible, so that new features (i.e. capacity constraints) can be added. Last but not least, the model is expected to favor a theoretical analysis. We propose a model that conforms to all these requirements in the next section.
5.3
S-RING BASICS
When passengers give a hall call, they simply press a button. Therefore, only a one bit information for each floor is sent to the ESGC. It appears intuitively correct to map the whole state of the system to a binary string. The system dynamic is represented by a state transition table and can be controlled by a policy. The sequential-ring model (Sring model) has only a few parameters: The number of elevator cars m, the number of queues n, and the passenger arrival rate p (Markon et al., 2001). A Zbit state (si,q ) is associated with each site. The si bit is set to 1 if a server is present on the ith floor, to 0 otherwise. Correspondingly, the q bit is set to 0 or 1 if there is no waiting passenger resp. at least one waiting passenger. Figure 5.1 depicts a typical S-ring configuration. The state at time t is given as with IB := (0,l). A transition probability function f , a decision function 6, and a reward function r are used to determine the dynamic of the system. A look-up table as shown in table 5.1 can be used to represent f , 6, and r in a compact manner. We will give a formal definition of the S-ring in the appendix (definition 1). The state evolution is sequential (S-ring stands for sequential ring), scanning the sites from n - 1 down to 0, and then again around from
Metaheuristics: Progress as Real Problem Solvers
f-th floor
.....1..
,., .,
..1
Customer
;
......
-1
I . 1
Customer
,;,i;
,.. ..
1..
,....... sewer ,, ,,
.....
.. #
,
#I
.
- . - f i + e r #3 ........
1
2nd floor
....
C1
Ist floor
Co
So
Figure 5.1. T h e S-ring as a n elevator system. T h e sites are numbered from 0 to n-1.
n - 1.' At each time step, one of the floor queues is considered, where passengers may arrive with probability p. Therefore, the triple J(t) := (ck(t),sk(t),ski (t)), with k E (0, ..., n - 1) and k' := (k 1)mod n is updated: If the queue has both a customer and a server present, the server makes a decision to 'take' (1) or 'pass' (0) the customer according to a policy 7r (see definition 2 and definition 3 in the appendix). In case of a 'take' decision, the customer enters the car, and the server stays there; in the 'pass' case, or if there is no customer, the server steps to the next site. As the rules of operation are very simple this model is easily reproducible and suitable for benchmark testing.2 Despite the models simplicity, it is hard to find the optimal policy 7r even for a small S-ring; the real T * is not obvious, and its difference from heuristic suboptimal policies is non-trivial. If the set of states and the set of observations are identical, the model is called fully-observable and the observation function o uses global information. In the following we will also use the partially-observable or
+
he up and down elevator movements can be regarded as a loop. This motivates the ring structure. 'A reference implementation of the S-ring model can be requested from the authors: {tom, preuss)QLsll.cs.uni-dortmund.de.
Elevator Optimization
115
Table 5.1. The triple in the first column represents the state of the actual site: Customer waiting, server present, and server present on the next floor. The probability of a state change to the state in the fourth column is given in the second column. Columns three and five denote the decision and the reward respectively. I.e., the server has to make a decision (to 'take' or to 'pass' the customer) if there is a customer waiting (lxx), and if there is a server present on the same floor ( l l x ) but no server on the next floor (110).
[(t) 000
Prob 1- v
n(x)
+
[(t 1) Ar 000
0
the unobservable case. Next we will introduce some elementary policies: most obvious heuristic policy is the greedy one: When given the choice, always serve the customer: ng(o) = 1. Rather counter-intuitively, this policy is not optimal, except in the heavy traffic (p > 0.5) case. This means that a good policy must bypass some customers occasionally. The greedy-policy does not take any information about the state of the system into account. - The random policy is another trivial policy that leads to rather poor results. For some given a E [0, 11,we can define nb(o) = 0 with probability (w. pr.) 1- a, and 1otherwise. Actions based on the random-policy require no information about the actual system state. - A quite good heuristic policy, that takes information about the actual state of the system into account, is the balance-policy: nb(o) = 0, if s,-1 = 1, and 1 otherwise. The intention is to put some distance between servers by passing when there is another tailing server, letting it serve the customer: Waiting customers on the (n - 1)th floor queue are not served by the leading server, thus a gap is created between the leading and the following server. Balancing the positioning of the servers, xb is significantly better than ng for medium values of p.
- The
116
Metaheuristics: Progress as Real Problem Solvers
Finally, we present the perception policy representation: Let 6' : IR -t IB define the Heaviside function (see definition 4), and x = x(t) be the state at time t (see equation 5.1), and y E IR2n be a weight vector. A linear discriminator, or perceptron, np(x) = 6'(yT . x), can be used to present the policy in a compact manner. The perception presentation can be used to encode the other policies mentioned above. Variants of this policy require information on the complete state of the current system, since the state vector x is used.
5.3.1
The S-Ring Model as an Optimization Problem
The 'optimization via simulation' approach requires the definition of a performance measure for the simulation model. The long-run timeaverage number of customers in the system or in the queue (Q) are commonly used performance measures in queuing theory (Banks et al., 2001). Consider a simulation run of a queuing system over a period of time T. The steady-state time-average number in queue is
Q := lim T-00
STQ(t)dt T
w.pr. 1.
The basic optimal control problem is to find a policy n* for a given Sring configuration S E S (see definition I), so that the expected number of sites with waiting passengers Q , that is the steady-state time-average as defined in equation 5.2, in the system is minimized: n* = arg min Q(n). 7r
(5.3)
Equivalently, a policy n is optimal, if it maximizes the expected reward. The general S-ring problem: For a given S-ring S , find the optimal policy n*, can be modified to the
PROBLEM 1 (PERCEPTRON S-RINGPROBLEM) For a given S-ring S , find the weight vector y E IR2n that represents the optimal policy n*. The perceptron S-ring problem can serve as a benchmark problem for many optimization algorithms, since it relies on the fitness function F :I R + ~ IR ~ (Markon et al., 2001; Beielstein and Markon, 2002). In general, n can be realized as a look-up table of the system state x and n* is found by enumerating all possible n and selecting the one with the lowest Q. Since this count grows exponentially with n, the naive approach would not work for any but the smallest cases.
Elevator Optimization
5.4
ANALYSIS AND SIMULATION OF THE S-RING SYSTEM
The S-ring system can be interpreted as a Markov decision process. Let x(t) E X denote the state of the S-ring system at time-step t, where X denotes the state space of the S-ring system. A single state transition describes the changes of the system, if the kth floor queue is considered. A transition cycle describes the changes of the system, if the n sites (k = 0,1, . . . ,n- 1)are considered in sequence. The N different system states can be enumerated using the function snUm : I B -+ ~ (0, ~ 1,. . . ,22n - 1) defined as s,,(x(t)) := Cy=l 2i-1 (si 2n-1ci), and the function Slegal, that determines the feasibility of a state (Cy=l si = m). If the kth floor queue is scanned, the corresponding state transition can be described by a S-ring single state transition matrix Pk. The matrix element (pij) defines the state transition probability from state i to state j . The single state transition matrices can be multiplied to obtain the transition cycle matrix: P := HZ1Pn-i+l.Based on P, we can determine the limiting state probability distribution.
+
EXAMPLE 1 Even the simplest non-trivial case with n = 3 floors and m = 2 elevators requires 23 . = 24 dgerent states. Based on the limiting state probability distribution ii and on the vector c', that contains at its ith position the number of customers when the system is in the ith state, we can determine the value Q for the greedy strategy as ii. c' = 3ep2/(p4- ~ ~ + 2 ~ ~ E.g., + l ) if. we chose p = 0.3, we obtain Q = 0.2325.
(i)
The S-ring can be seen as a partially-observable Markov decision process (POMDP) (see definition 5). The unobservable MDP (UMDP) is a subclass of the POMDP: No information on the state of the system is available. The S-ring equipped with the random or with the greedy policy is an UMDP. The complete state of the system is known to the observer at each time point in the fully observable Markov decision process (MDP). The perceptron S-ring is a MDP. POMDPs can be formulated as optimization problems: 1.e. for a given POMDP, the decision maker selects the policy with the maximum expected value. There exist several dynamic programming approaches for solving POMDP problems: Standard algorithms are value iteration and policy iteration (Howard, 1972). A solution by dynamic programming and by numerical methods such as &-learning, Kiefer-Wolfowitz stochastic approximation and a (1+1)-ES is presented in (Markon and Nishikawa, 2002). The conclusidns drawn from the theoretical and numerical analysis might be complemented by simulation experiments. The S-ring can
Metaheuristics: Progress as Real Problem Solvers
Figure 5.2. Event graph. The thin arrow represents an event at the beginning (arrival) scheduling an event at the end of the arrow (departure) immediately. The heavy arrows indicate that the event at the beginning of the arrow m a y schedule the event at the end of the arrow.
be treated as a discrete-event-simulation model (Banks et al., 2001). An arrival event schedules a departure event without any intervening time, whereas other events occurring at time ti are scheduled at time ti+l := ti 1. Based on the event-graph method, where each event is represented by a node, and directed arrows show how events are scheduled from other events, the S-ring can be presented as depicted in figure 5.2 (Som and Sargent, 1989). A flowchart for the departure event is shown in figure 5.3. An event-based variant of the S-ring was implemented in simlib. simlib is a C-based simulation 'language', that provides functions to accumulate and to summarize simulation data, to schedule events, and to generate random variates (Law and Kelton, 2000).
+
5.5
THE S-RING MODEL AS A VALID ESGC MODEL
The complete validation process requires subjective and objective comparisons of the model to the real system. Subjective comparisons are judgments of experts ('face validity'), whereas objective tests compare data generated by the model to data generated by the real system. Building a model that has a high face validity, validating the model assumptions, and comparing the model input-output transformations to corresponding input-output transformations for the real system can be seen as three widely accepted steps of the validation process (Naylor and Finger, 1967). Important similarities of the S-ring with real elevator systems have been observed by experts: Both are found to show suboptimal performance when driven with simple greedy policies. They exhibit a characteristic instability, commonly called bunching in case of elevators. In the following we will consider input-output transformations more detailed. The model is described by the function:
Elevator Optimization
Event
Schedule next Arrival Event
Departure Event
Figure 5.3. Function depart. The probability of an arrival event is set to 0.5.
Metaheuristics: Progress as Real Problem Solvers
Thus values of the uncontrollable input parameters Z and values of the controllable decision variables (or of the policy) D are mapped to the output measures Y. The model can be run using generated random variates Zito produce the simulation-generated output measures. E.g. the S-ring model takes a policy and a system configuration and determines the expected average number of floors with waiting customers in the system using the generated random variates that determine a customer arrival event. If real system data is available, a statistical test of the null hypothesis can be conducted:
Ho : E(Y) = p is tested against HI : E(Y) # p,
(5.5)
where p denotes the real system response and Y the simulated model response. We will extend these standard validation techniques by introducing a new approach, that takes the choice of an optimization algorithm into account. The main idea is based on the observation that the complexity of a model can only be seen in relation to the associated optimization algorithm (Naudts and Kallel, 2000): The functions Hnlb: (0, lIn + {0,1) defined by Hn,b(b) = 1 and Hn,b(a) = 0 if a # b ('needle in a haystack') can be extremely difficult for (standard) genetic algorithms, whereas they are simple for the degenerated search heuristic that generates the solution b deterministically. We additionally assume that every problem requires a specific algorithm parameter setting a' (Wolpert and Macready, 1997). a' includes the exogenous parameters such as the population size in evolutionary algorithms or the starting temperature for the cooling schedule in simulated annealing. (Franqois and Lavergne, 2001) introduce a methodology that classifies problem classes based on the parameterization of the underlying optimization algorithm. This methodology is extended in the following to 'optimization via simulation' approaches. We will give a definition first: DEFINITION 5.1 (ALGORITHM BASED EQUIVALENCE) Let the regression model E(Y) = X P model the functional relationship between the algorithm A and its expected performance E(Y) for the optimization problem P. a denotes a new variable that specifies the underlying optimization problem P. Two optimization problems Pl and P2are equivalent with respect to an algorithm A (PI -A P2), i f there are no interactions between the model parameters P and the problem parameter a. REMARK1 Pl significant.
=A
P2 does not require that the main efect of a is in-
Elevator Optimization
,
Problem PI
Fitness distribution 1 Algorithm
Problem P2
-. Fitness distribution 2
Figure 5.4. Schematic representation of algorithm based validation. A regression model describes the functional relationship between the parameter setting of an algorithm and its expected performance. Two optimization problems are equivalent, if there are no interactions between the problem and model parameters.
REMARK 2 If PI = A P2,then an optimization algorithm A with pammetrization ii shows a similar behavior on problem PI and problem P2. Equation 5.4 can be written equivalently as fp,& : (2,ii) + Y, where Y is the performance of an algorithm with the exogenous parameter setting a' for the problem P and the quality function Q. Similar to the test from equation 5.5 the following statistical test to identify equivalent problems can be performed: The null hypothesis Ho : a = 0, is tested against the alternative H1 : a # 0 (PI and P2 are not equivalent). Our goal is to show that the S-ring model is a valid ESGC-model, so that we can transfer results from the S-ring to the lift model. The first step in algorithm based validation (ABV) requires the selection of an optimization algorithm. Evolution strategies, that are applicable to many optimization problems, have been chosen in the following (Beielstein et al., 2003b). Recent publications propose generalized linear models (GLMs) or methods from computational statistics such as design and analysis of computer experiments (DACE) or regression trees (Bartz-Beielstein and Markon, 2004; Bartz-Beielstein et al., 2004). GLM analysis provides a unified approach for linear and non-linear models with both normal and non-normal responses (McCullagh and Nelder, 1989; F'ranqois and Lavergne, 2001). A generalized linear model that is based on the Gamma distribution and the canonical link is used in the following analysis. To model the problem, a factor L with two levels {S-ring, Lift) is introduced. We are interested to see whether or not
122
Metaheuristics: Progress as Real Problem Solvers
there are interactions between algorithm parameters and L. Starting from the over fitted model we perform a backward elimination proced ~ r e The . ~ final model shows that there are no significant interactions between the problem L and other factor^.^ We can conclude that the S-ring problem and the lift problem are equivalent with respect to ES. Therefore the S-ring model can be seen as a valid simplification of the lift model. Remark 2 justifies the development of a simplified ESGC model: An improved (tuned) parameterization a' of algorithm A and problem PI (S-ring) can be applied to optimize the complex optimization problem P2 (lift).
5.6
S-RING MODEL EXTENSIONS
The S-ring model has been introduced as simplified elevator system model with very limited parameters and features. To improve our understanding of its applicability, it makes sense to explore two types of changes to this model. Firstly, effects of mechanisms looking inappropriate compared to a real elevator system shall be investigated. Secondly, features not existent in the S-ring model but obviously present in the real-world situation may be subsequently added to find out if they influence the design of a controller significantly. For our experiments, we used a default NN controller with all weights set to 1.0 and a previously optimized controller which has been adapted to an arrival rate of 0.3. Experiences from previously performed optimization studies, i.e. (Beielstein et al., 2003a), recommended the following experimental setup: A (10+50)-ES performing the optimization was allowed 50,000 evaluations with 1,000 simulation steps each. 1,000 steps have been chosen to cope with the problem of the initial transient (Law and Kelton, 2000). We used self-adaptation with T = 0.3, a E [0.01,1.0] and re-evaluation of surviving parents. The S-ring model has been defined in a way that favors its analysis as Markov decision process: Within a full circle, floor states are updated in sequence. Alternatively, one can imagine random order or even
3 ~ h model e search (determination of the predictors, their orders and interactions) can be based on the Akaike Information Criterion (AIC). Backward elimination starts with an overfitted model, whereas forward selection adds a new variable to the model a t each stage of the process. 4Another way t o test for interactions between the factor L and other factors is t o compare two nested models M2 C M I . MI includes interactions between L and other factors of the Function * model is reduced model, whereas interactions are omitted in M2. M I : Y Function + model. compared t o M2: Y The symbol '+' denotes independent factors and the symbol '*' denotes interactions between two factors. ANOVA indicates that there is no significant difference if interactions between L and the other factors are included. N
N
Elevator Optimization Default Controller
Optimized Controller
sequentialupdate random update
..... quasi-parallel update 0.1
0.2
0.3 arrival rate
0.4
0.5
0.1
0.2
0.3 arrival rate
0.4
0.5
Figure 5.5. Two NN controllers dealing with different update methods (sequential, random, quasi-parallel) and arrival rates on an S-ring with 20 floors and 6 servers. Left hand: Default controller, all weights are 1.0, right hand: ES-optimized controller. Each point represents a simulation run with 1 million steps. Lower values are better.
Default Controller
Optlmlred Controller
Figum 5.6. Default (left) and optimized NN controller performance on a wide range of arrival rates and server capacities on an S-ring with 20 floors and 6 servers. Each point represents a simulation run with 1 million steps. Lower values are better.
quasi-parallelism. The general behavior of our model must remain stable whatever variant is chosen because the update order of the real system we want to model is usually not known beforehand. We cannot yet prove that this is true for all possible configurations and controllers, but simulations done so far (see figure 5.5) indicate that the S-ring behavior is very similar for different update orders.
124
Metaheuristics: Progress as Real Problem Solvers
An obvious difference between real-world elevator cars and S-ring ones is that the latter have infinite capacity. Previously, we assumed that it is reasonable to neglect capacities for a wide range of parameter settings. Simulation runs depicted in figure 5.6 show that this is indeed the case. Only for extreme passenger flows congestion occurs and waiting customers sum up to large numbers. However, the turning point can be shifted upwards with a good controller policy.
5.7
SUMMARY AND OUTLOOK
We proposed a simplified elevator supervisory group controller, the socalled S-ring. The S-ring can serve as a helpful benchmark problem for evaluating and comparing search heuristics. Different techniques for its analysis and simulation were presented. A new method was developed to validate the S-ring as an ESGC model by taking an optimization algorithm into account. Furthermore, we demonstrated how new features can easily be added to the S-ring. The current work can be extended by implementing different parallel optimization strategies. Additionally, this methodology is transferable to other traffic systems or, more general, other distributed control problems. Hence, we hope that the S-ring is an interesting real-world related optimization problem for other researchers.
ACKNOWLEDGMENTS This work is a product of the Collaborative Research Center 531, 'Computational Intelligence', at the University of Dortmund and was supported by the Deutsche Forschungsgemeinschaft.
APPENDIX: DEFINITIONS DEFINITION 1 (S-RING)The S-ring is the tuple where n E IN and m E IN are the number of queues and servers respectively. X , A, and O denote finite set of states, actions and observation respectively, o is an observation function, and xo denotes the initial state. X is defined as the set of binary vectors
si = m. Let g(t) : IN$ + {0,1,2,. . . ,n - 1 ) be the function that determines with the number of the floor queue scanned at time step t : g(t) := n - 1 - (t mod n).
(5.A.1)
h : X x IN$ + I B ~is a helper function, that extracts three bits (customer present on the actual floor, server present on the actual floor, and server present on the next
Elevator Optimization poor) from the state vector x: (5.A.2)
h ( x , t ) :'(~g(t),S g ( t ) , s ~ ( ~ - I ) ) -(~2n-l-g(t),~n-l-g(t), -
xn-1-(g(t-I)
mod n ) ) .
The transition probability function
defines probabilities for a state transition from state x t o state x' depending o n the action a performed. Finally,
is the reward function. S denotes the set of all possible S-ring configurations.
DEFINITION2 (DECISIONRULE) A decision rule is a mapping from observations t o actions: 6 :O
-+A,
6(0) = ( 0 , l ) .
(5.A.5)
DEFINITION3 (POLICY)A sequence (So,61, 62 ...) of decision rules is called a policy.
DEFINITION5 (POMDP) A partially-observable Markov Decision Process (POMDP) M is a tuple M = { X , xo, A, 0,f , o, V ) , where: X denotes a finite or countable set of states, xo E X is the initial state, A denotes a set of actions, and O denotes a set of observations. If not mentioned otherwise, the Markov assumption is made in general: Each state has all information necessarg t o predict the n e b event and action. f : X x A x X + [O,1] defines probabilities for a state transition from state x to state y depending o n the action a performed. f ( x , a , y ) is the probability that state y is reached from state x o n action a . Therefore, each action can be represented by a state transition table of size N x N , or by a state transition matrix pk wtth entries ( p t j ) as defined in equation 5.1. The probabilities i n the transition matrix take also exogenous effects into account. o : X + O denotes the observation function: The corresponding set of observations O can be interpreted as a set of messages sent t o the decision maker after a n action is completed. And finally, the value function V : 7-1 + IR,. If V i s time-separable, then i t can be written as a combination of the reward function r and the cost function c, that are defined as follows:
Metaheuristics: Progress as Real Problem Solvers
REFERENCES Arnold, D.V. and Beyer, H.-G. (2003). A comparison of evolution strategies with other direct search methods in the presence of noise. Computational Optimization and Applications, 24(1). Banks, J., Carson, J. S., Nelson, B. L., and Nicol, D. M. (2001). Discrete Event System Simulation. Prentice Hall. Barney, G. (1986). Elevator Trafic Analysis, Design and Control. Cambridge U.P. Bartz-Beielstein, T. and Markon, S. (2004). Tuning search algorithms for real-world applications: A regression tree based approach. In Proceedings of the 2004 IEEE Congress on Evolutionary Computation, pages 1111-1118, Portland, Oregon. IEEE Press. Bartz-Beielstein, T., Parsopoulos, K. E., and Vrahatis, M. N. (2004). Analysis of particle swarm optimization using computational statistics. In Simos, T. E. and Tsitouras, Ch., editors, International Conference on Numerical Analysis and Applied Mathematics 2004 (ICNAAM), pages 34-37. European Society of Computational Methods in Science and Engineering (ESCMSE), Wiley. Beielstein, T., Ewald, C.-P., and Markon, S. (2003a). Optimal elevator group control by evolution strategies. In Cantti-Paz, E., Foster, J. A., Deb, K., Davis, L. D., Roy, R., O'Reilly, U.-M., Beyer, HansGeorg, et al., editors, Proc. Genetic and Evolutionary Computation Conf. (GECCO 2003), Chicago IL, Part 11,volume 2724 of Lecture Notes in Computer Science, pages 1963-1974, Berlin. Springer. Beielstein, T. and Markon, S. (2002). Threshold selection, hypothesis tests, and DOE methods. In Fogel, David B., El-Sharkawi, Mohamed A., Yao, Xin, Greenwood, Garry, Iba, Hitoshi, Marrow, Paul, and Shackleton, Mark, editors, Proceedings of the 2002 Congress on Evolutionary Computation CEC2002, pages 777-782. IEEE Press. Beielstein, T., Markon, S., and Preufl, M. (2003b). Algorithm based validation of a simplified elevator group controller model. In Ibaraki, T., editor, Proc. 5th Metaheuristics Int'l Conf. (MIC'O3), pages 061106/13 (CD-ROM), Kyoto, Japan. Beielstein, T., Markon, S., and PreuB, M. (2003~).A parallel approach to elevator optimization based on soft computing. In Ibaraki, T., editor, Proc. 5th Metaheuristics Int'l Conf. (MIC'03), pages 0711-07/11 (CD-ROM), Kyoto, Japan. Crites, R.H. and Barto, A.G. (1998). Elevator group control using multiple reinforcement learning agents. Machine Learning, 33(2-3):235-262.
Elevator Optimization
127
F'ranqois, 0. and Lavergne, C. (2001). Design of evolutionary algorithms - a statistical perspective. IEEE Transactions on Evolutionary Computation, 5(2):129-148. Howard, R. A. (1972). Dynamic Programming and Markov Processes. MIT Press, 7th edition. Law, A.M. and Kelton, W.D. (2000). Simulation Modelling and Analysis. McGraw-Hill, New York, 3rd edition. Markon, S. (1995). Studies on Applications of Neural Networks in the Elevator System. PhD thesis, Kyoto University. Markon, S., Arnold, D.V., Back, T., Beielstein, T., and Beyer, H.-G. (2001). Thresholding - a selection operator for noisy ES. In Kim, J.-H., Zhang, B.-T., Fogel, G., and Kuscu, I., editors, Proc. 2001 Congress on Evolutionary Computation (CEC'OI), pages 465-472, Seoul, Korea. IEEE Press, Piscataway NJ. Markon, S. and Nishikawa, Y. (2002). On the analysis and optimization of dynamic cellular automata with application to elevator control. The 10th Japanese-German Seminar, Nonlinear Problems in Dynamical Systems, Theory and Applications. Noto Royal Hotel, Hakui, Ishikawa, Japan. McCullagh, P. and Nelder, J.A. (1989). Generalized Linear Models. Chapman and Hall, 2nd edition. Naudts, B. and Kallel, L. (2000). A comparison of predictive measures of problem difficulty in evolutionary algorithms. IEEE Transactions on Evolutionary Computation, 4(1):1-15. Naylor, T.H. and Finger, J.M. (1967). Verification of computer simulation models. Management Science, 2:B92-B101. Reeves, C.R. and Yamada, T. (1998). Genetic algorithms, path relinking and the flowshop sequencing problem. Evolutionary Computation journal (MIT press), 6(1):230-234. Schwefel, H.-P., Wegener, I., and Weinert, K., editors (2003). Advances in Computational Intelligence - Theory and Practice. Natural Computing Series. Springer, Berlin. So, A.T. and Chan, W.L. (1999). Intelligent Building Systems. Kluwer A.P. Som, T. K. and Sargent, R. G. (1989). A formal development of event graphs as an aid to structured and efficient simulation programs. ORSA J. Comp. Whitley, D., Watson, J.P., Howe, A., and Barbulescu, L. (2002). Testing, evaluation and performance of optimization and learning systems.
128
Metaheuristics: Progress as Real Problem Solvers
Technical report, The GENITOR Research Group in Genetic Algorithms and Evolutionary Computation, Colorado State University. Wolpert, D.H. and Macready, W.G. (1997). No free lunch theorems for optimization. IEEE Tkansactions on Evolutionary Computation, l(1):67-82.
Chapter 6
MULTI-OBJECTIVE HYPER-HEURISTIC APPROACHES FOR SPACE ALLOCATION AND TIMETABLING Edmund K. Burke, J. Dario Landa Silva and Eric Soubeiga School of Computer Science and Information Technology University of Nottingham, UK (ekb,jds,exs)@cs.nott.ac.uk
Abstract: An important issue in multi-objective optimisation is how to ensure that the obtained non-dominated set covers the Pareto front as widely as possible. A number of techniques (e.g. weight vectors, niching, clustering, cellular structures, etc.) have been proposed in the literature for this purpose. In this paper we propose a new approach to address this issue in multi-objective combinatorial optimisation. We explore hyper-heuristics, a research area which has gained increasing interest in recent years. A hyper-heuristic can be thought of as a heuristic method which iteratively attempts to select a good heuristic amongst many. The aim of using a hyper-heuristic is to raise the level of generality so as to be able to apply the same solution method to several problems, perhaps at the expense of reduced but still acceptable solution quality when compared to a tailor-made approach. The key is not to solve the problem directly but rather to (iteratively) recommend a suitable heuristic chosen because of its performance. In this paper we investigate a tabu search hyper-heuristic technique. The idea of our multi-objective hyper-heuristic approach is to choose, at each iteration during the search, the heuristic that is suitable for the optimisation of a given individual objective. We test the resulting approach on two very different real-world combinatorial optimisation problems: space allocation and timetabling. The results obtained show that the multi-objective hyper-heuristic approach can be successfully developed for these two problems producing solutions of acceptable quality. Keywords: Multi-objective optimisation, Pareto optimisation, hyper-heuristic, local search, diversity preservation.
130
6.1
Metaheuristics: Progress as Real Problem Solvers
INTRODUCTION
In multi-objective optimisation the aim is to find solutions that represent a compromise between the various (sometimes conflicting) criteria used to evaluate the quality of solutions. A solution x is said t o be non-dominated with respect to a set of solutions S if there is no other solution in S that is, as good as x in all the criteria and better than x in at least one of the criteria. In Pareto optimisation the goal is to find a set of non-dominated solutions that is representative of the whole trade-off surface, i.e. a non-dominated set that is a good approximation to the Pareto optimal front (Steuer 1986; Rosenthal 1985). A hyper-heuristic can be viewed as a heuristic that (iteratively) chooses between given heuristics in order to solve an optimisation problem (Burke et al. 2003). One of the main aims of exploring hyperheuristics is to raise the level of generality at which most current met* heuristic systems operate. A hyper-heuristic is not concerned with solving a given problem directly as is the case with most meta-heuristic implementations. Instead, a hyper-heuristic solves the problem indirectly by recommending which solution method (e.g. heuristic) to apply at which stage of the solution process. The search is on a heuristic search space rather than a search space of potential problem solutions. One of the motivations is that the same hyper-heuristic method can be applied to a range of problems. For each application problem, our hyper-heuristic only needs a set of heuristics and a formal means for evaluating solution quality (Burke et al. 2003b). The goal is to raise the level of generality of decision support methodology perhaps at the expense of reduced - but still acceptable - solution quality when compared to tailor-made meta-heuristic approaches. Over the past decade or so, hyper-heuristics have been successfully investigated for a number of optimisation problems (e.g. Ayob and Kendall 2004; Burke et al. 2003b; Burke and Newall 2004; Cowling et al. 2000; Cowling et al. 2002; Cowling et al. 2002b; Han and Kendall 2003; Gaw et al. 2004; Ross et al. 2002; Ross et al. 2003). An underlying principle in using a hyper-heuristic approach is that different heuristics have different strengths and weaknesses and it makes sense to try and combine them (the heuristics) in an intelligent manner so that the strengths of one heuristic can compensate for the weaknesses of another (Burke et al. 2003). This paper proposes the use of hyper-heuristics to help guide the search towards the optimisation of the different individual objectives. This would help to improve the ability of meta-heuristics based on local search to produce non-dominated fronts to better approximate the
Pareto front. By using a hyper-heuristic approach, a heuristic is chosen to guide the search towards the desired regions of the trade-off surface. This strategy takes into consideration the localization of the current solution(~)in the objective space and the ability of each neighbourhood exploration heuristic to achieve improvements on each of the individual objectives. That is, a hyper-heuristic systematically tries to apply the neighbourhood exploration heuristic that improves on 'poor7 objectives while maintaining the quality of 'rich' objectives on a given solution. This is a novel approach for tackling the problem of achieving a good coverage of the desired trade-off surface in multi-objective combinatorial optimisation.
6.2
TECHNIQUES FOR IMPROVING THE DISTRIBUTION OF NON-DOMINATED SETS
Among the meta-heuristics proposed for Pareto optimisation there are single-solution approaches and population-based approaches (Coello Coello et al. 2002; Deb 2001; Jones et al. 2001). One of the issues of major concern when developing meta-heuristics for Pareto optimisation is how to ensure that the algorithm produces a uniformly distributed nondominated set of solutions at the end of the search. Researchers have shown the importance of maintaining a good distribution of solutions along the trade-off surface for the good performance of population-based meta-heuristics for Pareto optimisation (e.g. Laumanns et al. 2001). Several strategies that aim to improve the distribution of non-dominated solutions have been proposed. For example, the search can be directed towards the desired area of the trade-off surface by tuning weights (e.g. Czyzak and Jaszkiewicz 1998; Ishibuchi et al. 2002; Ulungu et al. 1999). Clustering or niching methods attempt to achieve a good distribution by assigning fitness to solutions based on the density of solutions in a given area (e.g. Knowles and Corne 2000; Lu and Yen 2002; Socha and KisielDorohinicki 2002). Fitness sharing is a clustering technique that reduces the fitness of solutions in proportion to the number of solutions that are close together (e.g. Horn 2003; Talbi et al. 2001; Zhu and Leung 2002). Cellular structures and adaptive grids are also clustering techniques that aim to uniformly distribute the solutions over the trade-off surface (Murata et al. 2001; Toscano Pulido and Coello Coello 2003). Restricted mating sets the probability of recombining two solutions according to the degree of similarity between these solutions in order to avoid the generation of new solutions that are 'too-similar' (Ishibuchi and Shibata 2003; Kumar and Rockett 2002). Relaxed forms of the
132
Metaheuristics: Progress as Real Problem Solvers
dominance relation (e.g. Burke and Landa Silva 2002; Burke and Landa Silva 2005; Deb et al. 2003; Laumanns et al. 2002; Mostaghim and Teich 2003; Jin and Wong 2003) and entropy metrics (Gunawan et al. 2003) have also been proposed to improve the ability of multi-objective meta-heuristics to achieve a good coverage of the trade-off surface. Also, fuzzy logic has been used to provide different degrees of Pareto optimality within non-dominated sets (Farina and Amato 2003). Most of the above techniques attempt to 'restrict' the likelihood of generating solutions in 'crowded' regions of the trade-off surface and 'boost' the likelihood of generating solutions in 'under-populated' regions. F'rom these techniques, the specification of the search direction by tuning weights is the method that directly attempts to 'push' the current solution(s) towards the desired region of the trade-off surface. The hyper-heuristic approach proposed here follows this same strategy, but attempts to do it in a more 'intelligent' way by applying the neighbourhood search heuristic that is more likely to 'push' the solution in the desired direction.
6.3
A MULTI-OBJECTIVE HYPER-HEURISTIC APPROACH
In this section we first give a brief overview of the work presented in the literature related to hyper-heuristics. Then, we describe our proposed hyper-heuristic approach for multi-objective combinatorial optimisation. Next, we develop four multi-objective hyper-heuristic algorithms based on the tabu search framework proposed by (Burke et al. 2003b) for single-objective optimisation.
6.3.1
Related Work
It has been shown that the use of various 'simple' neighbourhood heuristics can be beneficial when tackling complex combinatorial optimisation problems. For example, variable neighbourhood search is based on the systematic change of the neighbourhood structure during the search (Hansen and Mladenovic 2001). Salman et al. proposed a cooperative team of heuristics to generate non-dominated solutions for the two-objective sparse knapsack problem (Salman et al. 2002). In that approach, an asynchronous architecture was implemented in which a number of heuristics (constructors, improvers and destroyers) evolve a shared population of solutions. The heuristics work in an asynchronous fashion and each one decides when to work, on which solutions to work, and how to generate or improve solutions.
Hyper-heuristics are designed to control the application of a set of heuristics during the search process (Burke et al. 2003). At each time during the search, the selection of the next heuristic to be used is based on the past performance that each of them has exhibited. Note that an important feature of hyper-heuristics is that the set of heuristics that are applied during the search can be simple neighbourhood exploration heuristics (as in Hansen and Mladenovic 2001 and Salman et al. 2002) or more elaborate algorithms such as metaiheuristics. The idea of using hyper-heuristics is that the resulting method should be able to produce solutions which are 'soon-enough, good-enough, cheap enough', while remaining competitive with problem specific techniques. Although the term hyper-heuristic has been proposed in recent years (see Burke et al. 2003), a number of these approaches have been developed particularly in the past ten years or so. For example, Hart and Ross used a genetic algorithm based hyper-heuristic to solve the job-shop scheduling problem (Hart and Ross 1998). In their approach, the chromosome represents which method to use in order to identify conflicts amongst schedulable operations and which heuristic to use in order to select an operation from the conflicting sets. Cowling et al. applied a genetic algorithm based hyper-heuristic to tackle the trainer scheduling problem in which the chromosome represents the ordered sequence of simple heuristics to be applied during the search process (Cowling et al. 2002). The application of hyper-heuristics using a simple choice function to rank a set of simple heuristics has been reported in (Cowling et al. 2000; Cowling et al. 2001; Cowling et al. 2002).
6.3.2
The Proposed Approach
The multi-objective hyper-heuristic approach proposed here is based on a tabu-search hyper-heuristic method which was developed in (Burke et al. 2003b) for single-objective optimisation. The performance of a given neighbourhood exploration heuristic may depend on the problem domain, the particular instance of the problem domain and the present conditions of the search process. For some multi-objective combinatorial optimisation problems, a set of simple neighbourhood exploration heuristics can be developed fairly quickly. Then, the approach proposed here selects the most appropriate neighbourhood heuristic at certain points during the search in order to 'push' the solution in the desired direction towards the Pareto optimal front. An 'intelligent' way to do this is by 'learning' how well each simple heuristic achieves improvements on each of the objectives of a given solution. Having a hyper-heuristic that systematically chooses the best strategy to explore the neighbourhood
Metaheuristics: Progress as Real Problem Solvers objective v
objective u
a)
improves v small large improves u deteriorates u
small large large
H2Hs
-------------
-----
HI Hs Hs
H ' ,
deteriorates v small large ---a-
-------------
Hs H7
---------
Figure 6.1. a). Towards a better coverage of the trade-off surface. Solutions in crowded regions of the trade-off surface (such as solution B) are pushed towards the under-populated regions (such as the region enclosed by the rectangle). b). Directed neighbourhood search for a better coverage of the tradeoff surface. Each heuristic might produce an improvement or detriment on each particular objective. Then, the adequate heuristics can be applied to improve upon specific objectives and hence, to push the solution from one region of the trade-off surface to another region.
of the current solution(s) can help to obtain a uniformly distributed set of non-dominated solutions. The 'learning' mechanism can be implemented so as to 'reward' well-performing heuristics and 'punish' badlyperforming ones. The hyper-heuristic therefore maintains a list of the heuristics and controls their application during the search following the principles of tabu search (Glover and Laguna 1997). The tabu search hyper-heuristic measures the performance of each simple neighbourhood exploration heuristic and adapts it according to the knowledge gained during the search and during previous runs of the algorithm. The aim of this adaptation is to approximate the trade-off surface in a more efficient way by using those moves that are more promising according to the current quality of the various objectives and the historical knowledge about the search process.
The idea described above is illustrated in Fig. 6.1, where a twoobjective minimisation problem is considered. The desired trade-off surface and three non-dominated solutions are shown. Solutions A and B are 'good' with respect to the objective u but are 'bad' with respect to the objective v. On the other hand, solution C is 'good' with respect to objective v but it is 'bad' with respect to objective u. The region of the trade-off surface enclosed in the rectangle can be considered to be underpopulated because no solutions have been found in that area. Figure 6.1 shows how each of eight neighbourhood heuristics could perform with respect to each objective. Then, in order to obtain a better coverage of the trade-off surface, the following strategy can be used: maintain solutions A and C in their current locations and 'push7 solution B towards the under-populated region. This can be achieved by applying a heuristic which yields a large improvement on objective v (possibly with a small deterioration on objective u). Heuristics HI, H8, and H5 of Fig. 6.1 can be considered good candidate heuristics to achieve this. The challenge for the hyper-heuristic is to choose the right heuristic for the right operation at the right time during the search. It should be noted that the hyper-heuristic thus operates in the heuristic space as opposed to most implementations of meta-heuristics which operate in the solution space.
6.3.3
The Tabu Search Hyper-heuristic Framework
The basic idea of the tabu search hyper-heuristic framework was initially introduced in (Burke et al. 2003b). In this framework, the heuristics can be thought of as competing with one another. The competition rules are inspired from the principles of reinforcement learning (Kaelbling et al. 1996; Sutton and Barto 1998). At the beginning of the search each heuristic k has a score of 0 points (i.e. rk = 0). These scores are allowed to decrease and increase - within the interval [rmin,r,,,], where rmin,r,, are respectively the lower and upper rankings - to reflect the performance of the corresponding heuristics. Let A represent the change in the objective function value from the previous solution to the new one. If the application of a given heuristic results in an improvement of the current solution (i.e. A > 0) then the score of the heuristic is increased, e.g. rk = r k +a. Otherwise it is decreased, e.g. r k = r k -a, where a is a positive number. There are several ways to choose a. Here we choose a = 1 (see Burke et al. 2003b). In addition to this ranking scheme, a tabu list of heuristics is maintained, which excludes certain heuristics from the competition for a certain duration. The basic idea of the tabu list is to prevent a heuristic
136
Metaheuristics: Progress as Real Problem Solvers
which did not perform well from being chosen too soon (even if it has the highest rank). More precisely, we include heuristic k in the tabu list (on a 'First In - First Out' basis) if A is non-positive. Furthermore, heuristics already in the tabu list are released if A is positive. The idea is that there is no point in keeping a heuristic tabu once the current 0). Thus we employ a solution has been improved (e.g. when A variable-length dynamic tabu list of heuristics. The basic tabu search hyper-heuristic can be outlined by the following pseudocode:
>
Do 1- Select the heuristic, k, with highest rank and apply it. 2- If A > 0 then rk = rk a and empty TABULIST. 3- Else rk = rk - a and include k in TABULIST.
+
Until Stopping condition is met.
6.3.4
Multi-objective Tabu Search Hyper-heuristic Algorithms
In this paper we propose to adapt the above single-objective hyperheuristic approach to multi-objective optimisation. Consequently, the following modifications are made:
1 The performance of each heuristic is no longer evaluated with respect to a single objective (or aggregate objective) but instead with respect to individual objectives. This implies that A is replaced with A, and rk is replaced with rk(u)where u = 1,2, ...q and q is the number of objectives in the problem. 2 As a result of the above change, we also have to decide (choose) which individual objective to deal with at any one time.
3 A third level of design concerns the tabu list. It is obvious that instead of one tabu list, we may now have several (i.e. one tabu list for each of the q objectives). We implemented three algorithms with different combinations of the above three modifications. Within the three algorithms, heuristic performance is evaluated with respect to each objective.
Single Tabu Random Uniform (TSRandUnif). In this algorithm the individual objective is chosen uniformly at random. Here, there is only one tabu list. The algorithm works as shown in the pseudocode below. The on-line non-dominated set contains all the nondominated solutions that are obtained in each iteration of step 2. That
is, for each solution in the initial population. The off-line non-dominated set contains the non-dominated solutions obtained from the P on-line non-dominated sets.
1- Randomly generate an initial population of P solutions. 2- For each solution in the initial population, Do 2.1- Select an individual objective u uniformly at random. 2.2- Select the heuristic, k, with highest rank r k ( u )and apply it to the current solution. 2.3- If A, > 0 then rk(u)= rk(u) a and empty TABULIST. 2.4- Else r k ( u )= rk(u)- a and include k in TABULIST. 2.5- For all other individual objectives v = 1,2, ...q and v # u, Do 2.5.1- If A, > 0 then rk(v)= r k ( v ) a. 2.5.2- Else r k ( v )= r k ( v )- a. 2.6- Update the on-line set of non-dominated solutions. 3- Until Stopping condition is met. 4- Generate the 08-line set of non-dominated solutions.
+
+
.
In this alSingle Tabu Roulette-Wheel (TSRoulWheel) gorithm the choice of individual objectives is based on roulette-wheel selection (see Goldberg 1989). A given individual objective u is chosen with a probability that is proportional to the distance from the value of u in the current solution to the value of u in an ideally optimal solution (i.e. a solution in which the value of each objective is optimal - such a solution may not exist.). The idea here is that the worse the value of an individual objective (relative to the others), the higher the probability of that objective being chosen by the roulette-wheel selection. Of course, the sum of all probabilities over all the individual objectives must be equal to 1. As in the previous algorithm, here too, there is only one tabu list. The algorithm works as follows:
1- Randomly generate an initial population of P solutions. 2- For each solution in the initial population, Do 2.1- Select individual objective u using roulette wheel selection. 2.2- Select the heuristic, k, with highest rank r k ( u )and apply it to the current solution. 2.3- If A, > 0 then rk( u )= rk(u) a and empty TAB ULIST. 2.4- Else rk(u)= rk(u)- a and include k in TABULIST. 2.5- For all other individual objective v = 1,2, ...q and v # u, Do 2.5.1- If A, > 0 then rk(v)= rk(v) a. 2.5.2- Else rk(v)= rk(v)- a.
+
+
138
Metaheuristics: Progress as Real Problem Solvers
2.6- Update the on-line set of non-dominated solutions. 3- Until Stopping condition is met. 4- Generate the off-line set of non-dominated solutions.
Multiple Tabu Roulette-Wheel (MTSRoulWheel). In this algorithm the choice of individual objectives is based on roulette-wheel selection as in the previous one (TSRoulWheel). However, this algorithm maintains multiple tabu lists. In effect, there is one tabu list for each objective u = 1,2, ...,q. The algorithm works as follows: 1- Randomly generate an initial population of P solutions. 2- For each solution in the initial population, Do 2.1- Select individual objective u using roulette wheel selection. 2.2- Select the heuristic, k:, with highest rank: r k ( u ) and apply it to the current solution. 2.3- For each objective u = 1,2, ...q, Do 2.3.1- If A, > 0 then r k ( u )= r k ( u ) a and empty TABULIST(u). 2.3.2- Else r k ( u )= r k ( u )- a and include k: in TABULIST(u). 2.4- Update the on-line set of non-dominated solutions. 3- Until Stopping condition is met. 4- Generate the off-line set of non-dominated solutions.
+
It can be seen from the above procedures that the main difference between TSRandUnif on the one hand and TSRoul Wheel and MTSRoulWheel on the other hand is in step 2.1, which is a simple random uniform selection for the former and a roulette wheel selection for the two latter algorithms. The difference between TSRoul Wheel and MTSRoul Wheel is in the number of tabu lists used.
.
Pure Random (PureRand) In order to investigate if there is a benefit in incorporating a learning mechanism (which, in this case, consists of the heuristic ranking system, the tabu list of heuristics and the objective selection mechanism) into our hyper-heuristics, we implemented one algorithm in which the learning is disabled. In the complete absence of a learning mechanism the choice of a heuristic is simply made randomly. The resulting algorithm, repeatedly chooses one heuristic uniformly at random and applies it once. This simple algorithm is illustrated in the following pseudocode. 1- Randomly generate an initial population of P solutions. 2- For each solution in the initial population, Do
2.1- Select a heuristic uniformly at random and apply it once to the current solution. 2.2- Update the on-line set of non-dominated solutions. 3- Until Stopping condition is met. 4- Generate the '08-line' set of non-dominated solutions. Note that, like the tabu search hyper-heuristics, PureRand maintains an on-line non-dominated set of solutions. It also produces the off-line non-dominated set of solutions, which is the output of the algorithm. In the next two sections we report results that are obtained by applying the above hyper-heuristic approaches to two different real-world combinatorial optimisation problems. As already mentioned, in order to apply a hyper-heuristic to a given problem, all that is needed is a set of simple neighbourhood search heuristics and a means of evaluating solution quality. These will be given for each problem considered below. It should be noted that our multi-objective hyper-heuristic approaches are not designed with a particular problem in mind. On the contrary, the goal is to develop an approach which is more general than current meta-heuristic approaches to multi-objective optimisation. Moreover, the only mechanism used to obtain a good distribution of solutions over the trade-off surface is the learning mechanism incorporated into the hyper-heuristics. We show below that our approach is both effective and general in terms of the two problems considered in this paper.
6.4
APPLICATION TO SPACE ALLOCATION
In this section we present the application of the multi-objective hyperheuristic approaches described above to the space allocation problem. This problem refers to the distribution of office space in academic institutions. First, we give a description and formulation of the problem. Then, we describe the heuristics employed to carry out the neighbourhood search. This is followed by a presentation and discussion of the results obtained in our computational experiments.
6.4.1
Problem description
The space allocation problem is a difficult real-world combinatorial optimisation problem that is closely related to the class of knapsack problems (Martello and Toth 1990). The particular space allocation problem considered here is the distribution, in an academic institution, of the available room space among a set of entities (staff, research students, computer rooms, lecture rooms, etc.) in such a way that the misuse of room space and the violation of soft constraints are minimised.
140
Metaheuristics: Progress as Real Problem Solvers
Soft constraints are restrictions that limit the ways in which the entities can be allocated to the rooms (e.g. entities that should not share a room, entities that should be allocated together, etc.) and that are penalised if violated. The following types of constraints exist in the problem instances considered in this paper:
1 Not Sharing - two entities cannot share a room (e.g. professors must have private offices). A penalty of 50 is applied if a constraint of this type is violated. 2 Be located in - a given entity should be allocated to a given room (eg. a computer lab). A penalty of 20 is applied if a constraint of this type is violated.
3 Be adjacent to - two given entities should be allocated in adjacent rooms (e.g. a PhD student and his supervisor). A penalty of 10 is applied if a constraint of this type is violated. 4 Be away from - two given entities should be allocated away from each other (e.g. lecture room and photocopier room). A penalty of 10 is applied if a constraint of this type is violated.
5 Be together with - two given entities should be allocated in the same room (e.g. two PhD students working on the same project). A penalty of 10 is applied if a constraint of this type is violated. 6 Be grouped with - a given entity should be allocated in a room that is 'close' to a given set of entities (e.g. the members of a research group). A penalty of 5 is applied if a constraint of this type is violated. When a particular constraint is not soft but hard, it must be satisfied for the solution to be considered feasible. Depending on the problem instance, any of the above types of constraints can be hard or soft. More formally, the space allocation problem refers to the allocation of a set of n entities into a set of m available rooms. Each entity j = 1,2, ...,n has a space requirement w(j). Similarly, each room i = 1,2, ...,m has a capacity c(i). Each entity must be allocated to exactly one room and each room can contain zero or more entities. The aggregated space requirements of all the entities allocated to a room i is denoted Q(i). For a given room i, there is space wastage if c(i) > Q(i) and there is space overuse if c(i) < Q(i). There is a penalty of 1for each unit of space wasted and a penalty of 2 for each unit of space overused (it is less desirable to overuse space than to waste it). The sum of penalties due to space wastage and to overused space for all m rooms is called
space misuse and is denoted by F1. The sum of all penalties due to the violation of soft constraints is denoted by F2. This problem is tackled as a two-objective optimisation problem in this paper, where F1 and F 2 are minimisation objectives. A solution or allocation is represented by a vector n of length n where each element n ( j ) E 1,2, ..,m for j = 1,2, ...,n indicates the room to which the entity j is allocated. For a more detailed description of the space allocation problem see (Burke and Varley 1998; Landa Silva 2003).
6.4.2
Neighbourhood Search Heuristics
Several neighbourhood exploration heuristics have been designed based on three moves: relocate, swap and interchange. A relocate move changes one entity from one room to another. In a swap move, the assigned rooms between two entities are swapped. The third move interchanges all the entities between two rooms. That is, there are three neighbourhood structures, one defined by each type of move. However, there can be many ways in which to explore each of these neighbourhood structures and each of these is a neighbourhood exploration heuristic. In our implementation, there are three neighbourhood structures and nine neighbourhood exploration heuristics, three for each neighbourhood structure. These neighbourhood exploration heuristics are outlined below.
RelocateRndRnd: Selects an allocated entity and room at random and relocates the entity to the chosen room. RelocateRndBestRnd: Selects an allocated entity at random. Next, explores a number of randomly selected rooms evaluating the suitability of each of them to relocate the selected entity. Then, the chosen entity is relocated to the best of the subset of explored rooms. RelocatePenaltyBestRnd: The allocated entities are sorted in nonincreasing order of their individual penalties (violation of soft constraints). In each iteration, the allocated entity with the highest penalty is selected and the room to relocate this entity is chosen with the same procedure as in RelocateRndBestRnd. SwapRndRnd: Selects two allocated entities at random and makes the swap move. SwapRndBestRnd: Selects an allocated entity at random. Next, explores a number of randomly selected allocated entities evaluating the suitability of each of them to be swapped with the other entity.
142
Metaheuristics: Progress as Real Problem Solvers Then, the best of the subset of explored entities is chosen to make the swap move.
SwapPenaltyBestRnd: The allocated entities are sorted in nonincreasing order of their individual penalties (violation of soft constraints). The allocated entity with the highest penalty is selected and the other entity to make the swap is chosen with the same procedure as in SwapRndBestRnd. InterchangeRndRnd: Selects two rooms at random and makes the interchange move. InterchangeRndBestRnd: Selects a room at random. Next, it plores a number of randomly selected rooms and evaluates suitability of each of them to make the interchange. Then, best of the subset of explored rooms is chosen to implement interchange move.
exthe the the
InterchangePenaltyBestRnd: The rooms are sorted in non-increasing order of their individual penalties (space misuse and violation of soft constraints). The room with the highest penalty is selected and the room to make the interchange is chosen with the same procedure as in InterchangeRndBestRnd.
6.4.3
Computational results
Experimental Settings. All algorithms were coded in Microsoft Visual C++ version 6, and all experiments were run on a PC Pentium 111 lOOOMHz with 128MB RAM running on Microsoft Windows 2000. Three problem instances: nottl, nottlb and trentl were used in these experiments. The nottl and nottlb test intances were prepared using real data corresponding to the distribution of office space in the School of Computer Science and Information Technology at the University of Nottingham during the 1999-2000 academic year. In the nottl instance there are 131 rooms, 158 entities to be allocated, and 263 constraints (111hard and 152 soft). The nottlb instance has 115 rooms, 142 entities, and 260 constraints (110 hard and 150 soft). The trentl instance was prepared using real data corresponding to the distribution of office space in the Chaucer bulding at the Nottingham Trent University during the 20002001 academic year. In the trentl instance there are 73 rooms, 151 entities, and 211 constraints (80 hard and 131 soft). For full details of these data sets see www. cs . n o t t .ac .uk/"jds/research/spacedata.html. For each test instance, a population of size 20 was generated as follows. One entity is selected at random. Then, the best of a subset of randomly
selected rooms is chosen to allocate the entity, ensuring that no hard constraint is violated. This process is repeated for each entity until all of them are allocated to a room. Each of the four hyper-heuristic algorithms described in section 6.3.4 was applied to each of the problem instances. The termination condition for each algorithm was set to a maximum number of solution evaluations eval (i.e. eval/P evaluations for each solution in the population). The value of eval was set to 100000, 80000 and 50000 for nottl, nottlb and trentl respectively. The off-line non-dominated sets obtained by the algorithms are shown in Fig. 6.2.
Comparing the Hyper-heuristic Approaches. It is clearly observed in Fig. 6.2 that for the three problem instances, the TSRoul Wheel hyper-heuristic produces the best non-dominated sets. This algorithm seems to be particularly good when applied to the problem nottl because each of the solutions produced by this algorithm dominates all the solutions obtained by the other three approaches. For the problems nottlb and trentl, the TSRoulWheel algorithm produces one or more solutions that dominate each single one of the solutions obtained with the other algorithms. Furthermore, TSRoul Wheel achieves a good coverage of the trade-off front in the three problem instances while the non-dominated solutions produced by the other three algorithms produce solutions that are clustered in some region on the trade-off front. That is, from these results, it can be visually verified that the best non-dominated fronts for the three problem instances are obtained with the TSRoulWheel hyperheuristic. There is not a clear ranking when comparing the performances of the other three algorithms. Only in the instance trentl does TSRand Unif clearly outperform MTSRoul Wheel and PureRand. It can also be observed in Fig. 6.2 that the learning mechanism incorporated into the TSRoulWheel algorithm (the combination of the heuristic ranking system, the tabu list of heuristics and the objective selection mechanism) seems to be effective in managing the set of simple neighbourhood search heuristics for obtaining good sets of non-dominated solutions. From the other three algorithms, PureRand does not incorporate any element of the learning mechanism and TSRandUnif does not incorporate the roulette-wheel mechanism to select the objective. In the case of MTSRoulWheel, it seems that having two lists of heuristics deteriorates the performance of the learning mechanism. The mechanism implemented in MTSRoulWheel to manage one tabu list for each objective (two in this problem) is a basic one, it simply associates one tabu list to each objective. We are currently investigating more sophisticated mechanisms to manage the tabu list(s) of heuristics.
Metaheuristics: Progress as Real Problem Solvers
2400
Problem nottl
1500
Problem nottl b
1250
A~
- --
- - --
-1
A TSRandUlif
Problem trentl
0 TSWuNVhoel 0M T s R w m e e l
03 4750
-
+ RreRand
Figure 6.2. Non-dominated sets obtained with each of the hyper-heuristics for the problems a) nottl, b) nottlb and c) trentl.
Comparison with a Population-based Annealing Algorithm. A population-based annealing algorithm (PBAA) has been tailored for the space allocation problem (Burke and Landa Silva 2005). This algorithm is fairly sophisticated and a considerable amount of work has been invested in its design. This approach is a hybrid algorithm that evolves a population of solutions using a local search heuristic HLS and a mutation operator. This local search heuristic manages the same simple neighbourhood search heuristics described above for the space allocation problem. However, HLS incorporates knowledge of the problem domain to decide which neighbourhood search heuristic to apply according to the status of the current solution. The mutation operator disturbs a solution in a controlled way by removing from their assigned room those entities that have the highest penalties. These entities are then re-allocated to different rooms in an attempt to diversify the search. A common annealing schedule controls the evolution of the whole population and a cooperation mechanism is incorporated in order to encourage the sharing of good parts of solutions among individuals in the population and hence, to avoid the exploration of already visited bad solutions. A more detailed description of this population-based annealing algorithm can be seen elsewhere (Burke and Landa Silva 2005). The non-dominated fronts obtained by the TSRoul Wheel algorithm above are compared with those produced by the PBAA approach in Fig. 6.3. The results for PBAA were reported in (Burke and Landa Silva 2005) and were obtained using the same termination condition used in this paper and on the same computer. The results shown in Fig. 6.3 show that none of the two algorithms appears to clearly outperform the other one. For example, in problem nottl, the TSRoulWheel produces a better front. In the problem nottlb, TSRoulWheel outperforms PBAA in the upper part of the trade-off surface while PBAA does better in the lower part of the front. In the problem trentl, the PBAA algorithm clearly obtains better results than TSRoulWheel. We have shown in (Burke and Landa Silva 2005) that knowledge of the problem domain incorporated into the PBAA approach helps to obtain high quality sets of non-dominated solutions. Here, we can see that the fairly simple TSRoulWheel hyper-heuristic approach appears to be competitive. As noted above, we do not expect the TSRoulWheel hyper-heuristic approach to produce better solutions than a well-tuned algorithm that incorporates knowledge of the problem domain. But, as we show here, this multi-objective hyper-heuristic is easy to implement and produces acceptable results. In the next section, we apply the four hyper-heuristics to the university course timetabling problem. We aim to demonstrate that these approaches are not only effective but that they can also be
Metaheuristics: Progress as Real Problem Solvers 1500
Problem nolti
Figure 6.3. Non-dominated sets obtained by the TSRoulWheel hyper-heuristic and the tailor-made Population-based Annealing Algorithm (PBAA) for the problems a) nottl, b) nottlb and c) trentl.
readily applied to different problems with solution quality still being competitive.
6.5
APPLICATION TO TIMETABLING
In this section we present the application of the multi-objective hyperheuristic approaches described above to the course timetabling problem. This problem refers to the scheduling of a set of events to a time period while satisfying a number of constraints. First, we give a description and formulation of the problem. Then, we describe the heuristics employed to carry out the neighbourhood search. This is followed by a presentation and discussion of the results obtained in our computational experiments.
6.5.1
Problem description
In the university course timetabling problem the aim is to schedule a number of events such as lectures, seminars, tutorials, etc. in the available timeslots and satisfying a number of additional constraints (see Burke et al. 1997; Carter and Laporte 1998; Schaerf 1999). The problem instances used in this paper are taken from the literature (Rossi-Doria et al. 2003; Socha et al. 2002). L is the set of events to be scheduled. There are 5 days and in each day there are 9 hourly timeslots, that is, there are 45 available timeslots in total. R is the set of rooms in which events can take place. S denotes the set of students who attend the events. There is also a set F of features satisfied by rooms and required by events (e.g. event e requires a room equipped with an overhead projector, or a sound system, video conference facilities etc.). Each student is required to attend a number of events. Each room has a maximum seating capacity. The following constraints are considered to be hard (must be satisfied): 1 No student can attend more than one event in the same timeslot.
2 The room in which an event takes place, satisfies all the features required by the event. 3 The capacity of the room cannot be exceeded. 4 At most one event is scheduled in the same combination of room and timeslot. The soft constraints (desirable to be satisfied) are listed below:
1 A student has a scheduled event in the last timeslot of the day. 2 A student should attend more than 2 consecutive events.
148
Metaheuristics: Progress as Real Problem Solvers
3 A student has only one event to attend on a given day.
+
Burke et al. used E = 1000 x Hcv Scv, where Hcv is the number of hard constraint violations and Scv the number of soft constraint violations, to evaluate solution quality (Burke et al. 2003b). Here, we tackle the problem in a multi-objective fashion. Feasible solutions (ones which satisfy the hard constraints) are those for which Hcv = 0. Each feasible solution is then evaluated using the following three objectives to be minimised: L S (respectively EiR and SC) counts the number of violations of the first (respectively second and third) soft constraint. We represent solutions in the same way as in (Rossi-Doria et al. 2003; Socha et al. 2002). A timetable is represented using a vector of length ILJ. Each position in the vector corresponds to one event. That is, position j corresponds to event e j for j = 1,. ,I LI. In each position of the vector, there is an integer number in the interval [I,451 that indicates the timeslot in which the corresponding event has been scheduled. For example, in the vector: [39, 10, ..., 451, event el is scheduled in timeslot 39, ea is scheduled in timeslot 10, ..., and event e l ~ lis scheduled in timeslot 45. Similarly to (Rossi-Doria et al. 2003; Socha et al. 2002), in this paper we also tackle the problem of room assignment in a separate way by means of a matching algorithm. This algorithm is applied to the solution every time the solution is modified by any of the neighbourhood search heuristics. These heuristics are described next.
6.5.2
Neighbourhood Search Heuristics
We used eight neighbourhood search heuristics which are all simple and based on the neighbourhood moves described in (Rossi-Doria et al. 2003; Socha et al. 2002). These heuristics are described as follows: hl: Select an event at random and move it from its current timeslot to a different timeslot selected at random too. This move is performed only if Hcv > 0 (i.e. solution is infeasible). h2: Select an event at random and move it from its current timeslot to a different timeslot selected at random too. This move is performed only if Hcv = 0 (i.e. solution is already feasible) and the move does not result in Hcv > 0. h3: Swap the timeslots of two events selected at random. This move is performed only if Hcv > 0 (i.e. solution is infeasible). h4: Swap the timeslots of two events selected at random. This move is performed only if Hcv = 0 (i.e. solution is already feasible) and the move does not result in Hcv > 0.
h5: Same as the heuristic [hl] but the timeslot selected for the move is the first one that provokes an improvement on H c v . h6: Same as the heuristic [h2] but the timeslot selected for the move is the first one that provokes an improvement on Scv. h7: Same as the heuristic [h3] but the pair of timeslots selected for the swap is the first one that provokes an improvement on H c v . h8: Same as the heuristic [h4] but the pair of timeslots selected for the swap is the first one that provokes an improvement on Scv. where Scv = LS
6.5.3
+ E i R + SC is the aggregate objective.
Computational Results
Experimental Settings. All algorithms were coded in Microsoft Visual C++ version 6, and all experiments were run on a PC Pentium I11 1000MHz with 128MB RAM running on Microsoft Windows 2000. To test the effectiveness of our hyper-heuristic approaches we considered problem instances taken from (Socha et al. 2002). A set of 20 initial feasible solutions were randomly obtained using the basic tabu search hyper-heuristic of (Burke et al. 2003b). To allow for a fair comparison, all four algorithms described above in this paper ( TSRand Unif, TSRoulWheel, MTSRoulWheel and PureRand) start from the same initial set of solutions. Each of the 20 initial solutions is generated using the same algorithm of (Burke et al. 2003b) with different random seeds. Comparing the Hyper-heuristic Approaches. We show in Fig. 6.4 to 6.6 the off-line non-dominated sets obtained by all four algorithms when applied to three problem instances of medium size (400 events, 10 rooms and 5 features) described in (Socha et al. 2002). The stopping condition is 1000 iterations for each individual solution, i.e. 20000 iterations for the whole population. Of the four algorithms, we note that PureRand performs the poorest. This shows that the benefit obtained by incorporating a learning mechanism into the hyper-heuristic approaches is more evident in this problem than in the space allocation problem above. In the absence of an intelligent mechanism to 'learn' to choose a 'good' heuristic at each decision point, the PureRand algorithm is bound to perform poorly. It can also be said that, overall, TSRoulWeel and MTSRoulWeel seem to produce the best sets of non-dominated solutions. It is striking to note that MTSRoulWeel .does not always get so close to the desired trade-off front. This (relatively) poor performance from MTSRoul Wee1 can be explained by the use of multiple tabu lists.
Metaheuristics: Progress as Real Problem Solvers
Figure 6.4. Non-dominated sets obtained with each of the hyper-heuristics for the problem M2.
Indeed, the use of several tabu lists may lead to an overhead in terms of tabu list management. As it was also observed in the application to the space allocation problem, it seems that having just one tabu list is good enough to produce solutions of acceptable quality. Perhaps, more elaborate mechanisms of dealing with multiple tabu lists of neighbourhood search heuristics can help to obtain better results in the MTSRoulWheel. We are currently exploring this possibility.
Comparison with Previous Results. As indicated above, we are tackling the course timetabling problem in a multi-objective fashion. In order to find out if the solutions produced by our approaches are competitive with those obtained with other methods, we compare our results with those reported in (Socha et al. 2002) and in (Burke et al. 2003b). Two tailored algorithms were used in (Socha et al. 2002), a local search approach (LLS) and an ant algorithm (ANT). In (Burke et al. 2003b), the approach presented was a single-objective tabu search hyper-heuristic. In those three algorithms, the problem is tackled as a single objective problem, i.e. using the aggregated value Scv. Here, we tackle the three objectives (LS,EiR, and SC) independently. In addition to the medium size instances M2, M3, and M4 used in the experiments above, we also compare the algorithms in the small size instance S1. To allow a comparison, we computed the aggregated objective value (Scv) for the non-dominated solutions obtained by each hyper-heuristic
Figure.6.5. Non-dominated sets obtained with each of the hyper-heuristics for the problem M3.
Figure 6.6. Non-dominated sets obtained with each of the hyper-heuristics for the problem M4.
152
Metaheuristics: Progress as Real Problem Solvers
Table 6.1. Comparison between the multi-objective tabu search hyper-heuristics with the two single-objective local search (LLS) and ant algorithms (ANT) from (Socha et al. 2002) and the single-objective hyper-heuristic (HH) approach from (Burke et al. 2003b). MTSRW is MTSRoulWheel, TSRW is TSRoulWheel, and TSRU is TSRandUnzf. For all the hyper-heuristics the table shows average Scv (if solution is feasible) / best Scv in all runs. In column LLS 77.5% Inf indicates the proportion of infeasible solutions in 40 runs. The best obtained solutions are shown in bold. Sl M2 M3 M4
MTSRW 2.311 198.41168 272.81231 189.21134
TSRW 2.1510 196.51173 276.21224 191.81160
TSRU 1.9510 219.21192 274.21244 190/149
HH 2.211 197.61173 295.41267 1801169
LLS 8 202.5 77.5% Inf 177.5
ANT 1 184 248 164.5
approach. The best and average values for each off-line non-dominated set together with the results obtained in (Socha et al. 2002) and in ( Burke et al. 2003b) are reported in Table 6.1. These results show that the sort of solutions produced by our multi-objective tabu search hyperheuristics are of comparable quality with those reported in (Socha et al. 2002) and in (Burke et al. 2003b). The average solutions obtained by the multi-objective hyper-heuristics of this paper, are competitive with those obtained by the HH, LLS, and ANT approaches. Furthermore, for all instances the best solution is obtained by one of our multi-objective hyperheuristic approaches. It should be noted that our algorithms used substantially fewer evaluations than the algorithms of (Socha et al. 2002). Overall, it can be said that our multi-objective hyper-heuristic approach is effective in tackling the three-objective course timetabling problem considered here.
6.6
THE CONCLUSIONS
The problem of obtaining a uniformly distributed set of non-dominated solutions is of great concern in Pareto optimisation. This work proposes the application of hyper-heuristics for achieving a good coverage of the trade-off surface. The central idea is to develop a strategy that selects the most promising neighbourhood search heuristic in order to guide the search towards the desired areas of the trade-off surface. This technique has the advantage that it can be applied to single-solution and to population based algorithms because no population statistics are required as would be the case in, say, some clustering techniques. Experiments have been carried out on the space allocation problem and the university course timetabling problem. By using a hyper-heuristic approach for multi-objective combinatorial optimisation, the idea is to adapt the
application of neighbourhood search heuristics according to the quality of the current solution in each of the objectives. In a way, this is similar to the strategy of tuning weights to specify search directions. The results obtained show that the hyper-heuristic approaches used here are capable of obtaining non-dominated sets that represent a good coverage of the trade-off surface. The results obtained in our experiments show that among the four approaches implemented here, the TSRoul Wheel algorithm shows the best overall performance. The learning mechanism of the TSRoulWheel approach uses two strategies. One is Roulette-Wheel selection for deciding which objective to be tackled at any one time during the search. The TSRoulWheel algorithm also employs a single tabu list to manage the tabu status of the neighbourhood exploration heuristics during the search. Future work will concentrate on the improvement of the learning mechanism and upon further testing by comparing our approach with other multi-objective optimisers from the literature.
REFERENCES Ayob M., Kendall G. (2004). A Monte Carlo Hyper-Heuristic To Optimise Component Placement Sequencing for Multi Head Placement Machine. Proceedings of the 2003 International Conference on Intelligent Technologies (InTech 2003), pp. 132-141, Chiang Mai Thailand. Burke E.K., Jackson K., Kingston J.H., Weare R. (1997). Automated University Timetabling: the State of the Art. The Computer Journal, Vol. 40, No. 9, pp. 565-571. Burke E.K., Kendall G., Newall J., Hart E., Ross P., Schulemburg S. (2003). Hyper-heuristics: an Emerging Direction in Modern Search Technology. In: Glover F.W., Kochenberger G.A. (eds.), Handbook of Metaheuristics, Kluwer Academic Publishers. Burke E.K., Kendall G., Soubeiga E. (2003b). A Tabu-search Hyperheuristic for Timetabling and Rostering. Journal of Heuristics, Vol. 9, pp. 451-470. Burke E.K., Landa Silva J.D. (2002). Improving the Performance of Multiobjective Optimisers by Using Relaxed Dominance. Proceedings of the 4th Asia-Pacific Conference on Simulated Evolution and Learning (SEAL 2002), Singapore, pp. 203-207. Burke E.K., Landa Silva J.D. (2005). The Influence of the Fitness Evaluation Method on the Performance of Multiobjective Optimisers. To appear in European Journal of Operational Research.
154
Metaheuristics: Progress as Real Problem Solvers
Burke E.K., Newall J. (2004). Solving Examination Timetabling Problems Through Adaptation of Heuristic Orderings. Annals of operations Research, Vol. 129, pp. 107-134. Burke E.K., Varley D.B. (1998). Space Allocation: An Analysis of Higher Education Requirements. The Practice and Theory of Automated Timetabling 11: Selected Papers from the 2nd International Conference on the Practice and Theory of Automated Timetabling (PATAT 97), Lecture Notes in Computer Science, Springer, Vol. 1408, pp. 2033. Carter M.W., Laporte G. (1998). Recent Developments in Practical Course Timetabling. The Practice and Theory of Automated Timetabling 11: Selected Papers from the 2nd International Conference on the Practice and Theory of Automated Timetabling (PATAT 97), Lecture Notes in Computer Science, Vol. 1408, Springer, pp. 3-19. Coello Coello C.A., Van Veldhuizen D.A., Lamont G.B. (2002). Evolutionary Algorithms for Solving Multi-Objective Problems, Kluwer Academic Publishers. Cowling P., Kendall G., Han L. (2002). An Investigation of a Hyperheuristic Genetic Algorithm Applied to a Trainer Scheduling Problem. Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), pp. 1185-1190. Cowling P., Kendall G., Soubeiga E. (2000). A Hyperheuristic Approach to Scheduling a Sales Summit. The Practice and Theory of Automated Timetabling 111: Selected Papers from the 3rd International Conference on the Practice and Theory of Automated Timetabling PATAT 2000, Lecture Notes in Computer Science, Vol. 2079, Springer, pp. 176-190. Cowling P., Kendall G., Soubeiga E. (2001). Hyperheuristics: A Tool for Rapid Prototyping in Scheduling and Optimisation. Second European Conference on Evolutionary Computing for Combinatorial Optimisation (EvoCop 2002), Lecture Notes in Computer Science, Vol. 2037, Springer, pp. 1-10. Cowling P., Kendall G., Soubeiga E. (2002b). Hyperheuristics: A Robust Optimisation Method Applied to Nurse Scheduling. Proceedings of the VII Parallel Problem Solving From Nature (PPSN VII), Lecture Notes in Computer Science, Vol. 2439, Springer, pp. 7-11. Czyzak P., Jaszkiewicz A. (1998) Pareto Simulated Annealing - A Metaheuristic for Multiple-objective Combinatorial Optimization. Journal of Multicriteria Decision Analysis, Vol. 7, No. 1, pp. 34-47.
Deb K. (2001). Multi-Objective Optimization Using Evolutionary Algorithms, Wiley. Deb K., Manikanth M., Mishra S. (2003). Towards a Quick Computation of Well-Spread Pareto Optimal Solutions. Proceedings of the 2nd International Conference on Evolutionary Multi-Criterion Optimization (EM0 2003), Faro Portugal, Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 222-236. Farina M., Amato P. (2003). Fuzzy Optimality and Evolutionary Multiobjective Optimization. Proceedings of the 2nd International Conference on Evolutionary Multi-Criterion Optimization (EM0 2003), Faro Portugal, Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 58-72. Gaw A., Rattadilok P., Kwan R.S.K. (2004). Distributed Choice Function Hyper-Heuristics for Timetabling and Scheduling. Proceedings of the 2004 International Conference on the Practice and Theory of Automated Timetabling (PATAT 2004), Pittsburgh USA, pp. 495-497. Glover F., Laguna M. (1997). Tabu Search. Kluwer Academic Publishers. Goldberg, D. (1989). Genetic Algorithms in Search, Optimisation and Machine Learning. Addison Wesley. Gunawan S., Farhang A., Azarm 5. (2003). Multi-level Multi-objective Genetic Algorithm Using Entropy to Preserve Diversity. Proceedings of the 2nd International Conference on Evolutionary Multi-Criterion Optimization (EM0 2003), Faro Portugal, Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 148-161. Han L., Kendall G. (2003). Investigation of a Tabu Assisted HyperHeuristic Genetic Algorithm. Proceedings of the 2003 Congress on Evolutionary Computation (CEC2003), Canberra Australia, pp. 22302237, IEEE Press. Hansen P., Mladenovic N. (2001). Variable Neighbourhood Search: Principles and Applications. European Journal of Operational Research, Vol. 130, No. 3, pp. 449-467. Hart E., Ross P. (1998). A Heuristic Combination Method for Solving Job-shop Scheduling Problems, Proceedings of the V Parallel Problem Solving From Nature (PPSN V), Lecture Notes in Computer Science, Vol. 1498, Springer, pp. 845-854. Horn J. (2003). Niche Distributions on the Pareto Optimal Front, Proceedings of the 2nd International Conference on Evolutionary MultiCriterion Optimization (EM0 2003), Faro Portugal, Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 365-375.
156
Metaheuristics: Progress as Real Problem Solvers
Ishibuchi H., Yoshida T., Murata T. (2002). Selection of Initial Solutions for Local Search in Multiobjective Genetic Local Search. Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), Hawaii USA, pp. 950-955. Ishibuchi H., Shibata Y. (2003). An Empirical Study on the Effect of Mating Restriction on the Search Ability of EM0 Algorithms. Proceedings of the 2nd International Conference on Evolutionary MultiCriterion Optimization (EM0 2003), Faro Portugal, Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 433-447. Jin H., Wong M.L. (2003). Adaptive Diversity Maintenance and Convergence Guarantee in Multiobjective Evolutionary Algorithms. Proceedings of the 2003 Congress on Evolutionary Computation (CEC 2003), Camberra Australia, IEEE Press, pp. 2498-2505. Jones D.F., Mirrazavi S.K., Tamiz M. (2001). Multiobjective Metaheuristics: An Overview of the Current State-of-the-Art. European Journal of Operational Research, Vol. 137, No. 1, pp. 1-9. Kaelbling L.P., Littman M.L., Moore A.W. (1996). Reinforcement Learning: A Survey, Journal of Artificial Intelligence Research, Vol. 4, pp. 237-285. Knowles J., Corne D.C. (2000). Approximating the Nondominated Front Using the Pareto Archived Evolution Strategy, Evolutionary Computation, Vol. 8, No. 2, pp. 149-172. Kokolo I., Hajime K., Shigenobu K., Failure of Pareto-based MOEAS, Does Non-dominated Really Mean Near to Optimal?, Proceedings of the 2001 Congress on Evolutionary Computation (CEC 2001), pp. 957962, 2001. Kumar R., Rockett P. (2002). Improved Sampling of the Pareto-front in Multiobjective Genetic Optimization by Steady-state Evolution: A Pareto Converging Genetic Algorithm, Evolutionary Computation, Vol. 10, No. 3, pp. 283-314. Landa Silva J.D. (2003). Metaheuristic and Multiobjective Approaches for Space Allocation. PhD Thesis, School of Computer Science and Information Technology, University of Nottingham. Laumams M., Thiele L., Deb K., Zitzler E. (2002). Combining Convergence and Diversity in Evolutionary Multiobjective Optimization. Evolutionary Computation, Vol. 10, No. 3, pp. 263-282. Laumanns M., Zitzler E., Thiele L. (2001). On the Effects of Archiving, Elitism, and Density Based Selection in Multi-objective Optimization. Proceedings of the 1st International Conference on Evolutionary
Multi-Criterion Optimization (EM0 2001), Lecture Notes in Computer Science, Vol. 1993, Springer, pp. 181-196. Lu H., Yen G.G. (2002). Rank-density Based Multiobjective Genetic Algorithm. Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), Hawaii USA, IEEE Press, PP. 944-949. Martello S., Toth P. (1990). Knapsack Problems - Algorithms and Computer Implementations.Wiley. Mostaghim S., Teich J. (2003). The Role of e-dominance in Multiobjective Particle Swarm Optimization Methods. Proceedings of the 2003 Congress on Evolutionary Computation (CEC 2003), Camberra Australia, IEEE Press, PP. 1764-1771. Murata T., Ishibuchi H., Gen M. (2001). Specification of Genetic Search Directions in Cellular Multi-objective Genetic Algorithms. Proceedings of the 1st International Conference on Evolutionary MultiCriterion Optimization (EM0 2001), Lecture Notes in Computer Science, Vol. 1993, Springer, pp. 82-95. Rosenthal R.E. (1985). Principles of Multiobjective Optimization. Decision Sciences, Vol. 16, pp. 133-152. Ross P., Marin-Blazquez J.G., Schulenburg S., Hart E. (2003). Learning a Procedure that Can Solve Hard Bin-packing Problems: A New GAbased Approach to Hyper-heuristics. Proceedings of the 2003 Genetic and Evolutionary Computation Conference (GECCO 2003), Lecture Notes in Computer Science, Vol. 2724, Springer, pp. 1295-1306. Ross P., Schulenburg S., Marin-Blazquez J.G., Hart E. (2002). Hyperheuristics: Learning to Combine Simplke Heuristics in Bin-packing Problems. Proceedings of the 2002 Genetic and Evolutionary Computation Conference (GECCO 2002), Morgan Kaufmann, pp. 942-948. Rossi-Doria O., Sampels M., Birattari M., Chiarandini M., Dorigo M., Gambardella L.M., Knowles J., Manfrin M., Mastrolilli M., Paechter B., Paquete L., St. zle T. (2003). A Comparion of the Performance of Different Metaheuristics on the Timetabling Problem, The Practice and Theory of Automated Timetabling IV : Selected Papers from the 4th International Conference on the Practice and Theory of Automated Timetabling (PATAT 2002), Lecture Notes in Computer Science, Vol. 2740, Springer, pp. 330-352. Salman F.S., Kalagnaman J.R., Murthy S., Davenport A. n(2002). Cooperative Strategies for Solving Bicriteria Sparse Multiple Knapsack Problem, Journal of Heuristics, Vol. 8, pp. 215-239. Schaerf A. (1999). A Survey of Automated Timetabling. Artificial Intelligence Review, Vol. 13, pp. 87-127.
158
Metaheuristics: Progress as Real Problem Solvers
Socha K., Knowles J., Samples M. (2002). A Max-Min Ant System for the University Course Timetabling Problem. Ant Algorithms: Proceedings of the Third International Workshop (ANTS 2002), Lecture Notes in Computer Science, Vol. 2463, Springer, pp. 1-13. Socha K., Kisiel-Dorohinicki M. (2002). Agent-based Evolutionary Multiobjective Optimization. Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), Hawaii USA, IEEE Press, PP. 109114. Soubeiga E. (2003). Development and Application of Hyperheuristics to Personnel Scheduling, PhD Thesis, School of Computer Science and Information Technology, University of Nottingham, June 2003. Steuer Ralph E. (1986). Multiple Criteria Optimization: Theory, Computation and Application. Wiley. Sutton R.S., Barto A.G. (1998). Reinforcement Learning, MIT Press. Talbi E.G., Rahoudal M., Mabed M.H., Dhaenens C. (2001). A Hybrid Evolutionary Approach for Multicriteria Optimization Problems: Application to the Flow Shop. Proceedings of the 1st International Conference on Evolutionary Multi-criterion Optimization (EM0 2001), Lecture Notes in Computer Science, Vol. 1993, Zurich Switzerland, Springer, pp. 416-428. Toscano Pulido G., Coello Coello C.A. (2003). The Micro Genetic Algorithm 2: Towards Online Adaptation in Evolutionary Multiobjective Optimization. Proceedings of the 2nd International Conference on Evolutionary Multi-Criterion Optimization (EM0 2003), Lecture Notes in Computer Science, Vol. 2632, Springer, pp. 252-266. Ulungu E.L., Teghem J. Fortemps P.H., Tuyttens D. (1999). MOSA Method: A Tool for Solving Multiobjective Combinatorial Optimization Problems. Journal of Multicriteria Decision Analysis, Vol. 8, pp. 221-236. Zhu Z.Y., Leung K.S. (2002). Asynchronous Self-adjustable Island Genetic Algorithm for Multi-objective Optimization Problems. Proceedings of the 2002 Congress on Evolutionary Computation (CEC 2002), Hawaii USA, IEEE Press, pp. 837-842.
Chapter 7
THEORY AND PRACTICE OF THE MINIMUM SHIFT DESIGN PROBLEM Luca Di G a s p e r o l , Johannes G a r t n e r 2 , Guy Kortsarz3, Andrea Schaerfl and Wolfgang Slany5
N y s r e t Musliu4,
'DIEGM, University of Udine - via delle Scienze 208, 1-33100 Udine, Italy
{ l.digaspero,schaerf) @uniud.it ' ~ i r n e sInc
-
Schwedenplatz 2/26, A - 1010 Wien, Austria
[email protected]
Computer Science Department, Rutgers University - Camden, N J 08102, USA
[email protected]
4 ~ n s t .of Inf. Systems, Vienna University of Technology - A-1040 Wien, Austria
[email protected]
5 ~ n s tfor . Software Technology, Graz University of Technology - A-8010 Graz, Austria
[email protected]
Abstract: The min-SHIFT DESIGNproblem is an important scheduling problem that needs to be solved in many industrial contexts. The issue is to find a minimum number of shifts and the number of employees to be assigned to these shifts in order to minimize the deviation from the workforce requirements. Our research considers both theoretical and practical aspects of the min-SHIFT DESIGN problem. First, we establish a complexity result by means of a reduction to a network flow problem. The result shows that even a logarithmic approximation of the problem is NP-hard. However, the problem becomes polynomial if the issue of minimizing the number of shifts is neglected. On the basis of these results, we propose a hybrid heuristic for the problem which relies on a greedy construction phase, based on the network flow analogy, followed by a local search algorithm that makes use of multiple neighborhood relations. An experimental analysis on structured random instances shows that the hybrid heuristic clearly outperforms an existing commercial implementation and highlights the respective merits of the composing heuristics for different performance parameters.
Keywords: Workforce scheduling, hybrid algorithms, local search, greedy heuristics.
160
7.1
Metaheuristics: Progress as Real Problem Solvers
INTRODUCTION
The typical process of planning and scheduling a workforce in an organization is inherently a multi-phase activity [18]. First, the production or the personnel management have to determine the temporal staff requirements, i.e., the number of employees needed for each timeslot of the planning period. Afterwards, it is possible to proceed to determine the shifts and the total number of employees needed to cover each shift. The final phase consists in the assignment of the shifts and days-off to employees. In the literature, there are mainly two approaches to solve the latter two phases. The first approach consists of solving the shift design and the shift assignment phases as a single problem (e.g., [8, 101). A second approach, instead, proceeds in stages by considering the design and the assignment of shifts as separate problems [I, 13,141. However, this approach does not ensure that it will be possible to find a good solution to the assignment problem after the shift design stage. In this work we focus on the problem of designing the shifts. We propose the SHIFT DESIGNformulation where the issue is to find a minimum set of work shifts to use (hence the name) and the number of workers to assign to each shift, in order to meet (or minimize the deviation from) pre-specified staff requirements. The selection of shifts is subject to constraints on the possible start times and the lengths of shifts, and an upper limit for the average number of duties per week per employee. Our work is motivated by practical considerations and differs from other literature dealing with similar problems since we explicitely aim at minimizing the number of shifts. The latter leads to schedules that are easier to read, check, manage and administer. The original formulation of the problem arose in a project at Ximes Inc, a consulting and software development company specializing in shift scheduling. An initial solver for this problem was implemented in a software endproduct called OPA ('Operating hours Assistant') and presented in [15]. The paper is organized as follows. After having formally introduced the problem statement and the relevant related work on the subject (Sect. 7.2), we establish the complexity of the SHIFT DESIGNproblem by means of a reduction to a Network Flow problem, namely the cyclic multi-commodity capacitated fixed-charge min-COST max-FLOWproblem [3, Prob. ND32, page 2141. The precise relation between the two problems is shown in Section 7.3. As we will show, even a logarithmic approximation of the problem is NPhard. However, if the issue of minimizing the number of shifts is neglected, the resulting problem becomes solvable in polynomial time. Then, we introduce a hybrid heuristic for solving the problem that is inspired by the relation between the SHIFT DESIGNand the min-COST max-FLOW problems. The algorithm relies on a greedy solution construction phase, based
Theory andpractice of the minimum shift design problem
161
on the min-COST max-FLOWanalogy, followed by a local search algorithm that makes use of the Multi-Neighborhood Search approach [ 5 ] . The heuristic solver is presented in Section 7.4. In Section 7.5 we compare the performances of the proposed heuristic solver with OPA. The outcome of the comparison shows that our heuristic significantly outperforms the previous approach. Finally, in Section 7.6 we provide some discussion.
7.2
PROBLEM STATEMENT
The minimum shift design problem (MSD) consists in the selection of which work shifts to use and how many people to assign to each such shift in order to meet pre-specified workforce requirements. The requirements are given for d planning days D = ( 1 , . . . ,d ) (the socalledplanning horizon), where a planning day can start at a certain time on a regular calendar day, and ends 24h later, usually on the next calendar day. Each planning day j is split into n equal-size smaller intervals ti = [ri,ri+1), called timeslots, which have the same length h = 1 1 ~ ~ -+ rill ~ E IR expressed in minutes. The time point 7 1 on the first planning day represents the start of the planning horizon, whereas time point rn+l on the last planning day is the end of the planning horizon. In this work we deal with cyclic schedules, thus Tn+l of the last planning day coincides with 7 1 of the first planning day of the next cycle, and the requirements are repeated in each cycle. For each timeslot ti of a day j of a cycle, we are given an optimal number of employees bij, representing the number of persons needed at work in that timeslot. An example of workforce requirements with d = 7 is shown in Table 7.1, where the planning days coincide with calendar days (for the rest of this document we will use the term 'day' when referring to planning days unless stated otherwise). In the table, the days are labeled 'Mon', 'Tue', etc. and, for conciseness, timeslots with the same requirements are grouped together (the example is adapted from a real call-center problem). In this problem we are interested in determining a set of shifts for covering the workforce requirements. Each shift s = [a,,a, A,) is characterized by two values a, and A, that determine the starting time and the length of the shift, respectively. Since we are dealing with discrete time slots, for each shift s, the variables a, can assume only the ri values defined above, and the variables A, are constrained to be a multiple of the timeslot length h. The set of all possible shifts is denoted by S. When designing shifts, not all starting times are feasible, neither are all lengths allowed. For this reason, the problem statement also includes a collection of shift types V = {vl,. . .v,), each of them characterized by the
+
162
Metaheuristics: Progress as Real Problem Solvers
Table 7.1. Sample workforce requirements. Start
End
0O:OO 06:OO 08:OO 09:OO 10:OO 11:OO 14:OO 16:OO 17:OO 22:OO
06:OO 08:OO 09:OO 1O:OO 11:OO 1400 16:OO 17:OO 22:OO 24:OO
Mon Tue Wen Thu Fri Sat Sun 5 2 5 7 9 7 10 7 5 5
5 2 5 7 9 7 9 6 4 5
5 2 5 7 9 7 7 4 2 5
5 6 9 13 15 13 9 6 2 5
5 2 5 7 9 7 10 7 5 5
5 0 3 5 7 5 5 2 0 5
5 0 3 5 7 5 5 2 0 5
Table 7.2. An example of shift types Shift type M (morning) D (day) A (afternoon) N (night)
min, 05:OO 09:OO 13:OO 21:OO
ma, OR00 11:OO 15:OO 23:OO
minl 07:OO 07:OO 07:OO 07:OO
ma1
09:OO 09:OO 09:OO 09:OO
earliest and the latest starting times (denoted by mins(vk) and maxs(vk), respectively), and a minimum and maximum length of its shifts (denoted by minl (vk) and maxi (vk)). Each shift s belongs to a unique shift type, therefore its starting time and length are constrained to lie within the intervals defined by its type. We denote the shift type relation with K(s) = vk. A shift s that belongs to the type vk is a feasible shift if mins(vk) 5 a, 5 max,(vk) and mini (vk) 5 As 5 maxl (vk). Table 7.2 shows an example of a set of shift types together with the ranges of allowed starting times and lengths. The times are expressed in the format hour:minute. The shift types together with the time granularity h determine the quantity m = IS1 of possible shifts. For example, assuming a timeslot length of 15 minutes, there are m = 360 different shifts belonging to the types of Table 7.2. The goal of the SHIFT DESIGNproblem is to select a set of q feasible shifts Q = {slys a , . . . s ) and to decide how many people x j (s) E N are ) ? going to work in each shift s E Q for each day j, so that bij people will be present at each timeslot ti of the day. If we denote the collection of shifts that include the timeslot ti with Sti 5 Q, a feasible solution consists of d numbers xj(s) assigned to each shift s, so that 1, = Csss, x ~ ( s )is equal to bG. In other words, we require that the number of workers present at time ti, for all values of i and for all days j, meets the staffing requirements. In practical cases, however, this constraint is relaxed, so that small deviations are allowed. To this aim, each solution of the MSD problem is evaluated
Theory and practice of the minimum shift design problem Table 7.3. A solution to the min-SHIFT DESIGNproblem Start 06:OO 08:OO 09:OO 14:OO 22:OO
Type M M D A N
Length 08:OO 08:OO 08:OO 08:OO 08:OO
Mon 2 3 2 5 5
Tue 2 3 2 4 5
Wed 2 3 2 2 5
Thu 6 3 4 2 5
Fri 2 3 2 5 5
Sat 0 3 3 0 5
Sun 0 3 2 0 5
Sm
Mon
Figure 7.1. A pictorial representation of the solution in Table 7.3
by means of an objective.function to be minimized. The objective function is a weighted s ~ &of thrke main components. The first aid second components are the stajing excess and shortage, namely, the sums FI ( Q ,x ) = ~d J=I En %=Imax{lu - bij,0) and F2(Q,x ) = C jd= , ELl max{bij - l i j , 0). The third component of the objective function is the number of shifts selected F3(Q,x) = IQI. The MSD problem is genuinely a multi objective optimization problem in which the criteria have different relative importance depending on the situation. Therefore, the weights of the three Fi components depend on the instance at hand and can be adjusted interactively by the user. A solution to the problem in Table 7.1 is given in Table 7.3 and is pictorially represented in Figure 7.1. Notice that this solution is not perfect. For example, there is a shortage of workers every day in the timeslot 10:0&11:00, represented by the thin white peaks in the figure. Conversely, on Saturdays there is an excess of one worker in the period O9:O&l7:OO. The values of the objectives Fi are the following. The shortage of employees Fl is 15 person-hours, the excess of workers Fz is 7 person-hours, and the number of shifts used, F3, is 5, as listed in Table 7.3.
164
7.2.1
Metaheuristics: Progress as Real Problem Solvers
Related work
Though there is a large literature on shift scheduling problems (see, e.g., [12] for a recent survey), the larger body of work is devoted to the problem of allocation resources to shifts, for which network fbw techniques have, among others, been applied (e.g., [I, 21). Heuristics for a shift selection problem that has some similarity with minSHIFTDESIGNhave been studied by Thompson [17]. In [2], Bartholdi et al. noticed that a problem similar to SHIFT DESIGNcan be translated into a min-COST max-FLOWproblem (which is a polynomial problem, see, e.g., [16]) and thus efficiently solved. The translation can be applied under the hypothesis that the requirement of minimizing the number of selected shifts is neglected and the costs for assignments that do not fulfill the requirements are linear. To the authors knowledge, the only paper that deals explicitly with the formulation of the SHIFT DESIGNproblem considered in this work is a previous paper of M u s h et al. [15], which presents the OPA software. In Section 7.5, we will compare our heuristic solver with the implementation described in [15] by applying it to the set of benchmark instances used in that paper.
7.3
THEORETICAL RESULTS
In this section we prove that a restricted version of SHI SHIFT DESIGNis equivalent to the infinite capacities fbw problem on a Direct Acyclic Graph with unitary edge costs (UDIF), which, in turn, is a variant of min-COSTmaxFLOWproblem [3, Prob. ND32, page 2141. First we present the UDIF problem, which is a network fbw problem with the following features: (1) Every edge not incident to the sink or to the source, calledproper edge, has infinite capacity. Non-proper edges, namely edges incident to the source or to the sink, have arbitrary capacities. (2) The costs of proper edges is 1, whereas the cost of non-proper edges is 0. (3) The underlying fbw network is a Direct Acyclic Graph. (4) The goal is, as in the general problem, to find a maximum fbw f ( e ) over the edges (obeying the capacity and fbw conservation laws) and, among all maximum fbws, to choose the one minimizing the cost of edges carrying non-zero fbw. Hence, in this case, the problem is to minimize the number of proper edges carrying nonzero fbw (namely, minimizing I { e : f ( e ) > 0, e is proper) 1). Thanks to the equivalency between SHI SHIFT DESIGNand UDIF, a hardness of approximation result for UDIF carries over to SHI SHIFT DESIGNand,
Theory and practice of the minimum shift design problem
165
as we are going to see, we could prove a logarithmic lower bound on these problems. To simplify the theoretical analysis of min-SH1F~DESIGN,in this section we restrict ourselves to SHIFT DESIGNinstances where d = 1(i.e., workforce requirements are given for a single day only), and no shifts in the collection of possible shifts span over two days, that is, each shift starts and ends on the same day. We also assume that for the evaluation function, the weights for excess and shortage are equal and are much larger than weights for the number of shifts. This effectively gives priority to the minimization of deviation, thereby only minimizing the number of shifts for all those feasible solutions already having minimum deviation. It is useful to describe the shifts via 0 - 1matrices with the consecutive ones property. A matrix obeys the consecutive ones (el) property if all entries in the matrix are either 0 or 1 and all the 1 in each column appear consecutively. A matrix A for which the c l property holds is called a c l matrix. We now provide a formal description of min-SHIFTDESIGNby means of c l matrices as follows. We are given an n x m matrix A in which each column corresponds to a possible shift. Each entry ai, in the matrix is either 1 if i is a valid timeslot for shift s or 0 otherwise. Since the set of valid timeslots for a given shift type (and thus for a given shift belonging to a shift type) is made up of consecutive timeslots, A is clearly a c l matrix. Furthermore, we are given a vector b of length n of positive integers; each entry bi corresponds to the workforce requirement for the timeslot i. Within these settings, the minSHIFTDESIGNproblem can be stated as a system of inequalities: Ax 2 b with x E Zn,x 2 0, where the vectors x correspond to the shift assignments. The optimization criteria are represented as follows. Let Ai be the ith row in A, and llxlll denote the L1 norm of x. We are looking for a vector x 2 0 with the following properties: (1) The vector x minimizes IIAx - bill (i.e., the deviation from the staffing requirements). (2) Among all vectors minimizing 11 Ax - bill, x has a minimum number of non-zero entries (corresponding to the number of selected shifts). Given this formulation of the restricted variant of min-SHIFTDESIGNit is possible to prove the following result (the detailed proof is contained in [4]).
PROPOSITION 7.1 The restricted one-day noncyclic variant of SHIFT DESIGNwhere a zero deviation solution exists (i.e., h = 1, all shifts start and jinish on the same day, and Ax = b admits a solution), is equivalent to the UDIF problem. The proof proceeds as follows: first a fbw matrix F that preserves the solutions of the problem Ax = b is constructed, by means of a regular transforma-
166
Metaheuristics: Progress as Real Problem Solvers
tion of A. Then, after a little post-processing of F,the resulting fbw problem becomes an instance of UDIF. It is possible to show that this result can be exploited also for handling workforce shortage and excess (components Fl and F2 of the objective function), by introducing a set of n slack variables yi and solving the problem (A; -I)(x; y) = b. Moreover, if we neglect the problem of minimizing the number of shifts, the problem (A; -I) (x; y) = b can be transformed into a min-COSTmax-FLOW(MCMF) problem. This allows us to efficiently find the minimum (weighted) deviation from the workforce requirements, and this idea will be employed in the first stage of our heuristic presented in Section 7.4. We next state that, unless P = NP, there is some constant c < 1 such that approximating UDIF within c In n-ratio is NP-hard. Since the case of zero excess SHIFT DESIGNis equivalent to UDIF, similar hardness results follow for SHIFT DESIGNas well.
THEOREM 7.2 There is a constant c < 1 so that approximating the UDIF problem within c In n is NP-hard. The proof employs a reduction from the SET-COVER problem and is omitted for brevity.
7.4
HEURISTIC SOLVER
Our solution heuristic is divided into two stages, namely a greedy construction for the initial solution and a tabu search procedure [7] that iteratively improves it, which are described in the following subsections. In our experiments we evaluate the behavior of each stage and of the resulting hybrid algorithm, in order to analyze the sensitivity of the tabu search procedure to the starting point used.
7.4.1
Greedy constructive heuristic
Based on the equivalence of the (non-cyclic) min-s~IF'TDESIGNproblem to UDIF, and the relationship with the min-COST max-FLOW problem, we propose a new greedy heuristic GreedyMCMFO that uses a polynomial minCOSTmax-FLOWsubroutine (MCMFO). The pseudocode of the algorithm is reported in Figure 7.2. The algorithm is based on the observation that the min-COSTmax-FLOWsubroutine can easily compute the optimal staffing with minimum (weighted) deviation when slack edges have associated costs corresponding, respectively, to the weights of shortage and excess. Note that, however, the algorithm is not able to simultaneously minimize the number of shifts that are used. Since the MCMF() subroutine cannot consider cyclicity, we must first perform a preprocessing step that determines a good split-off time where the cycle
Theory and practice of the minimum shift design problem function GreedyMCMF(S,b): MSD-Solution I* I. Preprocessing step: where to break cyclicity? */ t := FindBestSplitOf%Time(S,b); // Searchfor a split-off on the P day of the cycle /* 2. Greedypart with MCMF subroutine */ f * := MCMF(MSD2Flow(S,b,t)); /I Compute bestflow sofar for MSD instance a := ShiftsAndWorkforceIn(f*); I/ Shifts are edges withflow # 0; worvovce is edgeflow min-cost := MSD_Eval(a); /I Cost of the best MSD solutionfound so far Q := ShiftsInUseIn(a); N Shzjis in the current solution /I Shzjis already tried T := 0; repeat s := UniformlyChooseAShiftFrom(Q \ T); // Consider a shift s that is used but not tried yet f := MCMF(MSD2Flow(Q \ {s},b,t)); N Try to solve the problem without shift s a := ShiftsAndWorkforceIn(f); /I Extract shifts and worvorce from flow solution current-cost := MSD-Eval(a); N Compute the cost of the current solution if current-cost < min-cost then min-cost := current-cost; // Solution with one shift less and lower cost I/ Update the best solutionfound sofar f * := f ; Q := ShiftsInUseIn(o); N Could be less than Q \ {s} endif T := T U {s); /IAdd s to shifts already tried until Q \ T = 0; N Cycle until no shift to try is left /* 3. Postprocessing step to recover cyclicity,peflonn a local search with the ExchangeStaff move */ a := SteepestDescent(ShiftsAndWorkforceIn(f *), Exchangestaff); return o;
Figure 7.2. The Greedy min-COST max-FLOW (MCMF) subroutine computes a solution for the min-SHIFT DESIGN (MSD) problem
of d days should be broken. This is done heuristically by calling MCMF() with different starting times chosen between 5:00 and 8:00 on the first day of the cycle (in practice, we can observe that there is usually a complete exchange of workforce between 5:00 and 8:00 on the mornings of the first day). All possibilities in this interval are tried while eliminating all shifts that span the chosen starting point when translating from MSD to the network fbw instances. The number of possibilities depends on the length of the timeslots of the instance (i.e., the time granularity). The starting point with the smallest cost as determined by MCMF() is used as the split-off time for the rest of the calls to MCMF() in GreedyMCMF. This method has been shown to provide adequate results in practice. In the main loop, the greedy heuristic then removes all shifts that did not contribute to the MSD instance corresponding to the current fbw computed with MCMF(). It randomly chooses one shift (without repetitions) and tests whether removal of this shift still allows the MCMF() to find a solution with the same deviation. If this is the case, that shift is removed and not considered anymore, otherwise it is left in the set of shifts used to build the network fbw instances, but it will not be considered for removal again. Finally, when no shifts can be removed anymore without increasing the deviation, a final postprocessing step is made to restore cyclicity. It consists of
168
Metaheuristics: Progress as Real Problem Solvers
a simple repair step performed by a fast steepest descent runner that uses the Exchangestaffneighborhood relation (see below). The runner selects at each iteration the best neighbor, with a random tie-break in case of same cost. It stops as soon as it reaches a local minimum, i.e., when it does not find any improving move. As our MCMF() subroutine, we use CS2 version 3.9 (@ 1995 - 2001 IG Systems, Inc., h t t p ://www .avglab .com/andrew/sof t .html), an efficient implementation of a scaling push-relabel algorithm [9], slightly edited to be callable as a library.
7.4.2
Multi-Neighborhood Search for Shift Design
The second stage of the proposed heuristic is a local search procedure based on multiple neighborhood relations. We first define the search space, then describe the set of neighborhood relations for the exploration of this search space, followed by the search strategies we employ. Search space. We consider as a state for MSD a pair (Q, X ) made up of a set of shifts Q = {sl,s2, . . .) and their staff assignment X = {xl, 22,. . .). The shifts of a state are split into two categories:
Active shifts: at least one employee is assigned to a shift of this type on at least one day. Inactive shifts: no employees are assigned to a shift of this type on any day. These shifts does not contribute to the solution and to the objective function. Their role is explained later. More formally, we say that a shift si E Q is active (resp. inactive) if and only if d xj(si) # 0 (= 0). Neighborhood exploration. In this work we consider three different neighborhood relations that are combined in the spirit of the Multi-Neighborhood search described in [5]. In short, the Multi-Neighborhood Search consists in a set of operators for automatically combining basic neighborhoods and in a set of strategies for combining algorithms (called runners) based on different neighborhoods. The motivation for applying a combination of neighborhoods comes from the observation that for most problems there is more than one natural neighborhood that deserves to be investigated. Furthermore, using different neighborhoods or algorithms in different phases of the search increases diversification, thereby improving the performance of the local search metaheuristics. The way the neighborhoods are employed during the search is explained later. In the following we formally describe each neighborhood relation by means of the attributes needed to identify a move, the preconditions for its
Theory andpractice of the minimum shift design problem
169
applicability, the effects of the move and, possibly, some rules for handling special cases. Given a state ( Q ,X) of the search space the types of moves considered in this study are the following: Changestaff (CS): The staff of a shift si is increased or decreased by one employee, that is either xg (si) := xj (si) 1, or xg (si) := xj (si) - 1.
+
If si is an inactive shift and the move increases its staff, then si becomes active and a new randomly created inactive shift of type K ( s i )is inserted (distinct from the other shifts). Exchangestaff (ES): One employee in a given day is moved from one shift sil to another one of the same type (say si2),i.e., xi(sil) := xj(si1)- 1 and x$(si2):= xj(si2) 1.
+
If si, is an inactive shift, si, becomes active and a new random distinct inactive shift of type K ( s i l ) is inserted (if such a distinct shift exists). If the move makes si, inactive then, in the new state, the shift sil is removed from the set Q. Resizeshift (RS): The length of a shift si is increased or decreased by one time slot, either on the left-hand side or on the right-hand side of the interval. For this kind of move we require that the shift sb, obtained from si by the application of the move must be feasible with respect to the shift type K (si).
We denote with 6 the size modification to be applied to the shift si, that is S = +l when the shift is enlarged by one timeslot and 6 = -1 when the shift is shrunk. If the action should be performed on the left-hand side of si we have that a: := ai - Sh and X i := Xi Sh. Conversely, if the move should take place on the right-hand side ai remains unchanged and := Xi Sh.
+
+
In a previous work, Musliu et al. [15] define many neighborhood relations for this problem including CS, ES, and a variant of RS. In this work, instead, we restrict ourselves to the above three relations for the following two reasons: First, C S and R S represent the most atomic changes, so that all other move types can be built as chains of moves of these two. For example, an ES move can be obtained by a pair of C S moves that delete one employee from the first shift and add one to the other shift. Secondly, even though ES can be seen as a composition of two more basic moves as just explained, we employ it because it turned out to be very effective for the search, especially in combination with the concept of inactive shifts. In fact, the transfer of one employee from a shift to a similar one makes a very
170
Metaheuristics: Progress as Real Problem Solvers
small change to the current state, thus allowing for fine grained adjustments that could not effectively be achieved by the other move types. Inactive shifts allow us to insert new shifts and to move staff between shifts in a uniform way. This approach limits the creation of new shifts only to the current inactive ones, rather than considering all possible shifts belonging to the shift types (which are many more). The possibility of creating any legal shift is rescued if we insert as many (distinct) inactive shifts as compatible with the shift type. Experimental results, though, show that there is a trade-off between computational cost and search quality which seems to have its best compromise in having two inactive shifts per type.
Search strategies. For the purpose of analyzing the behavior of the local search heuristic alone, we provide also a mean to generate a random initial solution for the local search algorithm. That is, we create a fixed number of random distinct active and inactive shifts for each shift type. Afterwards, for the active shifts, we assign a random number of employees for each day. In detail, the parameters needed to build a solution are the number of active and inactive shifts for each shift type and the range of the number of employees per day to be assigned to each random active shift. For example, in the experimental session described in Section 7.5, we build a solution with four active and two inactive shifts per type, with one to three employees per day assigned to each active shift. If the possible shifts for a given shift type are less than six, we reduce the generated shifts accordingly, giving precedence to the inactive ones. The proposed local search heuristic is based on tabu search, which turned out to give the best results in a preliminary experimental phase. However, we have developed and experimented also with a set of solvers based on the hill climbing and simulated annealing meta-heuristics. A full description of tabu search is out of the scope of this paper and we refer to [7] for a general introduction. We describe later in this section its specialization to the MSD problem. We employ the three neighborhoods defined above selectively in various phases of the search, rather than exploring all neighborhoods at each iteration. In detail, we combine the neighborhood relations CS, ES, and RS, according to the following scheme made of compositions and interleaving (through the, so-called, token-ring search strategy). That is, our algorithm interleaves three different tabu search runners using the ES move alone, the RS move alone, and the set-union of the two neighborhoods C S and RS, respectively. The token-ring search strategy implemented is the same as that described in 151, i.e., the runners are invoked sequentially and each one starts from the best state obtained from the previous one. The overall process stops when a full round of all of them does not find an improvement. Each single runner
Theory and practice of the minimum shift design problem
171
stops when it does not improve the current best solution for a given number of iterations. The reason for using only some of the possible neighborhood relations introduced in [15] is not related to the saving of computationaltime, which could be obtained in other ways, for example by a clever ordering of promising moves, as done in the cited paper. The main reason, instead, is the introduction of a suitable degree of diversijcation in the search. In fact, certain move types would be selected very rarely in a full-neighborhood exploration strategy, even though they could help to escape from local minima. For example, we experimentally observe that a runner that uses all the three neighborhood relations combined by means of the union operator would almost never perform a CS move that deteriorates the objective function. The reason for this behavior is that such a runner can always find an ES move that deteriorates the objectives by a smaller amount, even though the CS move could lead to a more promising region of the search space. This intuition is confirmed by the experimental analysis that shows that our results are much better than those in [15]. This composite solver is further improved by making two adjustments to the final state of each runner, the results of which is then handed over as the initial state to the following runner, as follows: Identical shifts are merged into one. When RS moves are used, it is possible that two shifts become identical. This is not checked by the runner after each move as it is a costly operation, and is therefore left to this inter-runner step. Inactive shifts are recreated: the current inactive shifts are deleted, and new distinct ones are created at random in the same quantity. This step, again, is meant to improve the diversification of the search algorithm. Concerning the prohibition mechanism of tabu search, for all three runners, the size of the tabu list is kept dynamic by assigning to each move a number of tabu iterations randomly selected within a given range. The ranges vary for the three runners, and were selected experimentally. The ranges are roughly suggested by the cardinality of the different neighborhoods, in the sense that a larger neighborhood deserves a longer tabu tenure. According to the standard aspiration criterion defined in [7], the tabu status of a move is dropped if it leads to a state better than the current best. As already mentioned, each runner stops when it has performed a fixed number of iterations without any improvement (called idle iterations). For practical reasons, in order to avoid the setting of parameters by an enduser, tabu lengths and idle iterations are selected once for all, and the same values were used for all the instances. The selection turned out to be robust
172
Metaheuristics: Progress as Real Problem Solvers
Table 7.4. Tabu search parameter settings Parameter Tabu range
TS(ES)
TS(RS)
TS(CSURS)
10-20
5-10
Idle iterations
300
300
20-40 (CS) 5-10 (RS) 2000
enough for all tested instances. The choice of parameter values is reported in Table 7.4.
7.5
COMPUTATIONAL RESULTS
In this section, we describe the results obtained by our solver on a set of benchmark instances. First, we introduce the instances used in this experimental analysis, then we illustrate the performance parameters that we want to highlight, and finally we present the outcomes of the experiments.
7.5.1
Description of the Sets of Instances
The instances consist of three different sets, each containing thirty randomly generated instances. Instances were generated in a structured way to ensure that they look as similar as possible to real instances while allowing the construction of arbitrarily difficult instances. Set 1 contains the 30 instances that were investigated and described in [15]. They vary in their complexity and we mainly include them to be able to compare the solvers with the results reported in that paper for the OPA implementation. Basically, these instances were generated by constructing feasible solutions with some random elements as they usually appear in real instances, and then taking the resulting staffing numbers as workforce requirements. This implies that a very good solution with zero deviation from workforce requirements is known. Note that our solver could find even better solutions for several of the instances, so these reference solutions may be suboptimal. Nevertheless, we refer in the following to the best solutions we could come up with for these instances as the "best known " solutions. Set 2 contains instances that are similar to those of Set 1. However, in this case the reference solutions of instances 1 to 10 were constructed to feature 12 shifts, those of instances 11 to 20 to feature 16 shifts, and those of instances 21 to 30 to feature 20 shifts. This allows us to study the relation between the number of shifts in the "best known" solutions and the running times of the solver using the different settings. While knowing these "best known" solutions eases the evaluation of the proposed solver in the different settings, it also might form a biased preselection toward instances where zero deviation solutions exist for sure, thereby letting the solver behave in ways that are unusual for instances for which no such so-
Theory and practice of the minimum shift design problem
173
lution can be constructed. For this reason, the remaining set is composed of instances where with high likelihood solutions without deviations do not exist: Set 3 contains instances without reference solutions. They were constructed with the same random instances generator as the previous sets but allowing the constructed solutions to contain invalid shifts that deviate from normal starting times and lengths by up to 4 timeslots. The number of shifts is similar to those in Set 2, i.e., instances 1 to 10 feature 12 shifts (invalid and valid ones), and so on. This construction ensures that it is unlikely that there exist zero deviation solutions for these instances. It might also be of interest to see whether a significant difference in performance for the solver employing the different settings can be recognized compared to Set 2, which would provide evidence that the way Sets 1 and 2 were constructed constituted a bias for the solver. All sets of instances are available in self-describing text files from h t t p : //www .dbai .tuwien. ac .a t / p r o j /Rota/benchmarks .h t m l . A detailed description of the random instance generator used to construct them can be found in [15].
7.5.2
Experimental setting
In this work we made two types of experiments, aiming at evaluating two different performance parameters: 1) the average time necessary to reach the best known solution; 2) the average cost value obtained within a time bound. Our experiments have been run on different machines. The local search solvers are implemented in C++ using the EASYLOCAL++ framework [6] and they were compiled using the GNU g++ compiler version 3.2.2 on a 1.5 GHz AMD Athlon PC running Linux Kernel 2.4.21. The greedy min-COST maxFLOWalgorithm, instead, was coded in MS Visual Basic and run on a MS Windows NT 4.0 computer. The running times have been normalized according to the DIMACS netfbw benchmark ( f t p ://dimacs. r u t g e r s . e d ~ / ~ u b / n elow/benchmarks/c/) tf to the times of the Linux PC (calibration timings on that machine for above benchmark: t l .wm: user 0.030 sec t 2 .wm: user 0.360 sec). Because of the normalization the reported running times should be taken as indicatory only. We experiment with the following three heuristic solvers: GrMCMF The GreedyMCMFO algorithm is called repeatedly until the stopping criterion is reached. Since the selection of the next shift to be removed in the main loop of GreedyMCMFO is done randomly, we call the basic heuristic repeatedly and use bootstrapping as described in [I 11 to compute expected values for the computational results (counting the
174
Metaheuristics: Progress as Real Problem Solvers preprocessing step only once for each instance since it computes the same split-off time for all runs).
TS The tabu search procedure is repeated several times starting from different random initial solutions. The procedure is stopped either when the time granted has elapsed or when the best solution is reached. Each round of the tabu search procedure is allowed to run at most for 10 seconds. GrMCMF+TS The two solvers are combined in a hybrid heuristic by using the solutions delivered by the GreedyMCMFO procedure as initial states for TS trials. In order to maintain diversification, we exploit the non-determinism of GreedyMCMFO to generate many different solutions, and the initial state of each trial of TS is randomly selected among those states.
7.5.3
Time-to-best results
The first experiment evaluates of the running times needed to reach the "best known" solution. We ran the solvers on data Set 1 for 10 trials until they could reach the "best known" solution, and we recorded the running times for each trial. Table 7.5 shows the average times and their standard deviations (between parentheses) expressed in seconds, needed by our solvers to reach the best known solution. The first two columns show the instance number and the best known cost for that instance. The third column reports the cost of the best solution found by the commercial tool OPA. Bold numbers in the second column indicate that the best known solution for this instance was not found by OPA. Dash symbols denote that the best known solution could not be found in any of the 10 trials for those instances. First, note that all three solvers in general produce better results than the commercial tool. In fact, TS always finds the best solution, GrMCMF in 20 cases and GrMCMF+TS in 29 cases out of 30 instances. OPA, instead, could find the best solution only for 17 instances. However, looking at the time performance on the whole set of instances, it is clear that TS is roughly 30 times slower than GrMCMF and 1.5 times slower than the hybrid heuristic. GrMCMF+TS is significantly outperformed by TS only for some few instances for which GrMCMF could not find the best known solution, thus biasing the local search part of the heuristic away from search space near the best known solution. As a general remark, the TS algorithm proceeds by relatively sudden improvements, especially in the early phases of the search, while the behavior of the GrMCMF+TS is much smoother (we omit graphs showing this for brevity). Thus, it is easier to predict the benefits of letting GrMCMF+TS run for a longer period of time compared to TS alone.
Theory and practice of the minimum shift design problem
175
Table 7.5. Times to reach the best known solution for Set 1. Data are averages and standard deviations (between parentheses) for 10 trials. Instance 1
Best 480 300
600 450
480 420
OPA ~ 5 1 480 390 600 1,170 480 420
GrMCMF 0.07 0.11 0.20 0.06
(0.00) ((0.01) ((0.16) (0.01)
TS 5.87 16.41 8.96 305.37 5.03 2.62
(4.93) (9.03) (5.44) (397.71) (2.44) (0.99)
GrMCMF+TS 1.06 40.22 1.64 108.29 1.75 0.62
(0.03) (27.93) (0.05) (75.32) (1.43) (0.02)
Starting local search from the solution provided by GrMCMF has also an additional benefit in terms of the increase of robustness, roughly measured by the standard deviations of the running times. In fact, for this set of instances, while the standard deviation for TS is about 50% of the average running time, this value decreases to 35% for GrMCMF+TS. The behavior of the GrMCMF solver is similar to the one of the hybrid heuristic and the standard deviation is about 35% of the average running time.
7.5.4
Time-limited experiments
Moving to the time-limited experiments, we perform two experiments on the different sets of instances. The first experiment with limited running times aims at showing how the solver scales up with respect to the optimum number of shifts. For this purpose we recorded the cost values of 100 runs of our solvers with the different settings on the instances of Sets 1 and 2, for which
Metaheuristics: Progress as Real Problem Solvers
Figure 7.3. Aggregated normalized costs for 10s time-limit on data Sets 1 and 2.
the value of a good solution is known. The runs were performed by granting to each trial a time-limit of 10 seconds. The results of the experiment are grouped on the basis of the instance size and are shown in Figure 7.3. The X axis of the figure shows the number of shifts in the best known solution where results on instances with the same number of shifts are clustered together. The Y axis shows normalized costs, obtained by dividing the difference between the average cost and the best cost by the latter value. In other words, each cost y obtained on instance i, for which the best known cost is besti, is transformed by means of the function y - besti f d y ) := The graph presents the data as box-and-whiskers plots, i.e., it shows the range of variation (the interval [fi(min-cosc), fi(max-cos~)]),denoted by the dashed vertical line, and the frequency distribution of the solutions. The latter measure is expressed by means of a boxed area featuring the range between the 1st and the 3rd quartile of the distribution (accounting for 50% of the fiequency). The horizontal line within the box denotes the median of the distribution and the notches around the median indicate the range for which the difference of medians is significant at a probability level of p < 0.05. The figure shows that, for short runs, the hybrid solver is superior to GrMCMF and T S alone, both in terms of solution quality and robustness: the ranges of variation are shorter and the frequency boxes are tinier. Looking at these results from another point of view, it is worth noting that GrMCMF+TS is able to find more low-cost (and even min-cost) solutions that are significantly better than those found by T S and GrMCMF. Furthermore, it is apparent that the hybrid heuristic scales better than its components, since the ",
x-
-
-
-
neory and practice of the minimum shift design problem
177
Table 7.6. Results for Set 3: cost values within 1s time-limit. Data are averages and standard deviations (between parentheses) of 100 trials. The best algorithm on each instance is highlighted in boldface; the symbol t denotes the cases for which the difference between the distribution of solutions was not statistically significant (Ma-Whitney test with p < 0.01). Instance
GrMCMF 2,445.00 (0.00)
TS 9,916.35 (3,216.35)
GrMCMF+TS 2,386.80 (9.60)
deterioration in the solution quality with respect to the number of shifts grows very slowly and always remains under an acceptable level (7% on the worst case, and about 2% for 75% of the runs). The second time-limited experiment aims at investigating the behavior of the solver when provided with a very short running time on "unknown" instances (we use here the term "unknown" by contrast with the sets of instances constructed around a reference solution). We performed this experiment on the third data set and we recorded the cost values found by our solver over 100 trials. Each trial was granted 1 second of running time, in order to simulate a practical situation in which the user needs a fast feedback from the solver. For this problem, speed is of crucial importance to allow for immediate discussion in working groups and refinement of requirements, especially if such a solver is used during a meeting with customers. Hence, without quick answers, understanding requirements and consensus building is much more difficult.
178
Metaheuristics: Progress as Real Problem Solvers
In Table 7.6 we report the average and the standard deviation (between parentheses) of the cost values found by each heuristic. In this case the hybrid heuristic performs better than TS on all instances, and it shows a better behavior in terms of algorithm robustness (in fact, the standard deviation of GrMCMF+TS is usually more than an order of magnitude smaller than the one of TS). Moreover, even the GrMCMF achieves better results than the TS heuristic, due to the running time performance of the local search procedure. However, differently from the results of the previous experiment, the hybrid heuristic does not dominate the GrMCMF on all instances. In fact, it is possible to see that GrMCMF+TS finds better results on 15 instances, whereas GrMCMF prevails in 8 cases. On 7 instances there is no clear winner among the two heuristics, and these cases are indicated by the symbol t in the table. The reason of this behavior is related to the amount of running time needed by the local search procedure. Indeed, in another experiment (omitted for brevity) with a higher time-limit, the behavior of the three heuristic tends to be similar to the one observed in the previous experiment, indicating the absence of bias in the construction of sets 1 and 2 of instances.
7.6
CONCLUSIONS
The SHIFT DESIGNproblem is an important shift scheduling problem that arises in many industrial contexts. We provided complexity results for it and designed a hybrid heuristic algorithm composed of a constructive heuristic (suggested by the complexity analysis) and a multi-neighborhood tabu search procedure. This problem appears to be quite difficult in practice, even for small instances, which is also supported by the theoretical results. An important source of hardness is related to the variability in the size of the solution, since dropping this requirement makes the problem solvable in polynomial time. In the experimental part, the hybrid heuristic and its underlying components have been evaluated both in terms of ability to reach good solutions and in quality of solutions reached in fast runs. The outcomes of the comparison show that the hybrid heuristic combines the good features of its components. Indeed, it obtained the best performances in term of solution quality (thanks to the increased thoroughness allowed by tabu search) but with a lower impact on the overall running time. Furthermore, we compare our heuristics with the results obtained with a commercial software as reported [15]. Our hybrid heuristic clearly outperforms this commerical implementation, and thus can be considered as the best general-purpose solver among the other heuristics that were compared to it.
Theory and practice of the minimum shift design problem
REFERENCES [I] N. Balakrishnan and R.T. Wong. A network model for the rotating workforce scheduling problem. Networks, 20:2542, 1990. [2] J. Bartholdi, J. Orlin, and H.Ratliff. Cyclic scheduling via integer programs with circular ones. Operations Research, 28: 110-1 18, 1980. [3] M. R. Garey and D. S. Johnson. Computers and Intractability--A guide to NP-completeness. W.H. Freeman and Company, San Francisco, 1979. [4] L. Di Gaspero, J. Girtner, G. Kortsarz, N. Musliu, A. Schaerf, and W. Slany. The minimum shift design problem: theory and practice. In Giuseppe Di Battista and Uri Zwick, editors, Proc. of the 11th Annual European Symposium on Algorithms (ESA 2003), number 2832 in Lecture Notes in Computer Science, pages 593-604. Springer-Verlag, BerlinHeidelberg, 2003. ISBN 3-540-20064-9. [5] L. Di Gaspero and A. Schaerf. Multi-neighbourhood local search with application to course timetabling. In E. Burke and P. De Causmaecker, editors, Lecture Notes in Computer Science, number 2740 in Lecture Notes in Computer Science, pages 263-278. Springer-Verlag, BerlinHeidelberg, 2003. ISBN 3-540-40699-9. [6] L. Di Gaspero and A. Schaerf. EASYLOCAL++: An object-oriented framework for fixible design of local search algorithms. Software Practice & Experience, 33(8):733-765, July 2003. [7] F. Glover and M. Laguna. Tabu search. Kluwer Academic Publishers, Boston, July 1997. ISBN 0-7923-9965-X. [8] F. Glover and C. McMillan. The general employee scheduling problem: An integration of MS and AI. Computers & Operations Research, 13(5): 563-573,1986. [9] A.V. Goldberg. An efficient implementation of a scaling minimum-cost fbw algorithm. Journal of Algorithms, 22: 1-29, 1997. [lo] W.K. Jackson, W.S. Havens, and H. Dollard. Staff scheduling: A simple approach that worked. Technical Report CMPT97-23, Intelligent Systems Lab, Centre for Systems Science, Simon Fraser University, 1997. Available at http: //citeseer .nj .nec.com/lOlO34. html. [I 11 D.S. Johnson. A theoretician's guide to the experimental analysis of algorithms. In Proc. 5th and 6th DIMACSImplementation Challenges. American Mathematical Society, 2002. URL ht tp :/ /www .research. att.com/"dsj/papers/experguide.ps. [12] G. Laporte. The art and science of designing rotating schedules. Journal of the Operational Research Society, 50: 1011-1 0 17, 1999.
180
Metaheuristics: Progress as Real Problem Solvers
[13] H.C. Lau. On the complexity of manpower scheduling. Computers & Operations Research, 23(1):93-102, 1996. [14] N . Musliu, J . Gartner, and W. Slany. Efficient generation of rotating workforce schedules. Discrete Applied Mathematics, 1 1 8(1-2):85-98,2002. [15] N . Musliu, A. Schaerf, and W. Slany. Local search for shift design. European Journal of Operational Research, l53(1):5144,2004. [16] C.H. Papadirnitriou and K. Steiglitz. Combinatorial Optimization: Algorithms and Complexity. Prentice-Hall, 1982. [17] G. Thompson. A simulated-annealing heuristic for shift scheduling using non-continuously available employees. Computers & Operations Research, 23(3):275-278, 1996. [ I 81 J.M. Tien and A. Kamiyama. On manpower scheduling algorithms. SIAM Review, 24(3):275-287, 1982.
Chapter 8
LOCAL SEARCH ALGORITHMS FOR THE TWO-DIMENSIONAL CUTTING STOCK PROBLEM WITH A GIVEN NUMBER OF DIFFERENT PATTERNS Shinji Imahori,' Mutsunori Yagiura,' Shunji ~ m e t a n iShinya ,~ Adachi2 and Toshihide Ibaraki4 Department of Mathematical Informatics, Graduate School of Information Science and Technology, University of Tokyo, Hongo, Bunkyo-hi, Tokyo 113-8656, Japan
'Department of Applied Mathematics and Physics, Graduate School of Informatics, Kyoto University, Sakyo-ku, Kyoto 606-8501, Japan Cyagiura, shin)@arnp.i.kyoto-u.ac.jp
3 ~ e p a r t m e n tof Advanced Science and Technology, Graduate School of Engineering, Toyota Technological Institute, Tenpalm-ku, Nagoya 468-8511, Japan
[email protected]
4 ~ e p a r t m e n tof Informatics, School of Science and Technology, Kwansei G a h i n University, Gakuen, Sanda 669-1337, Japan
[email protected]
Abstract: We consider the two-dimensional cutting stock problem that arises in many applications in industries. In recent industrial applications, it is argued that the setup cost for changing patterns becomes more dominant and it is impractical to use many different cutting patterns. Therefore, we consider the pattern restricted two-dimensional cutting stock problem, in which the total number of applications of cutting patterns is minimized while the number of different cutting patterns is given as a parameter n. For this problem, we develop local search algorithms. As the neighborhood size plays a crucial role in determining the efficiency of local search, we propose to use linear programming techniques for the purpose of restricting the number of solutions in the neighborhood. In this process, to generate a cutting pattern, it is required to place all the given products (rectangles) into the stock
182
Metaheuristics: Progress as Real Problem Solvers
sheet (two-dimensional area) without mutual overlap. For this purpose, we develop a heuristic algorithm using an existing rectangle packing algorithm with the sequence pair coding scheme. Finally, we generate random test instances of this problem and conduct computational experiments, to evaluate the effectiveness of the proposed algorithms.
Keywords: Two-dimensional cutting stock problem, linear programming, rectangle packing, neighborhood, local search.
8.1
INTRODUCTION
We consider the two-dimensional cutting stock problem, which is one of the representative combinatorial optimization problems, and arises in many industries such as steel, paper, wood, glass and fiber. The problem can be defined as follows: We are given an unlimited number of stock sheets of the same width W and height H, and m types of rectangular products, where each product i has its width wi, height hi and demand di. From stock sheets, we have to cut rectangular products whose numbers are specified as demands. The objective is to minimize the total number of stock sheets required. This problem is NP-hard, since this is a generalization of the two-dimensional bin packing problem and the (one-dimensional) cutting stock problem, which are already known to be NP-hard [5]. A classical approach to the one-dimensional cutting stock problem (1DCSP) is to formulate it as an integer programming problem (IP), and solve it by a heuristic method based on its linear programming (LP) relaxation. As it is impractical to consider all cutting patterns ("a pattern" is a set of rectangles which can be placed in one stock sheet), Gilmore and Gomory [6,7]proposed a column generation technique that generates only the cutting patterns (which correspond to columns in the LP relaxation) necessary to improve the lower bound of IP by solving the associated knapsack problems. The LP relaxation often has the property that the round up of the LP lower bound is equal to the optimal value of IP [14]. Based on these ideas, branch-and-bound, heuristic and metaheuristic algorithms with the column generation technique have been developed with certain computational success [20]. It is however observed that those approaches tend to use many (very close to the number of product types) different cutting patterns. In recent cutting industries, the setup cost for changing patterns is more significant and it is often impractical to use many different cutting patterns. Several researchers (e.g., Foerster and Wascher [4], Haessler [9], Umetani et al. [17]) have proposed algorithms for 1DCSP with consideration on the number of cutting patterns.
Local Search Algorithms for 2DCSPn
183
The two-dimensional cutting stock problem (2DCSP) has also been extensively studied. Gilmore and Gomory [8] extended their previous work, column generation scheme, on 1DCSP [6,7]to the two-dimensional case. Afterwards, various heuristic algorithms based on the column generation technique have been proposed [1,3,19,2l]. Nevertheless, to the authors' knowledge, there is no study on 2DCSP under the constraint on the number of different patterns. In this paper, we consider the two-dimensional cutting stock problem using a given number of different patterns n (we call this problem 2DCSPn). 2DCSPn asks to determine a set of cutting patterns, whose size is n or less, and the numbers of applications of the generated cutting patterns. The objective is to minimize the total number of applications of cutting patterns. The problem of deciding the number of applications for each pattern becomes IP. In Section 8.2, we propose a heuristic algorithm for IP, which is based on its LP relaxation. We incorporate a sensitive analysis technique and the criss-cross method [22], a variant of simplex method, to enhance the effectiveness of our algorithm. In Section 8.3, we propose local search (LS) algorithms to find a good set of cutting patterns. As the size of the neighborhood plays a crucial role in determining the efficiency of LS, we propose to utilize the dual solution of the LP relaxation for the purpose of restricting the neighborhood size. To generate a feasible cutting pattern, we have to place all the given products in the stock sheet (two-dimensional area) without mutual overlap. At this placement stage, we assume that each product can be rotated by 90°, and assume no constraint on products' placement such as "guillotine cut". In Section 8.4, we propose heuristic algorithms to find a feasible placement, which are based on our previous algorithms for the two-dimensional rectangle packing problem [lo,111. In Section 8.5, the outline of our entire local search algorithm, which is comprised of those algorithms proposed in Sections 8.2, 8.3 and 8.4, is described. In Section 8.6, we generate random test instances of 2DCSP and conduct computational experiments to compare two algorithms using basic and enhanced neighborhoods. We also compute the trade-off curve between the number of different cutting patterns n and the solution quality.
8.2
PROBLEM
To define 2DCSP, we are given an unlimited number of stock sheets of the same width W and height H, and m types of rectangular products M = {1,2,. . .,m), where each product i has its width wi, height hi and
Metaheuristics: Progress as Real Problem Solvers
184
demand di. A cutting pattern p j is described as pj = (alj, aaj, . . . ,amj), where aij E Z+ (the set of nonnegative integers) is the number of product i cut from a stock sheet by pattern pj. A placement of products in a pattern is defined by a set of their locations in one stock sheet together with their orientations (i.e., the original direction or rotated by 90°), where a placement is feasible if all the products are placed in one stock sheet without mutual overlap. We call a pattern p j feasible if it has a feasible placement. Let S denote the set of all feasible patterns. Note that, the set S is very large and it is not explicitly given; i.e., we must find a feasible placement to confirm that a pattern is feasible. A solution to 2DCSP consists of (1) a set of cutting patterns II = {pl, p2, . . . ,plnl}5 S, (2) a feasible placement of each pattern p j E IT, and (3) the numbers of applications X = (x17x2,. . . ,xlrrl)of all the patterns p j E II, where x j E Z+. A typical cost function is the total number of stock sheets used in a solution. This problem is formally described as follows: 2DCSP:
minimize
x
f (II, X ) =
xj
(8.1)
pjEn
subject to
C a ~ x>j di7 for i E M, pj En
7 II 5 s Xj
E
z+,for pj E n.
In this paper, we consider a variant of 2DCSP with an input parameter n, where n is the number of maximum different cutting patterns Ill\. We call this problem the two-dimensional cutting stock problem with a given number of different patterns n (2DCSPn), which is formally defined as follows: 2DCSPn:
minimize
f (II, X) =
x
xj
(84
pj En
subject to
C aijxj 2 di, for i E M, P~EII
II E 7 s PI 5 n, x j E Z+, for p j E II. Now, we consider lower bounds on the total number of stock sheets used for 2DCSP. A simple lower bound is the so-called continuous lower
Local Search Algorithms for 2DCSPn bound, L1, which is defined as follows:
This bound is easy to compute (it can be computed in O(m) time), and is a good bound when there are many products of small sizes. We also introduce another lower bound L2, which works effectively if there are many large products. This lower bound is obtained by concentrating on large products, and is a little complicated since each product can be rotated by 90'. We note that other lower bounds are known for the two-dimensional bin packing problem without rotation [14]. For each product i, we define wf and hf as follows: wf = hf = min{wi, hi) wf = wi, hf = hi ~f = h i , hf = wi
(if max{wi, hi) 5 min{W, H)), (if wi > H or hi > W), (if wi > W or hi > H).
(8.4)
Given a constant q, with 0 < q 5 H / 2 , we define
No two products i E and j E {My(q) U ~ p ' ( q ) )can be packed into the same stock sheet, and at most [H/qJ products in can be packed into one stock sheet. Therefore, we have the following lower bound:
This bound algorithm.
LY can be computed in O(m log m) time with the following
Algorithm Compute
LY
Step 1: Divide the set of all products M into two sets M W and M\MW. For each product i E MW, if hf 5 H/2, set s(i) := hf; otherwise set s(i) := H - hf E (0 < E << 1). Sort all rectangles i E M W in := 0, q := 0, := 0 and the ascending order of s(i). Set := Mw. Step 2: Choose a rectangle i E ~ p ' ( ~with ) the smallest s(i). If hf 5 H/2, go to Step 3; otherwise go t o Step 4.
+
LY
186
Metaheuristics: Progress as Real Problem Solvers
+ 11 +
Step 3: Set q := hf and compute I M y (q)1 1 / [H/qJ If set := I this is larger than 1 [l MY(^) 1 / LH/qJ Set := \ {i). If = 0, output and halt; otherwise return to Step 2.
LY,
LY
1.
LY
+
1.
Step 4: Set q := H - hf E , := := M y ( q ) \ {i) and M!'%)W, andcompute IMy(q)l+ [lMy(q)I / LHIqJ Ifthis set := IMy(q)l [lMy(q)1/ [H/qJ If is larger than = 0, output and halt; otherwise return to Step 2.
LY,
+
LY LY
1.
1.
We also define MH, MF(q) and M? (q) in the same manner, and is similarly computed. As a result, the following another lower bound lower bound L2 is derived by considering large products only.
LF
None of the L1 and L2 dominates the other, and the overall lower bound we use in this paper is as follows,
8.3
COMPUTING THE NUMBER OF PATTERN APPLICATIONS
In this section, we consider the problem of computing the numbers of applications X = (xl, x2,. . .,x,) for a given set of patterns II = {pi, pz, . . . ,pn), where x j denotes the number of applications of pattern pj. This is described as the following integer programming problem: IP(II) :
minimize
f (X) =
C xj
(8.9)
pjEn
aijxj 2 d;, for i E M,
subject to pj E n
x j E Z + , for p j E IT. This problem is already known to be NP-hard since x j must be integer. There are several studies for 2DCSP that solve IP(II) exactly with branch-and-bound methods. However, as we must solve it many times in our algorithm, we consider a faster heuristic algorithm.
Local Search Algorithms for 2DCSPn
187
Our algorithm first solves the LP relaxation LP(II) of IP(II), in which the integer constraints x j E Z+ are replaced with x j :j 0. LP(II) :
minimize
f (X) =
Xj pjEn
subject to
aijxj
t di, for i E M,
pj E n
x j 2 0 , for p j E II. Let X = (TI, 2 ,. . . ,Tn) denote an optimal solution of LP(II). Although this solution is not integer valued, the gaps of objective values between IP(II) and LP(II) are observed to be small in most instances of 2DCSPn. The simplest heuristic algorithm for IP(II) would be "rounding up" X to x = ( [ ~ l l , [ ~ 2 1. ,. ., 1 ~ ~ 1 ) . In our heuristic algorithm, we do a little more than the simple rounding up. We first set 2 j := lTjJ (i.e., rounding down) for all patterns pj E II and let X = (21, &, . . . ,2,). We then sort all indices j in the descending order of Tj - lTjJ , and determine all 2 j in the resulting order of j according to the following rule. If pattern p j includes a product i such that aij2j < di, we set 2 j := i?j 1 (i.e., rounding up) and go to the next pattern. If pattern p j does not include such products, we do not change 2 j and go to the next. The resulting solution x is feasible to IP(II) and not worse than the solution obtained by the simple rounding up method. Note that various rounding procedures are compared in e.g., Marcotte [13], Vanderbeck 1201. In our local search algorithm for finding a good set of patterns, which will be explained in the next section, we must solve many LP(II). If LP(II) is naively solved from scratch whenever we evaluate a new set of patterns, the computation becomes expensive. Therefore, as in our previous paper [17], we incorporate a sensitive analysis technique and the criss-cross method [22], a variant of simplex method, to utilize an optimal LP solution for the current set of patterns II. For a set of patterns 111E N(II), where N(II) is the family of neighboring sets of patterns of II, the criss-cross algorithm converges to an optimal solution of LP(II1) usually after a few pivot operations. A
xj
8.4
+
A LOCAL SEARCH ALGORITHM TO FIND A GOOD SET OF PATTERNS
In this section, we describe a local search (LS) procedure to find a good set of patterns II = {pl,p2, . . . ,pn). It generates many sets of patterns 111in the neighborhood N(II) of the current set of patterns II.
188
Metaheuristics: Progress as Real Problem Solvers
The numbers of applications of patterns in each set 11' are computed by solving IP(IIf) explained in the previous section. The following ingredients must be specified in designing LS: Initial solution, neighborhood, move strategy and a function to evaluate solutions. First, we will explain how to prepare an initial feasible solution, and then we will design several neighborhoods. As the move strategy, we adopt the first admissible move strategy (i.e., as soon as we find a better solution in its neighborhood, we move to the solution). Each set of patterns IT is evaluated by the optimal value of the LP relaxation LP(II). Note that, we also compute an integer solution x of IP(II) heuristically by the algorithm in Section 8.2, and update the incumbent solution accordingly (i.e., the best feasible solution among those obtained so far).
8.4.1
Initial solution
If there is no restriction on the number of different cutting patterns, it is easy to construct a feasible solution. But just finding a feasible solution is not trivial for 2DCSPn. Hence, to design a local search algorithm for 2DCSPn, we first consider how to construct a feasible solution heuristically. In order to construct a feasible solution, we first ignore the demand di of each product i, and temporarily we assume it as 1. In other words, we consider the two-dimensional bin packing problem (2DBPP) instead of 2DCSPn. 2DBPP:
minimize
In(
subject to
(8.11) a,
~j
> 1, for i E M,
En
We utilize a variant of the next-fit heuristic algorithm for 2DBPP known for the one-dimensional bin packing problem. (Note that, 2DBPP has been well studied and there are more sophisticated heuristic and metaheuristic algorithms [12].) If a feasible solution II for 2DBPP satisfying [IT] n is given, we construct a feasible solution for 2DCSPn by the heuristic algorithm proposed in Section 8.2.
<
8.4.2
Neighborhoods
A neighborhood N(IT) may be naturally defined by replacing each cutting pattern pj in the set IT with another cutting pattern p$ E S \ II:
Local Search Algorithms for 2DCSPn
189
where S is the set of all feasible cutting patterns. As mentioned in Section 8.1, the number of all feasible cutting patterns IS[ is too large, and most of them may not lead to improvement. In view of this, we propose heuristic algorithms to generate smaller neighborhoods.
Basic neighborhood. Let (E, 5;;) be the current solution, where X is an optimal solution of LP(l3) which may not be integer valued. The family of sets of patterns in our reduced neighborhood of E are those generated by changing one pattern p j 7j E by the following operation: Remove t (t = 0,1,2) products from pj and add one product. We call this operation "basic operation" and the neighborhood defined by basic operations is called the basic neighborhood. Note that, "removing a product i from pattern pj" means that one unit of product i is removed from pj (i.e., aij decreases by one). Adding a product is analogously defined. In order to decide which products to be removed, we use the overproduction
of product i; we sort all products in the descending order of ri, and then remove the products in this order. This is because the current solution is not improved by adding products i satisfying ri > 0. On the other hand, in order to determine the product to be added, we use a dual = (pl, Y2, . . . ,Ym) of LP(IT). A larger yi indicates optimal solution that increasing aij in pattern pj is more effective. We sort all products satisfying ri = 0 in the descending order of yi, and add a product in this order in a basic operation. The size of this neighborhood is O(nmt+') for a given t.
Redundancy reduction. To make the basic neighborhood more effective, we introduce other operations. We call the first operation "redundancy reduction", which removes some unnecessary rectangles from pattern p j before the basic operation is applied. That is, for a cutting pattern pj, we find the set of products which do not affect the current LP solution even if one unit of the product is removed from p j (i.e., the set of products i satisfying aij 2 1 and Zj Ti). For each product i in this set, aij is reduced by min{Lri/zj] ,aij).
<
Filling-up operation. We explain another operation "filling-up", which is applied to a pattern p j after changing p j by the basic operation. We divide all products i into two sets according to whether overproduction ri is 0 or positive. In the first stage, we sort all products i with ri = 0 in the descending order of pi, and add them one by one in this
190
Metaheuristics: Progress as Real Problem Solvers
order as long as the resulting pattern is feasible. Whenever a product is added, we recompute an optimal solution of LP and update yi. When it becomes impossible to add the products i with ri = 0 into pattern Pj, we go to the next stage. In the second stage, we sort products i with ri > 0 in the ascending order of ri, and add them in this order. Since products i with ri > 0 do not affect the LP solution, we can not improve the current LP value by this operation. However, if we apply this, we may find a better solution in the subsequent iterations in our local search.
Replacement operation.
If all products in a pattern p j are removed by the redundancy reduction and basic operations, we must reconstruct a new pattern from scratch. This situation always occurs for p j with Gj = 0. To find a new pattern with small trim loss, we keep in memory cn (c is a parameter and we use c = 3) cutting patterns having small trim loss, which were obtained by then, and choose one from them. We call this as the replacement operation.
Enhanced neighborhood.
Now, our new neighborhood is the set of solutions obtained from by applying the operations proposed in this section (i.e., basic, redundancy reduction, filling-up and replacement). We call this neighborhood as the enhanced neighborhood. These two neighborhoods, basic and enhanced, will be computationally compared in Section 8.6.
8.5
FEASIBILITY CHECK FOR A PATTERN
For a given cutting pattern pj, we must check its feasibility (i.e., find a feasible placement of the products in this pattern). This feasibility check is trivial for IDCSP, since we just check the following inequality:
where li is the length of product i and L is the length of the stock roll. On the other hand, the problem is hard for the two-dimensional case; because, in general, we must solve the two-dimensional rectangle packing problem (2DRPP). In this section, we first propose two simple methods to check the feasibility of a given two-dimensional pattern. These methods, however, work well only for some special cases. We then propose a heuristic algorithm to find a feasible placement.
Local Search Algorithms for 2DCSPn
191
We first check a given pattern pj against the continuous lower bound, aijwihi 5 WH. (EM
The pattern is obviously infeasible if this inequality is not satisfied. The second method is used to check a pattern constructed in our neighborhood search. In this case, we remove some products from the current (feasible) pattern and add some products to this pattern. A new pattern has a feasible placement if the products to be added are smaller than the removed products. For example, if we remove two products i and i1 from a pattern, and then add two products, one of them is smaller than i and the other is smaller than it, then the resulting pattern is known to be feasible without solving the rectangle packing problem. In other cases, however, we must tackle 2DRPP which is NP-hard.
Two-Dimensional Rectangle Packing Problem Input: A set of rectangles and one stock sheet, each of the rectangles and the stock sheet having its width and height. Output: The locations (l:, 1;) and orientations of all rectangles k in the stock sheet such that no two rectangles overlap each other. There are many heuristic algorithms in the literature proposed for this problem. Basic ingredients of such algorithms are as follows. 1 Coding scheme: How to represent a solution.
2 Decoding algorithm: How to compute a placement from a coded solution. 3 Search strategy: How to find a good coded solution. In this paper, we use a coding scheme called the sequence pair [15]. A sequence pair is a pair of permutations a = (a+,a_)of given rectangles where a+(a)= k (equivalently a r l ( k ) = a) means that the rectangle k is the a t h rectangle in a+ (a- is similarly defined). Given a sequence pair a = (a+,a-), the binary relations 5; and 5: are defined by
for any pair k and k1 (k # kt) of rectangles. Based on these, we impose the following constraints on relative locations:
192
Metaheuristics: Progress as Real Problem Solvers
Figure 8.1. An example of a placement based on sequence pair
where wr,and hr, are the current width and height of rectangle k (depending on its orientation), and the location (I;, 1;) is the x and y coordinates of its lower left corner. That is, if k 5: k' holds, the right side of rectangle k should be placed to the left of the left side of rectangle k'. If k 5: k' holds, on the other hand, the upper hem of rectangle k should be placed to the below of the lower hem of rectangle k'. See figure 8.1 as an example. This coding scheme has the following properties: (1) Constraints (8.17) are a sufficient condition for having no mutual overlap. (2) It is possible to find a feasible placement in polynomial time for a given sequence pair a, if there exists a feasible placement which satisfies constraints (8.17). In [15], Murata et al. proposed a decoding algorithm (i.e., an algorithm to compute locations of all rectangles under constraints (8.17) from a given sequence pair a) which runs in 0(s2)time, where s is the number of rectangles to place. After this, the time complexity has been improved; in [lo], Imahori et al. proposed a decoding algorithm with O(s1ogs) running time, and later it was improved to O(1) amortized computational time per one sequence pair if used in the neighborhood search [ll].Note that, the last algorithm outputs only feasibility; they need O(s log s) more time if a feasible placement for a is required. There are several local search or metaheuristic algorithms proposed to find a good sequence pair [10,11,15]. An iterated local search algorithm proposed by Imahori et al. [ll]is one of the most efficient ones among them. We call this the original algorithm in this paper. As it is too expensive to use the original algorithm in our local search, we modify it in the following manner. In our neighborhood search, we modify a pattern p j E 11 to another pattern pi. Since we already have a good sequence pair u for pattern pj, we construct a sequence pair a' for pi starting from a. As noted before, we remove some products from pattern p j and add some other products
Local Search Algorithms for 2DCSPn
193
to construct a new pattern p[i When a product i is removed, we just remove it from the current sequence pair a. (If p j includes two or more units of product i (i.e., aij 2 2)) we remove one of them at random.) When we add a new product it,we check all insertions of it to all positions of the sequence pair. The number of sequence pairs we check in this process is s2, where s is the number of products in pattern p j (i.e., s = aij). We check all of them in 0(s2)time with the algorithm Evaluate-Shift-Moves proposed in [ll].When there are more than one products to be added, we add them one by one to the sequence pairs generated by then.
zi
8.6
THE ENTIRE ALGORITHM
The outline of our entire local search algorithm is described as follows. (Algorithm NS( (II, , (II*,x*) ,pj, t) in Line 6 will be explained later.)
z)
Algorithm LS-2DCSPn Line 1: Line 2: Line 3: Line 4: Line 5: Line 6: Line 7: Line 8: Line 9: Line 10: Line 11:
Construct an initial set of patterns II and compute its LP solution 51; Set n* := II and compute its integer solution X* heuristically; Start the neighborhood search from the current solution (II,y); f o r t = 0,1,2 do for pj E II do NS((II,X), (II*,x * ) , ~ t~),t o obtain an improved solution; i f an improved solution (II', 5?7) is found then set (II,W):= (II1,fTi)and return t o Line 3; end for end for Output the incumbent solution (II*,x*) and halt;
Note that, the incumbent solution, which is the output of this algorithm, is updated in Line 6. Algorithm NS((II, (II*,x*), pj, t), where NS stands for neighborhood search, is the core routine of our entire algorithm, which is comprised of those algorithms described in Sections 8.2,8.3 and 8.4. Starting from the current set of patterns II, this algorithm checks the family of the sets of patterns generated by modifying the pattern p j E II by the basic, redundancy reduction, filling-up and replacement operations, for a given parameter t (= 0 , l or 2) used in the basic operation. It also computes an integer solution for each set of patterns by the heuristic algorithm of Section 8.2, and updates the incumbent solution (IT*, x*) if a better integer solution is obtained.
x),
194
Metaheuristics: Progress as Real Problem Solvers
Algorithm NS((II, X),(II*,x*), pj, t ) Input: The current solution (IT,X), the incumbent solution (II*,x*), a pattern pj E II which is the candidate to be removed from IT, and a parameter t = 0 , l or 2. Output: An improved solution (II', X') or the failure. (If a better integer solution is found in this computation, the incumbent solution (II*,x*) is updated accordingly.) Step 1: If Tj = 0, go to Step 2; otherwise go to Step 3. Step 2: Repeat the following procedure c n times (where c n is the number of good cutting patterns stored in memory, as described in Section 8.3), and then go to Step 5. (replacement operation): Replace pattern p j with a good cutting pattern stored in memory. Compute LP solution (IT', X') and an integer solution (II', XI) for the resulting set of patterns as described in Section 8.2. If (Ill, x') is better than the incumbent solution (IT*, x*), update it. If (II', X') is better than the current solution (IT, fZ;), exit with (IT', X'). Step 3 (redundancy reduction): Remove the redundant products from p j as many as possible, by the procedure in Section 8.3. Denote the resulting pattern as p;. If this pattern does not have more than t products, go to Step 2; otherwise go to Step 4. Step 4: Apply the following procedures to every subset of products M' with IM'I = t and every product i 6M' with ri = 0, as described in Section 8.3. 4-1 (basic operation) : Remove a set of products M' from pi and add one product i. Denote the resulting pattern as pi and check its feasibility by the procedure described in Section 8.4. If a feasible placement is found, then compute the LP solution as described in Section 8.2, and go to 4-2. 4-2 (filling-up operation) : Fill-up the pattern p: by the procedure in Section 8.3. Compute LP solution (11',X') and an integer solution (IT', X I ) for the resulting set of patterns. If (II', XI) is better than the incumbent solution (IT*,x*), update it. If (11', X') is better than the current solution (II, fZ;), exit with (II', X'). Step 5: Exit with failure (no improved LP solution found).
Local Search Algorithms for 2DCSPn
8.7
COMPUTATIONAL EXPERIMENTS
We conducted computational experiments to evaluate the proposed algorithms. They were coded in the C language and run on a handmade PC (Intel Pentium IV 2.8GHz, 1GB memory).
8.7.1
Other existing algorithms
In the literature, several heuristic algorithms have been proposed for 2DCSP [1,2,3,18,19,21]. For the evaluation of our algorithm, it is desirable to compare our algorithm with those algorithms. However, it is not easy for the following reasons. First of all, there are many variations of 2DCSP and those algorithms in the literature were designed for slightly different problems. Cung et al. [2] and Alvarez-ValdBs et al. 1181 considered the following problem, and proposed branch-and-bound and heuristic algorithms: Cut a single rectangular stock sheet into a set of small rectangular products of given sizes and values so as to maximize the total value. If the value of each product is equal to its area, the objective is to minimize the trim loss. Alvarez-ValdBs et al. considered another problem in [19]: A set of stock sheets of different sizes and a set of rectangular products are given. Each product has its width, height, demand and a fixed orientation. From these stock sheets, products are cut by "guillotine cut" in order to satisfy all demands. The objective is to minimize the total area of stock sheets required. Vanderbeck [21] proposed a heuristic algorithm, which is based on a nested decomposition for 2DCSP, with various constraints such as 3-stage pattern and the maximum number of products in one pattern. Chauny and Loulou [I] and Farley [3] considered a similar problem to ours, but the number of different cutting patterns n is not specified. In [I] and [3], heuristic algorithms based on the column generation technique were proposed, together with some computational results. However, their computational results are too limited to compare (i.e., the size of their test instances is too small to evaluate the performance of our local search algorithms). From these observations, we had to give up the comparison with other existing algorithms. Instead, we generated various types of test instances, and conducted detailed experiments with two different types of neighborhoods and by changing the number of patterns n.
8.7.2
Test instances
We generated random test instances of 2DCSP following the generation scheme described in [16,19]. The instances are characterized by the following three parameters.
Metaheuristics: Progress as Real Problem Solvers
196 Table 8.1.
Comparison two neighborhoods in solution quality and time basic
enhanced
m
quality
time
quality
time
20 30 40 50
15.17 14.81 11.91 10.94
13.88 41.18 221.61 955.64
10.49 8.71 8.76 8.18
18.42 45.76 144.93 638.86
Number of product types: We have four classes 20, 30, 40 and 50 of the number of product types m (e.g., m = 20 in class 20). Range of demands: Demand di of type S (S stands for small) is randomly taken from interval [1,25], type L (large) is taken from [loo, 2001, and type V (variable) is taken from either interval [I,251 or [loo,2001 with the equal probability for each product i. Size of stock sheet: We have five classes a , p,r, 6 and E of the stock sheets. Class a is the smallest stock sheet which can contain six products on the average, while class E is the largest containing about 50 products.
Hence, there are 60 types of instances and we generated one instance for each type. These instances are named like "20San, "20S/3", . . . , "~OSE", "20LaV,. . . , "~OVE","30SaV,. . . , "50V~".In our computational experiments, we apply our local search algorithms ten times to each instance with different initial solutions, and report the average results of ten trials. All test instances are electronically available from our web site (http://www.simplex.t.u-tokyo.ac.jp/"imahori/packing/).
8.7.3
Comparison of basic and enhanced neighborhoods
First, basic and enhanced neighborhoods were computationally compared. For each instance, we applied our local search algorithms with two types of neighborhoods ten times each, and report the average quality of the obtained solutions and the average computational time, where local search halts only when a locally optimal solution is reached. For simplicity, we set the number of different cutting patterns to the number of product types (i.e., n = m). Results are shown in Table 8.1. Column "m" shows the number of product types. For each m, we have 15 instances with different ranges of demands and different sizes of stock sheet; e.g., we have instances 20Sa, 20S/3, . . . , 2 0 V for ~ m = 20. Column "quality" shows the average percentage deviation from the lower bound computed by (8.8) in Section 8.1. Column "time" shows the average
Local Search Algorithms for 2DCSPn Table 8.2.
Quality and time with various number of different patterns n n=m
quality class 20 class 30 class 40 class 50 class S class L class V class a class p class y class 6 class a average
10.49 8.71 8.76 8.18 12.53 6.19 8.38 10.52 8.05 7.92 7.33 11.35 9.03
time 18.42 45.76 144.93 636.86 149.20 262.20 223.09 46.94 71.71 141.18 311.11 486.53 211.49
n = 0.8m
quality
time
12.25 6.31 9.90 18.53 10.36 45.33 9.94 143.14 14.56 47.34 7.39 57.18 9.89 55.47 12.44 10.00 10.03 15.58 9.66 28.30 8.48 60.77 12.45 151.99 10.61 53.33
n = 0.6m
quality time 14.43 12.18 12.22 11.50 16.38 9.10 12.27 16.32 12.27 11.53 9.40 13.39 12.58
3.75 6.42 15.63 37.29 15.37 16.87 15.09 1.84 3.39 6.26 15.83 51.56 15.78
n = 0.4m
quality time 20.81 1.95 16.76 3.10 16.89 7.09 15.32 12.12 20.77 6.35 12.40 5.37 19.16 6.48 28.20 0.26 19.44 0.78 14.91 1.63 10.80 6.57 13.87 21.09 17.44 6.07
CPU time in seconds of one local search. These notations are also used in Table 8.2. From Table 8.1, we can observe that the enhanced neighborhood gives better solutions than the basic neighborhood in all cases, while using roughly the same computational time. It indicates that the redundancy reduction, filling-up and replacement operations proposed in Section 8.3 make the search more powerful and efficient. Based on this, we will use the enhanced neighborhood in the following experiments.
8.7.4
Effect of the number of patterns n
Next, we conducted computational experiments for different number of patterns n; i.e., n was set to m, 0.8m, 0.6m and 0.4m. Results are given in Table 8.2. The leftmost column shows the instance classes. For example, "class 20" represents 15 instances with m = 20. Each figure in this row is the average of 150 trials (that is, 10 trials with different initial solutions for each instance, and there are 15 instances for class 20). "class S" represents 20 instances whose demand is taken from interval [I, 251, and each figure is the average of 200 trials. Other rows can be similarly interpreted. Now from the rows for classes 20, 30, 40 and 50 in Table 8.2, we can observe that as m becomes larger (i.e., from class 20 to 50), computational time increases and solution quality becomes slightly better. As n becomes smaller, the size of neighborhood becomes smaller and local
198
Metaheuristics: Progress as Real Problem Solvers
search algorithm converges to locally optimal solutions rather quickly, making the quality of obtained solution poorer. From the rows for different ranges of demands (i.e., S, L and V), we can observe that the solution quality for class S is the worst. This is due to the influence of rounding and overproduction. Namely, we compute the numbers of applications xj by rounding from the LP solution, and it introduces a little overproduction for several product types. As the total demands is smallest for class S, the effect of one unit of overproduction to the quality is larger. From the rows for different sizes of stock sheet (i.e., class a,@, y,6 and E), we can observe that the solution qualities for classes a and e are worse than others. The reason for class E is similar to the previous one. For many test instances of class E, we could find good solutions if the numbers of applications xj can be fractional. However, these solutions degrade after obtaining integer solutions. On the other hand, as the size of stock sheet becomes smaller, it becomes harder to find a placement of products with small unused area.
8.7.5
Trade-off curve between n and solution quality
Finally, we conducted a more detailed experiment to obtain the tradeoff curve between n and the quality of the obtained solutions. We used two instances 40Va and 40VS. The area of the stock sheet of 40V6 is four times as large as that of 40Va. Results are shown in Figures 8.2 and 8.3. In these figures, horizontal axis is n, and vertical axis shows the solution quality and CPU time in seconds. 40Va-LP (resp., 40VS-LP) shows the average quality of obtained LP solution (i.e., the numbers of applications can be fractional) for 40Va (resp., 40VS), and 40Va-IP (resp., 40VS-IP) shows the average quality of obtained integer solution (as noted in Section 8.2, we solve IP heuristically) for 40Va (resp., 40VS). 40Va-time and 40VS-time show the average CPU times in seconds for ten trials. When n is very small (i.e., n 5 11 for 40Va and n 5 2 for 40VS), we could not find initial feasible solutions. From Figures 8.2 and 8.3, we observe that the computational time tends to increase and the solution quality improves as n increases. For larger n, the improvement in quality becomes tiny instead of the computational time is increasing steadily. Note that, if the numbers of applications can be fractional, an optimal solution for 2DCSP uses at most m different patterns since we solve LP with m constraints to compute the numbers of applications. Nevertheless, our obtained LP solutions for these instances with n = 40 are slightly worse than those with larger n. We
Local Search Algorithms for 2DCSPn 30
--a--40Va-IP
- - - + - -40Va-time
25
20
Z
%
$ 15 C
.8
10
5 +$
:%
0
.~&+.+++#++
0
10
Figure 8.2.
-
,
20
10
.+*+
,
30 40 50 number of dHferent patterns
60
70
0 80
Trade-off between n and solution quality for 40Va
*i ++ +
< rYU++&++++++++*~*, +
10
-
:
20
,
,
30 40 50 number of different patterns
,
,
60
70
Figure 8.3. Trade-off between n and solution quality for 40VS
also observe that the obtained trade-off curves between n and solution quality are not monotonic, which should be non-increasing ideally. From these observations, there is still room for improvement in our neighborhood search. We also observe that the gap between LP and IP solutions for 40V6 are more significant than the gap for 40Va.
200
8.8
Metaheuristics: Progress as Real Problem Solvers
CONCLUSION
In this paper, we considered the two-dimensional cutting stock problem using a given number of different patterns n. As this is an intractable combinatorial optimization problem, we proposed a local search algorithm, which is based on linear programming techniques. In this algorithm, we utilized heuristic algorithms to solve three NP-hard subproblems; i.e., the problem to compute the numbers of applications for IT,the two-dimensional bin packing problem and the two-dimensional rectangle packing problem. To see the performance of our local search algorithm, we conducted some computational experiments with randomly generated test instances of 2DCSP. We first confirmed the effectiveness of our enhanced neighborhood, which utilized basic, redundancy reduction, filling-up and replacement operations. We also computed the trade-off curves between n and the quality of the obtained solution. As a future work, we are planning to improve the solution quality by introducing more efficient neighborhood search and by incorporating more sophisticated metaheuristic algorithms.
ACKNOWLEDGEMENT The authors are grateful to anonymous referees for their valuable comments, which were used to improve this paper. This research was partially supported by Scientific Grant-in-Aid, by the Ministry of Education, Culture, Sports, Science and Technology of Japan, and by Informatics Research Center for Development of Knowledge Society Infrastructure (21st century COE program of the Ministry of Education, Culture, Sports, Science and Technology, Japan).
REFERENCES [I] F. Chauny and R. Loulou, "LP-based method for the multi-sheet cutting stock problem," INFOR, Vol. 32, 1994, pp. 253-264. [2] V.D. Cung, M. Hifi and B. Le Cun, "Constrained two-dimensional cutting stock problems a best-first branch-and-bound algorithm," International Transactions in Operational Research, Vol. 7, 2000, pp. 185-210. [3] A.A. Farley, "Practical adaptations of the Gilmore-Gomory approach to cutting stock problems," OR Spectrum, Vol. 10, 1998, pp. 113-123. [4] H. Foerster and G. Wascher, "Pattern reduction in one-dimensional cutting stock problems," International Journal of Production Re-
Local Search Algorithms for 2DCSPn
201
search, Vol. 38, 2000, pp. 1657-1676. [5] M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness (Freeman, 1979). [6] P.C. Gilmore and R.E. Gomory, "A linear programming approach to the cutting-stock problem," Operations Research, Vol. 9, 1961, pp. 849-859. [7] P.C. Gilmore and R.E. Gomory, "A linear programming approach to the cutting-stock problem-Part 11," Operations Research, Vol. 11, 1963, pp. 863-888. [8] P.C. Gilmore and R.E. Gomory, "Multistage cutting stock problems of two and more dimensions," Operations Research, Vol. 13, 1965, pp. 94-120. [9] R.E. Haessler, "Controlling cutting pattern changes in onedimensional trim problems," Operations Research, Vol. 23, 1975, pp. 483-493. [lo] S. Imahori, M. Yagiura and T. Ibaraki, "Local search algorithms for the rectangle packing problem with general spatial costs," Mathematical Programming, Vol. 97, 2003, pp. 543-569. [ll]S. Imahori, M. Yagiura and T. Ibaraki, "Improved local search algorithms for the rectangle packing problem with general spatial costs," European Journal of Operational Research (to appear). [12] A. Lodi, S. Martello and D. Vigo, "Heuristic and metaheuristic approaches for a class of two-dimensional bin packing problems," INFORMS Journal on Computing, Vol. 11, 1999, pp. 347-357. [13] 0. Marcotte, "The cutting stock problem and integer rounding," Mathematical Programming, Vol. 33, 1985, pp. 82-92. [14] S. Martello and D. Vigo, "Exact solution of the two-dimensional finite bin packing problem," Management Science, Vol. 44, 1998, pp. 388-399. [15] H. Murata, K. F'ujiyoshi, S. Nakatake and Y. Kajitani, "VLSI module placement based on rectangle-packing by the sequence-pair," IEEE Transactions on Computer Aided Design, Vol. 15, 1996, pp. 1518-1524. [16] J. Riehme, G. Scheithauer and J. Terno, "The solution of two-stage guillotine cutting stock problems having extremely varying order demands," European Journal of Operational Research, Vol. 91, 1996, pp. 543-552. [17] S. Umetani, M. Yagiura and T. Ibaraki, "An LP-based local search to the one dimensional cutting stock problem using a given num-
202
Metaheuristics: Progress as Real Problem Solvers
ber of cutting patterns," IEICE Transactions on Fundamentals, Vol. E86-A, 2003, pp. 1093-1102. [18] R. Alvarez-Valdhs, A. Paraj6n and J.M. Tamarit, "A tabu search algorithm for large-scale guillotine (un)constrained two-dimensional cutting problems," Computers & Operations Research, Vol. 29, 2002, pp. 925-947. [19] R. Alvarez-Valdhs, A. Paraj6n and J.M. Tamarit , "A computational study of LP-based heuristic algorithms for two-dimensional guillotine cutting stock problems," OR Spectrum, Vol. 24, 2002, pp. 179192. [20] F. Vanderbeck, "Computational study of a column generation algorithm for bin packing and cutting stock problems," Mathematical Programming, Vol. 86, 1999, pp. 565-594. [21] F. Vanderbeck, "A nested decomposition approach to a threestage, two-dimensional cutting-stock problem," Management Science, Vol. 47, 2001, pp. 864-879. [22] S. Zionts, "The criss-cross method for solving linear programming problems," Management Science, Vol. 15, 1969, pp. 426-445.
Chapter 9
A GENERIC OBJECT-ORIENTED TABU SEARCH FRAMEWORK Hoong C. Lau, Xiaomin Jia and Wee C. Wan School of Computing, National University of Singapore 3 Science Drive 2, Singapore 11 7543 {lauhc, jxiaomin, jwan)@comp.nus.edu.sg
Abstract: Presently, most tabu search designers devise their applications without considering the potential of design and code reuse, which consequently prolong the development of subsequent applications. In this paper, we propose a software solution known as Tabu Search Framework (TSF), which is a generic C* software framework for tabu search implementation. The framework excels in code recycling through the use of a welldesigned set of generic abstract classes that clearly define their collaborative roles in the algorithm. Additionally, the framework incorporates a centralized process and control mechanism that enhances the search with intelligence. This results in a generic framework that is capable of solving a wide range of combinatorial optimization problems using various tabu search techniques and adaptive strategies. The applications of TSF are demonstrated on the implementation of two NP-hard problems, the Vehicle Routing Problem with Time Windows (VRPTW) and Quadratic Assignment Problem (QAP). We show that TSF is able to obtain quality solutions within reasonable implementation as well as computation time.
Key words:
9.1
Tabu Search, software framework, reusability, combinatorial optimization.
INTRODUCTION
Recent studies have reported many successful applications of tabu search [Glover and Laguna, 19971 in solving real-world optimization problems. In most cases, tabu search applications are designed specifically for their intended problems, with little or no consideration for design and codes reuse. Consequently, this leads to difficulties in recycling the developed work for subsequent applications. Conceivably, the sokware development cost could
204
Metaheuristics: Progress as Real Problem Solvers
be drastically reduced if a well-designed programming framework is available that allows the reuse of both designs and codes. The challenge of developing such a framework lies in the tension between its simplicity of use versus the sophistication involved in supporting user-preferred search strategies. To date, there is a lack of a widely accepted tabu search framework and only few research prototypes have gained limited popularity. Another strong motivation for a tabu search programming framework is the demand for an unbiased platform that could ensure fairness in comparing different tabu search strategies. Typically, it is not unusual for a talented programmer to write better codes than his peers and thus could paint an unrealistic picture of a more efficient algorithm. However, when different algorithms for a given problem are implemented on a common framework, it implies that they have been implemented using common software components (such as using the same tabu search engine) and even underlying data structures, which indirectly enforces fairness when algorithms are compared, especially in terms of run-time performance. In addition, an optimized framework lowers the technical expertise of an algorithm designer by providing him with efficient components. Perhaps an implicit third incentive for a framework can be seen from the software engineering point of view. By enforcing an object-oriented design (OOD), the framework imposes a development discipline on the algorithm designer. Consequently this paves a way for ease of code integration and maintenance, and for future extension. In addition, OOD also provides clarity in design, which allows algorithm designers to quickly grasp the conceptual flow of the framework. This results in more efficient use of the framework as well as less prone to programming errors. In this paper, we propose a generic object-oriented framework that performs the standard routine of the tabu search and yet offers the robustness for algorithms designers and developers to incorporate their desired search strategies. Tabu Search Framework (TSF) is a C++ object-oriented software framework that uses a set of interfaces to epitomize the routine tabu search procedures. It has a centralized control mechanism to adaptively guide the search in accordance to events encountered dynamically. TSF also provides a set of supporting software tools, called the Strategy Software Library, which aids developers in their strategies development. In summary, TSF allows users to focus on designing, testing and comparing algorithms by minimizing efforts in programming. This paper proceeds as follows. Section 9.2 gives a literature review of some existing local search frameworks. Section 9.3 presents the architecture of TSF. Section 9.4 gives 3 illustrations on using TSF to formulate user-defined
A Generic Object-Oriented Tabu Search Framework
205
strategies. Section 9.5 presents experimental results. Section 9.6 presents the conclusion and future works.
9.2
LITERATURE REVIEW
In this section, we present a review of four existing frameworks, OpenTS, Localizer*, EasyLocal++ and HotFrame.
9.2.1
OPENTS
OpenTS [Harder, 20031 is one of the project initialized by Computational Operations Research (COIN-OR) to spur the development of open-source software for the operations research community. It is a javabased tabu search framework that has a well-defined, object-oriented design. The generic aspect of the framework is achieved through inheritance, using well-structured interfaces, which includes Solution, Move, Move Manager, Objective Function, Tabu List and Aspiration Criteria. This unambiguous decomposition defined clearly the collaborative role of each interface in the algorithm. In addition, the author presumes that most TS applications adopt the "tabu-ing the move" strategy and hence provides "helper" classes such as SimpleTabuList, ComplexMove and ComplexTabuList classes to assist the implementation.
Infrastructure for
OpenTS also supports the implementation of adaptive strategies through the use of the EventListener objects. These listeners can be embedded into any of the interface-inherited objects and used later to adjust objects' parameters. However, the listeners only respond to a static set of search events and does not consider user-defined events such as recording the presence (or absence) of certain solution structures. This results in difficulty in implementing strategies that are based on the solution structures (such as recency and frequency based strategies). The absence of a centralized control mechanism also poses a limitation to the framework capability. For example, when two listeners are triggered in the same iteration, their order of execution follows a First-In-First-Out (FIFO) sequence, thus giving no control to the algorithm designer. It is also probable for two conflicting EventListener objects (such as intensification and diversification) to be performed together without designer's intention.
206
Metaheuristics: Progress as Real Problem Solvers
The literature presented another framework known as the Localizer++ [Michel and Van Hentenryck, 19991 that incorporates Constraint Local Search (CLS) in C++. The framework is structured into a two-level architecture, which composes of Declarative and Search components. The Declarative components are the core of the architecture and are used to maintain the complex data structure in local search. In addition, it also incorporates a Constraint Library that provides a set of frequently used constraints, such as the AllDiffconstraint which verifies that every element in the data structure has a different value. The Search component on the other hand, operates around the Declarative component and is procedural in nature. Generally, this component implements the general procedure of local search and thus could be used to implement any meta-heuristics that follow to this general behavior (i.e. such as iterative local search and tabu search). Localize*+ requires designers to formulate their problem into its mathematical equivalence form in order for the framework to recognize and subsequently manage the variables (thus achieving the genericty aspect). Algorithm designers are required to implement the routines of the local search such as the local moves and the selection criteria, and together with the Constraint Library, to construct the optimizer. Due to the numerous possible types of constraint, it is improbable for the Constraint Library to provide all forms of constraint and thus Localize*+ copes with this limitation by supporting the extension to the library through the addition of invariants. The framework also supports user-defined search strategies that are triggered at static points of the search (such as at the start or the end of the search) rather than dynamically in response to search events. New search procedures can be extended from Localizer++ through inheritance.
EasyLocal++ [Gaspero and Schaerf, 20011 is another object-oriented framework that can be used as a general tool for the development of local search algorithms in C++. EasyLocal++ relies on programming techniques such as the "Template Method" that specifies and implements the invariant parts of various search algorithms, and the "Strategy Method" for the communication between the main solver and its component classes, in order to achieve the generic aspect. The classes in EasyLocal++ can be classified into four categories, Basic Data, Helpers, Runners and Solvers. The Basic Data is a group of data structure with their managers and is used to maintain the states of the search space, the moves, and the inputloutput data. The
A Generic Object-Oriented Tabu Search Framework
207
Basic Data classes are supplied to the' other classes of the framework by means of template instantiation. The local search problem is embodied in the Helpers classes, which perform actions that are related to some specific aspects of the search, such as maintaining the states or exploring the neighborhood of a solution. The Runners represent the algorithmic core of the framework and are responsible for performing the routine of the metaheuristic. Currently, EasyLocal++ supports several common meta-heuristics such as hill climbing heuristic, simulated annealing and tabu search. EasyLocal++ can be easily deployed by first defining the data classes and the derived helper classes, which encode the specific problem description. These classes are then "linked" with the required Runners and Solvers and the application is ready to run. EasyLocal++ also supports diversification techniques through the Kickers classes. The Kickers objects are incorporated into the Solver and triggered at specific iteration of the search. Hence, this mechanism relies on the knowledge of the algorithm designer to determine the best moment to trigger the diversification. While this may be achievable for most experience designer, it may be demanding for unfamiliar implementer coping with a new problem. In short, the framework provides limited support for adaptive strategies and although it could be possible for such strategies to be incorporated, the authors do not present a clear mechanism to realize them.
9.2.4
HOTFRAME
HotFrame [Fink and VoB, 20021 is a more matured meta-heuristics framework implemented in C++ when compared with Easy Local++. The framework provides numerous adaptable components to incorporate a wide range of meta-heuristics and common problem-specific components. The supported meta-heuristics includes basic and iterated local search, SA and their variations, different variants of tabu search, evolutionary methods, variable depth neighborhood search, candidate list approaches and some hybrid methods. As a means of reducing the programming efforts of designers, HotFrame provides several reusable data structure classes to incorporate common solution spaces such as binary vectors, permutations, combined assignment and sequencing and also some standard neighborhood operations like bit-flip, shift, or swap moves. These classes can be deployed immediately or be used as base classes for subsequent customized derived classes. This design encourages software reuse especially for problems that can be formulated with the components that are already presence in the framework.
208
Metaheuristics: Progress as Real Problem Solvers
Meta-heuristics strategies can be implemented in HotFrame through the use of templates. The idea is to incorporate a set of type parameters that can be extended to support both problem-specific and generic strategies. A benefit of this design is that it gives HotFrame a concise and declarative system specification, which would decrease the conceptual gap between program codes and domain concepts. HotFrame also adopts a hierarchical configuration for the formulation of the search techniques in order to separate problem-specific with the generic meta-heuristic concepts. Generic meta-heuristic components are pre-defined in the configuration as a higherlevel control while the problem-specific definitions are incorporated inside these meta-heuristic components to form a two level architecture (i.e. each problem-specific strategy will be embedded to a meta-heuristic scheme). Additionally, inheritance can be applied on these components to overwrite parts of the meta-heuristic routine with user preferred procedure.
9.2.5
Discussion
It can be seen that the focus of the above reviewed frameworks is primarily on relieving the mundane task of meta-heuristic routines from the algorithm designers. TSF has a slightly different objective: TSF is designed with the intention to support adaptive tabu search strategies. As such, in addition to performing the basic routines of tabu search, TSF has a centralized control mechanism to incorporate adaptive strategies. While it is true that most of the reviewed frameworks could also support adaptive strategies, the incorporation of such strategies may not be as straightforward (i.e. no dedicated mechanism is built for it). For example, while HotFrame could incorporate adaptive strategies by extending its procedures, such inheritance often requires the designer to "re-code7' some of the meta-heuristic procedures. This may pose a problem to designers who are unfamiliar with the internal design of the framework, i.e. the framework can no longer be seen as a black box to the designer. TSF works differently fkom such conventional design by incorporating a communication link between the framework engine (which perform the tabu search routines) and the control mechanism. As the search proceeds, the engine will record the current search state and passes this information to the control mechanism. The control mechanism then processes information to determine if actions such as adjusting the search parameters or applying a diversification strategy are necessary. Analogously, the control mechanism can be seen as a feedback mechanism that adapts the framework engine to the search environment. Such feedback control provides a centralized mechanism for designer to collect information on the search spaces as well as to direct future search trajectory.
A Generic Object-Oriented Tabu Search Framework
9.3
DESIGN AND ARCHITECTURE
9.3.1
Frameworks
Framework has a different concept from "Software Library". In a software library, implementers are required to design their program flow and then use the components in the library to develop their applications. The ILOG optimization suite [ILOG, 20031 (such as the CPLEX and Solver engines) is an example of a well-known software library. In ILOG optimization software library, the programmers formulate their problems as a specific constraint/mathematical-programming model, and a predefined engine operates on the formulated model to obtain solutions. A benefit of such software architecture is that it does not require the programmer to specify the algorithms to be performed on the problem. However, this can also be a drawback, as the predefined engine offers little if no capacity for the implementers to control of the search process. On the other hand, in a framework, the reused code is the controller, which provides an overall "frame" for an application. By means of inheritance, the programmer can implement the child classes, which are subordinate to the framework. In an informal sense, frameworks tell the programmer "Don't call us, we'll call you." In summary, while library allows sharing of lowlevel codes, frameworks allow sharing of high-level concepts and control. The essence of our proposed TSF framework revolves around four principal considerations:
(a) Genericity This means that the framework should allow the user to implement any tabu search algorithm. Additionally the framework should not make any assumption on problem type or its solution representation, thus allowing flexibility to the formulation of applications. (b) Reusability The framework should adopt built-in tabu search routines that can be easily recycled across applications. Furthermore, the algorithm procedure should be disintegrated into distinctive interfaces so that the developed components could be recycled easily across different applications. (c) Extensibility The framework should able to extend easily to support not only some predefined tabu search strategies, but also user-defined procedures that
210
Metaheuristics: Progress as Real Problem Solvers
are specific to the problem domain. In addition, the possibility of extending the framework to form hybrids should not be ignored. (d) Usage Friendliness The framework should be easy to learn and understand from an algorithm designer and implementer perspective. It should have unambiguous interfaces that give clarity in execution flow. To cater for these design goals, the components of TSF are categorized into 4 components: interfaces, control mechanism, search engine, and strategies softwae library (see Figure 9.1). The interfaces define the basic components used by tabu search in an object-oriented architecture. The control mechanism is for users to define strategies that guide the search adaptively in response to events encountered. TSF eliminates the tedious routine task of programming the search engine repeatedly. The search engine interacts with the interfaces and collects information that is passed dynamically to the control mechanism to influence future search trajectory. Finally, TSF includes an optional Strategy SoNare Library consisting of a set of software components to support various user-defined search strategies.
9.3.2
Interfaces
There are seven key interfaces that must be implemented, described as follows. 1. The solution interface allows the user to encapsulate the data structure(s) that represents the problem's solution. The framework does not impose any restriction on how the user defines the solution or the data structures used since it never manipulates Solution objects directly. 2. The Objective Function interface evaluates the objective value of the solution. 3. The Neighborhood Generator interface is an iterator that generates a collection of neighbors based on the Move and Constraint interfaces. 4. The Move interface defines the move neighborhood, where it constructs possible translations of Solution object. When the engine determines the best move in an iteration, the Solution object is then translated to its new state. 5. The Constraint interface computes the degree of violation for these translations. 6. The Tabu List interface records the tabu-ed solutions or moves. 7. The Aspiration Criteria interface allows specification of aspiration criteria for tabu-ed moves.
A Generic Object-Oriented Tabu Search Framework
211
Com binatorial Problems Interfaces
I
Figure 9.1. TSF Architecture
9.3.3
Control Mechanism
Switch Box Like many machines, a set of switches is required to operate the Search Engine. A Switch Box is used in the framework to control the basic operations of the search engine. The two commonly used switches are the maximizing switch and the first-accept switch. The maximizing switch is used to control the engine to solve a maximizing or a minimizing problem. The First-Accept switch informs the tabu search engine to perform first accept or best accept strategy. The best accept strategy searches through all the feasible solutions in the neighborhood and select the best possible move. When run time is comparatively more crucial than the solution quality, we settle for the first neighbor with a better objective value, i.e. the first-accept strategy. All switches are capable of changing values dynamically set by an application. Event Controller It is often desirable for the search engine to respond to encountered events.
212
Metaheuristics: Progress as Real Problem Solvers
For example, a reactive tabu list would need to readjust its tenure in response to the success or failure in obtaining a better solution during the search. Hence we need a means of controlling the tabu search to make dynamic readjustments. TSF uses a centralized control mechanism. It has an Event Controller, which provides interaction between the search engine and its interfaces. When the tabu search engine detects the occurrence of predetermined events, it conveys them to the Event Controller. The Event Controller then responds to these events in accordance to strategies defined by the user. Typically, these strategies will affect one or more of the elements in the interfaces, which in turn, re-adjust the search strategy adopted by the engine. For the reactive tabu list example, the number of non-improving moves encountered can be a "triggering-event", which causes the Event Controller to readjust the tabu tenure based on parameters. Some default events in TSF are as follows: 1.Tabu Search Start is triggered at the start of tabu search. Used to start a timer to record the total time spent in doing the search. 2. Tabu Search Stop is triggered at the end of tabu search. Used to stop the timer or to call an output program to display the results. 3 . N m Best Solution Found is triggered when a new best solution is found. Used for intensification strategies. 4.Non-improving Move Made is triggered when the tabu search engine executes a new non-improving move. Used for diversification strategies. 5.End of Iteration is triggered at the end of the iteration. This is extremely usehl for collection of search information (such as similarity of solutions) or strategies that executed every iteration. 6.No move generated is triggered when the Neighborhood Generator could not generate any moves. 7.No Solution Found event is triggered when the search engine could not find a feasible solution. Used for implementing oscillating strategies. TSF also allows users to define their own events by providing a generic Event interface. Users need to define the triggering event and implement the response to it. For example, suppose we want to apply Random Restart strategy at every n number of completed iterations. To do this, we simply need to implement an Event that is triggered at the every nth iteration. The response to this event is to restart the tabu search with a new starting solution. Figure 9.2 gives a fragment of code segment for such implementation.
A Generic Object-Oriented Tabu Search Framework
213
/ / Base class for the Event interface Class Event{
...... virtual void IterationEvent (TabuSearch* TS){};
}
Class RandomRestart : Event / / user-implemented clas: {
int max-limit = n; // User d e f i n e d n i t e r a t i o n int count~NonImprovingMoves;
I
virtual void IterationEvent (TabuSearch* TS){ if (TS->isBadMove( ) ) int count~NonImprovingMoves++; if (count~NonImprovingMoves> max-limit) ApplyRandomRestart (TS);
Figure 9.2. Code Implementation of a User-DefinedEvent
Some strategies may require history information to be collected during search. In TSF, the Event interface can be used to collect such useful information. For instance, implementing a Frequency and Recency strategy may require the tabu search to record the number of occurrences a substructure/configuration in the solution has appeared during the search. As an example, in the Traveling Salesman Problem, if we discover that the solution that visits customer 4 before customer 3 occurs very frequently in local optima, this may imply that the global optimal may contain the same subroute with the structure X 4 3 - Y , where X and Y refer to some arbitrary customers. In this case, the user may like to implement a soft constraint based on this observation, which in turn will reduce the size of the neighborhood generated. By collecting more information during the search and consequently adaptively modi&ing the search strategy, we can derive a more effective search.
9.3.4
Tabu Search Engine
The Tabu Search Engine component implements the control flow as follows: 1.
Set initial solution as current and best found solution
214
2. 3. 4. 5. 6. 7.
9.3.5
Metaheuristics: Progress as Real Problem Solvers Neighborhood Generator generates a list of feasible moves Objective Function evaluates each move Choose best non-tabu move using Tabu List and Aspiration Criteria Apply Move on the current solution Update Tabu List and trigger related events Go to step 1 until terminating condition(s) is reached
Strategy Software Library (SSL)
Strategy Software Library (SSL) provides optional components for designer to facilitate them in adding generalized strategies. By making assumptions on the solution representation (such as permutation of integers or array of bits), these components can be incorporated to build strategies such as intensijkation among elite solutions, probabilistic diversi~cation,candidate lists, and very large-scale neighborhood (VLSN). Although not as powerful as specific strategies tailored for a single problem type, these generic components provide a quick and easy means for developers to apply them in their search. In the following, we describe some of the components in SSL. Probabilistic Diversification
Probabilistic diversification refers to diversifying the search when it is caught in a local optimum. If the designer adopts a permutation or bits array solution representation, SSL can readily supports this strategy by providing a Random Generator that determines the parts of the solution that will be removed in according to a preset probability distribution (such as uniformly random distribution). These randomly chosen portions are then reconstructed by random swapping (permutation representation) or flipping (bits array) and later recombined. Intensification search on Elite solutions
SSL supports this strategy by storing a list of elite solutions during tabu search in the Elite Recorder. As solution objects inherited Solution interface, different solution representations can be easily stored as their base class. Each of these elite solutions is then used as a new initial solution for future tabu search. The rationale behind this strategy is to search the elite solutions more thoroughly and hence is classified as an intensification strategy. Developers simply need to declare the number of elite solutions to be collected in the preliminary search and TSF would search each of these points more thoroughly.
A Generic Object-Oriented Tabu Search Framework
Very Large-Scale Neighborhood (VLSN)
VLSN [e.g. Ahuja et al., 20021 works on the principle that by generating a larger neighborhood, the hope is to increase the probability of obtaining better solution in a single iteration. Under the assumption that the solution representation is a permutation of integers, this strategy usually requires some permutation function to generate the large neighborhood. SSL provides two functions to support this strategy: PermutationGenerator and NeighborhoodBooster. PermutationGenerator provides the ease of permuting a solution to construct its neighborhood. NeighborhoodBooster, is used to increase the neighborhood size by combining multiple 2-opt moves into k-opt moves. User can also combine this strategy with the candidate list to keep the size of the neighborhood reasonable. Candidate Lists
Candidates are often used to narrow the neighborhood size especially when VLSN is involved. A possible technique is to select neighbors that meet some certain criteria or constraint. SSL provides a Filter function that inherits from the Constraint Interface. It receives a solution, a move and a selection function, and "filters" unfavorable moves that do not meet the constraint.
9.4
ILLUSTRATION
In this section, we illustrate how TSF can deploy some common user-defined search strategies, namely DiversiJication, IntensiJcation and Reactive Tabu Search'. These simplistic examples demonstrate how events can interact and incorporate the necessary actions to execute user-defined strategies.
9.4.1
Diversification
Diversification refers to strategies that transform one solution to a radically different solution. Usually, this transformation involves alternating part or
'
Note that although TSF can support adaptive strategies such as diversification, it is accomplished in a rather rudimentary fashion. Since the publication of the conference version of this work, the authors have developed an enhanced version of TSF known as Metaheuristic Development Framework (MDF), in which TSF is a component of a bigger framework (please see [Lau et al., 20041. In MDF, strategies such as adaptive methods and hybridization can be incorporated in a more elegant approach via the use of event handlers.
216
Metaheuristics: Progress as Real Problem Solvers
the whole solution structure. When some forms of probability are involved in the transformation, it is known commonly as probabilistic diversification. The greatest difficulty in executing this strategy is to decide when to apply diversification, for if diversification is applied too often, this may result in accidentally missing out good local optima; otherwise if diversification is performed infrequently, the search may waste too much time exploring potentially useless solutions. The easiest approach to decide when to perform diversification is to execute a fixed number of iteration and then applied the strategy. TSF easily support this strategy by implementing an event that counts the number of iteration performed. This event performs like a hardware counter. When the counter-event reaches zero, it will execute the desired diversifying actions. A code fragment is shown on Figure 9.3. Typically, this simplistic guiding rule is not very effective. An improved strategy is then to apply diversification when the search is caught in local optimal or experiences solution cycling. Unfortunately, both of these situations are extremely diffkult to detect accurately. There exist many heuristics that help to predict their occurrences, and one such heuristic is to observe the number of non-improving moves made since the last local optimum found. This heuristic again can be easily implemented with TSF using the event controller. Here, we implement an adaptive counter that decrements when the search makes a non-improving move and resets itself when a new best solution is found. A code fragment for this adaptive counter is shown in Figure 9.4.
9.4.2
Intensification
Intensification refers to strategies that examine thoroughly on some specific solutions. As oppose to diversification, intensifying strategies improve on the solution quality by searching around the region close to the solution. As such, intensification is usually performed on elite solutions. Hence, intensification often requires two phases - the initial phase is used to identify "good" solutions while the next phase attempts to locate new local optimum around these identified solutions. TSF can implement this strategy using the event controller that track two events for each phase of search respectively. An elite solution recorder is essential to record on the elite solutions and user can use either the provide tool in SSL or to implement their own. In the first phase, the First-Phase event first preset a number of iteration to collect the elite solutions. This is very similar to the counterevent discussed in section 9.4.1. In addition, the First-Phase event also records the solution whenever it encounters a new best-found solution. When the counter reaches zero, the First-Phase event will notify the event controller that it has completed its task and the event controller will proceed to replace the First-Phase event with the Second-Phase
A Generic Object-Oriented Tabu Search Framework
217
event. The Second-Phase event is used to performed intensification on solution collected. One strategy in which intensification can be performed is to use a strategy that is analogous to backtracking. In this strategy, we conduct search on an elite solution for a fix number of iterations. If no better solution can be within these iterations, we would backtrack to our original solution and conduct a new search. To prevent conducting similar search, one approach is to preserve the tabu list. However, this may require a fair amount of memory depending on the number of iteration conducted. We proposed another approach, which is to interchange the tabu list each time we backtrack. The rationale behind this is that tabu list is used to guide the search and hence by using different tabu lists and interchanging them, we expect the search to move in different direction each time we revert to the original elite solution. A pseudo code for the events in both phases is presented in Figure 9.5.
9.4.3
Reactive Tabu Search
Our last illustration is on reactive tabu search, where we explain how two strategies can be incorporated into a single event. Reactive tabu search refers to strategies that adaptively adjusting tabu search parameters according to the search trajectory. Many complex heuristics have been proposed with this strategy, each with its own assumptions on the solution space. In fact a popular analogy is to visualize the solution space as a multi-dimensional terrain. The factors include objective value, similarity in the solution structure and time. Based on these factors, the reactive tabu search attempts to navigate along the terrain toward new local optima. In order to simplify our illustration, we only consider two factors, time and objective value and the parameter adjusted is limited to the tabu tenure. Time simply refers to number of iterations performed. Our simplified strategy works as follows. When we encounter a series of non-improving we lengthen our tabu tenure so as to prevent solution cycling. On the other hand, when we encounter a new best solution, we shorten our tenure in order to perform intensification. Hence we use TSF to implement an event called Reactive-Event to handle the two scenarios. First, when we encounter a series of nonimproving moves, we will increase the tabu tenure by some x amount. On the other hand, when a new best solution is encountered, we will revert the tenure, discarding any move that have been kept for more than n iterations. The pseudo code for this implementation can be found in Figure 9.6.
218
Metaheuristics: Progress as Real Problem Solvers
Class CounterEvent : Event / / user-implemented class int startvalue = n; // User d e f i n e d n i t e r a t i o n virtual void IterationEvent (TabuSearch* TS){ startvalue = startvalue - 1; if (startvalue <= 0 ) { ApplyDiversification(TS->getCurrentSolution()) StartValue = n; / / reset counter
I I I Figure 9.3: Code@agment implementing a counter event. -
-
Class AdaptiveCounterEvent : Event
I int startvalue = n; // User d e f i n e d n moves virtual void NewBestSolutionFound (TabuSearch* TS){ StartValue = n; / / reset counter
I virtual void NonImprovingMoveMade (TabuSearch* TS){ startvalue = startvalue - 1; if (startvalue <= 0 ) { // D i v e r s i f i c a t i o n i s a u s e r implemented method // i n c l a s s AdaptiveCoun t e r E v e n t
ApplyDiversification(TS->getCurrentSolution()) StartValue = n; / / reset counter
I I
I Figure 9.4: Code@agment implementing an adaptive counter event.
A Generic Object-Oriented Tabu Search Framework
219
Class FirstPhaseEvent : Event
I int maxIter = n; // Maximum number o f i t e r a t i o n virtual void NewBestSolutionFound (TabuSearch* TS){ EliteRecorder.record(TS->getCurrentSolution());
1 virtual void IterationEvent (TabuSearch* TS){ maxIter = startvalue - 1; if (maxIter <= 0) TS->getEventController().NextEvent();
I 1 Class SecondPhaseEvent : Event
I int allowedIter = x; virtual void NewBestSolutionFound (TabuSearch* TS){ allowedIter = x;
1 virtual void IterationEvent (TabuSearch* TS){ allowedIter = startvalue - 1; if (allowedIter <= 0) BackTrack(TS);
1
I Figure 9.5: Codefiagment implementing intens$cation strategy. Class FirstPhaseEvent : Event {
int badMoveLimit = n; // Maximum a l l o w e d b a d m o v e s int increment = x; // Maximum a l l o w e d b a d m o v e s int defaultTenure = t; // Maximum a l l o w e d b a d moves virtual void NewBestSolutionFound (TabuSearch* TS){ TS->getTabuList( ) setTabuTenure (t); BadMoveLimit = n; / / reset limit
.
1 virtual void NonImprovingMovesMade (TabuSearch* TS) badMoveLimit = badMoveLimit - 1; if (badMoveLimit <= 0) { int tenure = TS->getTabuList().getTabuTenure(); TS->getTabuList().setTabuTenure(tenure+x);
1 I Figure 9.6: Codefiagment implementing simpl$ed reactive tabu search.
220
9.5
Metaheuristics: Progress as Real Problem Solvers
EXPERIMENTATION
In this section, we report on experimental results on VRPTW and QAP. It is interesting to first observe that a senior undergraduate computer science student proficient at C++ programming took 1 week to learn TSF by studying the documentation and interacting with the TSF developers. He took another 1 week to first implement an application (QAP), and 3 days to implement a second application (VRPTW).
9.5.1
Vehicle Routing with Time Windows (VRPTW)
We benchmark with Solomon's instances [Solomon, 19871. 5 different moves were implemented: Relocate, Exchange, Reverse, Cross and Distribute. Reverse is used to reverse the sequence of customers within a same route and is usehl when the time window is loose. Cross is an extended Exchange where a sub-section of a route is swapped with another. Distribute attempts to reduce a vehicle by distributing the vehicle's customers to other vehicles. The design of these moves exploits the advantage of minimizing the distance without minimizing vehicles. With the exception of Relocate and Distribute, the other moves are designed to minimize the total distance traveled. The tabu list records on the previously accepted moves and a different tenure is set for each type of moves. The values of the tenure are Relocate: 1000, Exchange: 1000, Reverse: 300, Cross: 500 and Distribute: 400 for a problem size of 100 customers. We also adaptively apply intensification or diversification strategies based on the quality of the solutions found. Based on the default events, each solution is classified into two categories: improving solutions and non-improving solutions. An improving solution has an objective value that is better than all previously found solutions. Non-improving solution refers to solutions whose objective value is the same or poorer than the best-found solution. TSF adaptively alternates between intensification and diversification by observing the frequency of non-improving solutions. Diversification will be applied using a greedy heuristic when the frequency of non-improving solution exceeds a certain threshold. Appendix A summarizes our experimental results. TSF Results are results obtained by TSF; Best Results are the best-published results.
9.5.2
Quadratic Assignment Problem (QAP)
In QAP, the Solution can be represented as a permutation on a set of n facilities. A typical move often involves swapping two elements in the solution. [Ahuja et al., 20021 proposed a VLSN strategy for QAP, which implements complex moves involving multiple swaps. Generally, VLSN
A Generic Object-Oriented Tabu Search Framework
22 1
produces better solutions than typically swap move. Following the authors' proposal, we demonstrate that TSF is capable supporting this strategy through the use of two software components: PermutatorGenerator and NeighborhoodBooster. The PermutatorGenerator is used to construct the neighborhood from a solution by generating all the possible permutations. The NeighborhoodBooster then performs two M e r steps to generate a larger neighborhood. First, a selection criterion is used to accept only elite neighbors. These elite neighbors are then further permutated to result in more neighbors. The two steps are repeated for k times (and thus known as k-opt). The tabu list in this case, records the previously visited solution and has a tenure of O.6n, where n is the number of facilities. We conducted our experiments on a set of test cases taken from the QAPLib [Burkard et al., 19911, and the results are summarized in Appendix B. Gap is calculated as Gap = (Best Result - TSF Result)/Best Result *loo%. From the table, we can see that TSF performs well for most of test cases. In Chr test cases, except for Chr20a and Chr25a, the results obtained are optimal; the results for other test cases are within a small gap from optimality.
9.6
CONCLUSION
In this paper, we presented TSF, a C++ object-oriented framework for tabu search. TSF imposes no restriction on the domain representation and yet provides a well-defined programming scheme for customizing the search process. TSF differs from other frameworks in that it offers users the flexibility of incorporating various tabu search strategies through the Event Controller as the centralized control mechanism without compromising too much on the run-time efficiency and solution quality. The Strategies Software Library fbrther supports the development of enhancing solution quality. Through the implementations of TSF on VRPTW and QAP, we illustrate that good results can be obtained with the framework within reasonable implementation time as well as good run-time. TSF is one component within the Meta-Heuristics Development Framework (MDF) [Lau et al., 20041 that is work-in-progress. MDF encompasses other meta-heuristics such as the Simulated Annealing, Genetic Algorithms, and Ants Colony Framework. MDF aims to provide a generic, robust and userfriendly programming framework for promoting the development and integration of meta-heuristics algorithms. It also provides a platform for researchers to equitably compare and contrast meta-heuristics algorithms.
222
Metaheuristics: Progress as Real Problem Solvers
ACKNOWLEDGEMENT The authors would like to thank the referees of the 5th Meta-Heuristic International Conference, and the referees of this journal version.
A Generic Object-Oriented Tabu Search Framework
223
Legend: CR2 W. Chiang and R. A. Russell, A Reactive Tabu Search Metaheuristic for Vehicle Routing Problem with Time Windows, INFORMS Journal on Computing, 8:4, 1997 CLM J. F. Cordeau, G. Laporte, and A. Mercier, "A Unified Tabu Search Heuristic for Vehicle Routing Problems with Time Windows," Journal of the Operational Research Society 52,928-936,2001 HG J. Homberger and H. Gehring, "Two Evolutionary Metaheuristics for the Vehicle Routing Problem with Time Windows," INFOR, 37, 297-318, 1999 RT Rochat, Y. and E. Taillard, Probabilistic Diversification and Intensification in Local Search for Vehicle Routing, Journal of Heuristics, 1, 147-167, 1995 RGP L.M. Rousseau, M. Gendreau and G. Pesant, "Using Constraint-Based Operators to Solve the Vehicle Routing Problem with Time Windows," Journal of Heuristics, 8, 43-58, 1999 TBGGP E. Taillard, P. Badeau, M. Gendreau, F. Geurtin, and J.Y. Potvin, "A Tabu Search Heuristic for the Vehicle Routing Problem with Time Windows," Transportation Science, 31, 170-186, 1997
224
Metaheuristics: Progress as Real Problem Solvers
APPENDIX B: Experimental results on QAP test cases
A Generic Object-Oriented Tabu Search Framework
225
Legend: Chr: N. Christofides and E. Benavent. An exact algorithm for the quadratic assignment problem. Operations Research, 3:5, 760-768, 1989 Bur: R.E. Burkard and J. Offermann. Entwurf von Schreibmaschinentastaturen mittels quadratischer Zuordnungsprobleme. Zeitschrift Jiir Operations Research, 21, B121-B132, 1977 Nug: C.E. Nugent, T.E. Vollman, and J. Ruml. An experimental comparison of techniques for the assignment of facilities to locations. Operations Research, 16, 150-173, 1968 Sko: J. Skorin-Kapov. Tabu search applied to the quadratic assignment problem. ORSA Journal on Computing, 2: 1, 33-45, 1990
REFERENCES [Ahuja et al., 20021 R. K. Ahuja, J. B. Orlin, 0. Ergun, and A. Punnen A Survey of Very Large-Scale Neighborhood Search for the Quadratic Assignment Problem, Discrete Applied Mathematics 23, 75-102,2002. [Burkard et al., 19911 R. E. Burkard, S.E. Karisch and F. Rendl. QAPLIB A Quadratic Assignment Problem Library, European Journal of Operational Research, 55:99, 115-119, 1991. [Fink and VoB, 20021 A. Fink, S. VoB: HotFrame: A Heuristic Optimization Framework. In: S. VoJ, D.L. WoodrufS (Eds.), Optimization Software Class Libraries, Kluwer, Boston, 81-154,2002. [Glover and Laguna, 19971 F. Glover and M. Laguna, Tabu Search, Reading, Kluwer Academic Publishers, Boston/Dorderecht/London, 1997. [Gaspero and Schaerf, 20011 L. Di Gaspero and A. Schaerf, EasyLocal++: An object-oriented framework for flexible design of local search algorithms, Reading, Kluwer Academic Publishers, 200 1. [Harder, 20031 R. Harder, http://opents.iharder.net, 2003.
IBM
OpenTS
Homepage,
see
[ILOG, 20031 ILOG S.A. www.ilog.com, 2003. [Lau et al., 20041 H. C. Lau, M. K. Lim, W. C. Wan and S. Halim. A Development Framework for Rapid Meta-heuristics Hybridization, Proc.
226
Metaheuristics: Progress as Real Problem Solvers
28th Annual International Computer SofhYare and Applications Conference (COMPSAC), 362-367, Hong Kong, 2004. [Michel and Hentenryck, 19991 L. Michel and P. Van Hentenryck. Localizer++: A modeling language for local search. INFORMS Journal of Computing, 11, 1-14, 1999. [Solomon, 19871 M. M Solomon. Algorithms for Vehicle Routing and Scheduling Problem with Time Window Constraints, Operations Research 35, 254 - 265,1987.
Chapter 10 BI-OBJECTIVE SEQUENCING OF CUTTING PATTERNS An applicationfor the paper industry Ana ~ e s ~ i c i and o ' M. EugCnia captivo2 Universidade de Lisboa, Faculdade de Cisncias Centro de Investigap?~Operacional Campo Grande, 1749-016 Lisboa, Portugal
Abstract: Sequencing cutting patterns problems arise in several industries. Given a set of cutting patterns and a given objective, a sequencing problem consists of finding a permutation of patterns that optimises the objective. Single objective problems are NP-hard. Approaches available in the literature have only dealt with single objective problems, and consider heuristics and metaheuristics. Single objective optimisation approaches are myopic regarding other objectives and may loose Pareto optimal solutions. We propose a bi-objective sequencing problem considering the minimisation of the maximum number of open stacks and the minimisation of the average order spread. To approximate the Pareto optimal set we used multi-objective evolutionary algorithms. The bi-objective optimisation approach can provide knowledge about the solution space that would not have been achieved with a pure single objective approach. Key words:
10.1
Cutting-stock, sequencing problems, multi-objective evolutionary algorithms.
INTRODUCTION
Problems of sequencing cutting patterns arise in several industries. Given a set of cutting patterns and a given objective, a sequencing problem consists of finding a permutation of patterns that optimises the objective. Single objective problems are NP-hard. Heuristics and metaheuristics provide suitable solution approaches.
228
Metaheuristics: Progress as Real Problem Solvers
Under a cooperation project with Portucel, the major Portuguese paper producer (one of the European leaders in the paper market), we have developed customised interactive tools for decision-making support for production planning and scheduling [9]. Figure 10.1 describes the elaboration of cutting plans. The process consists of four stages, each of which is represented by a box.
I Select orders to cut I
1 t L Widthslnumber of items
Generation of a cutting solution >Minimising cutting waste Column Generation Technique
Cutting solution (widths)
Assignment of items to orders >Minimising number of patterns cutting each order Heuristics
Cutting solution (orders)
Sequencing cutting patterns >Minimising order spread >Minimising open stacks >Which objective? Cutting plan
Figure 10.I. Elaboration of cutting plans
We identified two major sequencing objectives: (1) the minimisation of the maximum number of open stacks and (2) the minimisation of the average order spread. The space around the cutting saw is narrow. As the number of produced items increases, packing mistakes arise. Objective (1) concerns the minimisation of these mistakes, in the worst case. Objective (2) regards the efficiency of the flow of work, on the average case. However the production schedulers were not able to set a preference between these two criteria. They state that "to choose a pattern sequence they need to analyse and compare the best sequences". We propose a bi-objective sequencing problem considering these two objectives. Linhares and Yanasse [6] clearly show that optimising these objectives leads to potentially different solutions. To our knowledge, approaches available in the literature have only dealt with single objective problems. Single objective optimisation approaches are myopic regarding other objectives and may loose Pareto optimal solutions. Approximating the Pareto optimal set allows for a more effective exploration of the solution space. We test a pure multi-objective evolutionary algorithm and propose a new hybrid algorithm, that includes local search procedures. Next section presents the mathematical functions for the objectives and the bi-objective model. Section 10.3 presents a literature summary. Section 10.4 describes the solution approach. Section 10.5 discusses the
Bi-objective sequencing of cutting patterns
229
computational results focusing on different strategies for the algorithm implementation. Section 10.6 presents an interface module to support decision-making. Section 10.7 concludes with a summary of the results achieved.
10.2
PROBLEM STATEMENT
Consider the cutting solution defined by the set of patterns pl,...,pn , where aq is the number of times order i is cut in pattern j , i = l,..., m , j = l,..., n . A permutation of the pattern indexes ll = (q, ...,n,) represents a cutting sequence. The maximum number of simultaneously open stacks in permutation II is given by
where qik(n)=
10,
j=1
j=k
otherwise.
If a stack for order i is open when pattern k is cut then q i k o = l , otherwise, q i k O = 0 , i = 1, ...,m . The spread value of order i in sequence ll , i = I,..., m ,is given by s i o , defined as
The average order spread of permutation II is given by
The bi-objective problem is the minimisation of the functionf that maps each permutation to a pair of objective values: min y = f (x)= (MOS(x),AOR(x)),
230
Metaheuristics: Progress as Real Problem Solvers
where x E T ( r is the set of all permutations of cardinality n ) and 0,
'1.
For our bi-objective problem, a single point on the decision space corresponds frequently to multiple alternative decision vectors. The set of all efficient decision vectors constitutes the optimal-Pareto set, and its image on the objective space is the set of all non-dominated solutions or the Paretofiont. Figure 10.2 illustrates these concepts for a bi-objective minimisation problem. Consider the outer solutions of the Pareto-front, z;" = ($,z r d ) and z;' = b;, z r d ) , the points that correspond to the optimums for each objective, respectively. The utopia point, zUt= b;, y;), represents the lower limit for each objective and it corresponds to a feasible solution only if the Paretofront is a singular set. The nadir point, given by z" = ( Z ; Y ~ , Z ?,~ ) represents the upper limits on the objectives. nadir point Y2
0
...............
i 0
utopia point '
0
ioo [ o 0 0 Qo')
0
'
-8-6
j
Non-dominated solution
0 Dominated solution
j
*....0 .........@.....
.
j
-.-
i;j
Figure 10.2. illustration of points on the objective space
Besides computing the approximation of the Pareto set, we also aimed to study the relative amount we could expect to loose in one objective when we optimise the other. Considering the concepts of figure 10.2, these measures are given by: - Maximum relative difference for MOS = ( q d - y;) l y; and - Maximum relative difference for AOR = ( z r d - y;) l y; .
10.3
LITERATURE REVIEW
Approaches in the literature are relevant, but only consider the single objective problems. The corresponding problems are proven to be NP-hard [3, 111. Table 10.1 summarises the literature approaches, the objective(s) considered, and the solution techniques used. There are some slight differences on the way objective values are computed. Some authors
Bi-objective sequencing of cuttingpatterns
23 1
consider the maximum order spread in spite of the average value, and the opposite happens for the maximum number open stacks. Yuen [12, 131 also studied the minimisation of the stacks number. Table 10.1. Summary of the literature for the single objective problems
Dyson and Gregory [l] Haessler and Talbot [S] Madsen [7] Yuen [12, 131 Yuen and Richardson [I41 Foerster and Wascher [4] Yanasse [l 11 Faggioli and Bentivoglio [2] Fink and Voss [3] Respicio et a1 [9] Linhares and Yanasse [6]
10.4
X X
X
X X X
X X
X
X
X X
X X X
X
X X
X
X X
X
X
X
X
X X
X
X
X
SOLUTION APPROACH
10.4.1 Multi-objective evolutionary algorithms We adapted the multi-objective evolutionary optimisation algorithm SPEA2 - an improved version of the Strength Pareto Evolutionary Algorithm (SPEA) - recently proposed [16]. SPEA2 has been compared with other recent multi-objective optimisation techniques, yielding very good results. The main features of the algorithm include elitism, a finegrained fitness assignment scheme and diversity of solutions in each generation. Non-dominated individuals are kept on an archive. We developed new versions of the algorithm, both by considering a special stopping criterion and by introducing local search procedures, as described in section 10.4.2. Encoding of individuals, recombination and mutation operators were adopted from the concepts and techniques for evolutionary algorithms for the TSPIsequencing problems [8, chp. 101. Individuals are encoded using the path representation, which is the most natural form of representing sequences. The recombination operator is the Order Crossover operator OX. The OX builds offspring by selecting a subsequence from one parent and preserving the relative order of elements from the other parent. This operator gives importance to the order of the elements in the sequence, rather
232
Metaheuristics: Progress as Real Problem Solvers
than to their positions. The mutation operator is the Reciprocal Exchange operator that exchanges the positioning of two elements.
10.4.2 Versions of the algorithm As stopping criteria, we implemented the usual test on the maximum number of generations and the test on the relative change of the distance between utopia and nadir point approximations, which is the best stopping test for estimating a Pareto-set by evolutionary algorithms [lo]. For this latter test we used a parameter r that rates the number of generations not yet Let tl be the last generation performed for the maximum established (0. when utopia andlor nadir point approximations changed. The algorithm stops at generation t2 if, from generation tl to generation t 2 , the relative change of the distance between utopia and nadir points is near zero and t2 - t, > r(T - t2). At each generation, the satisfaction of the stopping test is verified. The approximation of the Pareto set is given by the set of efficient individuals in the current archive. In the pure version of the algorithm individuals in the initial population are generated randomly. We also developed a hybrid algorithm. For each pattern index, we initialise a sequence with that index and compute the correspondent solution given by the heuristic 3 of Yuen [13], which was claimed to be quasioptimal [14]. Each of these sequences is included in the initial population. The remaining individuals in the initial population are generated randomly. Other feature of this algorithm consists of performing local search aiming to improve the potentially non-dominated individuals found so far. At each set of 50 generations, we test if the approximation of the utopia point has changed and, in that case, we perform a 2-optimal procedure over the nondominated individuals in the current archive. A total of four versions of the algorithm were tested, as summarised in table 10.2. Table 10.2. Versions of the algorithm Type of algorithm pure pure hybrid hybrid
Stopping criterion maximum number of generations distance between utopia-nadir points maximum number of generations distance between utopia-nadir points
Name of the version VP 1 VP2 VH1 VH2
Bi-objective sequencing of cutting patterns
10.5
COMPUTATIONAL TESTS
The algorithms were coded in C. All the tests were performed on a Pentium IV 1600MHz.
10.5.1 Description of the instances We tested over two sets of instances. The first one includes the larger instances randomly generated used by Foerster and Wascher [4] and by Fink and Voss [3]. For m (the total number of different orders), two values were considered m=50 and m=60. The number of patterns, n, is close to m. Four values for v (the relative size of the largest order length to the total raw length) were considered (1-0.25, ~ 0 . 5 ,~ 0 . 7 5 ,1-1). Each pair (m,v) corresponds to a subset of data instances, giving a total of eight instance groups - groups 1 to 4 for m=50 ordered according to decreasing complexity, and groups 5 to 8 for m=60 ordered in the same way. From each of the original groups, we tested over 10 instances (the first 10 of each set), adding up to a total of 80 instances. The second set consists of 22 real instances provided by the manufacturer, where m130 and 0.3950.5.
10.5.2 Description of the experiences For each instance, we made 10 run simulations of each algorithm version using a parameters set. The set of non-dominated solutions is approximated by all non-dominated solutions found during all the runs. VPl and VP2 were tested using the parameters sets PSI and PS2, and VHl and VH2 using PS3 and PS4. The correspondent parameter values for each set are described in table 10.3. Table 10.3. Parameters sets parameter Dimension of the population Dimension of the archive T (number of generations) r (generations remain rate)
PSI 100 100 750 0.2
PS2 150 150 2000 0.4
PS3 225 75 1000 0.1
PS4 300 100 750 0.1
PS5 150 50 750 0.1
We fixed the probability of reproduction to 0.8, the mutation probability to 0.2, and o to 0.5.
234
Metaheuristics: Progress as Real Problem Solvers
10.5.3 Evaluation of the algorithm versions To evaluate the algorithm versions, we used three metrics described by Zitzler et al. [15]. Consider a set of efficient decision vectors X', and Y' the correspondent set of non-dominated objective vectors. Let Y denote the optimum Pareto-front. The metric Ml(Y) gives the average distance of Y' to Y. M2(Y) counts the number of niches of neighbourhood o , for a given value o >O. The metric M3(Y) measures the extension of the approximated front on the objective space. To compare the different experiences we compared the approximations of the utopia point and count the relative number of times the best-known solution for each objective was found for each instance.
10.5.4 Experiences over the randomly generated instances All values presented on the following tables of results refer to average values over the simulation runs performed for each experience. Table 10.4 shows the computational results for VP1 and VP2 using the parameters set PSI. The maximum relative difference for the objectives is shown under the title %MRelD$ For each instance, we evaluated the number of times the best-known solution value for each objective (given by the approximated utopia point, over all the sets of experiences) was reached in each experience. Columns under the title %Best display these relative values in percentage. The last row A, displays the average of values in the above cells. Table 10.4. Computational results for VP1 and VP2 using PS 1 Approximated front
VPI
%MRelDif
%Best
M2
M3
MI
M2
M3
MOS AOR UOS AOR
1.5
1.0
0.56
1.48 0.10
0.10
2.69 0.35
90
20
1.4
0.8
0.44
1.72 0.02
0.09
2.16 0.81
50
20
1.5
1.0
0.58
1.22
4.99 3.51
90
30
.4.00 - - - - - -3.40 ----
80
20
#Y'
. 1.2 . . . . . . .0.4 . . . . . . 0.23 . . . . . . .0.71 ............. 1.3
0.6
0.36
2.19
0.24
0.34
1.4
0.8
0.44
2.09
0.12
0.25
1.78 0.61
1.3
0.6
0.37
1.79 0.02
0.08
3.84
1.49
1.2
0.4
0.22
1.12
3.67
1.49
1.4
0.7
0.40
1.54 0.06
3.04
1.55
0.11
1.14 0.73
A single run of VPl or VP2 doesn't approximate properly the final nondominated solutions set - there occur large values of metric MI. Version VP2 stops prematurely. The computing average times are 4.9 minutes for
Bi-objective sequencing of cutting patterns
235
VP1 and 1.4 minutes for VP2 (which corresponds to performing an average of 282 generations). Table 10.5 shows the computational results for VPl and VP2 using the parameters set PS2. For that parameters set, both VP1 and VP2 approximate correctly the Pareto-set. However, the computational effort is excessive even for VP2, which consumes near 7 CPU minutes on average to perform an average of 756 generations (VP1 consumes near 23 CPU minutes). Table 10.5. Computational results for VP1 and VP2 using PS2 Approximated front
VPI
VP2
%MRelDif
%Best
#G
#Y'
M2
M3
MI
M2
M3
MOS AOR MOS AOR
1
1.2
0.8
0.46
1.59 0.28 0.43
1.58 0.20
0.79
2.14
0.33
100
60
2
1.7
1.3
0.71
1.41 0.06 0.15
1.73 0.02 0.32
3.85
1.37
90
60
3
1.1
0.2
0.13
1.42
1.58
0.91
1.03
90
30
1.67 0.46
100
10
M2
M3
MI
.- -4- - - .-1.1 - - - - - -0.2 - - - - - -0.11 - - - . 0.80 0.02 0.04 0.85 5 1.8 1.4 0.76 1.76 0.06 0.19 2.21 0.28
6
1.5
0.9
0.53
2.14 0.08 0.19 2.07 0.05
7
1.6
1.1
0.59
1.65
8
1.0
A
1.4
0.7
0.41
0.54
3.20
1.13
90
70
0.29
2.73
0.95
90
30
6.11
2.74
30
2.57
1.00
83
1.62
0.97 1.47 0.06
0.10
70
1.39 0.13
1.63 0.07
0.25
33
Comparing VH1 and VH2, both versions reached similar values for the evaluation metrics, for the parameters sets PS3 and PS4, as shown in table 10.6 and table 10.7. We compared the components of the utopia point approximations with the best solutions given by the heuristic 3 of Yuen [13]. Columns under the title %MDiJY3 display the values found for the corresponding maximum relative difference (in percentage). Table 10.6. Computational results for VH1 and VH2 using PS3
236
Metaheuristics: Progress as Real Problem Solvers
For PS3, the CPU average times were 14.7 minutes for VH1, and 3 minutes for VH2, respectively, and VH2 performed an average of 203 generations. Using PS4, the computing average times were 13.8 minutes for VHl and 2.8 minutes for VH2 (performing an average of 175 generations), respectively. Comparing on the parameters sets, the best results were achieved using PS4, showing that the performance of the algorithm depends more on the number of individuals evaluated on each generation than on the number of generations. Comparing the versions performance for PS4, version VH2 performs well (the evaluation metrics values are similar to those obtainedby VH1). Table 10.7. Computational results for VHl and VH2 using PS4 Approximated front
#G #Y'
VH1
M2
M3
M1
0.11 0.18
M2
VH2 M3
MI
A42
%MRelDiJ %MDtjY3
%Best
M3 MOS AOR MOS AOR UOS AOR
1
1.1
0.20
0.02 0.50 0.05
17
17
50
20
2
1.1
0.40 0.22 0.29 0.20 0.01 0.35 0.04 0.11 1.03 0.35
19
25
30
30
3
1.1
0.20 0.12
30
23
90
70
4
1.0
5
1.2
6
1.0
7
1.2
8
1.0
A
1.1
0.40 0.20
0.02 0.29
0.27
0.54 0.08 0.18 0.71 0.34
0.04
0.06
26- - - - - - - - - - - . . 33 ----100 --- - - - - - -100 --0.86 0.04 0.18 0.88 0.12 0.41 0.82 0.04 21 17 50 30 20
16
30
40
2.22 0.1s 38
32
90
70
40
26
100
100
0.1 1 0.28 0.03 0.03 0.42 0.04 0.12 0.66 0.13 27
23
68
58
0.42 0.02 0.05 0.58 0.08 0.24 0.40
0.21
0.20
0.20
0.36
0.11
0.29
0.02
For the objective MOS, the best average results were achieved by VP1 using PS2, which is explained by the large number of individuals evaluated. This number reaches an average of 480000, that is four times the correspondent number when using PSI, 120000, and twice the number for both PS3 and PS4, 240000. For the objective AOR, the best average results were obtained by VHl and VH2 using PS4 (and not significantly different from the best ones for MOS). The improvements on the hybrid versions explain this superiority. Over all the tested instances, the average cardinality of the nondominated solutions set approximation is near or equal to 1. The maximum cardinality found was 2. The maximum relative variation for the objective AOR is near 3.5%, and the maximum relative variation for MOS is inferior to 7%. The maximum relative differences occur for the "easiest" instance groups (0.751v11), both for m=50 and for m=60 - groups 3,4, 7 and 8. For these groups, the number of orders to cut in each pattern is smaller. For the general case the trade-off is not significant.
Bi-objective sequencing of cutting patterns
10.5.5 Experiences over the real instances For the real instances, we tested VP1 and VP2 using PS 1, and VH1 and VH2 using PS5 (table 10.8). Column SC presents a measure of the sequencing complexity (the average number of different patterns an order as to be cut from). A value of SC =1 corresponds to the easiest sequencing. For all instances, the approximated utopia point is feasible, and all runs reached it for most of the instances. Using PS5, the M2 and M3 values were all zero, except for instance 22, where M2=0.2 and M3=0.6, for VH1; and M2=0.2 and M3=1.0 for VH2, respectively. Using PSI, the CPU average consumption time is 2.3 minutes for VP1, and 22 seconds for VP2 (160 generations). Using PS5, these values are 2.5 minutes for VH1 and 25 seconds for VH2 (175 generations), respectively. However, VH2 using PS5 seems to be the most suitable option, because the metric values show a correct approximation of the Pareto-front and is faster. Table 10.8. Results for the real instances - VPI and VP2 using PSI - VHl and VH2 using
%M MOS -
17 15 11 25
Although heuristic 3 of Yuen [13] was claimed quasi-optimal [14] for minimising the maximum number of open stacks, it found the best-known solutions only for the real instances of small dimension (n<15). Otherwise,
238
Metaheuristics: Progress as Real Problem Solvers
the relative difference is relevant, reaching an average of 27% over all the instances, a maximum of 40% over the randomly generated instances (group 8 - for m=60 and v=l) and a maximum of 25% for the real instance 22.
10.6
SUPPORTING DECISION-MAKING IN PRACTICE
We designed an interface to support the interaction between human schedulers and the solutions obtained. It allows for visualization of the cutting plans and their manipulation. To evaluate alternative solutions, the planner may change the relative position of the patterns in the plan. Figure 10.3 shows an example of a screen obtained with this tool. The window on the left displays the cutting plan - the cutting patterns sequence and the identification of the clients (orders) assigned to items cut in each pattern. A scheme of colouring the client names allows for identifl the state of the corresponding stack (opened at that pattern, opened before, or closed after that pattern). The windows on the right present the corresponding objective values: the average order spread ("Order SpreadMCdia"); the order spread ("Order SpreadMax"); the maximum number of open stacks ("Filas de Encomendas/Max"); and, the average number of open stacks ("Filas de Encomendas/MCdia"). For each objective, a lamp is lightened whenever the best-known value for that objective has been reached.
-
Figure 10.3. Visualization and evaluation of cutting plans
Bi-objective sequencing of cutting patterns
10.7
CONCLUSIONS
We proposed a bi-objective sequencing problem considering the minimisation of the maximum number of open stacks and the minimisation of the average order spread. It is well known that both objectives are related but lead to different results. To approximate the Pareto optimal set, we adapted the multi-objective evolutionary algorithm SPEA2 and we also developed and tested different versions of that algorithm. In one of them we embedded local search procedures originating a new hybrid algorithm. The analysis of results has shown that this new algorithm outperforms the existing one, when applied straightforwardly. Additionally, the introduction of a special stopping criterion [lo], which wasn't considered by the existing algorithm, allowed for improving the computational effort. Our tests over a set of real-life instances (of small to medium dimension) have shown that the hybrid version can achieve good results consuming a reasonable amount of CPU time. For larger instances, this algorithm may be very time consuming and a faster solution technique would be desirable. In general there is a single non-dominated solution, meaning the approximation of the utopia point is feasible. As a consequence, we conclude that for situations where the decision makers do not require a deep knowledge of the solution space, single objective approaches may be appropriate. However, even for a single non-dominated solution, the multiobjective optimisation approach may provide a set of equivalent decision solutions (multiple solutions on the decision space). This allows the decision maker to consider all the choices at once, in detail. For supporting decision making in an industrial context, the main conclusion is that, in practice, the bi-objective optimisation approach can provide knowledge about the solution space that would not have been achieved with a pure single objective approach. Sequencing cutting patterns is the last decision-making problem on a decision-making hierarchy, and precedes the implementation on the shop floor. Therefore, our approach is suitable for real-world applications.
ACKNOWLEDGEMENTS This research has been partially supported by the Portuguese Foundation for Science and Technology under the POCTI program (Projects POCTI/MATl139/2001, POCTI/MAT/2046/2001 and POCTIIISFL-11152). The authors acknowledge their industrial partner - Portucel - for the cooperation and support.
Metaheuristics: Progress as Real Problem Solvers
REFERENCES 1. Dyson RG, Gregory AS. 1974. The cutting stock problem in the flat glass industry. Operational Research Quarterly 25: 41-54. 2. Faggioli E, Bentivoglio CA. 1998. Heuristic and exact methods for the cutting sequencing problem. European Journal of Operational Research 110: 564-575. 3. Fink A, Voss S. 1999. Applications of modem heuristic search methods to pattern sequencing problems. Computers and Operations Research 26: 17-34. 4. Foerster H, Wascher G. 1998. Simulated annealing for order spread minimization problem in sequencing cutting patterns. European Journal of Operational Research 110: 272-28 1. 5. Haessler RW, Talbot FB. 1983. A 0-1 model for solving the corrugator trim problem. Management Science 29: 200-209. 6. Linhares A, Yanasse HH. 2002. Connections between cutting-pattern sequencing, VLSI design, and flexible machines. Computers & Operations Research 29: 1759-1772. 7. Madsen 0. 1988. An application of Travelling-Salesman routines to solve pattern-allocation problems in the glass industry. Journal of Operational Research Society 39: 249-256. 8. Michalewicz Z. 1994. Genetic algorithms + data structures = evolution programs (Second extended edition). Springer-Verlag. 9. Respicio A, Captivo ME, Rodrigues A. 2002. A DSS for production planning and scheduling in the paper industry. In Decision making and decision support in the internet age - Proceedings of the DSIAge2002: 298-308. 10. Szczepanski M, Wierzbicki AP. 2002. Multiple criteria evolutionary algorithms in relation to reference point approaches and nadir estimation. Opening plenary of the MCDM Winter Conference 2002 (16th MCDM world conference), Vienna, Austria; 30 pages. 11. Yanasse H. 1997. On a pattern sequencing problem to minimize the maximum number of open stacks. European Journal of Operational Research 100: 454-463. 12. Yuen BJ. 1991. Heuristics for sequencing cutting patterns. European Journal of Operational Research 55: 183-190. 13. Yuen BJ. 1995. Improved heuristics for sequencing cutting patterns. European Journal of Operational Research 87: 57-64. 14. Yuen BJ, Richardson K. 1995. Establishing the optimality of sequencing heuristics for cutting stock problems. European Journal of Operational Research 84: 590-598.
Bi-objective sequencing of cutting patterns
24 1
15. Zitzler E, Deb K, Thiele L. 2000. Comparison of multiobjective evolutionary algorithms: empirical results. Evolutionary computation 8: 173-195. 16. Zitzler E, Laumanns M, Thiele L. 2002. SPEA2: Improving the Strength Pareto Evolutionary Algorithm for Multiobjective Optimization. In Evolutionary Methods for Design, Optimisation and Control, Giannakoglou K, Tsahalis D, Periaux J, Papailiou K, Fogarty T, (eds.), CIMNE, Barcelona, Spain: 95-100.
Chapter 11
METAHEURISTICS APPROACH FOR RULE ACQUISITION IN FLEXIBLE SHOP SCHEDULING PROBLEMS Kazutoshi Sakakibara,' Hisashi Tamaki,2 Hajime Murao3 a n d S h i n z o Kitamura4 College of Information Science and Engineering, Ritsumeikan University Noji Higashi 1-1-1, Kusatsu City, Shiga 525-8577, Japan
[email protected]
Faculty of Engineering, Kobe University Rokko-dai, Nada-ku, Kobe City, Hyogo 657-8501, Japan
[email protected]
3 ~ a c u l t yof Cross-Cultural Studies, Kobe University Tsurukabuto 1-2-1, Nada-h, Kobe City, Hyogo 657-8501, Japan
~ o b eUniversity Rolcko-dai, Nada-ku, Kobe City, Hyogo 657-8501, Japan
[email protected]
Abstract: In this paper, we deal with an extended class of flexible shop scheduling problems. A solution is composed under the condition where information on jobs to be processed may not be given beforehand, i.e., under the framework of real-time scheduling. To realize a solution, we apply such a method where jobs are to be dispatched by applying a set of rules (a rule-set), and propose an approach in which rule-sets are generated and improved by using the genetics-based machine learning technique. Through some computational experiments, the effectiveness and the potential of the proposed approach are investigated. Keywords: Rule acquisition, geneticsbased machine learning, flexible shop scheduling problem, simulation.
244
11.1
Metaheuristics: Progress as Real Problem Solvers
INTRODUCTION
Recently, scheduling has been recognized as one of the most important issues in the planning and operation of manufacturing system. Extensive researches on scheduling have been reported from the theoretical as well as the practical viewpoints. Most of them deal with the static environment, i.e., the problems on the assumption that all information with respect to the jobs is given beforehand [I, 21. In actual manufacturing system, not a few unexpected troubles happen, and it is important to make feasible schedules promptly once any trouble happens. Furthermore, there is no guarantee that every parameter of the problems are given beforehand. These kinds of the problems are called real-time scheduling problems, to which rule-based dispatching approaches are widely applied [3-51. In these approaches, the jobs are dispatched just when they arrive. It is rather difficult, however, to acquire the effective rules for scheduling from the practical viewpoint. In this paper, a class of flexible shop scheduling problems is considered in the framework of real-time scheduling. That is, each shop includes more than one machines of the parallel machine type in the framework of job shop scheduling problems, and there are several auxiliary restrictions that originate from the necessity of set-up processes. In our past study to this class of scheduling problems, we have dealt with the problems as deterministic and static ones. And we have proposed a method of modeling the problem based on a mathematical programming approach, in which an integer programming method and a genetic algorithm are combined to obtain good schedules rapidly [6]. In our approach adopted here, jobs are to be dispatched in real-time using some rules, and the dispatching rules are generated and improved, in an off-line manner, by using the genetics-based machine learning (GBML) frameworks [7, 91. In implementing a GBML, we use the Pitt approach, where a rule-set is represented symbolically as an individual of genetic algorithms. The fitness of an individual, i.e., the (global) objective function value of the problem, is calculated according to the results of some simulations using the rule-set. By extending the ways of some applications adopting this framework presented so far [lo, 111, in the paper, a way of applying our Pitt approach to a class of flexible shop scheduling problems are proposed. Here, the target is to obtain such a rule-set that remains effective when the situation is changed to some extent. Furthermore, some computational experiments are also shown, where the effectiveness and the potential of the proposed approach are discussed.
Metaheuristics Approach for Rule Acquisition
DESCRIPTION OF THE PROBLEM There are nM machines Mi (i = 1,.. . , nM) and nJ jobs J j ( j = 1,. . . , nJ). Each job J j includes a series of n j operations Ok(k = Nj-l+ 11.2
I , . . . , N j ; Nj = C3 ne ; No = O), and these n j operations are to be processed in this order. To each operation Ok (Ic = 1,.. . , no ; no = Nnr = E& nj),the set of available machines M k and the type dk are associated. The type of operation represents the kind of production, and the combination of the machine and the type determines production speed. In a scheduling or dispatching process, the following restrictions should be taken into account. (a) Restriction of machines: each operation can be processed on one of the fitted machines. (This is due to the mechanical structure, size, weight and etc. of the machines and the fitness of operations to machines.) (b) Setup time: If the types of two operations that are processed successively on any machine differs, a setup time is needed between their processing. Here, it is assumed that the setup time should consist of two parts: the time required before processing and the time required after processing. To describe the scheduling problem, we use the following notations and parameters. First, the basic parameters are nM : number of machines, nJ : number of jobs, and no : number of operations (= N,J). Then, the following parameters are associated with machines, jobs and operations. (a) With each machine Mi (i = 1,. . . , nM): pis : time per unit product on Mi when an operation of type Ts is processed. (b) With each job J j ( j= 1,.. . , nJ) : dj : due date, rj : required quantity, n j : number of operations. (c) With each operation Ok (Ic = 1,.. . , no) :
Metaheuristics: Progress as Real Problem Solvers
(a) Shopfloor's view (Product flow)
(b) Operational view (Technical order)
Figure 11.1. An example of flexible shop problems.
Sk r:
type of Ok, : required quantity (the value of r: is determined according to that of r;), :
setup time required before processing, s: : setup time required after processing, M k : set of machines which can process Ok.
:s
:
As for evaluation of schedules, various kinds of criteria may be considered. It is impossible, however, to take all of them into consideration. So, we consider here the maximum completion time Cmm and the total tardiness Tsum: ZI =
F = max tk F, Cmax= max tNj 3
Z, =
{max (0, t$j - d j )
Tsum= j
(11.1)
k
),
Metaheuristics Approach for Rule Acquisition ........... (
Setup time (after) ) . . . . " ........................................................ ..... ., . .. ,..,,
0
,
',..,,
10;
.:..''
Time
M3
: ,, ,
!,
.,:
;
:
i
:
Figure 11.2. A feasible schedule.
where t: represents the completion time of the operation On. Then, we use the weighted sum :
as a scalar objective function, where the weights w l and w2 are nonnegative. The scheduling problem as defined above is categorized as flexible shop problems (or flexible job shop problems, generalized shop problems [12]), which little have been studied [2, 131. In Figure 11.1, an example of the flexible shop problems with nM= 6, nJ = 3 and no = 8 is shown. In this figure, there are 3 jobs. For example, J1 is processed on one of {MI, Ma, M3), and then processed on one of {M6,M7). In Figure 11.2, an example of feasible schedules to the problem described in Figure 11.1. To represent a schedule, we have to determine the following items : (i) Assignment of each operation to a certain machine, (ii) Sequence of operations to be processed on each machine, (iii) Start time of each operation, and (iv) Completion time of each operation. Here, the item (iv) is dependent on, i.e., is automatically determined by referring to, the items (i) and (iii). Moreover, the objective function of the problem considered here is a regular one, and it is known that the optimal schedule of the problems with regular objective function belongs to the set of active schedules [I, 21. Under this situation, by fixing the
248
Metaheuristics: Progress as Real Problem Solvers
items (i) and (ii), a feasible schedule can be uniquely determined. In the following, therefore, we consider a method of acquiring rules for determining the items (i) and (ii) efficiently, based on simulations in which the items (iii) and (iv) are calculated by using a prescribed procedure.
11.3
PRIORITY SCHEDULING
In our approach to the scheduling problem, we use a set of rules (a rule-set) to make decisions in real-time throughout manufacturing. As mentioned in Section 11.2, the rule-set is used to determine the assignment of jobs to machines and the sequence of jobs on each machine. To acquire a good (possibly the best) rule-set beforehand, the GBML method is designed and applied (as described in Section 11.4), where several computer simulations are required for evaluating the rule-sets according to the schedules obtained by applying them. In the following, the method of computer simulations, i.e., the scheduling procedure, is described.
11.3.1 Scheduling procedure The procedure for making a schedule of the problems is designed as follows (Figure 11.3).
1" Initialization: Set T = 0 and O1(r) = 4, where T and O1(r) represent the timing of dispatching and a set of operations that has been assigned, respectively. 2" Selection of one machine for assignment:
For each Mi, first set O:(T) = 4, where @(T) represents a set of possible operations to start processing on Mi. Then, for each operation Ok $ O1(r) and for each machine which can process Ok, set O:(T) = O:(T) U {Ok) if Ok is the first operation within a job (i.e., 3 ~ I kj = Nj 1) or the operation directly preceding it has been completed (i.e., Ok-1 E O1(r)). For each Ok E O:(T), calculate the earliest time to start processing as follows:
+
where Oe, represents the currently last operation assigned on Mi, pik (= pgk 'r;) denotes the processing time of Ok on Mi,
Metaheuristics Approach for Rule Acquisition
Step 2' (a) and (b)
Step 2' (c) Highest Priority
The earliest completion time
,Or
Step 3'
Step 4 O
Figure 11.3. Procedure of scheduling.
and Akkl is a constant defined as Akkt =
0 , if Sk # & I , 1, otherwise.
(c) Among the set of Ok E Ui @(T), find the operation Ok* and the machine Mi* such that the completion time of OK*is the minimum.
3" Determination of a set of candidate operations: Find O$(T) (C 0$(7))such that any operation Ok in O$ (T) satisfies the condition tf' < t $ + pi*k* .
+
4" Selection of one operation for processing: Find an operation 01;: such that its priority calculated by using a rule-set among the = operations in O$(T). Then, set the start time t i = t r , tF k
ti + pi*,*, and O1(T) = O1(T) n {OL).
5" Termination : If 1 O1(7) I = no terminate. Otherwise set
T
= T*
where T* is the earliest completion time among all machines, and go to 2".
250
Metaheuristics: Progress as Real Problem Solvers
11.3.2
Calculation of priority
In the step 4' of the scheduling procedure in Section 11.3, it is required to calculate the priority of operations according to the status of the production system as well as the characteristics of operations. As for the state parameters, we introduce the four kinds of indexes (variables) to represent the whole state space S : sR : ratio of the number of completed operations, sC: makespan of the current (partial) schedule, sD: average of slacks of remaining operations. Then, S is divided into nS portions S, (u = 1,.. . , nS) and, for each subset S,, the priority q5,k of Ok is defined as
where nA : number of attributes of an operation, w d : weight of the attribute Ae for S,, and ake : value of Ae of Ok. As for the attribute Ae of an operation Ok, we introduce the followings :
A1 : processing time, A2 : number of machines which can process it, AJ : slack for its due-date, and A4 : number of succeeding operations to complete a job. To determine the weights w,e, we use a production rule of the following type :
R: if (condition) then (action). The (condition) part represents the current status of the system, i.e., S,, and the (action) part possesses the (integer) weight vector w, = (wul, wU2,W,Q, wU4),where the range of each weight value is {-nW, . . . ,nW). This rule determines the weight vector w, as a whole according to the current status of the system. As for the acquisition of a good rule-set, i.e., the adjustment of the weight vector w,, we adopt a machine learning approach which is described in Section 11.4.
Metaheuristics Approach for Rule Acquisition Evaluate a rule-set based on a scheduling simulation Search,for a good ~ l e s e t
Simulator
Figure 11.4. Outline of the Pitt approach.
11.4
METHOD OF RULE ACQUISITION
As mentioned in Section 11.3, we adopt a scheduling approach using the priority rules. It is rather difficult, in general, to acquire the effective rule-set in heuristic manner. Here, a genetics-based machine learning (GBML) technique [7] is used in order to generate and improve the ruleset efficiently, The GBML is classified into two approaches: the Michigan [8] and the Pitt approaches [9]. In the former approach, a rule is represented symbolically as an individual of genetic algorithms (GA), and the credit of each rule is adjusted according to the result obtained by applying a rule-set. The rule is generated and improved by applying GA at certain time intervals, where the fitness of each individual is calculated according to its credit. On the other hand, in the latter approach, a rule-set is represented symbolically as an individual of GA, and the fitness of an individual is calculated based on the result, e.g., the simulation result, by applying a rule-set. In the following, because of its easier implementation, the Pitt approach of the GBML is adopted. In Figure 11.4, we show the framework of our Pitt approach, where the outline of the learning procedure is as follows : lo Create an initial population P(1)with randomly generated np individuals (rule-sets), where each rule-set includes n, rules. Initialize the upper bound of generation ng and set the current generation t=l. 2" Calculate the fitness of each individual by applying an individual (rule-set).
3O If t
< ng, go to 4'. Otherwise go to 5".
252
Metaheuristics: Progress as Real Problem Solvers
4' Apply genetic operators to the population P ( t ) , and generate P ( t + 1). Set t = t 1, and go back to 2'.
+
5" Terminate. The best-so-far individual possesses the best rule-set. In implementing GBML, we have to prefix a genetic representation and genetic operators. (a) Genetic representation: In the Pitt approach, a rule-set is represented symbolically as an individual, and includes a set of n, rules :
In this genetic representation, each rule is represented as a pair of the index number (integer) of the specified S, and the corresponding (integer vector) w,. The fitness value of an individual, which corresponds to the objective function value of the problem, is calculated by using the equation (11.3) based on the obtained schedule by simulating the situation in which a schedule is generated by applying each rule-set. (b) Genetic operators : In calculating the fitness value, we have to evaluate the schedule. Much computation is to be required in evaluating a solution, e.g., in solving larger-size examples. Then, the steady-state genetic algorithm [l4] is implemented in order to reduce the number of evaluations. In our implementation of the steady-state genetic algorithms, two individuals are paired randomly in a population and an offspring is created from them by adopting genetic operators. Then, the fitness of the offspring is compared to those of the parent individuals. If the offspring is better than the worse one of the parents, the worse parent is replaced by the offspring. As for the genetic operators, the uniform crossover (rate p,) and the one-locus-exchange mutation (rate p,) are applied.
11.5
COMPUTATIONAL EXAMPLES
We have prepared 3 types of the flexible shop problem (IA, IBand IC) by setting the parameters as shown in Table 11.1, and 20 instances (E?, E! and E?; i = 1, . . ,20) have been composed randomly for each type. In Table 11.1, indexes of the gap between the due-date and the
Metaheuristics Approach for Rule Acquisition Table 11.1. Parameters of the Problems
Table 11.2. Setting of the GA Parameters Population size n, Number of generations n, Mutation rate p , Number of rules n,
100 5000 0.1 / individual 100
completion time of a job defined as
where q, dAVG and pAVG represent the total processing time, the average due-dates and the average processing time of all operations respectively, are also shown as characterizing the tightness of the due-dates. To these instances, the proposed method has been applied and the rule-sets have been acquired, where the parameters of a rule are set as nS = lo3 and nW= 4 (! = 1,.. . ,4), and that of the GBML are set as shown in Table 11.2. In the experiments, 10 trials have been executed by changing initial conditions, and then the best schedule (the schedule generated by using the acquired rule-set) has been selected for each trial. In order to evaluate the schedules, the ratios p / p* / p* of the objective value of the obtained schedule to the known best/optimal schedule are discussed. In Table 11.3, the minimum, the maximum, the average and the standard deviation of the ratios among 20 instances are summarized, where the ratio pi is defined, for each instance (E?, E: and E:), as
fyBML
In Equation (11.8)) and f F A represent the objective value of the best schedule acquired by the proposed approach, and the objective value obtained by using the GA directly to each instance E?, E: and E? , respectively.
Metaheuristics: Progress as Real Problem Solvers
254 Table 11.3.
Results of Computational Experiments Ratio p ( p * )
Problem Min.
Table 11.4.
Max.
Avg.
Std.Dev.
Computational Time [sec] Example
GBML
GA
CPLEX
El I32 I33
1.00 4.40 68.68
0.42 3.64 39.24
482.74 -
In applying the GA, an individual is represented by using a string of the priorities of operations and a schedule is generated by using the procedure introduced in Section 11.3. The parameters setting of the GA is the same as shown in Table 11.2. In Table 11.3 the statistic scores of the ratios p* defined as
where fFPLEX represents the optimal schedule acquired by using the CPLEX (a commercial package of mathematical programming solver) [15], are also shown for the class EA. In Table 11.4, the average computational time required for each method is shown, where a PC with Pentium-I11 933 MHz is used for computation. From Table 11.3 and Table 11.4, we can observe that: (a) good schedules are obtained sufficiently fast by applying the best rule-set obtained by the proposed method. Furthermore, the robustness of the acquired rule-sets has been examined where the robustness of a rule-set is defined here as the effectiveness in the situation different from that in the learning phase. First, rule-sets have been acquired by using the proposed GBML method where the fitness value is calculated based on the average of the objective values to newly composed 20 examples E:~, EkB and EtC for each type, i.e., IA, IBand IC.Then, these rule-sets have been applied to another 20
Metaheuristics Approach for Rule Acquisition
255
EF~ EF~ EF*, E F ~ E F ~
examples EFA, and for each one. In Figure 11.5, ratios to the best values of and are summarized where the ratio pt is defined, for each instances, as
In Equation (11.lo), f? and f? represent the objective value of a schedule obtained by using the acquired rule-set and that of the best among schedules obtained by using the GBML, the GA method and the CPLEX methods. This ratio is nearer to 1.0 when the acquired rule-set is more robust. In Figure 11.5, the results obtained by using 3 kinds of typical heuristic rules, i.e., SPT (shortest processing time), EDD (earliest due date) and SLACK. From Figure 11.5, it is observed that good schedules are obtained by using SPT to the problem with small 7 value, and by using EDD to the problem with large 77 value. On the other hand, any single heuristic rule does not show good performance to 3 kinds of problems considered here. As for the best rule-sets acquired by using the GBML method, (b) the schedules obtained by applying the best rule are at most 2% worse than the best schedule for every problem. Thus, the results by using proposed methods indicate good robustness. As a result of the above observations, the proposed approach is effective for finding good rule-set for real-time scheduling.
11.6
CONCLUSION
In this paper, we deal with an extended class of flexible shop scheduling problems, and consider a solution under the conditions of real-time scheduling. To realize a solution, we adopt such a method in which jobs are to be dispatched by a set of rules (a rule-set), and effective rule-sets are to be acquired by using a GBML technique. From computational examples, we confirmed the usefulness of our proposal. Furthermore, the following issues have been left for further studies : (i) to investigate the definition and the division form of status of the production system in order to reduce the rules never match the input status, and (ii) to extend the proposed approach to the on-line learning ones.
Metaheuristics: Progress as Real Problem Solvers
++
Proposed
-+- SPT -A-
EDD SLACK
-0.
Example
EDD -D. SLACK -A-
1.2 1.0
Example
(4 EC Figure 11.5. Robustness of the obtained rule-set.
Metaheuristics Approach for Rule Acquisition
REFERENCES [I] M. Pinedo, Scheduling : Theory, Algorithms, and Systems, PrenticeHall, 1995 (2nd Ed., 2002). [2] J. Blazewicz, K. Ecker, E. Pesch, G. Schmidt and J. Weglarz, Scheduling Computer and Manufacturing Processes, SpringerVerlag, 1996 (2nd Ed., 2001). [3] M.J. Shaw, S. Park and N. Raman, Intelligent Scheduling with Machine Learning Capabilities - The Induction of Scheduling Knowledge, IEE Transactions, 24 (2), 156-168, 1992. [4] R. Shafaei and P. Brunn, Workshop Scheduling Using Practical (Inaccurate) Data Part 1: The Performance of Heuristic Scheduling Rules in a Dynamic Job Shop Environment Using a Rolling Time Horizon Approach, Int. J. of Production Research, 37 (17), 39133925, 1999. [5] R. Shafaei and P. Brunn, Workshop Scheduling Using Practical (Inaccurate) Data Part 2 : An Investigation of the Robustness of Scheduling Rules in a Dynamic and Stochastic Environment, Int. J. of Production Research, 37 (IS), 4105-4117, 1999. [6] K. Sakakibara, H. Tamaki, H. Murao and S. Kitamura, Mathematical Modeling and Hybrid Solution for a Class of Flexible Shop Scheduling Problems, Proc. of Int. Symp. on Scheduling 2002, 9396, 2002. [7] D. E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning, Addison-Wesley, 1989. [8] J. H. Holland and J. S. Reitman, Cognitive Systems Based on Adaptive Algorithms, in D. A. Waterman and F. Hayes-Roth (Eds.), Pattern-Directed Inference Systems, Academic Press, 1978. [9] S. F. Smith, A Learning System Based on Genetic Algorithms, Univ. of Pittsburgh, 1980. [lo] K. Sakakibara, H. Tamaki, H. Murao, S. Kitamura, T. Iwatani and K. Matsuda, A Genetics-Based Machine Learning Approach for Real-Time Scheduling, IEEJ Trans. on Electronics, Information and Systems, 123 (4), 823-831, 2003 (in Japanese). [ll]K. Sakakibara, H. Tamaki, H. Murao and S. Kitamura, Toward a Real-time Scheduling for a Class of Flexible Shop Problems, Proc. of the SICE Annual Conference 2002, 1379-1384, 2002. [12] K. Kriiger, Y. N. Sotskov and F. Werner, Heuristics for Generalized Shop Scheduling Problem Based on Decomposition, Int. J. on Production Research, 36 ( l l ) , 3013-3033, 1998.
258
Metaheuristics: Progress as Real Problem Solvers
[13] P. Brucker, Scheduling Algorithms, Springer-Verlag, 1998 (3rd Ed., 2001). [14] Z. Michalewicz, Genetic Algorithms + Data Structures = Evolution Programs, Springer-Verlag, 1994. [15] CPLEX 8.0, http://www.ilog.co.jp/, ILOG Inc., 2001.
Chapter 12
PREDICTING COLORECTAL CANCER RECURRENCE: A HYBRID NEURAL NETWORKS-BASED APPROACH* Rob Smithies, Said Salhi and Nat Queen School of Mathematics and Statistics, University of Birmingham Edgbaston, B15 bTT, U K
[email protected], ( ~ . ~ a l h i , ~ . ~ . ~ u e e n ) @ b h a m . a c . u k
Abstract: This study presents a new expert system for predicting colorectal cancer recurrence that combines a relaxed form of stepwise regression, a new clustering strategy designed to cope with mixed attribute types and missing data, and ensembles of neural networks trained via a new robust global optimisation method. Results show that implementation of the expert system leads to an improvement in the prediction of colorectal cancer recurrence approaching levels of accuracy required by medical practitioners for clinical use. Keywords: Metaheuristic, expert system, regression, K-means, missing data, neural network ensemble, RPROP, local search, tabu search.
12.1
INTRODUCTION
The objective of this research is to assist the medical profession in the prediction of colorectal cancer recurrence by developing a user-friendly tool in the form of an expert system that combines the best features of stepwise regression, unsupervised clustering and neural network ensemble techniques. This work is structured as follows: the problems of predicting colorectal cancer recurrence are discussed in this opening section, preliminary analysis of the colorectal cancer data set is pre-
*Said and Robert are currently at Kent Business School and Logica respectively and their new emails are s .salhiQkent.ac .uk and Robert. SmithiesQlogicacmg.com
260
Metaheuristics: Progress as Real Problem Solvers
sented in section 12.2, details of the expert system design are given in section 12.3, and computational results showing the effectiveness of its implementation are summarised in section 12.4. Colorectal cancer is one of the most common malignant diseases in developed countries, accounting for about 700,000 new cases and 500,000 deaths worldwide each year (United Kingdom Co-ordinating Committee on Cancer Research, 1998). It is also the third most common cause of cancer death in the United Kingdom, with 34,310 cases in 1999 of which 16,720 cases were fatal. This translates as roughly 1 in 2000 people developing the disease in that year, with a mortality rate of 48.73% (to 4 s.f.) (Barr et al., 1999). Although curative surgery is attempted in 70-80% of cases, 50% of resected patients subsequently develop incurable recurrent disease. Adjuvant chemotherapy based on the use of protracted 5-fluorouracil(5-FU) and folinic acid (FA) (collectively known as FUFA) can moderately improve survival (IMPACT, 1995). The medical profession traditionally bases colorectal cancer diagnosis on Duke's classification system, shown in Table 12.1 (Barr et al., 1999), across which five-year mortality rates vary considerably. Table 12.1. Duke's criteria for staging colorectal cancer. Stage
A B(i) B(ii) C
D
Criteria Tumour limited to submucosa and mucosa Tumour reaching but not penetrating serosa Tumour penetrating serosa but not local lymph nodes (node-negative) Tumour infiltrating local lymph nodes (node-positive) Distance metastasis due to secondaw cancers
I Mortality Rate 1 < 10%
The prognosis of Duke's stage D cancer is poor as detection of distant metastasis usually proves too late for effective treatment due to transportation of cancer cells via the immune system leading to the aggressive development of secondary cancers. Only treatment of the 70% of cases diagnosed as Duke's stage A-C colorectal cancer is likely to have clinical benefits (Barr et al., 1999), and this primarily involves radical surgical excision. However, local recurrence of the cancer after surgery occurs in a significant minority of these patients, whose only long-term hopes are its identification at an early stage (Papachristodoulou et al., 1987) or its prevention by means of adjuvant chemotherapy and radiotherapy. However, there are inadequate data to reliably assess the clinical benefit derived from FUFA chemotherapy by different types of patient, in
Predicting Colorectal Cancer Recurrence by Neural Networks
261
particular those diagnosed with Duke's stage B cancer. A meta-analysis of published adjuvant chemotherapy data suggests a 6% (confidence limits 2-10%) increase in 3-year survival for Duke's stage C colon cancer patients treated with a 6-month regimen of FUFA (Cancer Guidance Sub-group of the Clinical Outcomes Group, 1997). Though this survival benefit is real, the 5-fold range in the confidence limits for the absolute survival benefit is unsatisfactory, particularly when considering chemotherapy for older Duke's stage C patients. More uncertainty exists for Duke's stage B patients because even though studies suggest that FUFA may improve their chance of surviving 3-years by about 3% (IMPACT, 1995), saving many thousands of lives worldwide each year, it is of only borderline statistical significance (confidence limits 0-6%). Therefore, a survival benefit for Duke's stage B patients is not yet firmly established. Adjuvant chemotherapy of recurrent disease extends mean survival by about 6 months (Cancer Guidance Sub-group of the Clinical Outcomes Group, 1997), but it may be that a substantial part of any benefit is obtained by delaying recurrence and death for those who would die anyway, rather than by curing patients. Attempts to construct mathematical models that generate more accurate prognoses have been made by identifying clinical, pathological and molecular prognostic indicators of colorectal cancer recurrence. For example, incidences of colorectal cancer are vastly increased in genetic syndromes such as familial adenomatous polyposis (almost 100% risk by the age of 45) and hereditary nonpolyposis colorectal cancer (e80% risk), and those people vith inflammatory bowel disease. However, these incidences only account for a small minority of patients. Furthermore, many predictors such as the link between colorectal cancer and high-fat, low-fibre diets tend to be too vague and difficult to measure in practice and so clinical staging (eg using the Duke's system) remains the most important prognostic indicator. Studies tend to focus on Duke's stage C colorectal cancer because clear-cut results are more readily obtained, and almost all use statistical models based on linear regression, which is questionable since the complex relationships between prognostic indicators of recurrence are rarely linear. Finally, results are typically for small inhomogeneous data sets whose clinical and statistical significance is often negligible. To truly address these issues one requires much better randomised evidence on the true value of adjuvant FUFA chemotherapy in preventing colorectal cancer recurrence among different types of patient. The QUASAR1 (Quick And Simple And Reliable) trial - funded by the UK Medical Research Council - is designed to provide this evidence by randomising a large, heterogeneous group of colorectal cancer patients between chemotherapy and observation only, with chemother-
Metaheuristics: Progress as Real Problem Solvers
262
apy considered only for patients whose disease recurs. The data collected in a pilot study for QUASAR1 (Grumett et al., 2002) has been supplied for use in this study by the Institute of Cancer Studies at the University of Birmingham Medical School.
12.2
ANALYSIS OF THE COLORECTAL CANCER DATA SET
The colorectal cancer data set is summarised in Table 12.2 and consists of 646 anonymous patients with Duke's stage B or C colorectal cancer, recorded at NHS hospitals nationwide between 15/07/1994 and 18/03/1999. Each record consists of 33 input attributes thought to influence colorectal cancer recurrence, along with a binary class attribute
Table 12.2. Colorectal cancer attributes. e SITE SIZE GRADE
Description Site of tumour Size of tumour (cm) Appearance of tumour
DEPTHINV
Depth of serosal invasion (through the bowel wall)
PT TOTALLN VASCINV LYMPHRES INFILGRO TS dUTPase P53
MLHl MSH2 MUCINOUS MGMT COX2 SEX DATRAND AGERAND RECURRED
Number of lymph nodes examined Cancer cells in bloodstream Lymphocytic infiltration of local lymph nodes Infiltrative growth pattern Thymidylate synthase expression
Domain {colon, rectum) [1.2,16] {differentiated, moderate, poor) {muscularis propria, subserosa, serosa)
{none, low, medium, high)
Deoxyuridine triphosphatase expression Mutated p53 gene expression (%)
Mutated M L H l gene expression (%) Mutated MSH2 gene expression (%) Mucinous tumour O(6)-alkylguanine-DNA alkyltransferase expression Cyclooxygenase-2 expression Gender of patient Commencement o f adjuvant therapy Age of patient (years) Colorectal cancer recurrence
{no, yes) {low, medium, high)
{female, male) [15/06/94,18/03/99] [31,831 ("0, yes)
Predicting Colorectal Cancer Recurrence by Neural Networks
263
discriminating for recurrence. The input attributes are a mix of clinical factors recorded as part of a patient history (eg age and gender); physiological factors recorded by colonoscopy or sigmoidoscopy (eg tumour site, size and shape); histological factors recorded by light microscopy of paraffin-embedded tumour biopsies (eg vascular invasion and lymphocytic infiltration); and molecular factors recorded by immunohistochemistry (Grumett et al., 2002) (Bhatavdekar et al., 2001). Interestingly, the colorectal cancer data set consists of a mix of attribute types. Effectively speaking, SIZE, TOTALLN, DATRAND and AGERAND are continuous attributes, whereas SITE and SEX are categorical attributes with no assumed order given to the distribution of local recurrence across categories unlike the remaining input attributes that are discrete. Recurrence distributions of the 12 most influential input attributes (as deemed by regression later in this study) are displayed along with that of the target attribute in Figures 12.1 (a-f) and 12.2 (ag), with those of continuous attributes being in the form of histograms consisting of five intervals based on the mean and standard deviation of the attribute data. For completeness, the reader may wish to refer to Smithies (2004) for recurrence distributions of all 33 attributes. Another major issue affecting analysis of any real-world data set is the amount and distribution of missing data it contains. The colorectal cancer data set contains a large minority of missing values spread across the input attributes largely due to some NHS hospitals testing for certain genetic markers while others do not. Figure 12.3 shows that attributes can be classified into 4 distinct groups: AGERAND to VASCINV containing hardly any missing data, SIZE to MLHl containing roughly 10% or less, HITSDIST to HIDUTSCO containing between roughly 10% and 30%, and INFILGRO to COX2 containing more than 30%.
12.3
AN EXPERT SYSTEM FOR PREDICTING RECURRENCE
An implementation of the expert system (Medsker, 1994) shown in Figure 12.4 used to predict colorectal cancer recurrence is sequentially performed in three stages outlined below and described further in subsequent subsections.
Regression Stage- The colorectal cancer data set 2 is processed by a . . to metaheuristic for a prescribed number of significance levels P1,P2,. remove irrelevant input attributes and excessive missing data. Clustering Stage- Each of the resulting data sets 2 1 , 2 2 , . . . is processed by the K-means algorithm (Linde et al., 1980) with a new unsupervised clustering strategy that copes with mixed attribute types and
264
Metaheuristics: Progress as Real Problem Solvers
(a) Depthinv
(b) Vascinv
(c) Dutint
(d) MSH2
( e ) Infilgro
(f) Datrand
Figure 12.1. Recurrence distributions of colorectal cancer attributes.
missing data, giving K cluster sets (?I,&+. .,(?K such that set contains Ic clusters representing key features of the colorectal cancer data.
Predicting Colorectal Cancer Recurrence by Neural Networks
MISINGDATA
WLON
RECTUM
(a) Site
(b) Size
(c) Grade
(d) MGMT
*ISSlNGDATA
(e) Agerand
NO
(f) Lymphres
( g ) Recurred
Figure 12.2. Recurrence distributions of colorectal cancer attributes (cont).
265
Metaheuristics: Progress as Real Problem Solvers
266
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
PERCENTAGE OF PATIENTS WITH MISSING DATA
Figure 12.3. Distribution of missing data for colorectal cancer attributes.
Neural Network Ensemble
Figure 12.4. Schematic of the expert system.
ek
Neural Network Stage- For each cluster set the colorectal cancer data set is split a number of times via a prescribed ratio into training, validation and testing sets that are uniformly distributed over the associated k clusters Cl ,C2,. . .,CK. The training-validation-testingcombinations are used to train K neural network ensembles NN1 ,NN2,. . .,NNK with generalisation encouraged by a form of cross validation. Each ensemble consists of a prescribed number of multi-layer feed-forward (MLFF) networks differing in the number of hidden units. The MLFF
Predicting Colorectal Cancer Recurrence by Neural Networks
267
networks of each ensemble focus on learning on a unique cluster with the best selected to act as an expert for a specific type of patient. This divide-and-conquer approach is a form of global optimisation that should lead to improved predictions of colorectal cancer recurrence compared with those given by lone MLFF networks.
12.3.1
A Stepwise Regression Metaheuristic
The colorectal cancer data set is processed to give a new data set via a metaheuristic developed by Smithies (2004)) which attempts to minimise retention of missing data, while also maximising retention of statistically significant input attributes via the stepwise regression procedure of Draper and Smith (1981). Prior to performing stepwise regression the metaheuristic removes irrelevant input attributes by identifying each pair of attributes mutually correlated above some predetermined threshold and then removing that attribute with the larger missing data proportion. After performing stepwise regression the metaheuristic removes from the newly processed data set any patient or input attribute with a missing data proportion larger than some prescribed threshold.
12.3.2
A New Clustering Strategy
The rationale behind developing a new clustering strategy to improve prediction of colorectal cancer recurrence is two-fold. Firstly, the colorectal cancer data set 2 consists of a mix of attribute types and so should be clustered using a distance function that can adapt equally well to each type. Secondly, the act of clustering similar patients provides inferences for missing data without the inherent risk in assuming expected statistical distributions on each attribute as in standard multivariate missing data analyses. Instead of following a statistical approach, the strategy heuristically combines a new distance function able to cope with different attribute types and missing data, and a hybrid centroid mechanism for calculating cluster centres that also distinguishes between attribute types. Indeed, heuristic approaches such as those in Salhi (1998) can prove powerful especially when tailored to given problems.
Similarity Distance Function- The new distance function between patients 5 = [xl, x2, . . . ,x,] and y' = [yl,y2,. . . ,yn] in X is defined as -t
where 0 5 d(xn,yn) 5 1to prevent bias toward any of the three attribute types that each of the NI attributes of 2 can take. It also implies that
Metaheuristics: Progress as Real Problem Solvers
268
0 5 d(Z,y3 5 1, leading to normalised distances that can be used by all clustering algorithms. In relation to the following discussion, each cluster Ci can be thought of as a set {Zl, Z2,. . . ,Zm) of patients and also as a set {Cli, C2i,. . . ,Chi) of input attributes. A central tenet of the new distance function lies in its use of clustering itself to measure distances relative to the similarity between clusters. Similar patients in a loose cluster are deemed to be closer than if in a tight cluster, as they would be more likely to remain in the same cluster if any tightening of clusters occurred. This idea is encapsulated in the definition of d(x,, yn) in (12.1) by measuring distances for non-categorical attributes between patient elements x, E Cni and yn E Cnj relative to the range
of values in clusters Cni and Cnj combined. The use of d(x,, yn) can be extended to cope with missing data, in that it can be thought of a measure of uncertainty surrounding the true values of these missing data. TO illustrate this point, suppose that X, E Cni, yn E Cnj and without loss of generality that x, is a known value and yn = M is a missing value, such that d(x,, yn) is taken to be some weighted average of distances over possible values of 9,. Then ICniI
1
ICnjI
~c,llc,C,=1 Ct=1 d(xn M) =
-, ~ ( X S E
Cni, Yt E Cnj) if Xn is continuous, otherwise
w C t = l lcAjId(xn, Y E ckj) R
1
where s and t are indices such that x, and yt are the sth and tthvalues of CAj Cni and Cnj respectively. If is not continuous then Cnj = and so spans R categories or intervals, each indexed by t and containing elements of value y E CAj by definition. In situations where x, = yn = M , d(x,, 9,) is simply defined as some average degree of uncertainty and so once again without loss of generality
uEl
d(M, M ) =
Ic',ilc L ~ 'd(xS E Cni, M ) a Cs=1 d ( x € C t i , M )
{-
if
is continuous,
otherwise
where s is an index such that x, is the sth value of Cni. Again, if & is not continuous then Cni = Q Cti and so spans Q categories or
Predicting Colorectal Cancer Recurrence by Neural Networks
269
intervals, each indexed by s and containing elements of value x E Ciiby definition. Therefore, d ( x n , yn) of (12.1) is formally defined as follows: IF Zn is a categorical attribute THEN
ELSE IF Zn is a discrete attribute THEN
ELSE Zn is a continuous attribute AND
where S(xn, yn) is the Dirac delta function. The last three cases when + X n is categorical are equivalent to subtracting all pairings where x n = yn from the total number of pairings subject to normalisation by dividing by this total number of pairings. The last three cases when r?, is either discrete or continuous are equivalent to summing all pairings where xn # yn, weighted by their difference lxn - ynI, subject to normalisa-
270
Metaheuristics: Progress as Real Problem Solvers
tion by dividing by the total number of intervals for each known value and the maximum difference D of (12.2). This construct can be used for partition-based methods employing between-cluster variation where 2 = and y' = or hierarchical methods of merging where 2 E Ci and y' E Cj. Note that Smithies (2004) proved that in the absence of missing data, the square root of the new distance function d(Z, c', of (12.1) between 2 and y' from the same cluster also satisfied the properties of a norm defined on the vector space formed by the union of NI disjoint clusters.
G,
Hybrid Centroid Mechanism- Each cluster Ck has a centre c'l, = [elk, czk, . . . ,cNIk] E Ck such that the form of each component cnk is dictated by the attribute type of Zn in the manner described below: mode of values in Zn if median of values in -& if if mean of values in 2,
& is categorical & is discrete & is continuous.
In general, centroids from this mechanism are easier to interpret than equivalent centroids from a standard euclidean mechanism.
12.3.3
Mult i-Layer Feed-Forward Networks
The neural networks employed in ensembles of the expert system are multi-layer feed-forward (MLFF) networks (Patterson, 1996).
Architecture- The architecture of each MLFF network employed in benchmarking experiments to predict colorectal cancer recurrence is of the form given in Figure 12.5. The number of units (NI) in the input layer is given by the number of input attributes in the new data set generated by the regression stage of the expert system, while only one output unit is necessary for the sole binary target attribute. Indeed, the main purpose of the ensemble is to optimise the number of units in the hidden layer. None of the MLFF networks in this study have shortcut connections between non-adjacent layers. The input units distribute normalised colorectal cancer data to the hidden layer. Each non-input unit receives a weighted sum of its bias and activations from incident units, and generates non-linear hyperbolic tangent activations. Cross validation is used with colorectal cancer patients being distributed into training, validation and testing sets according to some user-defined ratio. Learning Algorithm- Each MLFF network is trained by batched error backpropagation (Rumelhart and McClelland, 1986) with the quality of
Predicting Colorectal Cancer Recurrence by Neural Networks
271
the solution given by the weights and biases being measured by a normalised mean squared cost function. The initial solution of each MLFF network is set to small random values (Le Cun, 1989) to prevent saturation of hidden units and break symmetry of the weights. The learning rate of batched error backpropagation is adapted by Resilient Propagation (RPROP) developed by Riedmiller and Braun (1993), which is generally regarded as the best locally adaptive gradient-based technique. Enhancements of RPROP proposed by Igel and Hiisken (2000) improve performance in classification tasks taken from the PROBENl benchmark collection of natural data sets (Prechelt, 1994). However, their use of weight-backtracking (Silva and Almeida, 1990) requires additional computation of the previous error E (t - 1). Hence Smithies et al. (2004) proposed a more powerful variant of their enhanced RPROP without weight-backtracking (iRPROP-), which is adapted in this study to train MLFF networks to predict colorectal cancer recurrence, and is now briefly described.
-----)
Input Layer given by Regression
Hidden Layer
Output
optimised by
Layer
Connection
Ensemble
Figure 12.5. Schematic of a Multi-Layer Feed-Forward Network.
12.3.4
Local Optimisation via Enhanced iRPROP-
Smithies et al. (2004) proposed two new enhancements of iRPROP(POWER and TRIG) that improved on the performance of the standard iRPROP- heuristic as well as other locally adaptive techniques such as Delta-Bar-Delta, Super SAB and Quickprop (see Smithies et al. (2004) for references) using classification tasks of the PROBENl benchmark collection (Prechelt, 1994), based on the cancer1 and diabetes1 data sets taken from the UCI repository of machine learning databases.
POWER- Learning rates are adapted more responsively and robustly compared with standard iRPROP-, Delta-Bar-Delta or Super SAB since POWER is less sensitive to the choice of initial step sizes 6ij (0). Step sizes are initialised to be less than 1to allow increments and are bounded
272
Metaheuristics: Progress as Real Problem Solvers
to prevent excessively large weights. Indeed, making use above by A,, of the rapid adaptation afforded by POWER one can effectively eliminate initial step sizes &(O) as heuristic parameters, with any positive value close to zero being sufficient.
TRIG- Step sizes are tailored to the local state of the error function by use of weight-specific adaptive parameters %(t) instead of relying on a fixed parameter, using that fact that close to a local minimum a mean-squared cost function is assumed to be quadratic.
12.3.5
Hybridising Enhanced iRPROP- with Local Search
Gradient-based methods such as Enhanced iRPROP- (iRPROP- with TRIG & POWER) require the existence of a gradient in order to descend towards a local minimum and thus fail in flat regions of the cost function. However, they can also falter if the gradient is shallow enough to be deemed effectively flat by round-off due to a lack of computational precision. Hybridising Enhanced iRPROP- with a gradient-independent Local Search (Aarts and Lenstra, 1997) can reinvigorate exploration of the weight space. The Local Search neighbourhood is given by step sizes A$ of the final Enhanced iRPROP- iteration, which provides an estimated basin of attraction of the local minimum. Both the switch from Enhanced iRPROP- to the new version of Local Search, and the subsequent termination of the local optimisation method, are controlled by two criteria due to Prechelt (1994). The first is satisfied if a measure of the ratio of current validation error to optimal validation error so far - known as generalisation loss - exceeds (GLj)thresholdfor j successive training epochs. The second is satisfied if a measure of the ratio of average training error to minimum training error over the last 5 training epochs - known as training progress - falls below (TPk)threshold.Combining these criteria with Enhanced iRPROP- & Local Search gives a hybrid method for local optimisation that draws on the relative strengths of both gradient-based and gradient-independent techniques. Smithies et al. (2004) show that this hybridisation leads to improvements in classification of the same cancer1 and diabetes1 data sets mentioned earlier.
12.3.6
Global Optimisation via Forbidden Neighbourhoods
The global optimisation strategy developed by Smithies et al. (2004) and used to train the MLFF networks in this study involves recursive application of the Enhanced iRPROP- & Local Search hybrid method,
Predicting Colorectal Cancer Recurrence by Neural Networks
273
with the final solution of each recursion being used to improve the search of subsequent recursions. This is achieved by borrowing ideas from Tabu Search (Salhi and Queen, 2004), whereby each recursion of the hybrid begins with the uniformly random selection of an initial solution GI from initial weight space that does not lie in a forbidden neighbourhood (initially there are none). Each time a final solution GF generated by a recursion of the hybrid method has some chosen measure of accuracy A worse than that of the current best final solution the corresponding initial solution WI is surrounded by a forbidden neighbourhood. The chosen accuracy measure A(G) is the mean percentage of correctly classified training and validation examples. Note that a recurrence example associated with a target output of 1 from the MLFF network is deemed to be correctly classified if the actual output is within the top 100c% of the range of activation of the MLFF network output unit, where c E [O,0.51 is a user-defined cut-off parameter. Conversely, a non-recurrence example associated with a target output of -1 from the MLFF network is deemed to be correctly classified if the actual output is within the bottom 100c% of the range of activation of the MLFF network output unit. The general aim of the new global optimisation method is to encourage exploration of new regions of weight space. Each forbidden neighbourhood is an n-dimensional hypercube of side 2r constructed in such a way that a minimum of m neighbourhoods provide a covering of the initial weight space that is itself an n-dimensional hypercube of side 2R. This is achieved by defining r = R/ fi.A typical trial performed by the global optimisation method is depicted in Figure 12.6.
WL,,
Termination >
w2
.---, -; - -* - - - -
Forbibben Neighbowhood
<
w1
Figure 12.6. A typical trial of the new global optimisation method using ideas borrowed from Tabu Search. The trial is depicted in a two-dimensional weight space for simplicity. Embedded into the method is the hybrid of Enhanced iRPROP- and the new form of Local Search.
12.4
COMPUTATIONAL RESULTS
The performance of the new expert system in predicting colorectal cancer recurrence is now investigated via a series of benchmarking experiments. To ensure a manageable number of trials the cumulative
274
Metaheuristics: Progress as Real Problem Solvers
effect of adding each stage to the expert system was analysed in turn. All algorithms were coded in the Java object-oriented programming language and run on a Sony laptop PC with Intel Pentium I11 845MHz processor, 128MB RAM and Microsoft Windows 2000 Professional operating environment.
12.4.1
Regression with Relaxed Siginificant Levels
Hypothesis tests in any regression process are usually performed at fairly strict levels (eg P < 5% or 10%) to ensure high statistical significance. Although theoretically sound, this can lead to the rejection of too many (if not all) attributes if inter-attribute relationships are non-linear or the data set is sufficiently noisy. By relaxing the significance level, one can create a relaxed regression mechanism capable of improved initial estimates of the most influential input attributes, even those non-linear in nature. This idea of relaxed regression was applied to the colorectal cancer data set using the stepwise regression metaheuristic with progressive relaxation of significance levels P < 5%, lo%, 50% and 90%, in conjunction with pre-processing by correlation analysis at thresholds of Cthreshold = 20010, 40%, 60%, 80% and 100% (no effect), to obtain an initial estimate of the best set of prognostic indicators. The resulting data sets are given by
2p<5% = {DEPTHINV,VASCINV), + &
= XP<5% +
u {DUTINT,MSH2),
= XP
{INFILGRO,DATRAND), {SITE,SIZE,GRADE,MGMT, AGERAND ,LYMPHRES) .
The strictness of standard regression is evident since the initial set of + prognostic indicators Xp<5%contains only two attributes even though the attributes allowed via progressive relaxation prove to be of significance in later analyses. For the cases where P < 5%, 10% and 50%, regression analysis is strict enough to render irrelevant any pre-processing of the data set by correlation analysis since attributes that are highly correlated with others are removed early in the regression progress. However, if regression is relaxed further (P < 90%) selection of attributes to join those of -?piso% becomes dependent on the threshold of the correlation procedure. Smithies (2004) shows that except for INFILGRO, the attributes of 2p<50% are ranked highly by both statistical and information theoretic measures. Therefore, factors that should be considered in colorectal cancer prognoses are histological: Duke's staging
Predicting Colorectal Cancer Recurrence by Neural Networks
275
(DEPTHINV), cancer cell invasion of the bloodstream (VASCINV) and infiltrative growth patterns (INFILGRO); and molecular: low expression of dUTPase and high expression of MSH2. In addition, the inclusion of DATRAND suggests that colorectal cancer recurrence has a significant time-dependence, advocating the necessity of routine check-ups. Lone MLFF networks with 8 to 12 hidden units are trained by the + + .+ new global optimisation method on the X P < ~ %XP
CORRECTLYCLASSIFEDRKURRENCES
(4
Figure 12.7. Performance of 64-1 and
6-12-1 MLFF network architectures.
One can see the effect on performance that the size of the hidden layer in MLFF networks has by comparing left-hand (8 hidden units) and right-hand (12 hidden units) scatter plots of Figure 12.7. In gen-
276
Metaheuristics: Progress as Real Problem Solvers
eral, MLFF network architectures with 8 hidden units generally perform better in training but worse in validation and testing than those with 12 hidden units, and so the 6-8-1 architecture trained with Tp<5O%is deemed to give the best overall predictions of colorectal cancer recurrence.
12.4.2
The New Clustering Strategy with K-Means
The performance of the new clustering strategy is compared with that of a standard clustering strategy based on a combination of the euclidean distance function using mean imputation and a mean centroid mechanism. This is done via benchmarking experiments involving a - the best data set given by relaxed classification task based on regression. Both new and standard clustering strategies are subject to 500 unsupervised K-means trials in total, with 50 trials for each number of clusters between 1 and 10 - that is 1 5 K 5 10. In order to prevent degenerate cycling, a trial is re-run if a maximum number of iterations of the K-means algorithm is exceeded - this is empirically set to 200 in order to allow convergence without being excessively large. For each of these 500 trials, 646 colorectal cancer patients were randomly split into training and validation examples using a 50%-50% ratio, to encourage the search for clusters with good generalisation properties. The percentage of correctly classified recurrences and non-recurrences are averaged over K clusters in Figures 12.8 (a-f) and 12.9 (a-c). The top-left graph of Figure 12.8 shows that the new clustering strategy correctly classifies more validation examples than the standard clustering strategy and thus has better generalisation properties. F'urthermore, the similarity distance function is better at clustering recurrence patients than the euclidean distance function, as shown in the middleleft graph of Figure 12.8, and thus is less susceptible to being swamped by the 80% majority of non-recurrences. The best clustering is achieved by the new clustering strategy, as shown in the top-right graph of Figure 12.8, and consists of 7 clusters with attribute distributions across training and validation examples shown in Figure 12.10 and 12.11, respectively. A marked similarity between distributions of input attribute values across the training and validation examples implies that K-means implementation of the new clustering strategy succeeds in identifying key features of the colorectal cancer data. Centroids associated with the 7 clusters are listed in Table 12.3 in decreasing order of the proportion of training recurrences given by the RECURRED distribution of Figure 12.10. Therefore, good prognostic indicators of recurrence seem to be vascular and serosal invasion, and low or no expression of dUTPase,
G<50%
Predicting Colorectal Cancer Recurrence by Neural Networks
277
while good prognostic indicators of non-recurrence seem to be survival beyond 3 years from the time of entry into the study and the lack of an infiltrative growth pattern. Further analysis of the specific types of patient represented by the 7 clusters is presented by Smithies (2004).
1
2
3
4
5
NUMBW
6
7
8
9
1
0
OF CLUSTERS
1
2
3
4
5
6
7
8
9
1
0
W E R OF CLUSTERS
Figure 12.8. A summary of the unsupervised K-means clustering results.
Metaheuristics: Progress as Real Problem Solvers
278
1
2
3
4
5
6
7
8
9
1
0
1
2
3
I
4
5
6
7
8
9
3
0
NUWBER OF CLUSTERS
NUMBER OFCWSTERS
2
3
4
5
8
7
1
9
1
0
NUMBER OFCLUSTERS
Figure 12.9. A summary of the unsupervised K-means clustering results (cont).
12.4.3
Implementing the New Expert System
The performance of the new expert system in classifying recurrences and non-recurrences is compared with those of the MLFF networks with 6-8-1 and 6-12-1 architectures shown in Figure 12.7, via more benchmarking experiments conducted with the data set &<50%. TOensure a fair test, neural network ensembles are populated with MLFF networks possessing 6-8-1 and 6-12-1 architectures only. The 7 clusters described in Figures 12.10 and 12.11 are used to train MLFF networks grouped into 7 ensembles, such that the MLFF networks of each ensemble focus on a unique cluster. Parameter settings for components of the expert system are identical to those of the earlier K-means trials. Figure 12.12 suggests that all 7 clusters are associated with general improvements in training, validation and testing performance. Optimal performances should be associated with achieving high (> 50%) clas-
Predicting Colorectal Cancer Recurrence by Neural Networks
(a) Depthinv
(b) Vascinv
(c) Dutint
(d) MSH2
(e) Infilgro
(f) Datrand
(g) Recurred
Figure 12.10. Training examples of the best K-means clustering.
279
280
Metaheuristics: Progress as Real Problem Solvers
(a) Depthinv
(b) Vascinv
(c) Dutint
(d) MSH2
( e ) Infilgro
(f) Datrand
(g) Recurred
Figure 12.11. Validation examples of the best K-means clustering.
Predicting Colorectal Cancer Recurrence by Neural Networks
281
Table 12.3. Centroids given by the best K-means clustering. DEPTHINV Subserosa Serosa Subserosa Subserosa Subserosa Subserosa Subserosa
1 High
6 7
High High High High
MSH2 Yes Yes Yes Yes No Yes Yes
DATRAND 14/8/96 6/11/96 15/5/96 25/10/96 10/5/96 2013196 27/07/98
sification percentages for both recurrences and non-recurrences. However, one may prefer either to optimise for recurrences as they are much harder to correctly classify, or non-recurrences as they are the majority. The best performances given by the hybrid expert system for each of the 7 clusters according to these two different measures of optimality are summarised in Table 12.4. Mean averages weighted by the total number of recurrences and non-recurrences in each cluster (see the R E CURRED distributions of Figures 12.10 and 12.11) are also taken to give a training-validation-testing classification percentage for the entire data set. Table 12.4 shows the improvement afforded by the hybrid expert system over lone MLFF networks, especially in relation to the classification of recurrences. Indeed, the prognoses of at least 66% of all colorectal cancer patients are now correctly predicted regardless of the chosen optimality measure. All weights and biases of experts for each of the 7 clusters are given by Smithies (2004).
zp
12.5
CONCLUSION
The new expert system developed by combining the best features of relaxed regression, a new clustering strategy that considers mixed attribute types and missing data, and neural networks trained with a new global optimisation method, improves the prediction of colorectal cancer recurrence with a quality approaching that required by the medical profession for clinical use. These promising results provide a platform for expert system enhancements such as the use of fuzzy or overlapping clusters to classify more subtle features of the colorectal cancer data. The ultimate goal will be the development of software that provides real clinical benefits for medical practitioners and patients alike.
Metaheuristics: Progress as Real Problem Solvers
(a) Cluster 1
(b) Cluster 2
(d) Cluster 4
rn
30%
zm
l a '0%
lor
a ,a a m
lW3
CMIIKTL"SU~SIIEDIEC"I1~DICES
m
l a
m s w . .au
ra
lo\
,or
o*
.ox lar
C(XIREOWCLIS30WEO(IKUIIIE*CU
(f) Cluster 6
(e) Cluster 5
(g) Cluster 7
Figure 12.12. Performances of 7 ensembles containing 6-8-1 architectures trained on the 7 clusters given by the best K-means clustering of 6 input attributes due to regression with P less than 50%.
Predicting Colorectal Cancer Recurrence by Neural Networks Table 12.4. Optimal performances of the new expert system (to 3 sf.). Cluster 11 12 13 14 15 16 17 ]All Number of examples All 92 74 50 275 13 99 646 43 Recurrence 22 1 127 34 10 45 9 6 Non-Recurrence 58 52 40 230 12 519 90 37 Classification % (recurrence preferred) All 65.2 71.6 82.0 58.5 86.8 73.7 72.1 66.4 76.5 72.7 80.0 68.9 100 66.7 66.7 72.4 Recurrence Non-Recurrence 58.6 71.2 82.5 56.5 85.7 74.4 73.0 65.2 Classification % (non-recurrence preferred) All 76.1 74.3 84.0 60.4 86.8 83.8 72.1 71.2 Recurrence 58.8 54.6 70.0 64.4 100 55.6 66.7 61.4 Non-Recurrence 86.2 82.7 87.5 60.4 85.7 86.7 73.0 73.7
ACKNOWLEDGMENTS The authors would like to thank Dr. Simon Grumett of the Institute of Cancer Studies at Birmingham for providing the colorectal cancer data set. The authors are also grateful to both referees for their helpful comments and suggestions.
REFERENCES Aarts, E. and Lenstra, J. (1997). Local Search in Combinatorial Optimization. John Wiley and Sons, Chichester, UK. Barr, L., Cowan, R., and Nicolson, M. (1999). Oncology. Churchill Livingstone, London, UK. Bhatavdekar, J., Patel, D., Chikhlikar, P., Shah, N., Vora, H., Ghosh, N., and Trivedi, T. (2001). Molecular markers are predictors of recurrence and survival in patients with Dukes B and Dukes C colorectal adenocarcinoma. Diseases of the Colon & Rectum, 44:523-533. Cancer Guidance Sub-group of the Clinical Outcomes Group (1997). Improving outcomes in colon cancer: The Research Evidence. Technical report, NHS Executive, Department of Health, London, UK. Draper, N. and Smith, H. (1981). Applied Regression Analysis (2nd edition). John Wiley and Sons, New York, NY. Grumett, S., Quirke, P., Kerr, D., McConkey, C., Stahlsmidt, M., and Barnwell, J. (2002). A pathology sub-study of putative prognostic
284
Metaheuristics: Progress as Real Problem Solvers
markers in colorectal cancer. In Proceedings of the International Symposium on Predictive Oncology and Intervention Strategies, Paris, France. Igel, C. and Husken, M. (2000). Improving the Rprop Learning Algorithm. In Proceedings of the Second International Symposium on Neural Computation, NC2000, pages 115-121, Berlin, Germany. ICSC Academic Press. IMPACT (1995). Efficacy of adjuvant fluorouracil and folinic acid in colon cancer. Lancet, 345:939-944. Le Cun, Y. (1989). Generalization and Network Design Strategies. Technical report, CRG-TR-89-4. Department of Computer Science, University of Toronto, Toronto, Canada. Linde, Y., Buzo, A., and Gray, R. (1980). The K-means algorithm. IEEE Transactions on Communication, 28234. Medsker, L. (1994). Hybrid Neural Network and Expert Systems. Kluwer Academic Publishers, Norwell, MA. Papachristodoulou, A., Kouskos, E., Markopoulos, C., Karatzas, G., Kouraklis, G., and Kostakis, A. (1987). Local recurrence after radical surgery for colorectal cancer. Physical Review Letters, 59:2229-2232. Patterson, D. (1996). Artificial Neural Networks:Theory and Applications. Prentice Hall, Singapore. Prechelt, L. (1994). PROBENl - A set of benchmarks and benchmarking rules for neural network training algorithms. Technical report, 21/94, Fakultat fur Informatik, Universitat Karlsruhe, Karlsruhe, Germany. Riedmiller, M. and Braun, H. (1993). A direct adaptive method for faster backpropagation learning: The RPROP algorithm. In Proceedings of the IEEE International Conference on Neural Networks (ICNN), volume 16, pages 586-591, Piscataway, NJ. IEEE Press. Rumelhart, D. and McClelland, J. (1986). Parallel Distributed Processing. MIT Press, Cambridge, MA. Salhi, S. (1998). Heuristic Search Methods: in Modern Methods for Business Research (G. Marcoulides, Ed.), chapter 6, pages 147-175. Lawrence Erlbaum Associates. Salhi, S. and Queen, N. (2004). A hybrid algorithm for detecting global and local minima when optimizing functions with many minima. European Journal of Operational Research, 155:51-67.
Predicting Colorectal Cancer Recurrence by Neural Networks
285
Silva, F. and Almeida, L. (1990). Advanced Neural Computers, pages 151-158. North-Holland. Smithies, R. (2004). Neural Network Heuristics for Real- World Classification with an Application to Predict Cancer Recurrence. PhD Thesis, University of Birmingham, Birmingham, UK. Smithies, R., Salhi, S., and Queen, N. (2004). Adaptive Hybrid Learning for Neural Networks. Neural Computation, 16:139-157. United Kingdom Co-ordinating Committee on Cancer Research (1998). QUASAR1 (Quick and Simple and Reliable): a UKCCCR study of adjuvant chemotherapy for colorectal cancer. Technical report, Clinical Trials Unit, Institute of Clinical Research, The Medical School, University of Birmingham, Birmingham, UK.
Chapter 13 A CONSTRUCTIVE GENETIC APPROACH TO POINT-FEATURE CARTOGRAPHIC LABEL PLACEMENT Missae ~amamoto'and Luiz A.N. ~ o r e n a ~ INPE - Znstituto Nacional de Pesquisas Espaciais Caixa Postal 515 12.245-970 S& Josk dos Campos - SP, Brazil
Abstract: The cartographic label placement is an important task in automated cartography and Geographical Information Systems (GIs). Positioning the texts requires that overlap among texts be avoided, that cartographic conventions and preference be obeyed. So, the label placement belongs to a problem area of difficult solution. A variety of methods have been proposed to generate quality labeling, with a wide range of results. In this work, two methods are presented, a Constructive Genetic Algorithm (CGA) and an initial exact method for small instances. The CGA application produced quality-labeling placements for printed maps, and the exact method is used to confirm the superiority of these results.
Key words:
13.1
Constructive genetic algorithm, point-feature cartographic label placement, genetic algorithm and exact algorithm.
INTRODUCTION
Cartographic label placement refers to the text insertion process in maps and is one of the most challenging problems in geoprocessing and automated cartography [12]. Positioning the texts requires that overlap among texts be avoided, that cartographic conventions and preferences be obeyed, that unambiguous association be achieved between each text and its corresponding feature and that a high level of harmony and quality be achieved. In this article we are concerned with the placement of labels for
288
Metaheuristics: Progress as Real Problem Solvers
point features, approaching the problem from a combinatorial optimization viewpoint.
Figure
13.1. Two points - potential label positions and corresponding conflict graph
The Point-Feature Cartographic Label Placement (PFCLP) problem considers potential label positions for each point feature, which will be considered as candidates. Figure 13.1 shows two points with a set of four potential label positions and the corresponding conflict graph, where vertices correspond to labels and edges to possible overlapping in labels. The PFCLP considers the placement of all labels searching for the large subset of labels with no conflict. A related but different problem appears when label selection is permitted and a subset of points are not labeled (cannot be labeled without conflicts). In that case the problem searches the maximum independent set of vertices on the conflict graph [lo]. Several heuristics and metaheuristics have been used to approximately solve the PFCLP problem. They are partially reviewed by Christensen et al. [I]. The algorithms included a version of Zoraster's integer programming algorithm (Lagrangean relaxation) [14], a version of Hirsch's continuous gradient-descent algorithm [3], a discrete gradient-descent algorithm, and a stochastic optimization algorithm using simulated annealing. A Genetic Algorithm (GA) with mask is described in [l 11 and [13] presented a Tabu Search algorithm showing better results in label placement quality than all these other methods. This work describes the application of a Constructive Genetic Algorithm (CGA) to PFCLP. The CGA was proposed by Lorena and Furtado [4] and applied to timetabling [9] and Gate Matrix Layout Problems [7, 81. Basically it differs from other GAS for evaluating schemata directly. It also has a number of new features compared to a traditional GA. These include a population of dynamic size composed of schemata and structures, and the possibility of using heuristics in the fitness function definitions.
Genetic approach to point-feature cartographic label placement
289
A simple tree search algorithm is also proposed to validate the CGA computational results on small-scale instances. The work is organized as follows. Section 13.2 presents a pseudo-code for the CGA and describes aspects of modeling for schema and structure representations and the consideration of the PFCLP as a bi-objective optimization problem. Section 13.3 describes some CGA operators, namely, selection, recombination and mutation. Section 13.4 shows computational results using instances formed by standard sets of randomly generated points suggested in the literature. Section 13.5 presents the exact algorithm with some computational results showed in the section 13.6.
13.2
CGA MODELING FOR PFCLP
The CGA for PFCLP is modeled as a bi-objective optimization problem indirectly solved by an evolutionary process. We first describe the structure and schemata representation. Structure and schema representation: The CGA operates as an iterative procedure on a population or pool of individuals. The individuals represent an encoding of the problem into a form that is analogous to the chromosomes of biological systems. Each chromosome is made up of a string of genes, whose values are called alleles. In PFCLP, each individual or chromosome represents a label distribution configuration for a given point set, where each allele in the chromosome corresponds to a point feature label and may take on one of the potential label position or the symbol #, indicating that the point is temporarily out of the problem. So, if we use a chromosome (individual) with length 10, sk = (1,4, #, #, 1,3,2, 1, #, 2) is a possible schema, where the numbers 1, 2, 3, 4, refer to the potential label positions for each point feature (four potential positions) and the symbol # represents that the corresponding point is temporarily not being considered. The structures represent feasible solutions to PFCLP. All labels are positioned and the symbol # is not present in the individual, for example, sk = (1,4,2, 1, 1,3,2, 1,4,2) is a possible structure. So, the CGA evaluate structures and parts of it, called schemata. In this work we use the word individual as a generic term to cover both structure and schema. Fitness.finctions: Let X be the space of all schemata and structures sk = (label or #, label or #, ..., label or #), that can be created using the alphabet {label, #), where label can be any corresponding point label (in Figure 13.1: L1, ..., L8), and # is an indetermination typical of schemata. The PFCLP is modeled using two fitness functions. Function f returns the number of conflict free labels in sk and g returns the corresponding
290
Metaheuristics: Progress as Real Problem Solvers
number after an heuristic application in sk. The variation (g(sk) - f(sk)) reflects the local search improvement and individuals with few # labels have higher g(sk)values (schemata have lower g(sk)values than structures). In our CGA for the PFCLP the variation (g(sk)- f(sk))plays two roles: Interval minimization: we would like to search for a sk E X that minimizes g(sk) - f(sk), since the response to the evolutionary search is given on a very adapted individuals that have a large number of conflict free labels. G maximization: we would like to search for a sk E X that maximizes g(sk), since we need to ensure feasibility. A individual that has very few labels assigned (it is a schema in which most points are labeled #) will not be a feasible solution to the PFCLP. This objective can be viewed as encouraging the process to move from schemata to structures (feasible solutions). Hence our CGA implicitly considers the following bi-objective optimization problem (BOP): Minimize Maximize Subject to
g(s) - f(s) g(s) g(s) 2 f(s),
Vs
E
X.
The BOP defined above is not directly considered as the set X is not completely known. Instead we consider an evolution process to attain the objectives (interval minimisation and g maximization) of the BOP. At the beginning of the process, two expected values are given to these objectives: for the g maximization objective we use a value g, 2 maxSExg(s) that is an upper bound on the objective value, for the interval minimization objective we use a value dg,, obtained from g, using a real number 0 < d ll. The evolution process proceeds using an adaptive rejection threshold, which considers both objectives described before. Given a parameter a 2 0, let g, be the total number of labels, then an individual sk is discarded from the population ifi
The right-hand side of expression (13.1) is the threshold for individual removal from the population and is composed of a expected value dg,, associated with the interval minimization and the measure [g,, - g(sk)], which is the difference between g, and g(sk) evaluations. For a = 0
Genetic approach to point-feature cartographic label placement
29 1
equation (13.1) is equivalent to comparing the interval length associated with sk against the expected length dg,,. When a a > 0, individuals containing a high number of # labels (i.e. schemata) have a higher probability of being discarded as, in general, they have higher differences [g,, - g(sk)] since g, is fixed and g(sk) is smaller for schemata than for solutions. The population is controlled by an evolution parameter (time) a , receiving small increments from generation to generation. The corresponding population is denoted by Pa ,and have a number of schemata and structures, ranked by the following expression (rearranging equation (13.1)):
where g, + g(sk) (in general, otherwise an optimal solution was found, i. e., all labels positioned without conflicts), considering one label for each point of the configuration. The size of population is then dynamically controlled by a , and can be emptied during the evolution process. At the time they are created, structures andor schemata s, receive a rank value 6(snew),which is compared with the current evolution parameter a. If a < 6(sne,), the new individual is accepted. At each generation this survival test is also applied to the individuals in the current population. Expression (13.2) shows that better schemata or structures have high ranks, reflected by small variations (g(sk)- f(sk)) andlor greater g(sk) values. In this sense better individuals are those trained by the heuristic and have a large number of conflict free labels. The algorithm implemented in this work is showed as follows. CGA J Constructive Genetic Algorithm ) Given g,, , d and a = 0; Initialize P, ; for all sk E P, compute g(sk),f(sk), Ks$; while (not stop condition) do If a < Ks$, add sk to P&I,for all s~ E P,; Define the selection of sb, and sguide; while (number of recombinations) do Select sbaseand sPidefiomP, ; Recombine Sbase and sWide +sn, ; Apply local search heuristic (mutation) to sn, ; compute g(~n,), f(~n,), K~n,);
292
Metaheuristics: Progress as Real Problem Solvers I f a < 6(s,,), adds,, to Pa+*; end-while Do sbasemutation and keep the best solution; Update a ; end-while
The best g(sk) is kept in the process, because it can be a good potential solution. The initial population, selection, recombination, mutation, the a updating and the heuristics used to calculate g(sk) and the local search heuristic, are all detailed in the following.
13.3
CGA OPERATORS
The initial population is composed exclusively of schemata, considering that for each schema, a proportion of random positions receive a label number. The remaining positions receive labels #. Along the generations, the population increases by addition of new offspring generated out of the combination of two schemata. For selection, the structures and schemata in population Pa are maintained where in ascending order by the key: [l + [(g(sk) - f(s9) /g(sk)]] / q(sk) , q(sk) is the number of points labeled in sk . The best-ranked individuals (schemata andlor structures) appear in first order positions. Two structures and/or schemata are selected for recombination. The first is called the base (sbase)and is randomly selected out of the first positions in Pa, and in general it is a good structure or a good schema. The second structure or schema is called the guide (sWide ) and is randomly selected out of the total population. The objective of the sguideselection is the conduction of a guided modification on SI., In the recombination operation, the current labels in corresponding positions are compared. Let snew be the new structure or schema (offspring) after recombination. The structure or schema snew is obtained by applying a recombination with mask based in Verner et al. [I I]: Mbase = mask of sbaSe(0 = conflict, I = without conflict, 2 = #) Mguide = mask of sguide(0 = conflict, I = without conflict, 2 = #) U= 0 or I (randomly generated) Repeatfor each position (i) in structure or schema representation: IfMbase (i) IfMbase(i) IfMb,, (i)
=
* *
1 then snm (i) f Sbase (i) I and Mguide (i) = 1 then S n m (i) + sguide (i) 1 and Mguide (i) # 1 and U = 0
Genetic approach to point-feature cartographic labelplacement
The mutation operation applies a simple local search heuristic to s, or to Sbase. If sbmeis a schema, it is initially transformed in structure changing #s by labels. The labels are positioned searching for a small number of extra conflicts. The new individuals snewand these new structures obtained directly from sbme,are then improved by a local search heuristic that tries to change each conflicted label by a conflict free position. Computational tests showed that 5 replications reached good results with reasonable processing times, then the local search heuristic is recursively applied five times to improve structure quality. The best solution is kept in the process, but the mutants are not inserted into the new population. Considering that the well-adapted individuals need to be preserved for recombination, the evolution parameter a! is started with zero, and Oliveira and Lorena [7] suggest to increase it with step proportional to actual population size IP,I, following this formula:
where, k is a proportionality constant, 1 is the minimum increment allowed, Gr is the remaining number of generations, and (6t0p-6b03is the actual range of values of 6. The adaptive increment of a is then affected by the search history (population size, best and worst 6's, etc). Thus, once the CGA achieves very good regions and does not get to improve the best rank, the parameter a goes eliminating the individuals until the population is emptied. To calculated the g(s$, a recursive smallest first (RSF) heuristic is used and drives the evolution process to a trained population. The RSF is very simple (other sophisticated heuristics can be tried). It takes the subset of labeled points in sk (points without #s) and their original potential label conflicts, i. e., a subgraph of the conflict graph. The vertices of the subgraph are then considered in non-decreasing order of degrees. The corresponding point receives a label with no conflict and the subgraph is updated eliminating this label (vertex) and their incident vertices and edges. The process is then repeated until no more labels to place. The local search heuristic (mutation) produces smaller changes to individuals than the RSF and is also used to calculate the g(s$ on the initial population. It allows the initial individuals to survive in the next generation, since they will have high ranks. The heuristic looks points without #s in
294
Metaheuristics: Progress as Real Problem Solvers
natural order at each position in structure or schemata representation and changes the label if the corresponding number of conflicts results to be smaller.
13.4
CGA COMPUTATIONAL RESULTS
Christensen et al. [I], Verner et al. [ l l ] and Yamamoto et al. [13] compared several algorithms using standard sets of randomly generated points: grid size of 792 by 612 units, fixed size label of 30 by 7 units and page size of 11 by 8.5 inch. In order to compare the CGA algorithm with previous works, the standard sets of randomly generated points and the same conditions as described by [l] are used, following the same assumptions as [ll]. The set of instances has the following characteristics (all the instances used in this paper are available at www. lac.inpe.br/-lorena/instancias. html): a) Number of the points: N = 100,250,500, 750, 1000; b) Configurations: For each problem size, 25 different configurations with random placement of point feature using different seeds; c) Penalties: No penalty was attributed for labels that extended beyond the boundary of the region; d) 4 potential label positions were considered; e) Cartographic preferences were not taken into account; f) No point selection was allowed (i.e., no points are removed even if avoiding superposition is inevitable); The parameters used for CGA are presented in Table 13.1. These values change in accordance with the instance and are determined executing a preliminary battery of computational tests with different parameters values until acceptable results were found. The computational results are presented in Table 13.2. The results, for each problem size, present the average percentage of labels placed without conflict for the 25 trials. Table 13.1.CGA parameters N Initial population size k 1
Number of # (~nltlalpopulation) % of sub-population Base
100
250
500
30 75 150 0.01 0.01 0.01 0.00001 0.00001 0.00001
1
15%
1U
15%
15%
750
1000
200 300 0.01 0.01 0.00001 0.00001 30 25 0.2 JU 70 15% 15%
Genetic approach to point-feature cartographic label placement
295
Table 13.2. Computational results
Algorithm
100
250
500
750
1000
CGAbest
100.00
100.00
99.6
97.1
90.7
CGAaverage Tabu search [13]
100.00
100.00
99.6
96.8
90.4
100.00
100.00
99.2
96.8
90.00
GA with masking [1 1]
100.00
99.98
98.79
95.99
88.96
GA [l 11
100.00
98.40
92.59
82.38
65.70
Simulated Annealing [I]
100.00
99.90
98.30
92.30
82.09
Zoraster [14]
100.00
99.79
96.21
79.78
53.06
Regarding the optimization algorithms of the literature, the CGA showed superior results in quality of label placement. Table 13.2 shows the percentage of labels placed without conflict for 100,250, 500, 750 and 1000 points, considering different algorithms of the literature. The CGA,,, reports the average result for 6 trials and CGAh, is the best result. The lines show the percentage of labels placed without conflict by the optimization algorithms tested on [l] (greedy-depth first, gradient descent, 2-opt gradient descent, 3-opt gradient descent, Hirsch, Zoraster and simulated annealing), [ l l ] (GA without masking and GA with masking), [13] (Tabu search) and the CGA. Figure 13.2 shows a label placement for 1000 points after using our CGA algorithm.
Metaheuristics: Progress as Real Problem Solvers
Figure 13.2. Final results after CGA application for 1000 random points (overlap = 88).
Table 13.3 compares the Tabu search of [13], CGAbestand CGA,,,,,, running times (seconds) to obtain the best solutions (using a Pentium I1 computer). The Tabu search approach is faster than CGA. Table 13.3. Computational times to reach the best solutions Algorithm CG&t CGAaverage Tabu search [13]
13.5
100
250
500
750
1000
0
0.6
21.5
228.9
1227.2
0
0.6
21.5
195.9
981.8
0
0
1.3
76.0
352.9
EXACT ALGORITHM
The label placement is a combinatorial optimization problem of difficult solution and Marks and Shieber [6] showed that the point features label placement problem is NP-hard. The PFCLP defined in this paper have the same characteristics and is also a difficult problem. This section describes an
Genetic approach to point-feature cartographic label placement
297
initial tree search exact algorithm to validate the CGA and Tabu search results presented and compared in last section. The exact algorithm to solve PFCLP problem follows the Loukakis and Tsouros [5] algorithm for maximum independent set problems (see also Dowsland [2]), adapting the pruning bounds and branching decisions. It searches the tree in a depth first procedure. The algorithm implemented in this work is showed as follows. Exact algorithm Given: n number of points set of active label positions (solution) S := {I V set of all potential label positions M number of labels without conflicts (CGA estimative) set of points in ascending order of vertices P= {PI,Pz, ...,P,) degrees While IS I z n do Choose from V a label of point Pi and add it to S Compute nc (number of labels with conflicts in S) Compute nsc (number of labels without conflicts in S) If (nsc > ly) then M := nsc Verifyfuture (number ofpoints unlabeled that have candidate label positions without conflict with active labels of S) If (nsc + &ture I ly) or (nc > n-ly) execute pruning end-while The point ordination, labels choice, future verification, pruning and branching, are detailed in the following. The point ordination refers to the sequence that the points are labeled. This sequence is set up in ascending order of vertices degrees, where vertices are the potential label positions of all points, and vertex degree refers to the number of conflicts of the potential label position. The labels choice is doing in ascending order of the point potential label positions cost. The algorithm places each label position for points in a prescribed order. If, as the algorithm proceeds, a point cannot be labeled (either because the number of conflicts exceeded an established boundary, or the sum of the number of labels positioned without conflicts and the number of labels without conflicts that can be positioned in future is smaller than the CGA estimative of number of labels without conflicts), the algorithm returns to the most recently labeled point and considers the next available position
298
Metaheuristics: Progress as Real Problem Solvers
(known as pruning the tree). The algorithm continues in this way until an acceptable labeling is identified or until the entire search space has been exhausted. For the exact algorithm, pruning in higher tree levels becomes a very attractive technique, as it reduces the number of the configurations to be analyzed, taking to a lower processing time. In thefiture verification, the algorithm do a foresight, verifying if at least one potential label position, of the points unlabeled, do not have conflicts with active labels of the labeled points. This algorithm is in a very preliminary fashion and can be improved in some ways, as for example, in pre-processing the initial conflict graph. If a mathematical programming formulation was available, upper bounds (Lagrangean for example) could be usefbl.
13.6
EXACT ALGORITHM RESULTS
The computational tests presented in Table 13.2 show that for the standard set of randomly generated points (grid size of 792 by 612 units, fixed size label of 30 by 7 units and page size of 11 by 8.5 inch) the difficult instances have 750 and 1000 points. It appears that positioning all labels will be impossible for these instances, particularly for the 1000 points. Then in order to approximately get the 1000 points configuration difficulty, we generate 8 different configurations with random placement of 25 point features using different seeds. The same region size and the same paper size suggested for Christensen et al. [l] is used, but the label sizes increased of 8.5%. The rest of conditions were remaining: no penalty was attributed for labels that extended beyond the boundary of the region, 4 potential label positions were considered, cartographic preferences were not taken into account and no point selection was allowed. The instances used in this paper are also available at www.lac.inpe.br/-lorena/instancias. html. The exact algorithm, implemented in C++ language, was applied to these instances and the results (average over 8 trials) are recorded in Table 13.4, as follows:
Genetic approach to point-feature cartographic label placement
299
Table 13.4. Results from Exact Algorithm
Configuration
Time (sec)
Overlapping labels
1
681
2
876
Results (average)
1
1128
1
Results (%)
2
Not overlapping labels 23
3
22
88
4.125
1
20.875
92
1
83.5
1
Where: a) Configuration: configuration number. b) Time (sec.): processing time to get exact solution in a SUN - SPARC20 workstation. c) Overlapping labels: labels placed with conflicts. d) Not overlapping labels: labels placed without conflict. e) Results (%): the percentage of labels placed without conflict. f ) Results (average): average of time, overlapping labels, not overlapping labels and results (%). The CGA and TS (Tabu search of Yamamoto et al. [13]) results are compared with the exact solution, using this set of points. The parameters used for TS are (see Yamamoto et al. [13]): a) Tabu list size = 7 + INT(0.25 * number of labels that overlap). b) Candidate list size = 1 + INT(O.05 * number of labels that overlap). c) Number of iterations for recalculation = 50. The parameters used for CGA are: a) Initial population size: 500. b) K: 0.00005. c) 1: 0.0001. d) Offspring: 500. e) Number of generations: 100. f ) d: 0.9 g) Number of # (initial population): 13. h) % of sub-population Base: 15%. Both TS and CGA algorithms showed results equal or very close to the exact solution for the 8 configurations. The CGA approach resulted to be better than TS. Table 13.5 shows the labels placed without conflict and
300
Metaheuristics: Progress as Real Problem Solvers
percentage of labels placed without conflict for the exact algorithm, TS and CGA. The CGAaverage reports the average result for 6 trials and CGAbest is the best result. Table 13.5. Comparison of TS, CGA and Exact Algorithm (labels placed without conflict)
Where: a) Config.: configuration number. b) Res: labels placed without conflict. c) %: percentage of labels placed without conflict. d) ~ e s u l t (average): s average of not overlapping labels and percentage of labels placed without conflict, for exact algorithm, TS and CGA. The CGA and TS algorithms were tested on a Pentium I1 computer, and exact algorithm on a SUN - SPARC20 workstation, and therefore processing times are not comparables, but the workstation was necessary to accelerate the exact algorithm computer times.
13.7
CONCLUSION
This work has proposed and evaluated a CGA applied to the PFCLP problem. By using a standard set of randomly generated points and the same conditions described by [I], [I 11 and [13], the CGA showed better results in label placement quality than other methods published in the literature. The exact algorithm proposed in this work labels all points even if some of them present conflicts. The algorithm tries to reach the exact solution in a reasonable time, pruning the tree when the known beforehand estimative (provided from CGA) is better. The CGA and TS found results very close to exact solutions, and the CGA has better results in label placement quality than TS. The low density (in edges) of the conflict graph shows that some improvement can be done in
Genetic approach to point-feature cartographic label placement
301
CGA computer times if the graph is partitioned and solved by a computerdistributed system. The CGA can be recommended to solve the automatic cartographic label placement problem for point features.
ACKNOWLEDGEMENTS The first author acknowledges CoordenagCio de Aperfei~oamento de Pessoal de Nivel Superior (CAPES) for financial support. The second author acknowledges Conselho Nacional de Desenvolvimento Cientifico e Tecnol6gico - CNPq (process 300837189-5) for partial financial research support. The comments and suggestions of two anonymous referees were very useful and appreciated.
REFERENCES Chistensen, J.; Marks, J.; Shieber, S. An empirical study of algorithms for point-feature label placement. ACM Transactions on Graphics, 14 (3): 203-232, 1995. Dowsland, K. A. An exact algorithm for the pallet loading problem. European Journal of Operational Research, 3 l(1): 78-84, 1987. Hirsch, S. A. An algorithm for automatic name placement around point data. American Cartographer, 9(1): 5-17, 1982. Lorena, L.A.N.; Furtado J.C. Constructive genetic algorithm for clusteringproblems. Evolutionary Computation. 9(3): 309-327,2001. Loukakis, E. and Tsouros, C. Determining the number of internal stability of a graph. International Journal of Computer Mathematics. 11: 207 - 220,1982. Marks, J.; Shieber, S. The Computational Complexity of Cartographic Label Placement. TR-05-9 1, Center for Research in Computing Technology, Harvard University, 1991. Oliveira A.C.M.; Lorena L.A.N. A Constructive Genetic Algorithm for Gate Matrix Layout Problems. IEEE Transactions on Computer-Aided Designed of Integrated Circuits and Systems, 21 (8): 969-974,2002. Oliveira, A.C.M.; Lorena, L.A.N. 2-Opt Population Training for Minimization of Open Stack Problem. In Advances in Artificial Intelligence, G. Bittencourt and G. L. Ramalho (Eds). Springer Lecture Notes in Artificial Intelligence 2507: 3 l3-323,2002. Ribeiro Filho, G. and Lorena, L. A. N. "A constructive evolutionary approach to school timetabling," In Applications of Evolutionary
302
Metaheuristics: Progress as Real Problem Solvers
Computing, Boers, E.J.W., Gottlieb, J., Lanzi, P.L., Smith, R.E., Cagnoni, S., Hart, E., Raidl, G.R., Tijink, H., (Eds.). Springer Lecture Notes in Computer Science vol. 2037, pp. 130-139 - 2001 10. Strijk, T.; Venveij, B.; Aardal, K. Algorithms for Maximum Independent Set Applied to Map Labeling. September, Technical Report UU-CS2000-22, Department of Computer Science, Utrecht University, 2000. 42p. Available at flp:/~p.cs.uu.nl/pub/RUU/CS/techreps/CS-2000/2000-22.p~ 11. Vemer, 0. V.; Wainwright, R. L.; Schoenefeld, D. A. Placing text labels on maps and diagrams using genetic algorithms with masking. INFORMS J. on Computing, 9: 266-275, 1997. 12.Wolff, A.; Strijk, T. The Map Labeling Bibliography. http://illwww.ilkd.uni-karlsruhe.de/map-labeling~/ , 1996. 13. Yamamoto, M., Camara, G. and Lorena, L. A. N. Tabu search heuristic for point-feature cartographic label placement. GeoInformatica. Kluwer Academic Publisher, Netherlands, 6(1): 77-90,2002. 14. Zoraster, S. The solution of large 0-1 integer programming problems encountered in automated cartography. Operations Research, 38(5): 752-759, 1990.
Chapter 14
PARALLEL STRATEGIES FOR GRASP WITH PATH-RELINKING Renata M. Aiexl and Mauricio G.C. ~ e s e n d e ~ ~ e ~ a r t m e of n t Computer Science Catholic University of Rio de Janeiro Rua MarquCs de Siio Vicente, 225, Rio de Janeiro, RJ 22453-900, Brazil
~ l ~ o r i t h mand s Optimization Research Department AT&T Labs Research 180 Park Avenue, Room C241, Florham Park, NJ 07932, USA
[email protected]
Abstract: A Greedy Randomized Adaptive Search Procedure (GRASP) is a metaheuristic for combinatorial optimization. It usually consists of a construction procedure based on a greedy randomized algorithm and a local search. Path-relinking is an intensification strategy that explores trajectories that connect high quality solutions. We analyze two parallel strategies for GRASP with path-relinking and propose a criterion to predict parallel speedup based on experiments with a sequential implementation of the algorithm. Independent and cooperative parallel strategies are described and implemented for the bindex assignment problem and the job-shop scheduling problem. The computational results for independent parallel strategies are shown to qualitatively behave as predicted by the criterion. Keywords: Combinatorial optimization, job-shop scheduling, bindex assignment, local search, GRASP, path-relinking, parallel algorithm.
14.1
INTRODUCTION
GRASP (Greedy Randomized Adaptive Search Procedure) is a metaheuristic for combinatorial optimization [12, 13, 15, 331. A GRASP is an iterative process, where each iteration usually consists of two phases: construction and local search. The construction phase builds a feasible
304
Metaheuristics: Progress as Real Problem Solvers
solution that is used as the starting solution for local search. The best solution over all GRASP iterations is returned as the result. In the construction phase, a feasible solution is built, one element at a time. The set of candidate elements is made up of those elements that can be added to the current solution under construction without causing infeasibilities. A candidate element is evaluated by a greedy function that measures the local benefit of including that element in the partially constructed solution. The value-based restricted candidate list (RCL) is made up of candidate elements having a greedy function value at least as good as a specified threshold. The next element to be included in the solution is selected at random from the RCL. Its inclusion in the solution alters the greedy functions and the set of candidate elements used to determine the next RCL. The construction procedure terminates when the set of candidate elements is empty. A local search algorithm successively replaces the current solution by a better solution in its neighborhood, if one exists. It terminates with a locally optimal solution when there is no better solution in the neighborhood. Since the solutions generated by a GRASP construction phase are usually sub-optimal, local search almost always improves the constructed solution. GRASP has been used to find quality solutions for a wide range of combinatorial optimization problems [15]. Furthermore, many extensions and improvements have been proposed for GRASP. Many of these extensions consist in the hybridization of the method with other methaheuristics. We observe that hybrid strategies usually find better solutions than those obtained using the pure GRASP, having in some cases improved the solution for open problems in the literature [36, 35, 381. Hybrid strategies of GRASP with path-relinking have been leading to significant improvements in solution quality when compared to the solutions obtained by the pure method. Path-relinking was originally proposed by Glover [18] as an intensification strategy exploring trajectories connecting elite solutions obtained by tabu search or scatter search [19-211. The use of path-relinking within a GRASP procedure, as an intensification strategy applied to each locally optimal solution, was first proposed by Laguna and Marti [22]. It was followed by several extensions, improvements, and successful applications [I, 2, 9, 34, 381. The path-relinking approach consists in exploring trajectories that connect an initial solution and a guiding solution. This is done by introducing in the initial solution attributes of the guiding solution. At each step, all moves that incorporate attributes of the guiding solution are analyzed and the best move is chosen. In GRASP with path-relinking, one of these solutions is obtained by the local search phase of GRASP and
Parallel GRASP with path-relinking
305
the other is chosen among the solutions kept in an elite set of solutions found during the iterations of the algorithm. Parallel computers have increasingly found their way into metaheuristics [ll].A frequent question raised during the development of a parallel strategy is how the algorithm will behave when implemented in parallel as compared to a sequential implementation. The ideal situation is achieving linear speedup, i.e. when the execution time of the sequential program divided by the execution time of the parallel program running in p processors is equal to p. Methodologies to help analyze the behavior of parallel strategies are significant in the development of a parallel application. Most of the parallel implementations of GRASP found in the literature consist in either partitioning the search space or partitioning the GRASP iterations and assigning each partition to a processor. GRASP is applied to each partition in parallel. Examples of these strategies can be found in [4, 5, 14, 24-30, 321. For hybrid strategies of GRASP with path-relinking, two general parallelization approaches have been proposed. In the first one, named the independent approach, the communication among processors during GRASP iterations is limited to the detection of program termination. In the second approach, called the cooperative approach, processors share information on elite solutions visited during GRASP iterations. These strategies are classified according to Verhoeven and Aarts [43] as multiple independent trajectories and multiple cooperative trajectories, respectively. Examples of parallel GRASP with path-relinking can be found in [I, 2, 9, 371. In this paper, we analyze two parallel strategies for GRASP with path-relinking and propose a criterion to predict parallel efficiency based on experiments with a sequential implementation of the algorithm. Independent and cooperative parallel strategies are described and implemented for the 3-index assignment problem (AP3) and the job-shop scheduling problem (JSP). Though some of the material in this paper is derived from content in [l-31, this paper contains original contributions. First, it introduces the criterion to predict parallel efficiency with respect to the time taken to find a solution with a given target value, and applies the criterion to predict the quality of parallel independent implementations of GRASP with path-relinking for the 3-index assignment problem and the jobshop scheduling problem. Second, the paper offers an answer to why the independent parallel strategy for the 3-index assignment problem, described in [2], rarely achieves linear speedup. Third, it introduces a
306
Metaheuristics: Progress as Real Problem Solvers
new cooperative parallel strategy for the 3-index assignment problem. This strategy is shown to almost always achieve super-linear speedup. The remainder of this paper is organized as follows. In Section 14.2, the sequential implementations of GRASP and of path-relinking are described for both the AP3 and the JSP. Section 14.3 shows how GRASP and path-relinking are combined. The parallel approaches are discussed in Section 14.4. The computational results are reported and analyzed in Section 14.5. Concluding remarks are made in Section 14.6.
14.2
SEQUENTIAL GRASP
In this section, the GRASP implementations developed for the 3-index assignment problem in Aiex et al. [2] and for the job-shop scheduling problem in Aiex, Binato, and Resende [I] are reviewed. Path-relinking is generalized for these problems.
14.2.1
GRASP for the AP3
The 3-index assignment problem (AP3) was first stated by Pierskalla [31] as a straightforward extension of the classical two-dimensional assignment problem. The AP3 is NP-Hard [16, 171. A formulation of the AP3 (often called the three-dimensional matching problem) is the following: Given three disjoint sets I, J, and K , such that [I/= IJI = IKI = n and a weight cijk associated with each ordered triplet (i, j, k) E I x J x K , find a minimum weight collection of n disjoint triplets (i, j, k) E I x J x K. The AP3 can also be formulated using permutation functions. There are n3 cost elements and the optimal solution of the AP3 consists of the n smallest, such that the constraints are not violated. Assign to each set I, J, and K , the numbers 1,2,. . . ,n. None of the chosen triplets (i, j, k) is allowed to have the same value for indices i, j , and k as another. For example, the choice of triplets (1,2,4) and (3,2,5) is infeasible, since these triplets share index j = 2. The permutation-based formulation for the AP3 is n
where T N denotes the set of all permutations of the set of integers N = {I, 2 , . . . ,n}.
GRASP for the AP3 - Construction phase. The GRASP construction phase builds a feasible solution S by selecting n triplets, one at a time.
Parallel GRASP with path-relinking
307
A restricted candidate list parameter a is selected at random from the interval [0, 11. This value is not changed during the construction phase. Solution S is initially empty and the set C of candidate triplets is initially the set of all triplets. To select the p t h (1 5 p 5 n - 1) triplet to be added to the solution, a restricted candidate list C' is defined to include all triplets (i,j, k) in the candidate set C having cost cijk c+ a ( Z - c), where
<
c = min{cijk -
I (i,j, k) E C)
I
and E = max{cijk (i,j, k) E C).
Triplet (i,, j,, k,) E Cf is chosen at random and is added to the solution, i.e. S = S U {(i,, j,, k,)). Once (i,, j,, k,) is selected, the set of candidate triplets must be adjusted to take into account that (i,, j,, kp) is part of the solution. Any triplet (i,j , k) such that i = i, or j = j, or k = kp must be removed from the current set of candidate triplets. This updating procedure is the computational bottleneck of the construction phase. A straightforward implementation would scan all n3 cost elements n - 1 times in order to update the candidate list. In Aiex et al. [2], four doubly linked lists are used to implement this process more efficiently, reducing the complexity from 0 ( n 4 ) to 0(n3). After n - 1triplets have been selected, the set C of candidate triplets contains one last triplet which is added to S , thus completing the construction phase.
GRASP for the AP3 - Local search phase. The solution of the AP3 can be represented by a pair of permutations (p, q). Therefore, the solution space consists of all (n!)2possible combinations of permutations. Let us first define the difference between two permutations s and sf to be 6(s, s') = {i I s(i) # sf(i)), and the distance between them to be d(s, s') = 16(s,st)l. In this local search, a Zexchange neighborhood is adopted. A 2-exchange neighborhood is defined to be
The definition of the neighborhood N(s) is crucial for the performance of the local search. In the 2-exchange neighborhood scheme used in this local search, the neighborhood of a solution (p, q) consists of all 2exchange permutations of p plus all Zexchange permutations of q. This
308
Metaheuristics: Progress as Real Problem Solvers
means that for a solution p, q E rlv, the 2-exchange neighborhood is
+
Hence, the size of the neighborhood is I N2(p)l I N2(q)l = 2(:). In the local search, the cost of each neighborhood solution is compared with the cost of the current solution. If the cost of the neighbor is lower, then the solution is updated, the search is halted, and a search in the new neighborhood is initialized. The local search ends when no neighbor of the current solution has a lower cost than the current solution.
14.2.2
GRASP for the JSP
The job-shop scheduling problem (JSP) is a well-studied problem in combinatorial optimization. It consists in processing a finite set of jobs on a finite set of machines. Each job is required to complete a set of operations in a fixed order. Each operation is processed on a specific machine for a fixed duration. Each machine can process at most one job at a time and once a job initiates processing on a given machine it must complete processing on that machine without interruption. A schedule is a mapping of operations to time slots on the machines. The makespan is the maximum completion time of the jobs. The objective of the JSP is to find a schedule that minimizes the makespan. The JSP is NP-hard [23] and has also proven to be computationally challenging. Mathematically, the JSP can be stated as follows. Given a set M of machines (where we denote the size of M by [MI)and a set 3 of jobs (where the size of 3 is denoted by 131)let , a! 4 4 . . - 4 o f M Ibe
4
the ordered set of [MI operations of job j , where o i 4 oi,, indicates that operation can only start processing after the completion of operation a:. Let 0 be the set of operations. Each operation a; is is processed defined by two parameters: M; is the machine on which and = p(oi) is the processing time of operation oi. Defining to be the starting time of the k t h operation o i E 0, the JSP can be formulated as follows:
4
t(4)
Parallel GRASP with path-relinking
,, minimize C
> t ( 4 ) +p(d,), for all 4E 0 , (14.la) t ( d ) > t ( 4 ) + p(oi)), for all a! 4 d,, (14.lb) +p ( a ; ) ~ t (4)> t t ( d ) > t ( 4 ) +p(ai), for all a;,d, E 0 s.t. Mu; = Mui, t ( 4 ) > 0, for all a; E 0 ,
subject to: Cm,
(0;)
where C,,, is the makespan to be minimized. A feasible solution of the JSP can be built from a permutation of 3 on each of the machines in M, observing the precedence constraints, the restriction that a machine can process only one operation at a time, and requiring that once started, processing of an operation must not be interrupted until its completion. Since each set of feasible permutations has a corresponding schedule, the objective of the JSP is to find, among the feasible permutations, the one with the smallest makespan.
GRASP for the JSP - Construction phase. Consider the GRASP construction phase for the JSP, proposed in Binato et al. [8] and Aiex, Binato, and Resende [I], where a single operation is the building block of the construction phase. That is, a feasible schedule is built by scheduling individual operations, one at a time, until all operations have been scheduled. While constructing a feasible schedule, not all operations can be secan only be lected at a given stage of the construction. An operation scheduled if all prior operations of job j have already been scheduled. .1 operations Therefore, at each construction phase iteration, at most 17 are candidates to be scheduled. Let this set of candidate operations be denoted by 0, and the set of already scheduled operations by 0, and denote the value of the greedy function for candidate operation a{ by
4
h(d,). The greedy choice is to next schedule operation
Let -
4= argmax(h(d) I d E O,), h = h(d,), -
h = h(4).
and
310
Metaheuristics: Progress as Real Problem Solvers
Then, the GRASP restricted candidate list (RCL) is defined as
where a is a parameter such that 0 5 a 5 1. A typical iteration of the GRASP construction is summarized as follows: a partial schedule (which is initially empty) is on hand, the next operation o{ to be scheduled is selected from the RCL and is added to the partial schedule, resulting in a new partial schedule. The selected operation is inserted in the earliest available feasible time slot on machine M .. Construction ends when the partial schedule is complete, a: i.e. all operations have been scheduled. The algorithm uses two greedy functions. Even numbered iterations use a greedy function based on the makespan resulting from the inclusion of operation o i to the already-scheduled operations, i.e. h(oi) = , ,C for O = { ~ , u o i } . In odd numbered iterations, solutions are constructed by favoring operations from jobs having long remaining processing times. Pi), which meaThe greedy function used is given by h(ai) = - Co:BO, sures the remaining processing time for job j . The use of two different greedy functions produce a greater diversity of initial solutions to be used by the local search.
4
GRASP for the JSP - Local search phase. To attempt to decrease the makespan of the solution produced in the construction phase, we employ the Zexchange local search used in [I, 8, 421, that is based on the disjunctive graph model of Roy and Sussmann [39]. The disjunctive graph G = (V,A, E) is defined such that
is the set of nodes, where (0) and ( 131. [MI and sink nodes, respectively,
+ 1) are artificial source
is the set of directed arcs connecting consecutive operations of the same job, and E = {(v, W) I Mv = M w ) is the set of edges that connect operations on the same machine. Vertices 31.IM I 1 in the disjunctive graph model are weighted. Vertices 0 and 1
+
Parallel GRASP with path-relinlcing
311
3 1. IM(}is the have weight zero, while the weight of vertex i E (1,. . . , 1 processing time of the operation corresponding to vertex i. Notice that the edges of A and E correspond, respectively, to constraints (14.la) and (14.lb) of the disjunctive programming formulation of the JSP. An orientation for the edges in E corresponds to a feasible schedule. Given an orientation of E , one can compute the earliest start time of each operation by computing the longest (weighted) path from node 0 to the node corresponding to the operation. Consequently, the makespan of the schedule can be computed by finding the critical (longest) path from node 0 to node 1 3 1. [MI 1. The objective of the JSP is to find an orientation of E such that the longest path in G is minimized. Taillard [41] described an O(131 . [MI) algorithm to compute the longest path on G. He also showed that the entire neighborhood of a given schedule, where the neighborhood is defined by the swap of two consecutive operations in the critical path, can be examined (i.e. have their makespan computed) in time O(131 - IM I) given that the longest path of G was evaluated. Given the schedule produced in the construction phase, the local search procedure initially identifies the critical path in the disjunctive graph corresponding to that schedule. All pairs of consecutive operations sharing the same machine in the critical path are tentatively exchanged. If the exchange improves the makespan, the move is accepted. Otherwise, the exchange is undone. Once an exchange is accepted, the critical path may change and a new critical path must be identified. If no pairwise exchange of consecutive operations in the critical path improves the makespan, the current schedule is locally optimal and the local search ends.
+
14.2.3
Path-relinking
Using permutation arrays, we generalize path-relinking in this subsection for both the AP3 and the JSP. A solution of the AP3 can be represented by two permutation arrays of numbers 1,2,. . . ,n in sets J and K, respectively, as follows:
where j f k is the k-th number assigned to permutation i in solution S. Analogously, for the JSP, a schedule can be represented by the permutation of operations in 3 on the machines in M. The schedule is represented by [MI permutation arrays, each with 1 3 1operations. Each permutation implies an ordering of the operations. A solution of the
312
Metaheuristics: Progress as Real Problem Solvers
JSP is represented as follows:
where jfk is the k-th operation executed on machine i in solution S. A path-relinking strategy for permutation arrays is carried out as follows. For a problem represented with R permutation arrays of elements from a set E, path-relinking is done between an initial solution
and a guiding solution
where jf; is the k t h element of permutation i in solution S'. Let the difference between S and T be defined by the R sets of indices
During a path-relinking move, a permutation array in S, given by
is replaced by a permutation array
by exchanging permutation elements jCi and jCq, where i E 62T and q are such that j& = j&. At each step of the algorithm, the move that produces the lowest cost solution is selected and its index is removed from the corresponding set 6 2 T . This continues until there are only two move indices left in one of the sets 62T. At this point, the move obtained by exchanging these elements will produce the guiding solution. The best solution found during the path traversal is returned by the procedure.
14.3
GRASP WITH PATH-RELINKING
This section describes how path-relinking and GRASP can be combined to form a hybrid GRASP with path-relinking. We limit this discussion to single processor implementations and consider parallel strategies
Parallel GRASP with path-relinking
313
procedure GRASPPR(seed,look4, maxitr, maxpool,i,freq,problemdata) 1 P=0; 2 for i = 1 , . . . ,maxitr d o 3 CONSTRUCTION(seed,S , problem-data); 4 LOCAL(S,problemdata); 5 i f IPI == maxpool t h e n 6 accepted = VERIFY-QUALITY(S); 7 i f accepted t h e n 8 select P' P; 9 for T E P' d o 10 Sgmin = PATHRELINKING(costS,S , T ,problemdata); 11 UPDATEPOOL(Sgmin,costgmin,P ) ; 12 Sgmin = P A T H R E L I N K I N G ( C O S ~ ~ T , , S, problem-data); 13 U P D A T E P O O L ( S ~costgmin ~ ~ ~ , ,P); 14 r of; 15 fi; 16 else P = P U { S ) f i ; i f mod (i,ij+eq)== 0 t h e n 17 18 INTENSIFY(P); 19 fi; 20 Sbest = a r g m i n ( P ) ; 21 i f costbest 5 look4 t h e n 22 break; 23 fi; 24 rof; 25 POSTOPT(P); 26 Sbest = a r g m i n ( P ) ; 27 r e t u r n (Sbest); end GRASPPR;
Figure 14.1.
GRASP with path-relinking.
in the next section. Pseudo-code for the GRASP with path-relinking is presented in Figure 14.1. Let [PI be the size of the current elite set and let maxpool be the elite set's maximum size. The first maxpool GRASP iterations contribute one solution to the elite set per GRASP iteration (line 16). Path-relinking is not done until the pool of elite solutions is full. In lines 3 and 4, GRASP construction and local search phases are carried out. Each of these phases can be replaced by more elaborated mechanisms, as for example, the construction phase developed for the JSP that alternates between two different greedy functions. Once the pool of elite solutions is full, solution S produced by the local search phase of GRASP is tested to verify its quality (line 6). This is done to avoid relinking low-quality solutions. If S passes the quality test used, bidirectional path-relinking is done between S and all elements P (lines 7 to 15). In bidirectional path-relinking [2], of a subset P' two paths are analyzed: one from the GRASP solution to the selected
314
Metaheuristics: Progress as Real Problem Solvers
solution from the pool; another from the selected pool solution to the GRASP solution. The degree of restrictiveness of the quality test is a function of the computational time necessary to do path-relinking. For the AP3, the cost of a solution in the neighborhood of S can be computed from the cost of S in O(1) time and therefore, path-relinking is applied to all solutions obtained in the local search phase of GRASP. For the JSP, on the other hand, the cost of each solution visited by path-relinking is computed in O(131 - IMI) using the algorithm proposed in Taillard [41]. Therefore, it is computationally expensive to apply path-relinking after each GRASP iteration, and path-relinking is applied only when the GRASP solution satisfies a given quality criterion [I]. After each path-relinking phase, the best solution traversed during path-relinking is tested for inclusion in the elite pool (lines 11 and 13). Every ifreq GRASP iterations, an intensification procedure is carried out (lines 17 to 19). The intensification procedure [2] is accomplished by applying path-relinking to each pair of elite solutions in P and updating the pool when necessary. The procedure is repeated until no further change in P occurs. The GRASP with path-relinking loop from line 2 to 24 continues for at most maxitr iterations, but can be terminated when a solution having a cost less than or equal to look4 is found (lines 21 to 23). Finally, a path-relinking post optimization is done on the elite set (line 25). Path-relinking as a post-optimization step was introduced in Aiex et al. [2] and Ribeiro, Uchoa, and Werneck [38]and has been also used in Resende and Werneck [36,35]. After applying path-relinking between all pairs of elite solutions without any change in the elite set, the local search procedure is applied to each elite solution, as the solutions produced by path-relinking are not always local optima. The local optima found are candidates for insertion into the elite set. If a change in the elite set occurs, the entire post-processing step is repeated.
14.4
PARALLEL GRASP STRATEGIES
In this section, two parallel strategies for the GRASP with pathrelinking algorithm shown in Figure 14.1 are described. The first scheme, called independent, limits communication between processors only to problem input, detection of process termination, and determination of best overall solution. In addition to the communication allowed in the independent scheme, the second scheme, called cooperative, allows processes to exchange information about their elite sets.
Parallel GRASP with path-relinking
14.4.1
Independent parallel strategy
We revisit a basic parallelization scheme for GRASP with pathrelinking used in Aiex et al. [2]. Figure 14.2 shows pseudo-code for this multiple independent walks scheme. Our implementations use message passing for communication among processors. This communication is limited to program initialization and termination. When p processors are used, a single process reads the problem data and passes it to the remaining p - 1 processes. Processes send a message to all others when they either stop upon finding a solution at least as good as the target value look4 or complete the maximum number of allotted iterations. The independent parallel GRASP with path-relinking is built upon the sequential algorithm of Figure 14.1. Each process executes a copy of the program. We discuss the differences between the sequential algorithm and this parallel variant. In line l of Figure 14.2, the rank my-rank of the process and the number p of processes are determined. Each GRASP construction phase is initialized with a random number generator seed. To assure independence of processes, identical seeds of the random number generator (rand (1) must not be used by more than one process to initiate a construction phase. The initial seed for process my-rank is computed in lines 2 to 4. We attempt, this way, to increase the likelihood that each process has a disjunct sequence of maxitrlp initial seeds. The for loop from line 6 to line 36 executes the iterations. The construction, local search, and path-relinking phases are identical to those of the sequential algorithm. In line 23, if a process finds a solution with cost less than or equal to look4, it sends a flag to each of the other processes indicating that it has found the solution. Likewise, when a process completes maxitrlp iterations, it sends a different flag to each of the other processes indicating that it has completed the preset number of iterations (lines 24 to 27). In line 28, the process checks if there are any status flags to be received. If there is a flag indicating that a solution with cost not greater than look4 has been found, the iterations are terminated in line 30. If a flag indicating that some process has completed the preset number of iterations has been received, then a counter num-proc-stop of the number of processes that are ready to be terminated is incremented (line 32). If all processes have completed their iterations, the execution of the main for loop is terminated (line 35). Each process, upon terminating the for loop going from line 6 to line 36, runs the post-optimization phase on the pool of elite solutions
Metaheuristics: Progress as Real Problem Solvers
316
procedure INDEPENDENT-GRASPPR(seed,look4, maxitr, maxpool,ifreq, problemdata) 1 m y r a n k = GETRANK();p = GETNUM_PROCS(); 2 for i = 1,. ,(maxitrlp) * my-rank do 3 seed = rand(seed); 4 roc 5 P = 0;num-proc-stop = 0; 6 for i = 1, ...,XI do 7 CONSTRUCTION(seed,S , problem-data); 8 LOCAL(S,problemdata); if [PI == maxpool then 9 10 accepted = VERIF'Y-QUALITY(S); if accepted then 11 12 select P' P; 13 for T E P' do 14 Sgmin = PATH_RELINKING(wsts,S , T ,problemdata); 15 UPDATE900L(Sgmin,costgmin,P ) ; Sgmi, = P A T H R E L I N K I N G ( CT, OSS,~ problem-data); ~, 16 17 UPDATEPOOL(Sgmin,costgmin,P ) ; roc 18 19 fi; 20 else P = P U { S ) f i ; 21 if mod (i,ifreq) == 0 then INTENSIFY(P);f i ; 22 Sbest = argmin(P); if costbest 5 look4 then SENDALL(look4stop) f i ; 23 24 if i == maxitrlp then num-proc-stop = num-proc-stop 1; 25 26 SENDALL(maxitr-stop); 27 fi; received = VERIFY_RECEIVING( f lag); 28 29 if received then if flag == look4Aop then break; 30 else if flag == maxitr-stop then 31 num-proc-stop = num-procstop 1; 32 33 fi; 34 fi; if num-proc-stop == p then break f i ; 35 36 roc 37 POSTOPT(P); 38 SGlobalBest= GET-GLOBALEEST(Sbest); 39 return ( S ~ l o b d ~ e s t ) ; end INDEPENDENT-GRASPPR
..
+
+
Figure 14.2. Pseudecode for the independent parallel GRASP with path-relinking.
(line 37). A reduce operator (GET-GLOBALBEST)determines the global best solution among all processes in line 38. A pure GRASP parallel algorithm can be obtained from the algorithm in Figure 14.2 by skipping the execution of lines 9 to 19. As in a basic GRASP, it is necessary to keep track of the best solution found and no pool handling operations are necessary. Therefore, intensification and
Parallel GRASP with path-relinking
317
post-optimization are not defined in a parallel implementation of pure GRASP.
14.4.2 Cooperative parallel strategy In the cooperative parallel GRASP with path-relinking, processes share elite set information. We now describe this scheme, whose pseudocode is presented in Figure 14.3. This algorithm is built on top of the independent scheme presented in the previous subsection. We limit our discussion to the differences between the two schemes, which occur in the path-relinking phase. Before doing path-relinking between solutions S and T, each process checks if one or more other processes have sent it new elite solutions. If there are new elite solutions to be received, RECEIVESOLUTIONS (in lines 14 and 18) receives the elite solutions, tests if each elite solution can be accepted for insertion into its local elite set, and inserts any accepted elite solution. Upon termination of each path-relinking leg, if the local elite set is updated, then (in lines 17 and 21) the process writes the new elite solutions to a local send buffer. In line 23, if the local send buffer is not empty, the process sends the buffer's contents to the other processes. Another difference between the independent and cooperative schemes concerns the INTENSIFY procedure. In the cooperative scheme, whenever the local elite set pool is updated, the new elite solutions are written to the send buffer. These bufferized solutions will be sent to the other processes the next time that procedure SENDSOLUTIONS is invoked.
14.5 COMPUTATIONAL RESULTS This section reports on computational experiments with the parallel versions of the pure GRASP and GRASP with path-relinking proposed in Section 14.4. The parallel strategies have been implemented for both the AP3 and the JSP described in Section 14.2.
14.5.1 Computer environment The experiments were done on an SGI Challenge computer (16 196MHz MIPS RlOOOO processors and 12 194-MHz MIPS RlOOOO processors) with 7.6 Gb of memory. The algorithms were coded in Fortran and were compiled with the SGI MIPSpro F77 compiler using flags -03 -static -u. The parallel codes used SGI's Message Passing Toolkit 1.4, which contains a fully compliant implementation of version 1.2 of the Message-Passing Interface (MPI) [40]specification. In the parallel experiments, wall clock times were measured with the MPI function MPI-WT. This is also the case for runs with a single processor that are compared to
318
Metaheuristics: Progress as Real Problem Solvers
procedure COOPERATIVE-GRASPSR(seed, look4, maxitr, maxpool,ijkq,problemdata) 1 m y r a n k = GETJUNK();p = GETNUMPROCS(); 2 for i = I , . . .,(maxitrlp) * my-rank d o 3 seed = rand(seed); 4 roc 5 P = 0;numgroc-stop = 0; 6 for i = l , . . . ,ood o 7 CONSTRUCTION(seed,S,problemdata); 8 LOCAL(& problem-data) ; 9 i f lPl== maxpool t h e n 10 accepted = VERIFY-QUALITI(S); 11 i f accepted t h e n 12 select P' P; 13 for T E P' d o 14 RECEIVESOLUTIONS(P); 15 Sgmin = PATH_RELINKING(costs,S , T,problemdata); 16 updated = U P D A T E P O O L costgmin, ( S ~ ~ ~ ~P, ) ; i f (updated) t h e n INSERT-SENDEUFFER(Sg,i,, costgmin,buffer)f i ; 17 18 RECEIVESOLUTIONS(P); 19 Sgmin = P A T H _ R E L I N K I N G ( C OT~ ,~S,problemdata); ~, 20 updated = UPDATE900L(Sgmin,costgminlP ) ; 21 costgmin,buffer)fi; i f (updated) t h e n INSERT-SENDEUFFER(S~~~~, 22 roc 23 SENDSOLUTIONS(buffer); fi; 24 25 else P = P U ( S ) f i ; 26 i f mod (i,ijkq) == 0 t h e n INTENSIFY(P) f i ; 27 Sbest = a r g m i n ( P ) ; i f costbest 5 look4 t h e n SENDALL(look4stop) f i ; 28 i f i == maxitrlp t h e n 29 30 num-proc-stop = num-proc-stop 1; 31 SENDALL(maxitr-stop) 32 fi; 33 received = VERIFY_RECEIVING(f lag); 34 i f received t h e n i f flag == look4-stop t h e n break; 35 else i f flag == maxitr-stop t h e n 36 num-procstop = num-proc-stop 1; 37 38 fi; 39 fi; 40 i f num-proc-stop == p t h e n break fi; 41 r o c 42 POSTOPT(P); 43 SGl,b,lBest = G E T - G L O B A L E E S T ( ~ ~ ~ ~ ~ ) ; 44 r e t u r n (SGlobalBest); e n d COOPERATIVE-GRASPS&
+
+
Figure 14.3. Pseudo-code for the cooperative parallel GRASP with path-relinking.
multiple-processor runs. Timing in the parallel runs excludes the time to read the problem data, to initialize the random number generator seeds, and to output the solution.
Parallel GRASP with path-relinking
exponential quantlles
Ume to sub-optimal (8)
Figure 14.4. Exponential distribution and Q-Q plot for GRASP for the AP3: problem B-S 26.1 with target value (100k4) of 17.
Figure 14.5. Exponential distribution and Q-Q plot for GRASP with path-relinking for the AP3: problem B-S 26.1 with target value (loo&) of 17.
The parallel implementations were run on 2, 4, 8, and 16 processors. Load on the machine was low throughout the experiments, therefore processors were always available. The average speedups were computed dividing the sum of the execution times of the independent parallel program executing on one processor by the sum of the execution times of the parallel program on 2, 4, 8, and 16 processors, for 60 runs. The execution times of the independent parallel program executing on one processor and the execution times of the sequential program are approximately the same.
320
Metaheuristics: Progress as Real Problem Solvers
I 0
1
2 3 4 exponential quantlles
5
0
0
200 400 600 800 1000 1200 1400 1MK) 1 Ume to subdptimal (s)
Figure 14.6. Exponential distribution and Q-Q plot for GRASP for the JSP: problem orb5 with target value (loo&) of 910.
0
1
2 3 4 exponential quanffles
5
0
0
1WO
2000 3000 4000 Ume to subdptimal (s)
5000
Figure 14.7. Exponential distribution and Q-Q plot for GRASP with path-relinking for the JSP: problem orb5 with target value (loo&) of 895.
14.5.2
The parallel GRASP strategies
The following parallel algorithms were studied in these experiments: pure GRASP; independent GRASP with path-relinking; cooperative GRASP with path-relinking. Path-relinking was always applied between the GRASP solution and all solutions in the elite set. The parallel GRASP as well as the parallel GRASP with path-relinking used in the experiments are named GRASP(prob) and GRASP ~ R ( p r o b ) ,
+
Parallel GRASP with path-relinkhg
321
where prob indicates the problem type (AP3 or JSP). The parameters of the procedures used in the parallel approaches of GRASP for the AP3 and for the JSP are the same used for testing the sequential algorithms in Aiex et al. [2] and Aiex, Binato, and Resende [I], respectively. Intensification and post-optimization are not carried out during the experiments with the parallel implementations.
14.5.3
Test problems
For the AP3, we tested one problem of each size n = 20,22,24,26, generated by Balas and Saltzman [6]. We named these problems B-S 20.1, B-S 22.1, B-S 24.1 and B-S 26.1. For the JSP we tested problems abz6, mt10, orb5, and la21 from four classes of standard problems for the JSP. These problems were obtained from Beasley's OR-Library [7].
14.5.4
Probability distribution of solution time to target value
Aiex, Resende, and Ribeiro [3] studied the empirical probability distributions of the random variable time to target value in GRASP. They showed that, given a target solution value, the time GRASP takes to find a solution with cost at least as good as the target fits a two-parameter exponential distribution. Empirical distributions are produced from experimental data and corresponding theoretical distributions are estimated from the empirical distributions. A quantile-quantile plot (Q-Q plot) and a plot showing the empirical and the theoretical distributions of the random variable time to target value for sequential GRASP and GRASP with path-relinking for the AP3 are shown in Figures 14.4 and 14.5, respectively. Analogously, Figures 14.6 and 14.7 show the same plots for the JSP. These plots are computed by running the algorithms for 200 independent runs. Each run ends when the algorithm finds a solution with value less than or equal to a specified target value (l00k4). Each running time is recorded and the times are sorted in increasing order. We associate with the i-th sorted running time (ti) a probability pi = (i - ;)/200, and plot the points zi = (ti,pi), for i = 1,. . . ,200 as the empirical distribution. Following Chambers et al. [lo],we determine the theoretical quantilequantile plot for the data to estimate the parameters of the twoparameter exponential distribution. To describe &-& plots, recall that the cumulative distribution function for the two-parameter exponential
lhttp://mscmga.ms. ic.ac .uk/jeb/orlib/jobshopinfo .html
322
Metaheuristics: Progress as Real Problem Solvers
distribution is given by
where X is the mean and standard deviation of the distribution data and p is the shift of the distribution with respect to the ordinate axis. For each value pi, i = 1,.. . ,200, we associate a pi-quantile Qt (pi) of the theoretical distribution. For each pi-quantile we have, by definition, that F((Qt(pi)) = pi. Hence, Qt(pi) = F-l(pi)and therefore, for the two-parameter exponential distribution, we have
The quantiles of the data of an empirical distribution are simply the (sorted) raw data. A theoretical quantile-quantile plot (or theoretical Q-Q plot) is obtained by plotting the quantiles of the data of an empirical distribution against the quantiles of a theoretical distribution. This involves three steps. First, the data (in our case, the measured times) are sorted in ascending order. Second, the quantiles of the theoretical exponential distribution are obtained. Finally, a plot of the data against the theoretical quantiles is made. When the theoretical distribution is a close approximation of the empirical distribution, the points in the Q-Q plot will have a nearly straight configuration. If the parameters X and p of the theoretical distribution that best fits the measured data could be estimated a priori, the points in a Q-Q plot would tend to follow the line x = y. Alternatively, in a plot of the data against a two-parameter exponential distribution with A' = 1 and p' = 0, the points would tend to follow the line y = Ax p. Consequently, parameters X and p of the two-parameter exponential distribution can be estimated, respectively, by the slope and the intercept of the line depicted in the Q-Q plot. To avoid possible distortions caused by outliers, we do not estimate the distribution mean by linear regression on the points of the Q-Q plot. Instead, we estimate the slope j\ of line y = Ax p using the upper quartile qu and lower quartile ql of the data. The upper and lower quantiles, respectively. quartiles are, respectively, the Q(;) and We take = (xu -xl)/(qu - 4 as an estimate of the slope, where xu and xl are the u-th and 1-th points of the ordered measured times, respectively. These estimates are used
+
+
~(2)
Parallel GRASP with path-relinking
323
to plot the theoretical distributions on the plots on the right side of the figures. The lines above and below the estimated line on the Q-Q plots correspond to plus and minus one standard deviation in the vertical direction from the line fitted to the plot. This superimposed variability information is used to analyze the straightness of the Q-Q plots. The following can be stated for a two parameter (shifted) exponential distribution [3, 433. Let Pp(t) be the probability of not having found a given (target) solution in t time units with p independent processes. If PI(t) = e-(t-p)lx with X E R+ and p E R, i.e. PI corresponds to a two parameter exponential distribution, then Pp(t) = e-~(~-p)I'. This follows from the definition of the two-parameter exponential distribution. It implies that the probability of finding a solution of a given value in time pt with a sequential process is equal to 1 - e-(pt-p)lx while the probability of finding a solution at least as good as that given value in time t with p independent parallel processes is 1- e-p(t-p)lx. Note that if p = 0, then both probabilities are equal and correspond to the nonshifted exponential distribution. Furthermore, since p 1 1, if p(pl << A, then the two probabilities are approximately equal and it is possible to approximately achieve linear speed-up in solution time to target value using multiple independent processes.
14.5.5 Test to predict speedup of parallel implementations The observation above suggests a test using a sequential implementation to determine whether it is likely that a parallel implementation using multiple independent processors will be efficient. We say a parallel implementation is efficient if it achieves linear speedup (with respect to wall time) to find a solution at least as good as a given target value (loo&). The test consists in K (200, for example) independent runs of the sequential program to build a Q-Q plot and estimate the parameters p and X of the shifted exponential distribution. If plpl << A, then we predict that the parallel implementation will be efficient.
14.5.6
The parallel experiments
The goals of the experiments in this subsection are threefold. First, we attempt to verify computationally the validity of the test to predict speedup of parallel implementations proposed above. Second, we contrast independent parallel implementations of pure GRASP with GRASP with path-relinking. Finally, we compare independent parallel implementations of GRASP with path-relinking with cooperative imple-
324
Metaheuristics: Progress as Real Problem Solvers
Figure 14.8. Speedups for the parallel implementations of independent and coop erative GRASP with path-relinking for the AP3: problems B-S 20.1, B-S 22.1, B-S 24.1, and B-S 26.1 with target values 7, 8, 7, and 8, respectively.
mentations. Because of the nature of these experiments, the stopping criterion for maximum number of iterations was disabled, and the programs terminated only when a solution with cost as good as the target value was found. In Aiex et al. [2] and Aiex, Binato, and Resende [I], we verified that the times to target solution in the GRASP variants for the AP3 and the JSP fit a two-parameter exponential distribution.
Parallel results for the AP3. To study the parallel implementation of GRASP(AP3), we tested problems B-S 20.1, B-S 22.1, B-S 24.1, and B-S 26.1 with target values 16, 16, 16, and 17, respectively. The independent and cooperative parallel implementations of GRASP + PR(AP3) were studied for problems B-S 20.1, B-S 22.1, B-S 24.1, and B-S 26.1, with target values 7, 8, 7, and 8, respectively. The speedups and efficiencies (speedup divided by the number of processors used) observed for GRASP(AP~)are shown in Table 14.1. We also show the estimates for parameters p and X of the two-parameter exponential distribution, as well as the value of Ip(/X for each pair of instanceltarget value tested. By examining the parameters estimated for GRASP(AP3))we can group the instances into two categories:
Table 14.1. Speedup and efficiency for instances of the AP3. Algorithm is the parallel implementation of GRASP. Instances are B-S 20.1, B-S 22. I , B-S 24.1, and B-S 26.1, with target values 16, 16, 16, and 17, respectively. The estimated parameters for the exponential distributions are shown for each pair of instance/target value. estimated parameter prob. B-S20.1 B-S 22.1 B424.1 B-S 26.1 averaee:
P 1.28 -2.607 -2.890 26.36
X 90.18 185.21 246.55 252.90
2 IpI/X spdup 2.02 .014 2.03 .014 2.16 .011 1.62 .lo4 .034 1.95
number of processors 4 8 effic. spdup effic. spdup effic. 3.66 .91 1.01 6.05 .75 4.58 1.14 10.33 1.29 1.01 1.08 4.27 1.06 7.89 .98 3.22 .80 6.23 .77 .81 .97 3.93 .97 7.62 .95
16 spdup effic. 16.30 1.01 17.88 1.11 13.91 .86 11.72 .73 14.95 .93
Table 14.2. Speedups for instances of the AP3. Algorithms are independent and cooperative implementations of GRASP with pathrelinking. Instances are B-S 20.1, B-S 22.1, B-S 24.1, and B-S 26.1, with target values 7, 8, 7, and 8, respectively. estimated parameter prob. B-S 20.1 B-S22.1 B-S 24.1 B-S 26.1 averaee:
P -26.46 -135.12 -16.76 32.12
1223.80 3085.32 4004.11 2255.55
IPl/x .021 .043 .004 .014 .020
speedup independent (number of processors) 2 4 8 16 10.82 1.67 3.34 6.22 2.25 4.57 9.01 14.37 12.19 1.71 4.00 7.87 11.49 2.11 3.89 6.10 1.935 3.95 7.3 12.21
speedup cooperative (number of processors) 2 4 8 16 1.56 3.47 7.37 14.36 1.64 4.22 8.83 18.78 2.16 4.00 9.38 19.29 2.16 5.30 9.55 16.00 1.88 4.24 8.78 17.10
326
Metaheuristics: Progress as Real Problem Solvers
{ B-S 20.1, B-S 22.1, B-S 24.1 ) and { B-S 26.1 ). For instances B-S 20.1, B-S 22.1, and B-S 24.1, the ratio IpJ/A is approximately 0.01, while for runs on problem B-S 26.1, it is about 10 times greater. By our proposed criterion, we would expect that the runs in the first category present better speedups than the one in the other category, which indeed is what one observes. The super-linear speedups observed in problem B-S 22.1 are probably explained by statistical fluctuation. Some negative estimates for p observed in the table should be expected whenever the shift in the exponential distribution is small, since p is the intercept of the ordinate axis of the line defined by the first and third quartiles of the Q-Q plot. The speedups for the independent and cooperative parallel approaches of GRASP PR(AP3) are shown in Figure 14.8. In Table 14.2, the speedups observed in the plots of Figure 14.8 are summarized. The estimated values of p, A, and IpllA, using 200 independent runs of the sequential GRASP PR(AP3) are also shown. An approximately linear speedup is observed for the independent GRASP PR(AP3) for up to 8 processors. With 16 processors, we observe a reduction in the speedup, although we can still consider that the program scales well for up to 16 processors. The gradual degradation in speedup as the number of processors increases is expected and is due to the fact that the number of processors p offsets the ratio IpI/A, i.e. IpI/A 5 21pI/A 5 41pI/A 5 8l~l/A5 16I~l/A. For the cooperative parallel GRASP PR(AP3), we cannot make any prediction based on the ratio IpllA, since the processors share information and are therefore not independent. We observe that the cooperative approach benefited more than the independent approach from the increase in the number of processors. The increase in sharing of elite solutions compensated for the increase in inter-process communication. In fact, super-linear speedups can occur for the cooperative approach.
+
+
+
+
Parallel results for the JSP. The parallel GRASP(JSP) was tested on instances abz6, m t 10, orb5, and la21, with target values 960, 960, 920, and 1120, respectively. The independent and cooperative parallel GRASP PR(JSP) , were also tested on instances abz6, m t 10, orb5, and la21, but with more difficult target values 943, 938, 895, and 1100, respectively. Table 14.3 lists the values of p, A, and IpI/A for each tested pair of instance and target value, as well as the speedups and efficiencies for the 2, 4, 8, and 16-processor runs for the parallel GRASP(JSP). Speedups are, on average, approximately linear, in accordance with the low values observed for IpI/A in the table.
+
Table 14.3. Speedup and efficiencyfor instances of the JSP. Algorithm is the parallel implementation of GRASP. Instances are abz6, mt10, orbs, and la21, with target values 960,960,920, and 1120, respectively. The estimated parameters for the exponential distributions are shown for each pair of instance/target value.
I
estimated parameter prob. abz6 mtlO
orb5 la21 average:
P .42 11.72 1.24 -1.01
X 15.56 885.03 38.27 206.83
2 IpI/X spdup 2.04 .027 1.62 013 2.12 .032 1.94 .005 -019 1.93
effic. 1.02 .81 1.06 .97 .96
number of processors 4 8 16 spdup effic. spdup effic. spdup effic. 4.75 1.18 19.17 1.19 8.87 1.10 14.81 .92 4.07 1.01 7.34 .91 14.10 .88 3.97 .99 7.63 .95 19.63 1.22 4.98 1.24 8.13 1.01 4.44 1.10 7.99 .99 16.921.05
Table 14.4. Speedups for instances of the JSP. Algorithms are independent, and cooperative implementation of GRASP with pathrelinking. Instances are abz6, mtlO, orbs, and la21, with target values 943, 938, 895, and 1100, respectively. The estimated parameters for the exponential distributions are shown for each pair of instance/target value. estimated parameter prob. abz6 mtlO
orb5 la21 averace:
I-1
47.67 305.27 130.12 175.20
756.56 524.23 395.41 407.73
IPvX .06 .58 .32 .42 .34
speedup independent (number of processors) 2 4 8 16 6.44 10.51 2.00 3.36 1.57 2.12 3.03 4.05 5.36 2.97 3.99 1.95 2.25 3.14 3.72 1.64 1.79 2.67 4.15 5.91
speedup cooperative (number of processors) 2 4 8 16 2.40 4.21 11.43 23.58 8.36 16.97 1.75 4.58 2.10 4.91 8.89 15.76 2.23 4.47 7.54 11.41 2.12 4.54 9.05 16.93
Q~
&
328
Metaheuristzcs: Progress as Real Problem Solvers
Figure 14.9. Speedups for the parallel implementations of independent and cooperative GRASP with path-relinking for the JSP: problems abz6, mtlO, orbs, and la21 with target values 943, 938,895,and 1100,respectively.
The plots in Figure 14.9 show speedup for both parallel implementations of GRASP PR(JSP). Table 14.4 summarizes the speedups in Figure 14.9. The values of p, A, and IpllA are also shown. In accordance with the speedup prediction test, sub-linear speedups are observed for the independent approach of GRASP PR(JSP). We notice that the ratios IpI/A are much higher than those in Table 14.3 for GRASP(JSP), as well as for ratios computed for the AP3 instances. On the other hand, the table shows linear and super-linear speedups for most of the instances tested with the cooperative approach. These speedups are considerably higher than those observed for the independent approach. For example, for 16 processors, the average speedups for the cooperative approach are almost three times higher than those of the independent approach. These results show that cooperation is more critical in the JSP than in the AP3. This perhaps is because path-relinking is applied less frequently in the JSP runs than in the AP3 runs, due to the criterion used to avoid applying path-relinking to poor quality solutions in the JSP. Figure 14.10 shows empirical distributions for the parallel GRASP(JSP) , and the parallel independent and cooperative GRASP PR(JSP), using 16 processors. The programs were tested for problems abz6, m t 10,orb5 and la21, with target values 943, 938, 895, and 1100, respectively. We
+
+
+
329
Parallel GRASP with path-relinking 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0
10
1W
1WO
them suaopUmal(a)
Figure 14.10. Empirical distributions for 16 processor parallel implementations of pure GRASP, independent GRASP with path-relinking, and cooperative GRASP with path-relinking: problems abz6, m t l O , orb5 and la21, for target values 943, 938, 895, and 1100, respectively.
notice that for 16 processors, although parallel GRASP(JSP) scales better than the independent GRASP PR(JSP), the execution times of the latter are in general, lower than the execution times of the former. We also notice that the execution times of the cooperative GRASP PR(JSP) are considerably lower than the execution times of the parallel GRASP( J S P ) and of the independent GRASP PR( JSP).
+
+
+
14.6
CONCLUSION
Parallel computers have increasingly found their way into metaheuristics. In particular, many parallel implementations of GRASP have been described in the literature. Recently, parallel implementations of GRASP with path-relinking have been proposed. In this paper, we contrast independent and cooperative parallel schemes for GRASP with path-relinking with a parallel scheme for GRASP. We also propose a test using a sequential GRASP implementation to predict the speedup of independent parallel implementations.
330
Metaheuristics: Progress as Real Problem Solvers
Implementations for the 3-index assignment problem and the job-shop scheduling problem are described. Computational experiments are done on four instances from each problem. We conclude that the proposed test is useful for predicting the degree of speedup expected for parallel implementations of GRASP and GRASP with path-relinking. The results also show that parallel GRASP with path-relinking outperforms parallel GRASP and that the cooperative scheme outperforms the independent approach, often achieving superlinear speedups.
REFERENCES [I] R.M. Aiex, S. Binato, and M.G.C. Resende. Parallel GRASP with path-relinking for job shop scheduling. Parallel Computing, 29:393430, 2003. [2] R.M. Aiex, M.G.C. Resende, P.M. Pardalos, and G. Toraldo. GRASP with path relinking for the three-index assignment problem. Technical report, Information Sciences Research Center, AT&T Labs Research, Florham Park, NJ 07932 USA, 2000. To appear in INFORMS Journal on Computing. [3] R.M. Aiex, M.G.C. Resende, and C.C. Ribeiro. Probability distribution of solution time in GRASP: An experimental investigation. Journal of Heuristics, 8:343-373, 2002. [4] A. Alvim and C.C. Ribeiro. Balanceamento de carga na paraleliza@o da meta-heuristica GRASP. In X Simpdsio Brasileiro de Arquiteturas de Computadores, pages 279-282. Sociedade Brasileira de Computaqiio, 1998. [5] A.C.F. Alvim. Estrathgias de paralelizac$o da metaheuristica GRASP. Master's thesis, Departamento de InformAtica, PUC-Rio, Rio de Janeiro, RJ 22453-900 Brazil, April 1998. [6] E. Balas and M.J. Saltzman. An algorithm for the three-index assignment problem. Oper. Res., 39: 150-161, 1991. [7] J. E. Beasley. OR-Library: Distributing test problems by electronic mail. Journal of the Operational Research Society, 41:1069-1072, 1990. [8] S. Binato, W.J. Hery, D.M. Loewenstern, and M.G.C. Resende. A GRASP for job shop scheduling. In C.C. Ribeiro and P. Hansen, editors, Essays and Surveys on Metaheuristics, pages 58-79. Kluwer Academic Publishers, 2002.
Parallel GRASP with path-relinking
331
[9] S.A. Canuto, M.G.C. Resende, and C.C. Ribeiro. Local search with perturbations for the prize-collecting Steiner tree problem in graphs. Networks, 38:50-58, 2001. [lo] J. M. Chambers, W. S. Cleveland, B. Kleiner, and P. A. Tukey. Graphical Methods for Data Analysis. Chapman & Hall, 1983. [l11 S. Duni, P.M. Pardalos, and M.G.C. Resende. Parallel metaheuristics for combinatorial optimization. In R. Correa, I. Dutra, M. Fiallos, and F. Gomes, editors, Models for Parallel and Distributed Computation - Theory, Algorithmic Techniques and Applications, pages 179-206. Kluwer Academic Publishers, 2002. [12] T.A. Feo and M.G.C. Resende. A probabilistic heuristic for a computationally difficult set covering problem. Operations Research Letters, 8:67-71, 1989. [13] T.A. Feo and M.G.C. Resende. Greedy randomized adaptive search procedures. Journal of Global Optimization, 6:109-133, 1995. [14] T.A. Feo, M.G.C. Resende, and S.H. Smith. A greedy randomized adaptive search procedure for maximum independent set. Opemtions Research, 42:860-878, 1994. [15] P. Festa and M.G.C. Resende. GRASP: An annotated bibliography. In C.C. Ribeiro and P. Hansen, editors, Essays and surveys in metaheuristics, pages 325-367. Kluwer Academic Publishers, 2002. [16] A.M. Frieze. Complexity of a 3-dimensional assignment problem. European Journal of Operational Research, 13:161-164, 1983. [17] M.R. Garey and D.S. Johnson. Computers and intractability - A guide to the theory of NP-completeness. W.H. Freeman and Company, 1979. [18] F. Glover. Tabu search and adaptive memory programing - Advances, applications and challenges. In R.S. Barr, R.V. Helgason, and J.L. Kennington, editors, Interfaces in Computer Science and Operations Research, pages 1-75. Kluwer, 1996. [19] F. Glover. Multi-start and strategic oscillation methods - Principles to exploit adaptive memory. In M. Laguna and J.L. GonzdesVelarde, editors, Computing Tools for Modeling, Optimization and Simulation: Interfaces in Computer Science and Operations Research, pages 1-24. Kluwer, 2000. [20] F. Glover and M. Laguna. Tabu Search. Kluwer Academic Publishers, 1997. [21] F. Glover, M. Laguna, and R. Marti. Fundamentals of scatter search and path relinking. Technical report, Graduate School of Business
332
Metaheuristics: Progress as Real Problem Solvers
and Administration, University of Colorado, Boulder, CO 803090419, 2000. [22] M. Laguna and R. Marti. GRASP and path relinking for 2-layer straight line crossing minimization. INFORMS Journal on Computing, 11:44-52, 1999. [23] J. K. Lenstra and A. H. G. Rinnooy Kan. Computational complexity of discrete optimization problems. Annals of Discrete Mathematics, 4: 121-140, 1979. [24] Y. Li, P.M. Pardalos, and M.G.C. Resende. A greedy randomized adaptive search procedure for the quadratic assignment problem. In P.M. Pardalos and H. Wolkowicz, editors, Quadratic assignment and related problems, volume 16 of DIMACS Series on Discrete Mathematics and Theoretical Computer Science, pages 237-261. American Mathematical Society, 1994. [25] S.L. Martins, P.M. Pardalos, M.G.C. Resende, and C.C. Ribeiro. Greedy randomized adaptive search procedures for the Steiner problem in graphs. In P.M. Pardalos, S. Rajasejaran, and J. Rolim, editors, Randomization methods in algorithmic design, volume 43 of DIMACS Series on Discrete Mathematics and Theoretical Computer Science, pages 133-145. American Mathematical Society, 1999. [26] S.L. Martins, M.G.C. Resende, C.C. Ribeiro, and P.M. Pardalos. A parallel GRASP for the Steiner tree problem in graphs using a hybrid local search strategy. Journal of Global Optimization, pages 267-283, 2000. [27] S.L. Martins, C.C. Ribeiro, and M.C. Souza. A parallel GRASP for the Steiner problem in graphs. In A. Ferreira and J. Rolim, editors, Proceedings of IRREGUALAR798 - 5th International Symposium on Solving Irregularly Structured Problems in Parallel, volume 1457 of Lecture Notes in Computer Science, pages 285-297. SpringerVerlag, 1998. [28] R.A. Murphey, P.M. Pardalos, and L.S. Pitsoulis. A parallel GRASP for the data association multidimensional assignment problem. In P.M. Pardalos, editor, Parallel processing of discrete problems, volume 106 of The IMA Volumes in Mathematics and Its Applications, pages 159-180. Springer-Verlag, 1998. [29] P.M. Pardalos, L.S. Pitsoulis, and M.G.C. Resende. A parallel GRASP implementation for the quadratic assignment problem. In A. Ferreira and J. Rolim, editors, Parallel Algorithms for Irregularly Structured Problems - Irregular794, pages 115-133. Kluwer Academic Publishers, 1995.
Parallel GRASP with path-relinking
333
[30] P.M. Pardalos, L.S. Pitsoulis, and M.G.C. Resende. A parallel GRASP for MAX-SAT problems. Lecture Notes in Computer Science, 1184:575-585, 1996. [31] W.P. Pierskalla. The tri-subsitution method for the threemultidimensional assignment problem. CORS Journal, 5:71-81, 1967. [32] M.G.C. Resende, T.A. Feo, and S.H. Smith. Algorithm 787: Fortran subroutines for approximate solution of maximum independent set problems using GRASP. ACM Trans. Math. Software, 24:386-394, 1998. [33] M.G.C. Resende and C.C. Ribeiro. Greedy randomized adaptive search procedures. In F. Glover and G. Kochenberger, editors, Handbook of Metaheuristics, pages 219-249. Kluwer Academic Publishers, 2002. [34] M.G.C. Resende and C.C. Ribeiro. A GRASP with path-relinking for private virtual circuit routing. Networks, 41:104-114, 2003. [35] M.G.C. Resende and R.F. Werneck. A hybrid multistart heuristic for the uncapacitated facility location problem. Technical report, Internet and Network Systems Research Center, AT&T Labs Research, Florham Park, NJ, 2003. [36] M.G.C. Resende and R.F. Werneck. A hybrid heuristic for the p median problem. Journal of Heuristics, 10:59-88, 2004. [37] C.C. Ribeiro and I. Rosseti. A parallel GRASP for the 2-path network design problem. Lecture Notes in Computer Science, 2004:922-926, 2002. [38] C.C. Ribeiro, E. Uchoa, and R.F. Werneck. A hybrid GRASP with perturbations for the Steiner problem in graphs. INFORMS Journal on Computing, 14:228-246, 2002. [39] B. Roy and B. Sussmann. Les probl&mesd'ordonnancement avec contraintes disjonctives, 1964. [40] M. Snir, S. Otto, S. Huss-Lederman, D. Walker, and J. Dongarra. MPI - The complete reference, Volume 1 - The MPI Core. The MIT Press, 1998. [41] E. D. Taillard. Parallel taboo search techniques for the job shop scheduling problem. ORSA Journal on Computing, 6:108-117,1994. [42] E.D. Taillard. Robust taboo search for the quadratic assignment problem. Parallel Computing, 17:443-455, 1991. [43] M.G. A. Verhoeven and E.H.L. Aarts. Parallel local search. Journal of Heuristics, 1:43-66, 1995.
Chapter 15 SPEEDING UP LOCAL SEARCH NEIGHBORHOOD EVALUATION FOR A MULTI-DIMENSIONAL KNAPSACK PROBLEM Ross J.W. James Department of Management, Universityof Canterbury Private Bag 4800, Christchurch,New Zealand
Abstract: Three different techniques are developed for reducing the computational time required to examine the neighborhood in a local search. Each of the techniques is based on storing some form of sorted information on the problem in order to quickly determine the best move to make. Each technique requires varying amounts of memory and pre-processing time. Computational experiments found that all these techniques improved the computational performance of a tabu search heuristic considerably, however the more complex techniques were able to provide orders of magnitude speed increases over a tabu search based on an unordered neighborhood search.
Key words:
15.1
Local Search, neighborhood, multi-dimensional knapsack.
INTRODUCTION
The computational time of a local search heuristic is dependent on many different factors. Some of these are related to the characteristics of the problem being solved - such as its size or the nature of its objective h c t i o n , which in itself may take a great deal of time to compute. Other factors, however, are more related to the formulation and implementation of the problem, for instance: The neighborhood scheme(s) used, The method of selecting neighboring moves,
336
Metaheuristics: Progress as Real Problem Solvers
The data structures used to represent the problem The ease of changing elements to reflect neighboring solutions, The efficiency of the algorithm's code, and The computational environment -for example processor speed, memory size and speed, and number of processors. For local search heuristics computational speed is not essential as there is always the opportunity to trade off solution quality against having less efficient code. It is clear, however, that gains made in improving computational speed are likely to improve the overall quality of the solutions found, as more iterations can be performed in a given amount of time. The issue of computational efficiency becomes very important when dealing with large problems with neighborhood schemes that are exponentially proportional to the problem size. In order to overcome this problem, researchers have either limited the number of iterations executed by the search or reduced the number of neighborhood elements considered in some manner. For example, Laguna et al. [I] restricted the number of neighbors examined in each iteration by examining a subset of items that could be moved, while Reeves [2] achieved a similar result by restricting the number of positions where the items could be moved to. Other techniques reduce the number of candidates by identifying promising candidate solutions or preferred attributes of neighbors and only trying those specific neighbors [3]. The attraction of the latter techniques is that they will attempt to reduce the chance of missing good quality neighbors. Another method of reducing the number of neighbors evaluated is to use the 'First-Improving' rather than the 'Best-Improving' move criterion, that is moving as soon as a better neighbor is found rather than moving to the best possible neighbor. All of these techniques will produce a less "intense" search, as the local neighborhood is not searched as thoroughly as it could be. In some problem situations this may not be a drawback, as the solution space topology may be relatively smooth and have many paths to the local optima. In other situations the solution space topology may be rough and therefore more care is needed in evaluating the neighboring solutions and therefore a more intense neighborhood search is required. In this paper we examine several different techniques for reducing the computational time required by a local search solving the Multi-Dimensional knapsack problem by targeting evaluation of the neighborhood. As a result of this speed increase either a more intense search of the solution space can be pursued or more iterations can be performed within a given amount of time. Although the techniques proposed here are specific to the Multidimensional Knapsack problem the principle of using simple data structures in order to increase the speed of a neighborhood evaluation is more generic.
Speeding up local search neighborhood evaluation Computational experiments compare the conclusions are drawn.
15.2
337
different techniques and
Neighbor Evaluation
Major improvements in the computational performance of a local search may be found by focusing on the method used to evaluate the neighboring solutions. Because this process is executed so many times during a search, small increases in computational efficiency can yield large increases in the overall performance of the search. A potential area for improvement in the neighbor evaluation process is to reduce the number of duplicate calculations between iterations. In many instances the same data is present in the solution from one iteration to the next, due to the move only slightly changing the solution thereby resulting in calculations being duplicated between iterations. The reduction or elimination of this duplication of effort could provide substantial gains in computational speed. Glover et al. [3] allude to this concept of reducing computational time when they talk of how (when the number of neighbors is small) it may be advantageous to store the change in objective function for each move from a solution to facilitate more efficient calculation of the next set of neighbors. Johnson and McGeoch [4] discuss a similar concept, involving speeding up the evaluation of traveling salesman problem neighbors by using, for each city, a list of all other cities sorted by increasing distance from the city. This speeds up the evaluation as the search only considers moves where the new edge is smaller than the current dropped edge. Johnson and McGeoch [4] also highlight two drawbacks of this approach: the first is the amount of memory required as the size of the problem increases, while the second is the amount of time required initially to create the information and to manipulate it into the required form, for example having to sort the cities by distance. An analogy can be made here with a factory that produces products with many different configurations. If the factory makes an item to order (maketo-order) then it takes a lot of time to fill the order but requires little inventory, whereas if all possible options were pre-made (make-to-stock) then it would not take long to fill the order, but this solution incurs an enormous amount of inventory. The compromise between these two extremes is assembling the components of the final product into final goods when an order is received (assemble-to-order). Local search heuristics have traditionally been formulated more like the make-to-order environment making calculations when needed and storing very little in memory. The make-to-stock option is infeasible for most problems of any practical size
338
Metaheuristics: Progress as Real Problem Solvers
due to combinatorial explosion of the solution space and, as a result, the exponentially large amount of memory that would be required. However some form of assemble-to-order would be possible in this scenario, using more memory in order to get more speed. The question is how much pre-processing should be done in order to get the biggest increase in computational speed? We clearly need to consider the trade-off between pre-processing time and running time. Clearly, as the total time available for the search increases, the more beneficial higher levels of pre-processing will become in terms of the number of iterations able to be achieved.
15.3
Multi-Dimensional Knapsack Problems
The multi-dimensional knapsack problem is used as the base problem for developing these pre-processing techniques; it is a well known problem that has many different applications [5]. The multi-dimensional knapsack problem can be defined as:
maximize
Cpixi n
subject to x r j i x i i bj for j
E {1,2,..,m}
i=l
xi E {O,l} for i E {1,2,....n} where n is the number of items, m is the number of constraints, pi is the value of item i, rji is the coefficient of item i for constraint j, bj is the maximum right hand side value for constraintj and xi is the decision variable that is 1 if item i is taken in the knapsack. The multi-dimensional knapsack problem has been solved in using various meta-heuristics, including Simulated Annealing [6], Genetic Algorithms [7,5,8], Tabu Search [9, 10, 11, 121 and Scatter Search [13]. In this paper we use a simple Tabu Search (TS) approach to solve this problem. The TS has a fixed tabu list size, and no long or intermediate term memories. The aspiration criterion is to accept a tabu move if it is better than the best move found to date. The neighborhood scheme enforces feasibility of solutions by using an Add-then-Drop scheme. Under this scheme, an item is added to the knapsack, then one or more items are removed (other than the one just added) in order to resolve any constraint violations. In all cases a 'Best-Improvement' scheme is used. Primarily we will be comparing the number of iterations performed by the simple TS using the various techniques proposed in this paper, however, we will also
Speeding up local search neighborhood evaluation
339
compare the overall performance of the simple TS with the optimal or best known solutions to the set of benchmark problems used.
15.4
Techniques for Speeding Up the Neighborhood Search
In order to speed up the neighborhood search we break the Add-thenDrop neighborhood scheme into its two distinct phases, the Add phase and the Drop phase. The Add phase will always add one item to the knapsack, while the Drop phase will drop zero, one or more items in order to bring the solution back to feasibility. The techniques proposed here focus primarily on the Drop phase of the neighborhood scheme. In its most basic form the Drop phase removes each item in turn (other than the item added in the Add phase) from the knapsack and checks for feasibility. If the move is feasible, then the value of the solution is assessed. The move that produces the highest objective fbnction value is the move chosen, as the best-improving scheme is implemented in this search. If, however, no feasible solution is found, then the lowest valued item is removed from the knapsack and the process repeated. In order to illustrate the various techniques, an eight item, three constraint example problem is used. The coefficient and right hand side data for this problem are outlined in Table 15.1. Table 15.1. Coefficientsfor the Example Problem
Item # 1
Objective 9
1 19
Constraint 2 20
3 3
For illustrative purposes the starting solution will include items 3 , 6 and 7 This solution has an objective value of 46 and a total left hand side of 65, 5 1 and 34 for constraints 1,2 and 3 respectively. We then consider the situation when item 5 is added to the knapsack. This takes the LHS totals to 80, 55 and 48 respectively, exceeding the constraint RHS by 14, 4 and 13
340
Metaheuristics: Progress as Real Problem Solvers
respectively. The techniques explained below will determine which item to drop.
15.4.1 The Sorted Index Technique The first technique used for speeding up the drop process, which we called SORTED, simply requires the use of a sorted list of all items in ascending value order. Instead of considering items in the order that they are presented in the problem, the items are considered in ascending value (i.e. objective coefficient) order. The first item that is currently taken and when removed makes the solution feasible will be the best item to drop and no further examination of the neighborhood is required. This is easy to prove as all subsequent items that are considered have higher values and therefore when removed will have a lower overall objective function value. In the case when the removal of one item will not return the problem to feasibility, the taken item with the smallest objective value, which is not tabu, is removed, and the process is repeated until feasibility is reached. This technique is extremely simple to implement and the amount of setup time is proportional to the time taken to sort the items, while storage space is linearly proportional to the size of the problem. In the case of our example the order for the items would be 2,8, 1,4,6,7, 5,3. We would therefore start by considering dropping item 2. As item 2 is not currently taken we move to the next item, item 8. Again item 8 is not taken so we move to item 1. Item 1 is not taken so we move to item 4. Item 4 is not taken so we move to item 6. Item 6 is taken and removing this item allows us to obtain a feasible solution with an objective of 52. No more testing is needed as all other possible neighbors will have lower objective function values.
15.4.2 The Sorted Constraint Sections Technique The Sorted Constraint Sections technique creates and uses a data structure that allows it to quickly find the set of items that potentially have sufficiently large constraint coefficient values to bring the solution back to feasibility. The data structure is organized initially in a tree-like structure with each level of the tree being a given constraint and each branch of the tree indicting those items that have a coefficient value for the given constraint greater than a given value. At the bottom of the tree (the leaves) is a list of items meeting the constraint specifications specified by the branches. Only these items need to be considered for deletion.. The branches break the range of constraint coefficient values into s equally spaced sections between the minimum and maximum constraint coefficient
Speeding up local search neighborhood evaluation
341
values. The value of s is defined by the user, however, due to memory limitations, we only trialed s values of 2 , 4 and 8. The table is constructed so that the list of items in each section is in ascending objective function value order. The time to create the table is dependent on the number of sections and the number of constraints involved. Once created finding the item to remove is a simple case of determining how much each constraint needs to be reduced by in order to bring the solution back to feasibility. This is achieved by accessing the appropriate section representing the appropriate range of constraint coefficient levels and working through the list of items with those levels. As the list is in ascending value order, the first item that can be removed and will bring the solution to feasibility will be the best move possible. In the case when the removal of one item will not return the problem to feasibility the taken item with the smallest objective value, which is not tabu, is removed and the process is repeated until feasibility is reached. It is expected that the more sections used, a smaller number of items will need to be searched, but this is at the expense of a lot more memory being required to store the table. Memory requirements are in the order of smn, therefore the number of constraints has an exponential impact on the amount of memory required for this technique. For our example problem we will use two constraint sections. In order to create the sections for each constraint we take the maximum and the minimum constraint coefficients and break the range into equal portions. For constraint 1 the maximum is 27 and minimum is 9, therefore the range is split at < 18 and 2 18. Similarly for constraints 2 and 3, where the splits are at 15.5 and 12.5 respectively. The final data structure used for this problem is shown in Figure 15.1. From the data structure in Figure 15.2 we can easily determine what items potentially could resolve the feasibility issues here. If we look at the amount the constraints are violated, i.e. 14, 4, 13 for constraints 1, 2 and 3 respectively, we follow through the data structure to find the appropriate list of items. For the first constraint, as 1 4 4 8 , the list will be in the first section. For the second constraint as 445.5, the list will be in the first section. For the third constraint, as 13>12.5 the list will be in the second section. Therefore the list of potential items, in order of preference, will be 8, 6, and 5. As item 8 is not currently taken we move to item 6. Removing item 6, as stated previously, finds the best feasible solution.
Metaheuristics: Progress as Real Problem Solvers Constraint Sections (2)
Constraint 1
< 18
218
I Constraint 2
Constraint 3
Figure 15.1. Sorted Constraint Section Data Structurefor the Example Problem
15.4.3 The Sorted Constraint Coefficient Technique The Sorted Constraint Coefficient technique, like the Sorted Constraint Sections technique, also utilizes the amount each constraint is violated in order to reduce the number of items that need to be examined. This technique uses a table that contains, for each constraint and for each item, a sorted list of items (in ascending objective value order) that have a constraint coefficient greater than or equal to that item's constraint coefficient. By processing each constraint in turn, we will create m lists of items. Due to the ordering of the lists, the first item that appears in all m lists that can be removed from the knapsack will be the item that should be dropped. However the process of integrating these lists is quite time-consuming and, when tested, was slower than simply searching all possible items to drop! A simpler and quicker alternative to finding the intersection of the lists is to use the constraint list with the smallest number of items and process each item in turn,checking for feasibility on all the other constraints. The first item that can be deleted that meets all the feasibility requirements is the one to drop. If there is no one item that can be dropped to restore feasibility then the item with the lowest objective value that is not tabu is dropped and the process is repeated. For this technique the memory requirements are m(%n2), which means that the memory requirement increases linearly with the number of
Speeding up local search neighborhood evaluation
343
constraints, and therefore this technique will be better able to cope with problems with a greater number of constraints than the Sorted Constraint Sections technique. For our example the resulting table is presented in Figure 15.2. In order to determine which set of items to consider we first check the amount of constraint violation. For constraint 1 with a violation of 14, we will need the list of items with a constraint 1 coefficient of 14 or more, i.e. the list with 2,8,1,6,7,5. For constraint 2 with a violation of 4, we will need the list of items with a constraint 2 coefficient of 4 or more, i.e. the list with 2,8,1,4,6,7,5,3. For constraint 3 with a violation of 13, we will need the list of items with a constraint 3 coefficient of 13 or more, i.e. the list with 8,6,5. As the constraint 3 list is the shortest we use this list to determine the item to drop. We then consider each item in the list in turn, starting with item 8. As item 8 is not currently taken we move to item 6. Removing item 6, as stated previously, finds the best feasible solution.
I
Constraint 1
I
Constraint 2
1
Constraint 3
1
Format used for the initial constraint list is: Item # (Constraint Coefficient)
Figure 15.2. Table for the Example problem using the Sorted Constraint Coeficient Technique
344
15.5
Metaheuristics: Progress as Real Problem Solvers
Computational Experiments
In order to test the efficiency of the different procedures we used the 0-1 Multi-dimensional knapsack problems developed by Chu and Beasley [5] and available from the OR-Library [14]. Problem sizes of (in the form of number of variables x number of constraints) 100x5,500x5,250x10,500x10 and 500x30 were used to compare the number of iterations performed in a time limit of 120 seconds, excluding the preparation time required for each technique. As the Tabu search is identical for each variant trialed, each search will follow exactly the same path, just at different speeds. All computational Experiments were performed on a computer running Windows XP with a 1.53Ghz AMD-Athlon XP processor and 1Gb RAM. All code was programmed in Microsoft Visual C++ V6.0. Table 15.2 shows the number of iterations achieved in these experiments from each technique and percentage improvement in the number of iterations from the NaYve, Non-sorted search. Note that a "-" in the table indicates that there was insufficient memory to create the table for solving this problem. How tight the constraints are in the problem, that is how small the bj value is, can dictate how difficult it is to solve the problem. The tightness of the problem can be defined by the tightness ratio (a), which is defined as a = bj /z:=,rjiby Chu and Beasley [5]. Table 15.3 breaks the analysis of the techniques down in terms of the problems' tightness ratio. Table 15.4 shows the amount of set up time required for each of the techniques in seconds. As all of these techniques are taking exactly the same search path, the question remains as to whether increasing the number of iterations actually increases the overall performance of the search. To answer this question Table 15.5 takes the best solution obtained from all the search techniques, essentially showing the potential of the search path, and compares this to the optimal or best known solutions as an average percentage deviation. From the results in Tables 15.2-15.5 we can make several observations about the techniques proposed. When we compare the NaYve search and the Sorted search we can see that overall we consistently obtain more moves with the Sorted search. However, when the tightness ratio is small, i.e. there are few items taken in the knapsack, then there is little difference in the performance between the two techniques. The larger the tightness ratio, the better the sorted technique performs when compared to the Nalve search.
Speeding up local search neighborhood evaluation Table 15.2. Average number of Iterations achieved in 120 seconds andpercentage improvement in the number of iteratiom from the NaiLe Non-sorted Neighborhood search. Problem Size
NaYve
100x5
575,312
500x5
25,419
250x10
59,338
500x10
13,647
708,880 (23%) 37,949 (49%) 77,491 (31%) 21,363 (57%)
500x30
6608
9252 40%
Sorted
2 Constraint Section 1,508,202 (162%) 135,235 (432%) 243,301 (310%) 84,098 (5 16%)
4 Constraint Section 2,234,95 1 (288%) 244,989 (864%)
8 Constraint Section 2,128,564 (270%) 199,923 (686%)
Constraint Coefficient 2,037,400 (254%) 169,768' (568%) 366,892 (5 18%) 116,257 (752%) 61738 (834%)
Table 15.3. Average Number of Iterations achieved in 120 seconds at each Tightness Ratio Problem Size
NaYve
Sorted
Tightness Ratio = 0.25 100x5 486,293 432,683 500x5 23,399 23,624 250x10 55,912 52,726 500x10 12,953 15,362 500x30 6,463 7,266 Tightness Ratio = 0.50 100x5 5 11,007 578,725 500x5 20,559 28,587 250x10 49,827 60,313 500x10 11,575 17,538 500x30 5,845 7,820 Tightness Ratio = 0.75 100x5 728,637 1,115,233 500x5 32,300 61,635 250x10 72,277 119,434 500x10 16,415 31,188
2 Constraint Section
4 Constraint Section
8 Constraint Section
Constraint Coefficient
346
Metaheuristics: Progress as Real Problem Solvers
Table 15.4. Average Setup Time in Seconds Problem Size
NaYve
Sorted
100x5
0.00
<0.01
2 Constraint Section <0.01
4 Constraint Section <0.01
8 Constraint Section 0.06
Constraint Coeficient
<0.01
Table 15.5. Average Solution Quality of the Best Solution foundporn all the techniques after the time in seconds Problem Size
Source of Optimal or Best Known
100x5 500x5 250x10 500x10 500x30
Optima from r51 ~ptimafromc<] Best Known from [5] Best Known from [12] Best Known from [12]
Average - % Deviation from Best or Optimal after time given in seconds Start 30 60 90 120 18.9% 0.34% 0.34% 0.34% 0.34% 17.1% 0.74% 0.63% 0.56% 0.54% 17.7% 0.68% 0.62% 0.57% 0.55% 16.8% 1.26% 1.1 1% 1.03% 0.95% 17.5% 1.27% 1.12% 1.05% 1.01%
The performance gain between the simple Sorted technique and the Sorted Constraint Section Techniques is very pronounced. By using two sections, in nearly every instance we more than doubled the number of iterations achieved. When using the Sorted Constraint Section Technique with four sections, we start to strike memory limitations with problems with 10 constraints and therefore we were unable to solve these problems. For those problems with 5 constraints, we again find that we increase our performance with four sections in the order of another 45-90% over having two sections. We would expect a similar gain when we move from 4 sections to 8 sections with the Sorted Constraint Section Technique, however what we actually found was that the technique slows down, although it is still faster than having just two sections. This result appeared to defy all logic until it was realized the importance of the computer's CPU configuration on the performance of the search. The CPU being used has a large amount of very fast cache memory that is used to store memory elements which are frequently accessed, as is the case for our table. Once the table size increased beyond the size of the cache memory, it then had to be stored in normal memory. The end result of this was that accessing the table slowed down the processing speed hence slowing down the overall speed of the search. In order to confirm that this was in fact what was happening, the code was run on an older CPU which only contained a small
Speeding up local search neighborhood evaluation
347
amount of cache memory that would not be large enough to hold the 4 sectioned table. The results came out as we initially expected, i.e. the foursectioned search was considerably slower than the eight-sectioned search. This result demonstrates that care is required when making statements about the relative performance between algorithms and heuristics, as often the advanced nature of the CPU being used can have a dramatic, and sometimes unplanned, impact on these results. The Sorted Constraint Coefficient technique performance was better than the Sorted Constraint Section technique with two sections, but worse than the same technique with four sections. The Sorted Constraint Coefficient technique was, however, able to find solutions within the tolerance range for problems with a larger number of constraints and was the fastest technique for solving these problems. Given the memory limitations imposed the Sorted Constraint Coefficient technique would be the technique of choice for problems with large numbers of constraints, while the Sorted Constraint Section technique would be the technique of choice for problems with a small number of constraints. If a substantially larger amount of memory was available, then the Sorted Constraint Section technique may prove to be faster. Preparation times were not included in the time limits imposed on the searches for this research, the reason being that the impact that the preparation time has on the search will depend on how long the user intends to run the search for. If it is to be run for a long time, then the payoff for using these techniques is likely to be large, whereas, if it is to run for a very small amount of time, then there is less likely to be a large payoff. As can be seen in Table 15.4, the preparation time required is actually very small, in all but one case requiring less than 0.5 second, with the Sorted Constraint Coefficient technique requiring the most time. In general this preparation time was strongly proportional to the number of items, due to the need for sorting these items. The information on the search quality in Table 15.5 demonstrates that the simple tabu search procedure implemented in this research produces reasonable quality results after a very short period of time. In all but the 100x5 case the average solution is improving over the 120 seconds, however the majority of the improvement is carried out in the first 30 seconds. These results may also suggest that further diversification strategies may be required to increase the overall performance of the search. The 120 second time limit may also be the main factor limiting the results for the larger 500x30 problems as the number of iterations able to be performed is an order of magnitude smaller than those achieved for the smaller problems.
348
15.6
Metaheuristics: Progress as Real Problem Solvers
Summary and Conclusions
This paper introduces three different techniques for speeding up the neighborhood search for the 0-1 Multi-Dimensional Knapsack problem. The techniques range from a simple sorting of the items through to the use of pre-categorized sets of items which provide specific sets of items to trial. Even the simplest technique provided a speed improvement for most classes of problems, while the more advanced techniques were able to carry out over nine times more iterations than the nalve search in the time given. The technique of choice depends on the number of constraints present in the problem. If there are only a few constraints, then the Sorted Constraint Section techniques with 4 sections provided the best results on the CPU and memory configuration in which we performed the tests. Other configurations may produce different results. If there are a large number of constraints then the clear choice is the Sorted Constraint Coefficients technique, which performs well under all circumstances and its memory requirements only grows linearly with the number of constraints. If suitably large amount of memory were available then the Sorted Constraint Section technique will provide the best performance. Although the techniques proposed here are specific to the 0-1 MultiDimensional Knapsack problem, the concept of pre-computing elements of a neighborhood scheme in order to speed up the overall search should be able to be universally applied to many different problems. In many cases simple changes can make a dramatic improvement to the computational performance of the search. Even though the tabu search used here is a relatively simple implementation, even more complex tabu search implementations are likely to experience similar performance improvements. In some instances the data structure could be used for finding more than one alternative neighbor by finding the k best moves for a given Add move to provide, for example, an extended candidate list. Due to the sorted nature of the data structures we are assured of the level of quality of the solutions found. The techniques could easily be applied to other meta-heuristics as well. For example a Simulated Annealing could be used with an "Add" neighborhood scheme randomly chosen and the Drop being automatically executed by one of the proposed techniques. Again this would save similar CPU time in the execution of the iteration and hence increase the number of iterations achieved. The application of these principles to either different problems or different meta-heuristics is clearly a fertile area for future research.
Speeding up local search neighborhood evaluation
REFERENCES Laguna M, Barnes JW, Glover F. Tabu Search Methods for a Single Machine Scheduling Problem. Journal of Intelligent Manufacturing 1991; 2: 63-74 Reeves CR. Improving the efficiency of tabu search for machine sequencing problems. Journal of the Operational Research Society 1993; 44: 375-382 Glover F, Taillard E, de Werra D. A user's guide to tabu search. Annals of Operations Research 1993; 4 1: 3-28 Johnson DS, McGeoch LA The Travelling Salesman Problem: A Case Study in Local Optimization. In Aarts E, Lenstra JK (Eds). Local Search in Combinatorial Optimization, Chichester, UK: John Wiley & Sons, 1997. p 215-310 Chu PC, Beasley JE. A Genetic Algorithm for the Multidimensional Knapsack Problem. Journal of Heuristics 1998; 4: 63-86 Drexl A. A simulated annealing approach to the multiconstraint zeroone knapsack problem. Computing 1988; 40: 1-8 Khuri S, Back T, Heitkotter J. The Zerolone Mutiple Knapsack Problem and Genetic Algorithms, Proceedings of the 1994 ACM Symposium on Applied Computing (SAC '94). ACM Press 1994;188193 Raid1 GR. An Improving Genetic Algorithm for the Multiconstrained 0-1 Knapsack Problem. Proceedings of the 5th IEEE International Conference on Evolutionary Computation 1998; 207-2 11 Lskketangen A, Glover F. Solving zero-one mixed integer programming problems using tabu search, European Journal of Operational Research 1998; 106: 624-658 Hanafi S, Freville A. An efficient tabu search approach to the 0-1 multidimensional knapsack problem. European Journal of Operational Research 1998; 106: 659-675 Cappanera P, Trubian M. A local search based heuristic for the demand constrained multidimensional knapsack problem. Technical Report TR-0 1- 10, Universita di Pisa, Dipartimento di Informatica 200 1 Vasquez M., Hao J-K. A Hybrid approach for the 0-1 Multidimensional Knapsack problem. Proceedings of the 1 7 ~ International Joint Conference on Artificial Intelligence, IJCAI-01, Seattle, Washington, August 2001 Plateau A, Tachat D, Tolla P. A hybrid search combining interior point methods and metaheuristics for 0-1 programming. International Transactions in Operational Research 2002; 9: 73 1-746
350
Metaheuristics: Progress as Real Problem Solvers
14.
Beasley JE. OR-Library: Distributing Test Problems by Electronic Mail. Journal of the Operational Research Society 1990; 41: 1069-
15.
James R.J.W., Nakagawa Y. Enumeration Methods for Repeatedly Solving Multidimensional Knapsack Sub-Problems. Submitted to IEICE Transactions, 2004.
1072
Chapter 16 COMPUTATIONALLY DIFFICULT INSTANCES FOR THE UNCAPACITATED FACILITY LOCATION PROBLEM
Yuri Kochetov and Dmitry Ivanenko Sobolev Institute of Mathematics, Novosibirsk, 630090, Russia (jkochet, ivanen)@math.nsc.ru
Abstract: Design and analysis of computationally diMicult instances is one of the promising areas in combinatorial optimization. In this paper we present several new classes of benchmarks for the Uncapacitated Facility Location Problem. The first class is polynomially solvable. It has many strong local optima and large mutual pair distances. Two other classes have exponential number of strong local optima. Finally, three last classes have large duality gap and one of them is the most difficult for metaheuristics and the branch and bound method.
Key words: Facility location, benchmarks, PLS-complete problem, local search, branch and bound method.
16.1
PROBLEM STATEMENT AND ITS PROPERTIES
In the Uncapacitated Facility Location Problem (UFLP) we are given a finite set of clients J, a finite set of facilities I, fixed costs of opening faciliand matrix of transportation costs (g&, i~ I,~ E J . tiesJ f; 0, id, We need to find a nonempty subset of facilities S s I such that minimizes the objective function
352
Metaheuristics: Progress as Real Problem Solvers
It is a well known combinatorial problem with wide range applications [2, 3, 91. The p-median problem, set covering problem, minimization problem for polynomials in Boolean variables are closely related to UFLP [1,7]. Notice that it is NP-hard in strong sense. The neighborhood Flip for the solution S is a collection of subsets S' c I which can be produced by dropping or adding one element to S. The neighborhood Swap is a collection of subsets S ' d which can be produced by swapping one element from S and one element from I \ S. The union of the neighborhoods we denote by Flip+Swap. Standard local improvement algorithm starts from initial solution SOand moves to a better neighboring solution until it terminates at a local optimum. The running time of the algorithm is determined by the number of iterations. The local search problem is to find a local optimum with respect to the neighborhood. Definition 1. [12] A local search problem II is in class PLS (polynomialtime local search problems) if there are three polynomial time algorithms An, Bn ,Cn with the following properties:
1. Given a string XE {0,1}*, algorithm An determines whether x is an instance of the problem n , and in the case it produces a feasible solution. 2. Given an instance x and a string s, algorithm Bn determines whether s is a feasible solution and if so, algorithm Bn computes the value of objective function for the solution s. 3. Given an instance x and a feasible solution s, algorithm Cn determines whether s is a local optimum, and if it is not, algorithm Cn finds a neighboring solution with strictly better value of objective function. It is easy to verifl that the local search problems (UFLP, Flip) and (UFLP, Flip+Swap) belong to the class PLS. Definition 2. [12] Let nl and 112be two local search problems. A PLSreduction from nl to n2consists of two polynomial-time computable functions h and g such that: 1. h maps instances x of 111to instances h(x) of n2;
2. g maps pairs (x, solution of h(x)) to solutions of x; 3. for all instances x of n l , if s is a local optimum for instance h(x) of 112, then g(x,s) is a local optimum for x.
If 111PLS-reduces to 112and if there is a polynomial-time algorithm for finding local optima for n 2 , then there is a polynomial-time algorithm for finding local optima for nl. Local search problem IIEPLS is called PLS-
Dz8cult instancesfor the uncapacitated facility location problem
353
complete if every problem in PLS can be PLS-reduced to it [6]. A list of PLS-complete problems can be found in [6, 121. Proposition 1. The local search problem (UFLP, Flip) is PLS-complete. Corollary 1. The local search problem (UFLP, Flip+Swap) is PLS-complete. Corollary 2. Standard local improvement algorithm takes exponential time in the worst case for the problem II=(UFLP, Flip) regardless of the tiebreaking and pivoting rules used.
Proofs are in the Appendix. These properties of the local search problems deal with the worst case behavior only. In average case, our computational results yield linear running time of the local improvement algorithm. We observe the same effect for Flip+Swap neighborhood too. So, we have pessimistic predictions for the worst case and optimistic one for the average case. In order to create computationally difficult benchmarks we may try to generate instances with long paths from starting points to local optima. But it seems that they are pathological cases. Another possibility is to find a way to produce instances with the following properties: - large number of local optima; - large area where local optima located; - large minimal distance for pairs of local optima; - large basins of attractions. Below we present several computationally difficult classes of benchmarks for the UFLP where average path from random starting point to local optimum is shot.
16.2
POLYNOMIALLY SOLVABLE INSTANCES
Let us consider a finite projective plane of order k [4]. It is a collection of n = k2 + k + 1 points XI,...,x,, and lines LI,...,L,. An incidence matrix A is an nxn matrix defining the following: a v = 1 if xj E Li and a v = 0 otherwise. The incidence matrix A satisfying the following properties: 1. A has constant row sum k + 1; 2. A has constant column sum k + 1; 3. the inner product of any two district rows of A is 1; 4. the inner product of any two district columns of A is 1. These matrices exist if k is a power of prime. A set of lines Bj = {Li I xj E Li) is called a bundle for the point xi. Cardinality of each bundle is
3 54
Metaheuristics: Progress as Real Problem Solvers
k+l and I Bjln Bj21=l for every pair of different points xjl and xjz. We define a class of instances for the UFPL. Put I=J = {I,.. ., n ) and g.. = r/
c&, if ag = 1,
+ ol) otherwise,
L = f >yyr, jcJ icl
We denote the class by FPPk. Proposition 2. Optimal solution for FPPkcorresponds to a bundle. Corollary 3. Optimal solution for FPPkcan be found in polynomial time. Every bundle corresponds to a strong local optimum of the UFLP with the neighborhood Flip+Swap. Global optimum is one of them. Hamming distance for arbitrary pair of the strong local optima equals 2k. Hence, the diameter of area where local optima are located is quite big. Moreover, there are no other local optima with distance less or equal k to the bundle. As we will see in section 16.5, the local optima have large basins of attraction. For metaheuristics it is additional obstacle for moving from one local optimum to others. In Tabu Search we have to use large tabu list. For Simulated Annealing we need high temperatures. If population in Genetic Algorithm is a collection of the bundles then the crossover operators produce 'bad' local optima or the same bundles. For GRASP heuristic this class is difficult too [lo].
16.3
INSTANCES WITH EXPONENTIAL NUMBER OF STRONG LOCAL OPTIMA
Let us consider two classes of instances where number of strong local optima grows exponentially as dimension increases. The first class uses the binary perfect codes with code distance 3. The second class exploits a chess board.
16.3.1 Instances based on perfect codes Let Bkbe a set of words (or vectors) of length k over an alphabet (0,l). A binary code of length k is an arbitrary nonempty subset of Bk. Perfect binary code with distance 3 is a subset C Bk, 1 ~ 1 = 2 ~ l ( ksuch + l ) that Hamming distance d(cI,c2)2 3 for all c,, c2 6 C, cl # c2. These codes exist for k = 2'-1, r > 1, integer.
DzJficult instancesfor the uncapacitated facility location problem
355
Put n = 2k, I = J = { l , ..., n}. Every element i E Icorresponds to avertex x(i) of the binary hyper cube z;. Therefore, we may use a distance dij= d(x(i), x(j)) for any two elements i, j E I. Now we define
Arbitrary perfect code C produces a partition of Z: into 2kl(k+l) disjointed spheres of radius 1 and corresponds to a strong local optimum for the UFLP. Number of perfect codes h'@) grows exponentially as k increases. The best known lower bound [8] is
The minimal distance between two perfect codes or strong local minima is at least 2(H1)'2.We denote the class of benchmarks by BPCk.
16.3.2 Instance based on a chess board Let us glue boundaries of the 3kx3k chess board so that we get a torus. Put r = 3k. Each cell of the torus has 8 neighboring cells. For example, the cell (1,l) has the following neighbors: (1,2), (l,r), (2,1), (2,2), (2,r), (r,l), (r,2), (r,r). Define n = 9k2, I =J={l,. .., n} and g.. = !I
cu, if the cells i, j are neighbors
+
o~
otherwise,
.A =f> yicIcj ccJ i j .
The torus is divided into k2 squares by 9 cells in each of them. Every cover of the torus by k2 squares corresponds to a strong local optimum for the UFPL. Total number of these strong local optima is 2-3H1-9. The minimal distance between them is 2k. We denote this class of benchmarks by CBk.
16.4
INSTANCES WITH LARGE DUALITY GAP
As we will see later, the duality gap for described classes is quite small. Therefore, the branch and bound algorithm finds an optimal solution and proves the optimality quickly. It is interesting to design benchmarks which
356
Metaheuristics: Progress as Real Problem Solvers
are computationally difficult for both metaheuristics and enumeration methods. As in previous cases, let the nxn matrix (gg) has the following property: each row and column have the same number of non-infinite elements. We denote this number by I. The value Iln is called the density of the matrix. Now we present an algorithm to generate random matrices (gii) with the fixed density. Random matrix generator (1,n) 1. J t {I,..., n} 2. Column [i] t 0 for allj E J 3. g[ij] t + oo for all i, j E J 4. for i t 1 to n 5. dolotO 6. f o r j t 1 to n 7. doif n - i + l =I-Column[i] 8. then g[i, j] t 6 [ij] 9. lo t lo+l 10. Column [i] t Column [i]+l J tJ \ j 11. 12. select a subset S c J, I SI =I - lo at random and put g[ij] t 6 [ij], Column [i] t Column [i]+l, forj~S. The array Column [i] keeps the number of small elements in j-th column of the generating matrix. Variable lo is used to count the columns where small elements must be located in i-th row. These columns are detected in advance (line 7) and removed from the set J (line 11). Note that we may get random matrices with exactly I small elements for each row only if we remove lines 6-1 1 from the algorithm. By transposing we get random matrices with this property for columns only. Now we introduce three classes of benchmarks: Gap-A: each column of gghas exactly I small elements; Gap-B: each row of gghas exactly 1small elements; Gap-C: each column and row of gghave exactly 1small elements.
instances have significant duality gap
DifJicult instancesfor the uncapacitatedfacility location problem
357
where Fop,is an optimal value and F L is~ an optimal value for the linear programming relaxation [5]. For 1 = 10, n = 100 we observe that 6 E [2 I%, 29%]. As consequence, the branch and bound algorithm evaluates about 0.5-lo9 nodes in the branching tree for the most part of the instances from the class Gap-C.
16.5
COMPUTATIONAL EXPERIMENTS
To study the behavior of metaheuristics we generate 30 random test instances for each class. The values of & are taken from the set {0,1,2,3,4) at random and we set f = 3000. All these instances are available by address: http://www.math.nsc.dAP/benchmarks/english.html. Optimal solutions are found for all instances by branch and bound algorithm [l, 51. Table 16.1 shows performance of the algorithm in average. Column Running time presents execution time on PC Pentium 1200 MHz, RAM 128 Mb. Column Iterations B&B shows total number of iterations or number of evaluated nodes in the branching tree. Column The best iteration shows iterations for which optimal solutions were discovered. Table 16.1: Performance of the branch and bound algorithm in average
Benchmarks classes
Iterations B&B
The best iteration
Running time
BPC7 CB4 FPP11
Gap - A Gap - B Gap - C Uniform Euclidean
For comparison we include two well known classes [111: Uniform: values gv are selected in interval [O, lo4] at random with uniform distribution and independently from each other. Euclidean: values gv are Euclidean distances between points i and j in the two dimension space. The points are selected in square 7000x7000 at random with uniform distribution and independently from each other.
358
Metaheuristics: Progress as Real Problem Solvers
For these classesf = 3000. The interval and size of the square are taken in such a way that optimal solutions have the same cardinality as in previous classes. Table 16.1 confirms that classes Gap-A, Gap-B, Gap-C have large duality gap and they are the most difficult for the branch and bound algorithm. The classes BPC7, CB4, Euclidean have small duality gap. Nevertheless, the classes BPC7, CB4 are more difficult than Euclidean class. This effect has simple explanation. Classes BPC7, CB4 have many strong local optima with small waste over the global optimum. In order to understand the difference between classes Erom the point of view the local optima allocation, we produce the following computational experiment. For 9000 random starting points we apply standard local improvement algorithm with Flip+Swap neighborhood and get a set of local optima. Some of them are identical. Impressive difference between benchmark classes deals with the cardinality of the local optima set. Classes Uniform and Euclidean have pathological small cardinalities of local optima sets and as we will see below these classes are very easy for metaheuristics. In Table 16.2 the column N shows the cardinalities for typical instances in each class. The column Diameter yields lower bound for diameter of area where local optima are located. This value equals to maximal mutual Hamming distance over all pairs of local optima. Figures 16.1-16.8 plot the costs of local optima against their distances from global optimum. For every local optimum we draw a sphere. The center of sphere has coordinates (x,y), where x is the distance, and y is the value of objective function. The radius of the sphere is a number of local optima which are located near the given local optimum. More exactly, the Hamming distance d less or equals to 10. In Table 16.2 columns min, ave, and max show the minimal, average, and maximal radiuses for the corresponding sets of local optima. The class FPPll has extremely small maximal and average value of the radiuses. Hence, the basins of attraction for the local optima are quite large. In Figure 16.3 the local optima, which corresponds to the bundles are shown by two lower spheres. The distance between them is 22. One of then is global optimum. All other local optima located quite far from global optimum and have high values of the objective function. The distance from global optimum to the nearest local optimum is 12. Column R* in Table 16.2 gives the radius of the sphere for the global optimum. It equals 1 for the classes FPP and Uniform. The maximal values 53 and 52 belong to classes CB4and BPC,. Notice that for all classes the sphere of global optimum is not the maximal one or minimal. It look like that there is no correlation between density of local optima in the feasible domain and objective function.
DifJicult instances for the uncapacitated facility location problem
359
Column Rlooshows the minimal radius for 100 biggest spheres. This column indicates that the classes Gap-A, Gap-B, Gap-C have many large spheres. Class FPPllhas not large spheres. In Figures 16.1, 16.2, 16.6, 16.7 there are many small spheres quite far from global optimum. If we imagine the set of local optima as a galaxy then we observe many small spheres at the border of the galaxy and a lot of large spheres at the center. The region of high concentration of local optima consists of the spheres with high and low values of objective function. The global optimum can be located at the center part of the galaxy and has large sphere (see Figures 16.1, 16.2) or very far from the center and has small sphere (Figures 16.3, 16.7). We can not predict its radius or place in the galaxy. We can only observe that easy classes have a small galaxy, N = 1018 for class Uniform and N = 40 for class Euclidean. The difficult classes have large galaxies, N = 9000 for classes BPC7, FPPII, Gap-C. May be the most difficult classes correspond to the cases of several galaxies which are separated from each other by the regions with high values of objective function. The test instances with this property are very interesting for future research. Table 16.2: Attributes of the local optima allocation
Benchmarks classes BPC7 CB4 FPP11
Gap - A Gap - B Gap - C
Uniform Euclidean
Diameter
min
55 50 51 36 42 41 33 21
1 1 1 1 1 1 1 11
Radius ave max 3 13 2 53 18 14 31 13
357 178 8 291 164 229 101 18
Table 16.3 shows the frequency of finding optimal solution by the following metaheuristics: Probabilistic Tabu Search (PTS), Genetic Algorithm (GA) and Greedy Randomizes Adaptive Search Procedure with Local Improvement (GRASP+LI). Stopping criterion for the algorithms is the maximal number of steps by the neighborhood Flip+Swap. We use number 1o4 as the criteria. Genetic algorithm uses local improvements for each offspring during the evolution. Table 16.3 indicates that classes Euclidean and Uniform are easy. Average number of steps to get optimal solution is less than 1o3 for all algorithms. Figure 16.9 shows the average radius R,, as a function of d. For every class the h c t i o n has three typical intervals: flat, slanting, and flat again.
Metaheuristics: Progress as Real Problem Solvers
360
The first interval corresponds to the distances d where the spheres overlap rarely. At the last interval the value of d is closed to diameter of area where local optima are located. The transition point from the second interval to the third one conforms to the diameter of area which covers the most part of local optima. For the class Gap-C this point approximately equals to 33. For the classes FPPll, BPC7, CB4 this value is near 42. Hence, the area of local optima is bigger for the classes FPPll,BPC7, CB4 than for the class Gap-C. The column Diameter in Table 16.2 gives us the same conclusion. Nevertheless, the class Gap-C is the most difficult. It has the same density but random structure of the matrix (g&. It looks like that this property is very important for generation difficult instances for UFLP.
Table 16.3: Frequency of obtaining optimal solutions by metaheuristics
Benchmarks classes BPC7 CB4 FPPl I Gap - A Gap - B Gap - C
Dimension
PTS
GA
GRASP+LI
Uniform Euclidean
Figure 16.1. Analysis of local optima for the class BPC7
Dzficult instancesfor the uncapacitatedfacility locationproblem
Figure 16.2. Analysis of local optima for the class CB4
Figure 16.3. Analysis of local optima for the class FPPll
361
Metaheuristics: Progress as Real Problem Solvers
Figure 16.4. Analysis of local optima for the class Gap-A
Figure 16.5. Analysis of local optima for the class Gap-B
Dzficult instancesfor the uncapacitatedfacility location problem
Figure 16.6. Analysis of local optima for the class Gap-C
Figure 16.7. Analysis of local optima for the class Uniform
363
Metaheuristics: Progress as Real Problem Solvers
Figure 16.8. Analysis of local optima for the class Euclidean
Figure 16.9. Average radius of spheres as a function of d
Dz@cult instancesfor the uncapacitated facility location problem
16.6
365
CONCLUSIONS
In this paper we present six new classes of random instances for the Uncapacitated Facility Location Problem. Class FPPkis polynomially solvable and has many strong local optima with large mutual pair distances. Classes BPCk, CBkhave exponential number of strong local optima. Finally, classes Gap-A, Gap-B, Gap-C have large duality gap. Class Gap-C is the most difficult for both metaheuristics and branch and bound method. For comparison, we consider two famous classes Euclidean and Uniform. Density for these classes is 1. They are quite easy. We believe that density is a crucial parameter for the Uncapacitated Facility Location Problem. In order to get difficult instances we need to use small values of the density. Classes BPCk, CBk, FPPkhave the small density but regular structure of the matrix (g&. The most hard instances belong to the class Gap-C. They have random structure of the matrix and the same small density for all columns and rows.
ACKNOWLEDGEMENT This research was supported by the Russian Foundation for Basic Research, grant No. 03-0 1-00455.
APPENDIX Proof of the Proposition 1. Let us consider the PLS-complete problem (MaxCut,Flip) [12]. Given a graph G=(V,E) with weights w , a , egE. Find a partition of the set V=Vl uV2with maximal weight of the cut
We want to reduce the problem to (CTFLP, Flip). For this purpose we should present the functions h, g from the Definition 2 with required properties. Denote by E(i) the set of edges in G which are incident to the vertex ieV. Put I= V, J=E and
fi = Cwe, e&(i)
gie
=
0, ife=(il,i2),i=ilori=i2 2we otherwise
For any solution S_dwe define a partition (Vl,V j by the following Vl=S, V2=V\Vl. We claim that
Metaheuristics: Progress as Real Problem Solvers
It guarantees the desired properties of the reduction. Let us consider three cases for an edge e=(iI,ij EE. Case 1: il, i2 EVI. The weight we is included inJl andJ2, miniesg,=O and we is not included in W(V1,Vd. Hence, the value we is presented twice in both parts of the equation. Case 2: il, i2 E V ~ .The valuesJl andJ2 are not included into the first item, minies g,=2we and we is not included in W(VI,Vj. Case 3: iI EVI, i2 EV~.The weight we is included inJI and W(VI,V j but miniesgie=O. Proof of the Corollary 1. The neighborhood Flip is a part of the neighborhood Flip+Swap. So, a local optimum for Flip+Swap is local optimum for Flip as well. Hence, (UFLP, Flip) is reduced to (UFLP, Flip+Swap). 0 Proof of the Corollary 2. The statement is true for (Max-Cut, Flip) [12]. The reduction in the proof of the Proposition 1 copies every step of the hill climbing algorithm for (Max-Cut, Flip) into the step of the local descent algorithm for (UFLP, Flip).
REFERENCES 1. V. Beresnev, E. Gimadi, and V. Dement'ev. Extremal standardization problems. Nauka, 1978, (in Russian). 2. M. Daskin. Network and Discrete Location Problem: Models, Algorithms, andApplications. John Wiley & Sons, 1995.
3. Z. Drezner (Ed.) Facility Location: A survey of Applications and Methods. Springer Series in Operations Research, Springer, 1995.
4. M. Hall Jr. Combinatorial Theory. Blaisdell. Waltham. MA, 1967. 5. D. Erlenkotter. A dual-based procedure for uncapacitated facility location, Operations Research, 26: 992-1009, 1978. 6. D. Johnson, C. Papadimitriou, and M. Yannakakis. How easy is local search? Journal of Computer and System Sciences, 37: 79-100, 1988. 7. J. Krarup and P. M. P m a n . The simple plant location problem: survey and synthesis. European Journal of Operational Research, 12: 36-81, 1983.
Dz&dt instancesfor the uncapacitated facility location problem
367
8. D. Krotov. Lower bounds for number of m-quasi groups of order 4 and number of perfect binary codes. Discrete Analysis and Operations Research, 7: 47-53,2000, (in Russian).
9. P. Mirchandani and R. Francis (Eds.) Discrete Location Theory. John Wiley & Sons, 1990. 10. M. Resende and R. Werneck. A hybrid multistart heuristic for the uncapacitated facility location problem, Manuscript, http://www.research.att.com/mgcr/doc/guflp.pdf. 11. D. Schilling, K. Rosing, and C. ReVelle. Network distance characteristics that affect computational effort in p-median location problems. European Journal of Operational Research, 127: 525-536,2000. 12. M. Yannakakis. Computational complexity. E.Aarts and J.K. Lenstra (Eds.) Local Search in Combinatorial Optimization, pages 19-55, Chichester: John Wiley & Sons, 1997.
Chapter 17
CONSISTENT NEIGHBOURHOOD IN A TABU SEARCH Michel Vasquez, Audrey Dupont and Djamal Habet ~ c o l edes Mines d'Al.4s/Commissariat d ll~nergieAtomique, Site EERIE, Parc scientifique Georges Besse 30035 Nimes cedex 01, France. (~ichel.~as~uez,~udre~.~u~ont,
[email protected]
Abstract: We present a general approach for solving Constraint Optimization Problems. In this order, we design a Consistent Neighbourhood which, after each variable assignment, deletes conflicting variables to maintain the constraint consistency. Hence, instead of allowing infeasible moves on complete configurations, we work only on partial consistent ones until a solution is found. This approach is successfully applied in solving four real-life problems. Keywords: Tabu search, constraint propagation, consistent neighbourhood.
17.1
INTRODUCTION
Our field of interest concerns large-scale combinatorial optimization problems, in particular problems implemented by constraint networks, where the formulated constraints have weak arity - often binary - and different priority levels. The problems treated in this paper come from real life and their resolution time is often limited because of the urgent need of solutions. This aspect, together with the large size of the problems, led us to adopt an approximate method. Among all the existing algorithms, we chose the metaheuristic Tabu Search [9]. Tabu Search is an intelligent algorithm based on adaptive memory and learning. Like the other local search methods, Tabu visits the search space by jumping from a configuration to an other within its neighbourhood. It samples the search space with a risk of narrowly missing the best solution. To overcome this weakness, our approach attempts to ob-
370
Metaheuristics: Progress as Real Problem Solvers
tain a complete evaluation of the search space, which must be achieved in an optimal way in terms of computation time. In this aim, we designed a consistent neighbourhood, which is maintained by an effective propagation of the instantiations through the constraints. In Section 17.1, we begin by recapping basic definitions. Then, in Section 17.2, we give the main characteristics of our Tabu Search algorithm, CN-Tabu. Finally, we describe how it can be successfully adapted to solve four real-life problems: the Frequency Assignment Problem with Polarisation ( F A P P ) [17], the Daily Photograph Scheduling Problem ( D P S P ) [19], the Agile Earth Observing Satellite (AEOS) Management Problem [ll], and the Antenna Positioning Problem (APP) [18].
17.2
DEFINITIONS
Constraint Network. A constraint network C N = <X, D, C> is defined by a set X = {xl, . . . ,x,) of n variables, each one taking value in its respective finite domain Dl,. - - ,Dn elements of 2). C is a set of e constraints linking some variables. A constraint Ci,...ij relating to the variable set (xi,, . .. ,xij) where j is the constraint arity, is a subset of the Cartesian Product Dil x . . .x Dij that specifies the allowed combinations of values for the variables xil, - - ,Xij. Local consistency. A partial instanciation of a subset of variables is locally consistent if and only if it satisfies all the constraints involving only this variable subset. A partial instantiation which can not belong to a solution is called a nogood. Tabu Search. A Tabu Search (TS) is a metaheuristic designed for tackling hard combinatorial optimization problems. T S can be described as a neighbourhood search with a set of critical and complementary components. For a given optimization instance (S, f ) characterized by a search space S and an objective function f , a neighbourhood N is introduced. It associates for each configuration s = (vl , ...,vn) in S, a non-empty subset N(s)of S. A typical T S algorithm begin with an initial configuration s in S, then repeatedly visits a series of the best local configurations following the neighbourhood function. At each iteration, one of the best neighbours s' E S is selected to become the current configuration, even if s' does not improve the current configuration in terms of cost function. To avoid the search cycling and allow it to go beyond local optima, a tabu list is introduced. This adds a short time memory component to the method. A tabu list maintains a selective history H (short-term memory), composed of previously encountered configurations or, more
Consistent Neighbourhood
371
generally, pertinent attributes of such configurations. A simple strategy consists in preventing configurations of H from being considered for during a given number of iterations, called the tabu tenure. A tabu tenure can vary for different attributes, and is generally problem-dependent. At each iteration, T S looks for the best neighbour from this dynamically modified neighbourhood N(H,s), instead of N(s) itself. Such a strategy prevents the search from being trapped in short-term cycling. When attributes of configurations, instead of configurations themselves, are recorded in a tabu list, some unvisited, yet interesting configurations may be prevented from being considered. Aspiration criteria may be used to overcome this problem. A widely used aspiration criterion consists in removing a tabu status from a move when it leads to a configuration better than the best one obtained so far. Since T S uses an aggressive search strategy to exploit its neighbourhood, it is crucial to have special data structures and techniques that enable rapid updating of move evaluations, and reduce the effort of finding best moves. A T S can therefore be described by specifying its main elements: the configuration representation, the cost function to evaluate the configurations, the neighbourhood function, the tabu list and its tabu tenure, and finally the aspiration criterion.
17.3
METHODOLOGY
Now we shall see, step by step, the implementation of some important characteristics of our Tabu Search algorithm, which we call CN-Tabu, standing for Consistent Neighbourhood in a Tabu Search.
17.3.1 Partial Configurations Basically, a configuration is an assignment of all the problem variables. The search space is the set of all configurations, where each one is either a solution or a dead-end. Such a configuration can be represented as an n-dimensional vector s = (vl ,va , ...,v,) where each vi E Di. In our approach, the search space is made up of partial configurations expressed by s = (vi,, vi,, ...,vins) where n, variables are instantiated, such as n, = Is1 5 n. To comply with the classical representation, we add a new value u (for uninstantiated) to each domain Di, to indicate that xi is free. For more clarity in the following sections, we define: xi, the ithvariable, for i = 1,...,n; vi, the current value of xi; Di[k], the kth value in Di, used to cover the domains.
372
Metaheuristics: Progress as Real Problem Solvers
17.3.2
Consistent Neighbourhood
At each iteration, the tabu process replaces the current configuration by a new one obtained by a local transformation called a move. Given a configuration s E S, a move denoted by mv(xi, vi), consists in replacing ) the variable xi by the new one vie the old value s ( x ~of In our approach, the move differs from the usual one in two ways. Firstly, it is restricted to the free variables, and, secondly, it is followed by a repairing process which uninstantiates all the conflicting variables. The set of configurations thus reached constitutes the neighbourhood of s. Hence, only locally consistent configurations are evaluated in n/ which can be distant from the current one by more than one assignment. For shortness, we have kept the notation mv(xi, vi), but actually such a move consists in one mv(xi, vi) followed by some mv(xi, u). In this way, our local search using a consistent neighbourhood is less local than the classical one. The search space so defined is constituted by partial configurations.
17.3.3 General Neighbourhood Evaluation The evaluation criterion of a such configuration is the number of instantiated variables in s. The objective function to maximize is f = Is[. Rather than compute f , we compute the number of deleted variables vi) then 6(i, k) is the number of the already 6. Thus, if s' = s instantiated variables which may be removed (i.e. set to u) when xi is set to vi = Di[k]. Finally, we obtain the algorithm 17.1.
+
Algorithm 17.1: e v a l u a t e N ( s ) begin bmin = b z z b u + n; Ccand + 0 for all xi E s, such as vi = u do for each D i [ k ] do if b(i, k ) < bmin then bmin t 6 ( i ,k ) PI if ( x i ,D i [ k ] )is not tabu then if b(i, k ) < 6;zbb" then PI + 6 ( i , k ) ; Lcand + ( x i ,D i [ k ] )
I
- -
return amin, end
if b(i, k ) = b;zbu then &and + &and U { ( x i , D i [ k ] ) )
L
&and
In note [I], is the minimum value of 6 over the whole neighbourhood of s, when in note [2], S;zh is biased by the tabu status. As we will see later, this subtlety is needed to detect nogoods.
Consistent Neighbourhood
373
The evaluation of S is the most time-consuming step in TS: as said above, the main characteristic of our T S procedure is to evaluate the whole neighbourhood. That is why we introduce an efficient neighbourhood evaluation performed by propagation functions, which uses the incremental computing principles, already seen in [7]. In algorithm 17.1, the maximum execution number of the inner loop is (d x (n - Isminl), where d is the largest domain size, and s,in is the configuration with the lowest instantiated variables.
Propagation Functions. They update S table by propagating each instantiation and uninstantiation in the constraint network. This maintains the following equivalency correctness:
The propagation is carried out in two steps: firstly, we propagate a variable assignment to its neighbours in the constraint network by deleting the conflicting variables and storing them in a list. Secondly, we propagate each u value (from the list) in CN. For more clarity, we present these steps separately:
- propagate-value(xi, vi): assigns the value vi to the variable xi, and propagates this assignment through the conflicting neighbours xj, which are uninstantiated and put in a list (.Cdel). Then, S(j, k), such that (vi, Dj[k]) !$ Cij, is increased. If necessary (i.e. S(j, k) = 0 before the updating) df reej, the degree of freedom of x j is decreased. This process, derived from the principles of Arc-Consistency (AC) [12], is carried out for all the domain values of the neighbours of xi in C N . Algorithm 17.2: propagate-value(xi, vi) begin for all xj :j Cijdo for all Dj[k]do if (vi,Dj[k])$! Cijthen if S(j,k) = 0 then dfreej--
II
L G, k)++
if ((vj # u ) and ((vi,vj)4 Cij))then -
L
&el
+ .&el
U {xj)
return C d e l end
- propagate-u(x j): stretches the uninstantiation of the variable x j . Hence, for each xl neighbour of xj, S(1, k) is decreased if Dl [k] is in conflict with vj and if necessary dfreel is increased.
374
Metaheuristics: Progress as Real Problem Solvers
Algorithm 17.3: propagate-u(xj) begin for all X L E C j l do for all Dl [k]do
if S(1, k ) = 0 then dfreel++ end
These two functions are embedded in the propagate-move(xi, vi) algorithm, which achieves the instantiation before locally propagating the constraints. As presented, this algorithm only runs when there are no constraints involving the same variables: working in a multigraph constraint network will require some adaptations. Algorithm 17.4: propagate-move(xi, v i ) begin Ldel + 0;V i + Di[k] &el + propagate-value(xi, v i ) while Ldel# 0 do xj + seled(Ldel) propagate-u(y) vj + u end
To summarize, at each iteration of CN-Tabu, we evaluate Is1 exclusively from the table 6 for the uninstantiated variables. In the worst case, the number of operations required by the propagation phase is proportional to A x d, where A is the maximal degree of the constraint graph.
17.3.4
Tabu List Management
As this kind of move is multi-attribute and often irreversible, the search is unlikely to cycle. Nevertheless, a tabu list is needed to prevent cycling, which notably occurs when we attempt to instantiate the last variables. Remember that a move mv(xi, vi) consists in assigning vi to to xi, then uninstantiating the r variables xjl, ...,xj,, where r = repair the violated constraints. If such move is carried out, the moves mv(xj1,vj,), ..., mv(xj,, vj,) are then classified tabu during some itera tions (tabu tenure) to avoid early uninstantiation of xi. In fact, we classify tabu all the values of the uninstantiated variables that can be in conflict with the new value of xi. This can be performed during the move propagation. We dynamically define the tabu tenure by freq(xi,vi) the number of times that xi is set to vi
375
Consistent Neighbourhood
from the beginning of the search. Then, at each iteration iter, we fix the tabu status, for each value Dj[k] which may be in conflict with vi to: tabu(xj, Dj[k]) = iter freq(xj, Dj[k]). Hence, the tabu status of a pair (xj, vj) is proportional to the flipping frequency of vj to u. Later, the tabu status of a move such that sf = s mv(xi,vi) is cancelled if Isf[ > I S *[ (where s* is the most complete configuration found so far), which corresponds to the aspiration criterion. Eventually, in the evaluateN function, the condition is not tabu corresponds to (tabu(xi, Di[k]) 5 iter V Is'l > IS*^).
+
+
17.3.5 Diversification The aim of diversification is to enable the search to escape from an attractive zone of the search space. For this purpose, we introduce penalties into the neighbour evaluation. More precisely, each time a configuration s such as 'v's' E N(s), IS'[ 5 IS[ (i.e. Smin > O), we add a penalty to all the pairs (xi, vi) of the allocated variables which have a un-assigned neighbour in the constraint network. Since dmin > 0 means that is not possible to instantiate any variable without violating constraints, the assigned variables belong to a nogood, emphasized by adding penalties, which are considered in the move heuristic during the diversification.
17.3.6
Consistent Neighbourhood in Tabu Search
Combining all the points and implementations described above, leads us to the Tabu Search on a Consistent Neighbourhood algorithm: Algorithm 17.5: CN-Tabu begin s + greedy(S); s* + s repeat 6min, Ccand + evaluateN(s) if 6,in > 0 then Updatenogoodpenalties if Ccand # 0 then iter++; ( x i ,Di[k])+ randSelect(Ccand) propagate-move(xi, vi); f req(xi,vi)++ if IS[ > IS*^ then if Is*l = n then return s* until Ccand = 0 return s* end
The algorithm greedy(S) attempts to assign a free variable while any constraint is violated. If it returns a partial configuration, this last one is processed by CN-Tabu which aims to complete it. CN-Tabu algorithm
376
Metaheuristics: Progress as Real Problem Solvers
stops either when a complete solution is reached, or when the tabu list is saturated and no improving configuration is reachable. In some points, CN-Tabu is close to the strategic oscillation [9] which =0 alternates constructive phase (corresponding to the condition in CN-Tabu) and destructive one (&,in > 0), except that, in CNTabu, these two phases constitute only one move and which is completely evaluated.
17.4 REAL-LIFE APPLICATIONS Even though the methodology proposed in this paper could be adapted, we expect it to solve many constrained optimization problems. The following four problems share some important characteristics. First, all the problems can be intuitively implemented by a constraint network. Secondly, they are made up of hard constraints, and finally, the involved constraints have weak arity.
17.4.1
F'requency Assignment Problem with Polarisation
As we shall see below, this first example matches well with our methodology, without any adaptation. All the constraints are binary, and the constraint graph is not multi-edge. A complete description of this problem can be found in [6].
Description. The F A P P is a frequency allocation optimization problem in Hertzian telecommunication networks. A network consists of a set of sites where the located antennae must communicate by hertzian liaisons. A liaison is composed of one or more unidirectional radioelectric bonds, called paths. A frequency allocation problem therefore consists in assigning a resource (frequency, polarisation) for each path where frequency belongs to the authorized waveband and polarisation is a binary attribute which indicates the antenna orientation (vertical or horizontal). All the assignments must satisfy some binary radio-electric compatibility constraints. Among them, the minimal gap constraints (MGC) avoid the interferences in the network. However, many problems are not feasible in practice, so relaxation levels are introduced into those minimal gap constraints to limit the interferences. Modelling. consists of:
Representing the F A P P within the C S P framework
associating a variable xi with each path: X = {xl, ...,x,);
377
Consistent Neighbourhood
associating to Xi a domain Di = Fi x Pi, where Fi is a set of permitted frequencies for the path xi and a polarisation Pi is one of the following set {-I), {I), or {-1,l); adding several imperative constraints (IC) between two paths and xj:
Xi
1 equality or inequality of frequencies across paths: fi = f j or
fi # fj; 2 distance between frequencies: Ifi - f j1 = ~ iorj 1 fi - f j1
# Eij;
3 equality or inequality of polarization across paths: pi = pj or Pi # pj; rn
adding the minimal gap constraints (MGC) where progressive relaxation is authorized:
the index k, growing from 0 to 10, indicates the relaxation level of the MGCs. Every problem is 11-feasible. A good solution has the least relaxed MGCs. We therefore have a hierarchical objective function dependent on k: firstly minimize k, secondly minimize the number of violated MGCs at level k - 1 noted Vk-l, and finally minimize the number of violated MGCs at level less than k - 2: xO
Implementation. The adopted resolution strategy consists in transforming the Max-CSP (optimization problem) into 11C S P (decision problems) according to the relaxation level on the minimal gap constraints: each CSP(k) contains both the I C and the MGCk. This enables the search space to be reduced by combining CAf-Tabu with a filtering arc-consistent preprocessing step. At each k level, the called AC function returns True, if it has not emptied a domain, and False otherwise, meaning that the problem is not k-feasible. The general algorithm is given in 17.6. Algorithm 17.6: AC*CN-Tabu begin k c 1 1 while AC(k) = True do if ICN-Tabu1 = n then k [3] end
L
+--
k' - 1
378
Metaheuristics: Progress as Real Problem Solvers
Although the main goal of CN-Tabu is to find a k-feasible solution, it can produce a kt-feasible one, where kt may differ from k by more than one unit (see line [3]). Sometimes, this combination proves the optimality of the Ic level (when CN-Tabu has found a k-feasible solution and AC empties a domain at level k - 1).
Results. The F A P P was the subject of the R O A D E F ' ~ Inter~~~ national Challenge, proposed by the CELAR~.The solved benchmarks3 contain up to 3000 paths, a total domain size of 2087947 values, and 67898 binary constraints. Table 17.1. F A P P results obtained after
1 hour computing time on PI11 5OOMhzl 128MB.
In Table 17.1, we compare the three best algorithms developed during the challenge: (MH+PPC), (TS+VN) and CN-Tabu. The first he acronym of the French society "Recherche OpBrationnelle et d'Aide B la DBcision" 2 ~ h acronym e of the French center "Centre d7Electroniquede l'ARmementn 3available from http ://m.prism.uvsq.fr/-vdc/ROADEF/CHALLENGES/2001/
Consistent Neighbourhood
379
one combines some constraint propagations with metaheuristics including Large Neighbourhood Search (LNS) [16] and Limited Discrepancy Search (LDS) [lo]. The second one uses a Tabu Search algorithm on a Variable Neighbourhood [8]. For each method, we give the three values of the objective function: k (underlined when the method proves the optimality), Vk-l, and CVk-2. Regarding to the k level, (MH+PPC) found the optimal k value 26 times, (TS+VN) 27 times, and Cn/-Tabu 28 times. Reader interested by more details can refer to [6, 171.
17.4.2
Daily Photograph Scheduling Problem
This second problem differs in some particular characteristics. First, the variables are weighted, so we have to deal with a valued constraint network VCSP [4,151. Second, the presence of ternary constraints, and finally, a knapsack n-ary constraint.
Description. The D P S P is one of the key applications of an Earth Observing Satellite (EOS) such as Spot 5. Its main purpose is to schedule a subset of photographs from a set of candidate ones which will be effectively taken by the three satellite cameras: front (I), middle (2) and rear (3). Mono photographs need only one camera, while stereo ones need cameras 1 and 3. The resulting subset of photographs must satisfy a large number of imperative constraints of different types, but at the same time, maximize a given profit function, which reflects several criteria such as client importance, urgency of demand, meteorological forecasts and so on. Concerning the constraints, there are binary and ternary logic constraints meaning the non-overlapping of photographs, but the hardest one is a global physical constraint: the total recording capacity on board the satellite. This last is like a knapsack constraint. Modelling. consists of:
Representing the D P S P within the VCSP framework
associating a variable xi with each photograph: X = {xl, ...,x,); associating to each xi a domain D,, = {u, 1,2,3) or DSt, ,,,= {u, 13). The value u indicates that the photograph is not selected; associating to each photograph a "size" si which represents the memory required to record photograph if it is taken; associating to each photograph a "profit" ci; associating to each scheduling its total profit f = adding hard constraints:
G;
380
Metaheuristics: Progress as Real Problem Solvers
1 a global capacity constraint (the knapsack constraint): Cl : Cvifu Si 5 Max-capacity; 2 several non-overlapping constraints between two photographs, noted C2(i, j), to formalize forbidden (vi, vj) value pairs; 3 several non-overlapping constraints between three photographs, C3(i, j, k), for the set of forbidden (vi, vj, vk) triplets. With this representation, the aim is to maximize the total profit f , with the respect of the Cl, C2 and C3 constraints.
Implementation. CN-Tabu can be easily adapted to a VCSP by replacing the neighbourhood evaluation function f = Is1 with the following weighted one: f, = CZliZu q, where c = (cl, ..., %). An embedded backtracking process in the CN-Tabu is implemented in order to deal with the ternary constraints. However, this algorithm is not intended to handle global constraints. Hence, the global capacity constraint is relaxed in the optimization process. Nevertheless, it is taken into account in two ways. In the first one, a hierarchical objective function maximizes the profit, and thus minimizes the total size of the selected photographs. This corresponds to a Lagrangian relaxation. In the second one, the knapsack constraint is periodically repaired by the Bellman Dynamic Programming algorithm [I] Results. Experiments were carried out on a set of realistic instances provided by CNES4. These benchmarks5 are described in detail in [2]. Table 17.2
Results on multi-orbit instances (lh. running time on PI1 2OOMhz/ 32MB).
Instance
n
1401 1403 1405 1021
488 665 855 1057
CN-Tabu Average Best 176055 176134 176175 176241
176056 176137 176179 176246
TS-CNES Best 174058 174137 174174 174238
The solved instances, containing up to 1057 photographs and up to 20730 constraints, belong to two different sets: with and without the capacity constraint. On the first set, CN-Tabu found the all known h he acronym of the French Space National Agency "Centre National d'Etudes Spatiales" 5available from: ftp: //f tp. cert .fr/pub/lemaitre/LVCSP/Pbs/
Consistent Neighbourhood
381
optima which are proved in [3]. On the second one, it produced the best known solutions as shown is Table 17.2. It outperforms the T S algorithm developed the CNES which works on feasible configuration and evaluates only a subset of the neighbourhood [3]. For more details refer to [19].
17.4.3
Agile Earth-observing Satellite Management Problem
In the same application domain but for a more complex task, this new problem must deal with weighted variables, unary and binary hard constraints, and especially with a non-linear objective function. For a full definition of the problem, please refer to [ll].
Description. The new generation of E O S are called Agile (AEOS) because of their mobility along three axes (roll, pitch and yaw). This mobility potentially increases the efficiency of the system to acquire photographs. However, managing an AEOS become significantly more difficult due to a very large search space. An observation request concerns some specified areas of the Earth's surface which are modelled by polygons. Each one is transformed into a set of contiguous strips. A strip has a duration and a validity period, and can be acquired using the two opposing azimuths, direct or indirect. Moreover, if the request is stereoscopic then the selected strips must be acquired twice in the same direction, and two successive image acquisitions require a transition manoeuvre duration. The AEOS management problem consists in selecting and scheduling a set of images among the candidate ones. A feasible schedule satisfies the time and acquisition constraints, and attempts to maximize a given gain function, which is convex and thus increases the problem hardness. Modelling.
A problem with n strips involves 2n possible acquisitions since for each strip i two shooting directions are possible: these shots are numbered 2i - 1 and 2i. For each strip i, tw(i) is the index of its stereo twin strip (0 if i is mono), d(i) its duration, and su(i) its surface. The earliest start, latest start, earliest end and latest end dates of a shot j are respectively noted es(j), ls(j), ee(j) and le(j). For each shot pair (i,j), i # j E [I, 2n], tij is the minimum transition time between the end of i to the beginning of j, and yij E (0, 1) equals 1 if and only if the shot j is immediately after i. Two variables are associated to each shot i: let xi be 1 if i is selected, 0 otherwise, and ti be its starting time acquisition. Let m be the number of polygons. The kth polygon
382
Metaheuristics: Progress as Real Problem Solvers
is characterized by its total surface s(k), its total gain gk, and the set of shots that it contains p(k) c [I, 2n]. Two continuous variables are associated to each polygon k: Sk E [0, 11 is the percentage of the surface covered by the selected strips, and Gk E [0, 11 is the corresponding percentage of the polygon gain. The constraints defining a feasible schedule are:
1 Visibility time windows: Vi E [I,2n], if xi = 1then ti E [es(i),ls(i)];
3 Strip acquisition unicity: Vi E [I,n], x2i-1
+ x2i 5 1;
4 Stereo acquisition: Vi E [I,n], if tw(i) # 0 then ( x ~ = ~ x2tW(i)-1 - ~ and x2i = ~ 2 t w ( i ) ) . The criterion G to maximize is a gain function, defined by the sum of gains associated to the complete or partial acquisition of each polygon k: G = C r = l gk.Gk,where Gk= f (Sk). f : [O, 11 -f [0, 11 is a non-linear function, piecewise linear and defined by the points ((0, O), (0.4,O.I), (0.7, 0.41, (1,l)}.
Implementation. A configuration s is a schedule of the selected shots. This configuration is partial, consistent and saturated. The saturation is one of the optimal solution features, where adding a free image (shot) requires removing some others to keep consistency. The neighbourhood is evaluated according the gain criterion. Indeed, the method tries to insert each free shot in s by allowing successive image removals resulting from constraint violation. A maximum of two image removals is authorized, extended to four in the case of stereo images. Hence, at each CN-Tabu iteration, a partial enumeration algorithm solves the decision problem of finding the best insertion position for each free image. Moreover, for a better resolution, a hierarchical problem is introduced which consists in minimizing the sum of the transition durations in a schedule. It is tackled by a T S algorithm which changes the acquisition direction and the order of the images currently selected. Results. The AEOS management problem was the subject of the ROADEF72003challenge. The CNES agency provided the instances6, which contain up to 534 strips (n value).
.
6available from the web site: vww prism.uvsq. fr/"vdc/ROADEF/CHALLENGES/2003
Consistent Neighbourhood Table 17.3. Instance
n
383
Results obtained after 300 sec. on Sun Blade station 750Mhzl 512MB (10 tries)
CN-Tabu Best Average
UTS
1
Best
SA Average
Best 191358231 121680360 563597071 185406200 425983220 717383629 1005301900 967910750
Average 191358231 121680360 563597071 185406200 425983220 716817920 1004434419 965414720
In Table 17.3, column 2 indicates the strip number of each instance refereed in the column 1, columns 3-4 indicates the results returned by CN-Tabu, where columns 5-6 and 7-8 the gains obtained respectively by J. F. Cordeau and G. Laporte [14] by the mean of an adaptation of the Unified Tabu Search Algorithm [ 5 ] ,and E. J. Kuipers [14] by using a Simulated Annealing (SA) algorithm. CN-Tabu algorithm outperforms the two other methods on the three last instances and is more robust.
17.4.4
Antenna Positioning Problem
This problem is the most complex and combinatorial one. Despite these characteristics, CN-Tabu has proved to be a powerful tool within the global approach implemented to solve it.
Description. The problem concerns terrestrial cellular phone systems. In fact, its aim is to completely cover a discrete geographic working area by an optimized selection of sites on which we place antennas of different types, but at the same time by an optimized tuning of the antenna parameters: type, power level, azimuth direction and tilt degree. Hence, a cell is defined from a site by fixing the antenna number and their parameters. The geographic working area is characterized by a set of points which contain information related to the traffic estimation and the radio threshold. Obviously this system is strongly constrained: in addition to the global coverage constraint, we must deal with a global handover constraint to guarantee communication continuity, and an unary one-connected-component constraint for each cell. Accordingly, the selected cells must optimize different objectives: the number of used sites, the amount of traffic handled and the potential interference level. The above constraints and objectives are rather interdependent and often have conflicting natures. This leads to the difficulty of producing feasible solutions.
384
Metaheuristics: Progress as Real Problem Solvers
In addition, the combinations are numerically huge in realistic networks. To give an example, figure 17.1 shows a geographic working area for a small town. Its size is 49.6 km wide and 45.8 km high. There are 17393 points to cover (the shape in the middle of the figure) and 568 potential sites (crosses in the figure).
Figure 17.1. Small town working area
Modelling. Due to this level of difficulty, we will be concise and refer the interested reader to [13, 181. We must first define the set of variables, then the set of constraints and finally the inherited objective function. Important concepts are needed for the formalisation: service test points S T P , where the radio signal must be higher than a threshold Sq; base stations B S aggregating the entities: site, antenna type, power, azimuth, and tilt; cells defined by the set of points p E S T P covered by a BS. Starting from the remaining set of 5-tuples after filtering: B = {b = (site, antenna, tilt, azimuth, power)), where each b represents a good BS, and associating the field strength Cdbp produced by b at the point p E S T P , we define the cell for each b E B by: Cell(b)={p E S T P , Cdbp 2 Sq A b'b' E B,Cdbp 2 Cdbl,). Each cell is split into two areas.
+
Cdbp < Sq SSP). The frontier: Front(b) = {p E S T P , Sq I Overlapping of frontier areas is allowed in order to consider the handover constraint which imposes that each cell has a nonempty intersection with its neighbouring cells to guarantee continuity of communication.
+
The kernel: ICer(b) = {p E S T P , Cdbp 2 Sq SSq). Kernel area overlapping is forbidden in order to consider the one-connectedcomponent constraints.
385
Consistent Neighbourhood
Figure 17.2. Cell = Front U Ker
Figure 17.2 shows the result of such a partition with a fixed value of SS,. Considerations on SSq are reported in [19]. Finally, representing the A P P within the CSP framework consists in: associating a variable b to each filtered B S that gives Cell@); associating to b the domain value { O , l ) meaning that either b is selected or not; adding the global coverage constraint:
U Cell@)= STP;
adding the global handover constraint; adding the One Connected Component constraints (OCC); adding the kernel non-overlapping constraints; the objective of this transformed problem is to find an assignment of the variables satisfying the coverage and the kernel constraints. The resulting problem is a paving of the geographic working area. To tackle the A P P , we developed a heuristic Implementation. approach made up of three sequential phases: a drastic filtering step, an optimization process by CN-Tabu, and a post-optimization step by fine tuning antenna parameters. Since our T S algorithm works on binary constraints, the global coverage constraint is relaxed, and the aim of CN-Tabu is to repair it. Hence, the objective function f is the number of covered points p E S T P , rather than the number of instantiated variables, so it is closely specific to the APP. On the other hand, the consistent neighbourhood is built on the kernel non-overlapping constraints, which are straightforwardly handled by the propagation functions. Finally, a move consists in adding a cell to the current configuration and dropping cells that overlap the kernel area.
386
Metaheuristics: Progress as Real Problem Solvers
Results.
Computational experiments were carried out on two large and realistic data sets corresponding to two different types of networks, urban and highway. These benchmarks were generated by the French Telecom's research laboratory, CNET. Depending on the benchmark and
Figure 17'. 3.
Urban network cells solution
the tuning of the filtering step, CN-Tabu had to deal with configurations containing up to 400000 binary components. The global heuristic approach, including CN-Tabu, found feasible solutions for all these scenarios. Algorithm results are tedious lists of antenna parameters that must be analyzed by specific software to evaluate their quality. A cellular network expert can judge the efficiency of a solution more quickly from the cell design as shown in Figure 17.3. The sharpness of this picture is representative of OCC constraint satisfaction and guarantees a very low interference level. For further details of numerical results and other benchmarks see [18].
17.5
CONCLUSION AND PERSPECTIVES
We have presented an original local search algorithm, CN-Tabu, adapted to combinatorial optimization problems with hard constraints of weak arity. The main specificities of our tabu algorithm are the search space built on partial configurations followed by the neighbourhood construction based on constraint programming tools. Such features enable progress to be made, at each iteration, under consistent partial configurations. Consequently, the neighbourhood is designed by consistency checking and its efficiency is ensured by an incremental updating step. We showed that CN-Tabu is well-designed for tackling some hard real-life problem. In practice, this algorithm was easily combined with several exact search methods. Resolution of the F A P P is a series of arcconsistency filtering steps followed by CN-Tabu. The DPSP one consists in embedding a backtracking process, for the ternary constraints, in the CN-Tabu algorithm, and a dynamic programming procedure, to treat the capacity constraint. CN-Tabu was bridged with a partial enu-
Consistent Neighbourhood
387
meration algorithm to solve the AEOS management problem. Finally, in resolving the A P P , CN-Tabu was shown to be easily embedded in a more general solving process. With regard to development perspectives, there are two promising directions for future research. First, nogood exploitation could be dramatically improved, particularly in the tabu list, and in the move heuristic. Second, an intensification pattern with an exact tabu list would tend to produce an exact resolution in promising regions. As application perspectives, the designed neighbourhood may be applied to other well-known problems in the areas of C S P and SAT.
REFERENCES [I] R. Bellman and D. Stuart. Applied Dynamic Programming. Princeton University Press, 1962. [2] E. Bensana, M. Lemaitre, and G. Verfaillie. Benchmark Problems: Earth Observation Satellite Management. Constraints, 4(3):293299, 1999. [3] E. Bensana, G. Verfaillie, J.C. Agnkse, N. Bataille, and D. Blumstein. Exact and Inexact Methods for the Daily Management of an Earth Observation Satellite. In Proc. 4th Intl. Symposium on Space Mission Operations and Ground Data Systems, Germany, 1996. [4] S. Bistarelli, H. Fargier, U. Montanari, F. Rossi, T. Schiex, and G. Verfaillie. Semiring-based CSPs and Valued CSPs: Basic Properties and Comparison. Constraints, 4:199-240, 1999. [5] J.F. Cordeau, G. Laporte, and A. Mercier. A Unified Tabu Search Heuristic for Vehicle Routing Problems with Time Windows. Journal of Operational Research Society, pages 59:928-936, 2001. [6] V.D. Cung and T. Defaix. Quelques problkmes d'allocation de frequences et le Challenge ROADEF72001. Actes des 7idmes Journe'es Nationales sur la re'solution pratique de Probl2mes NPComplets (JNPC701), pages 9-19, 2001. [7] C. Fleurent and J.A. Ferland. Genetic and Hybrid Algorithms for Graph Coloring. Annals of Operations Research, 63:437-461, 1996. [8] P. Galinier, S. Bisaillon, M. Gendreau, and P. Soriano. Solving the Frequency Assignment Problem with Polarization by Local Search and Tabu. the 6th Triennal Conference of the International Federation of Operational Research Societies (IFORS'OZ?), University of Edinburgh, UK, 8-12 July 2002. [9] F. Glover and M. Laguna. Tabu Search. Kluwer Academic Publishers, 1997.
388
Metaheuristics: Progress as Real Problem Solvers
[lo] W.D. Harvey and M.L. Ginsberg. Limited Discrepancy Search. in Proceeding of the 14th International Joint Conference on Artificial Intelligence (IJCAI-95), pages 607-613, 1995. [ll]M. Lemaitre, G. Verfaillie, F. Jouhaud, J.C. Lachiver, and N. Bataille. Selecting and Scheduling Observations of Agile Satellites. Aerospace Science and Technology, 6(5):367-381, 2002. [12] A. Mackworth. Consistency in networks of relations. Artijicial Intelligence, 8(1):99-118, 1977. [13] P. Reininger and A. Caminada. Model for GSM Radio Network Optimization. In 2nd Intl. ACM/IEEE Mobicom Workshop on Discrete Algorithms and Methods for Computing and Communications (DIALM), Dallas, USA, December 1998. [14] ROADEF72003Challenge. Booklet of Abstracts. ROADEF society, France, February 2003. [15] T. Schiex, H. Fargier, and G. Verfaillie. Valued constraint satisfaction problems: hard and easy problems. in Proc. of the 14th International Joint Conference on Artificial Intelligence, (IJCAI-95), Montreal, Quebec, pages 631-637, 1995. [16] P Shaw. Using Constraint Programming and Local Search Methods to Solve Vehicle Routing Problems. In Principle and Pratice of Constraint Programming, CP798,October 1998. [17] M. Vasquez. Arc-Consistency and Tabu Search for the Frequency Assignement Problem with Polarisation. In Proc. of the 4th International Workshop on Integration of A I and OR techniques in Constraint Programming for Combinatorial Optimization Problems (CP-AI-0R702), pages 359-372, Le Croisic, France, march 2002. [18] M. Vasquez and J.K. Hao. A Heuristic Approach for Antenna Positioning in Cellular Network. Journal of Heuristics, 7:443-472, 2001. [I91 M. Vasquez and J.K. Hao. A "Logic-Constrained" Knapsack Formulation and a Tabu Algorithm for the Daily Photograph Scheduling of an Earth Observation Satellite. Computational Optimization and Applications, 20:137-157, 2001.
Chapter 18
CONSTRAINT ORIENTED NEIGHBOURHOODS - A NEW SEARCH STRATEGY IN METAHEURISTICS Ana Viana,'
Jorge P. Sousa
and Manuel A. Matos2
ISEP - Instituto Superior de Engenharia do Porto, Rua Dr. Antonio Bernardino de Almeida, 431, 4200-072 Porto, Portugal
'FEUP - Faculdade de Engenharia da Universidade do Porto, Rua Dr. Roberto f i a s , s/n, 4200-465 Porto, Portugal
INESC Porto Campus da FEUP, Rua Dr. Roberto f i a s , 378, 4200-465 Porto, Portugal (aviana, jsousa,mmatos)@ines~~orto.~t
Abstract: One major practical problem when applying traditional metaheuristics seems to be their strong dependency on parameter tuning. This issue is frequently pointed out as a major shortcoming of metaheuristics and is often a reason for Decision-Makers to reject using this type of approach in practical situations. In this paper we present a new search strategy - Constraint Oriented Nezghbourhoods - that tries to overcome the referred drawback. The aim is to control the grade of randomness of metaheuristics, by defining "special" neighbourhood movements, that lead to a more robust heuristic, less dependent on parameter tuning. This is achieved by selecting and applying particular movements that take into account the potential violation of problem constraints. The strategy is illustrated in a real problem arising in the area of Power Systems Management - the Unit Commitment Problem, the computational experiments on a set of problem instances systematically outperforming those presented in the literature, both in terms of efficiency, quality of the solution and robustness of the algorithm. Keywords: Constraint oriented neighbourhoods, metaheuristics, unit commitment.
390
18.1
Metaheuristics: Progress as Real Problem Solvers
INTRODUCTION
After two decades of existence, metaheuristics are still an important area of research in combinatorial optimisation, with an ever growing publication of reports, papers and books. What we can call now "the classical metaheuristics"- Simulated Annealing, Tabu Search and Genetic Algorithms (Reeves, l995), evolved to more refined methods, and also gave rise to new methodologies like VNS - Variable Neighbourhood Search (Hansen and Mladenovib, 1997), GRASP - Greedy Randomised Adaptive Search Procedure (Feo and Resende, 1995), Ant Colonies (Dorigo and di Caro, 1999), Scatter Search and Path Relinking (Glover et al., 2000), etc. The areas of application of these techniques have also increased, and one can find studies in as diverse areas as telecommunications (Costamagna et al., 1998), power engineering (Viana et al., 2003), timetabling (Thompson and Dowsland, 1998), scheduling (Jozefowska et al., 2002), or vehicle routing (Gendreau et al., 1994). A recent natural trend is on developing multiobjective metaheuristics (e.g. (Czyzac and Jaszkiewicz, l998), (Serafini, l992), (Horn et al., l994), (Hansen, 1997)), where very promising results are being achieved. Given the considerable dynamism and interest of the scientific community in the subject, and the good results obtained with metaheuristics, one might think that metaheuristics are also strongly used in commercial applications. However this is not the case (Burke et al., 2003). Commercial software packages, for combinatorial optimisation problems, remain relatively traditional in what concerns the optimisation techniques used. One main reason for not using metaheuristics is that in general they are not viewed as reliable tools for supporting real decision making, due to the high dependence of their performance on parameter tuning. In this paper we propose a new general approach to handle this problem - Constraint Oriented Neighbourhoods. The idea behind this approach is to partially control metaheuristics randomness by defining several "special" neighbourhood movements, in such a way that drastic changes in a solution are avoided, allowing a smoother search and, consequently, a correct intensification phase during the search process. As the intensification phase becomes less dependent on parameter tuning, we expect the heuristic to be more robust. To illustrate its main features and potential, the concept of Constraint Oriented Neighbourhoods is applied to the Unit Commitment Problem in Power Systems Management. Computational results outperform those reached by a general purpose neighbourhood, as well as other benchmark results presented in the literature, both in terms of efficiency and effectiveness.
Constraint Oriented Neighbourhoods
18.2
ROBUSTNESS IN METAHEURISTICS
The advantages of metaheuristics are widely reported in the literature (e.g. (Glover and Kochenberger, 2003)): they are usually easier to develop than optimising constructive heuristics, leading to a significant reduction in software development time; they are able to easily incorporate new information/details in the model, being therefore easy to adapt to different problem variants; they can tackle complex cost functions; they are able to solve the very same problem for completely different objective functions, with minor changes in the code, etc. However these advantages are not fully accepted by decision makers, who are in general reluctant to using this type of algorithms in practice. There are two main reasons for this type of attitude: i) The performance of metaheuristics is, in general, highly dependent on parameter tuning. This is not a transparent process for Decision Makers that seldom understand what is the real meaning of the parameters. Moreover, they do not want to depend on an analyst every time that parameter tuning is required. ii) Metaheuristics do not have a "sound" mathematical foundation, when compared to more traditional techniques. In this paper we will focus on issue i) that is strongly related to the non satisfaction of two of the properties that, according to (Hansen and Mladenovid, 2002) and (Barr et al., 1995), should be found in metaheuristics, to guarantee their practical and theoretical interest, namely, user friendliness and robustness.
PROPERTY 1 Userfriendliness - "Heuristics should be well-defined, easy to understand and, most important, easy to use. This implies that they should have as few parameters as possible and ideally none." (Hansen and Mladenovid, 2002) PROPERTY 2 Robustness - The performance of heuristics should be consistent, performing well over a wide range of instances and parameters. Attempts have already been made to reduce parameter tuning by way of adaptive metaheuristics, as in (Battiti, 1996), where historybased feedback is integrated in local search for on-line definition of search parameters. In terms of robustness improvement, several lines of research have been followed. It has been shown that parallel implementations tend to be more robust than the single thread ones (Cung et al., 2001) and it is
392
Metaheuristics: Progress as Real Problem Solvers
also claimed (Ribeiro et al., 2002) that hybrid approaches present better results. Following a different approach, we will propose in this work a new strategy to reduce the impact of the metaheuristic parameters on their performance and, consequently, to improve their robustness in some combinatorial optimisation problems - Constraint Oriented Neighbourhoods (CON). This strategy consists in defining several neighbourhood movements, and in each iteration choosing one of these alternative movements, so that the new solution is not drastically different, and the search process is smooth. By doing so, we aim at achieving good intensification phases, following a procedure that is less dependent on parameter tuning than usual and consequently we expect to obtain a metaheuristic that is more robust. Some metaheuristics that consider alternative neighbourhoods have already been proposed (e.g. VNS (Hansen and Mladenovik, 1997) and Iterated Local Search (Louren~oet al., 2003), if we consider a perturbation to be an alternative movement). Nevertheless, they differ from CON both conceptually and in the underlying aim for using alternative movements: i) CON is not a metaheuristic. It is a search strategy to embed in Local Search based metaheuristics that considers alternative neighbourhood movements that take into account a specific problem constraints. The application of these movements during the process of search depends on the violation of the constraints of the problem being handled. ii) In, for example, VNS and ILS, multiple neighbourhood definitions are considered with the purpose of diversifying the search. On the contrary, in CON they are designed with the purpose of allowing a correct exploitation of the search space. iii) Metaheuristic are expected to be general and applicable to any combinatorial optimisation problem. On the contrary, the scope of application of CON is limited to some problems, presenting a specific set of features. A discussion on the scope of application of CON to Combinatorial Optimisation problems will be given later in this paper.
18.3
CONSTRAINT ORIENTED NEIGHBOURHOODS
A major advantage of metaheuristics, over problem specific heuristics, is that they can often be easily implemented, as they are usually designed
Constraint Oriented Neighbourhoods
393
on simple and easy to understand neighbourhood structures. There are however many cases where simple movements lead to infeasible solutions and the recovering techniques needed to reach feasibility involve complex procedures that may drastically change the structure of the solutions. In such cases, it is probably better to define more elaborate neighbourhood structures, to prevent a complex and computationally hard recovering process, and to allow a smoother search process. Generating a smoother search process, less dependent on parameter tuning, is the major motivation of Constmint Oriented Neighbourhoods. This goal is achieved by defining neighbourhood operations that, if leading to infeasible solutions, feasibility is easy to recover and the resulting solution is not very different in structure from the current one. In each iteration, the metaheuristic first checks what kind of constraints will be violated if part of the current solution is removed and then, accordingly, applies one specific neighbourhood movement, from a set of possibilities. Here we distinguish between neighbourhood structure and neighbourhood movement as follows: a neighbourhood structure is a two step procedure where 1) part of the current solution is removed, i.e. if the state of one or more of its decision variables is disabled, leading (or not) to an infeasible solution; 2) a neighbourhood movement is applied to restore solution feasibility (if necessary), or to diversify the search process. For the sake of generality, movements should be designed taking into consideration a broad range of possible problem instances.
18.3.1
General description
The Constraint Oriented Neighbourhoods (CON) strategy assumes that a good understanding of the solution structure and of the reasoning underlying the problem decisions may be helpful for a successful search process. Therefore it implies that a pre-analysis is performed to study the structure of solutions in each particular problem. The aim of this phase, that is not related to any computational assessment, is to detect those constraints that, for a general purpose neighbourhood structure (a neighbourhood that remains constant all over the search process and that may significantly change the current solution), require the use of a complex recovering algorithm - the hard recovering constraints. Once the sets of hard recovering constraints have been identified, all possible combinations of constraint violation are enumerated and, for each scenario, a neighbourhood movement is designed. The neighbourhood movements are not necessarily different for all cases but, in any case, if n types of hard recovering constraints are considered, one should analyse 2n different scenarios. For diversification purposes, a general purpose
Metaheuristics: Progress as Real Problem Solvers
394 Algorithm CON
i=O Build an initial solution X, Repeat x = ChangeVariableState(Xi) SetConst = CheckConstraintViolation(Xi\x) Neighb = SelectNeighbMovement(SetConst) Y = GenerateRandomSolution(Neighb,Xhx) Accept (or not) Y as the new current solution, Xi+,, according to the metaheuristics rules i++ Until Stopping criterion is met
Figure 18.1. Basic Constraint Oriented Neighbourhoods search strategy
movement (GPM) should also be designed and applied when, for exarnple, all the constraints are violated. The main steps of the basic Constraint Oriented Neighbourhoods strategy are presented in Figure 18.1. As the concept of CON may be applied to any metaheuristic based on Local Search, the number of generated solutions in the neighbourhood of the current one may vary, depending on the particular metaheuristic considered. For example, if Simulated Annealing is considered, the procedure will only generate a neighbour solution, but for Tabu Search several neighbours will be generated. The acceptance criterion will also depend on the metaheuristic considered and, as so, it is not specified in this general algorithm description. Again, a Simulated Annealing approach would require the specification of an acceptance probability, while for Tabu Search one would have to set one, or several, aspiration criteria. First, an initial solution is built, by way of any simple constructive heuristic, guaranteeing a feasible solution without any particular concern on its quality. In each iteration of the process, for the current solution Xi, the Changevariablestate procedure is applied. Within this procedure, the state of one or several decision variables, x, is changed. This will most probably lead to an infeasible solution, where some or all types of constraints are not satisfied. So, in CheckConstraintViolation(Xi\x) one detects the sets of hard recovering constmints that are not met (SetConst) and, accordingly, a specific neighbourhood movement (Neighb) is selected in SelectNeighbMovement(SetConst). Finally the selected movement is applied to the current solution, in GenerateRandomSolution, leading to a new solution, Y, that may be accepted, or not, as the new current solution.
Constraint Oriented Neighbourhoods
18.3.2
Motivations for CON
To better understand why the Constraint Oriented Neighbourhood concept should work, consider the following example. Suppose that you have to assign people to shifts, subject to some constraints: 1) each person r, when assigned to a shift starting at period t, must remain assigned for at least u, consecutive periods; 2) when an assignment is over, a person will have to be off for, at least, o, consecutive periods; 3) each shift requires that at least nt people are assigned to it. Consider also that a general purpose neighbourhood for this problem is to randomly pick a pair (r, t), change its state, starting in t, for a randomly chosen number of consecutive shifts (st) and, if necessary, apply some recovering rules to recover solution feasibility. Figure 18.2 exemplifies the case where such a neighbourhood is applied, for a problem with 5 people and 7 shifts, when st is set to 2. In each matrix, 1's indicate that a person is assigned to a shift (07s,otherwise). It has also been considered that us = 2, 01 = 3, 04 = 2, n5 = 3, n6 = 2 and n7 = 3. First, the pair (5,5) is randomly chosen (Figure 18.2.a)) and, accordingly, the state of person 5 is changed from 1 to 0 , from t = 5, until t = 6 (Figure 18.2.b)). The resulting solution is infeasible because u5 = 2. Trying to recover feasibility, the state of pair (5,7) is changed to 0 (Figure 18.2.c)) but the resulting solution is still infeasible because the number of persons assigned to shifts 5, 6 and 7 is not enough. So, in Figure 18.2.d), person 4 is assigned to shifts 5 and 6, the resulting solution being still invalid because, after a shift, person 4 must be off for at least 2 consecutive periods of time. Therefore, the state of that person, in period 4, is changed (Figure 18.2.e)). It is still necessary to check if the the number of people that is assigned to shift 7 respects the minimum, done in Figure 18.2.f). By doing so, we reach a solution where person 1 stays off for 2 periods of time, after a shift. As it is required that this person stays off for at least 3 periods of time (01 = 3), a new operation is applied to the solution. Finally, we reach a feasible solution (Figure 18.2.g)). Let us now evaluate the impact of applying a constraint oriented neighbourhood to a solution. Suppose that we pick pair (5,5) (Figure 18.3.al)) and change its state. This operation leads to an infeasible solution, because the minimum number of people that should be assigned to that shift is not reached (Figure 18.3.bl)). The neighbourhood operation related to the non-verification of this constraint is applied, leading to a feasible solution in Figure 1 8 . 3 . ~ ~ If ) . it were another constraint that had not been verified, another neighbourhood operation would be applied, as exemplified in Figure 18.3.a2),b2), c2). In this second case, by
396
Metaheuristics: Progress as Real Problem Solvers Shifts
1
2
3
4
5
6
7
1 0 -
2
$ 3 a 4
5
a) Initial solution
u, - minimum number of consecutive shifts 1, - maximum number of consecutive shifts o, - minimum number of shifts off
nt - minimum number of people assigned t o shift t
g) Final solution
Figure 18.2. Effect of a general purpose neighbourhood in a solution (shifts assignment problem)
changing the state of the pair (4,3) the solution becomes infeasible due to the non-verification of the minimum number of consecutive periods that this person must be assigned to shifts. A neighbourhood operation, different from the previous one, is applied and leads to the feasible solution depicted in Figure 1 8 . 3 . ~ ~ ) . As shown, in Figure 18.2, what we might expect to be a localised operation, leading to a solution similar to the current one, ended up strongly changing it. If this occurs frequently when applying a neighbourhood operation to a solution, the resulting solutions will tend to be far apart in the solution space, and no intensification during the search process will be achieved. This is in general a non desired behaviour, closer to a "random walk" search, not able to fully explore certain areas of the search space, unless very strict criteria of acceptance of solutions, related to the metaheuristics parameters, are defined. A correct intensification of the search process may also be achieved by defining neighbourhood movements that lead to solutions that are similar in structure to the current one. This is the reasoning behind CON,
Constraint Oriented Neighbourhoods Shifts 1
2
3
4
5
6
7
al) Initial solution
bl) n5 = 3
cl) Final solution
Shifts 1
2
3
4
5
6
a2) Initial solution
7
b2) u4 = 2
c2)
Final solution
Figure 18.3. Effect of a Constraint Oriented Neighbourhood in a solution (shifts assignment problem)
where multiple neighbourhood movements are designed so that, when applied, solutions will tend to be similar in successive iterations, allowing a correct exploration of a given area of the solution space, independently of the metaheuristic parameters. For diversification purposes, the approach should also allow the use of a general purpose neighbourhood that may be applied when, for example, all hard recovering constraints are not verified.
18.3.3
Scope of application
The Constraint Oriented Neighbourhoods search strategy may be considered as a good approach for problems where general purpose neighbourhoods lead to the following situations: i) if complex algorithms are required to recover solution feasibility; ii) if consecutive solutions are often significantly different, and promising areas of the search space are not correctly explored; iii) if worse solutions are often produced with a significant increase in computational time. Classical optimisation problems such as the TSP or the Knapsack problem do not, in general, suffer from such problems and therefore do no seem interesting for using this strategy. However, other problems,
398
Metaheuristics: Progress as Real Problem Solvers
such as Resource Constrained Project Scheduling (Viana and Sousa, 2000)) Timetabling (Burke and Petrovic, 2002), Rostering Scheduling problems (Ernst et al., 2004) or the Unit Commitment Problem (Viana et al., 2003), might well be considered as potential cases for applying this strategy.
18.4
APPLICATION TO THE UNIT COMMITMENT PROBLEM
In this section we present an application of Constraint Oriented Neighbourhoods to the Unit Commitment Problem (UCP) of thermal (steam) units, a problem arising in the area of Power Systems management. We first briefly introduce the problem, then state the reasons to use Constraint Oriented Neighbourhoods and, finally, present some implementation details, along with computational results.
18.4.1 Problem description The Unit Commitment Problem is the on/off problem of selecting the power generating units to be in service, and deciding for how long will they remain in that state, for a given planning horizon (lasting from 1 day to 2 weeks, and generally split in periods of 1hour). The committed units must satisfy the forecasted system load and reserve requirements, at minimum operating cost, subject to a large set of other system, technological and environmental constraints. Given that operating costs depend on the load assigned to each generator, the problem of committing units is directly connected to the additional problem of (roughly) assigning the load demand to the units that are on ("pre-dispatch" problem). This part of the problem can be easily solved by using e.g. the A-iteration method, based on the Kuhn-Tucker conditions (Wood and Wollenberg, 1996). However, the whole UCP is a combinatorial true multi-period problem (due to important start-up and shut-down costs) and the exact methods that have been used to solve it proved to be inefficient and, in general, not able to find a solution within the time available for real decision making. Thus, many heuristic approaches (capable of efficiently finding satisfactory, not necessarily optimal, solutions) have been developed to solve the problem. Heuristic approaches based on exact methods, e.g. Branch-and-Bound with cuts, as well as methods based on priority-lists and Lagrangian Relaxation or, more recently, metaheuristics (e.g. Genetic Algorithms, Simulated Annealing, Tabu Search) have been used (Sen and Kothari, 1998). The model presented in this paper considers that the power units are centrally managed, and aims at minimising the total production cost
Constraint Oriented Neighbourhoods
399
over the planning horizon, expressed as the sum of fuel, start-up and shut-down costs. Several complex system and technological constraints have to be considered, as described below.
Objective function and constraints. Usually, the UCP aims at minimizing the total production costs over the planning horizon, expressed as the sum of:
+
i) Fuel costs - represented by a quadratic function (Fi = ci P: bi Pi q,where Fi is the fuel cost of unit i; ai, bi and ci are the fuel cost parameters, measured in $/h, $/MWh and $ / M w ~ ~ , respectively, and Pi is the production level of unit i ) .
+
ii) Start-up costs - may be given by constants that depend on the last period the unit was operating. Two constants are defined: one for hot start-up costs, that are considered when the unit has been off for a number of periods smaller or equal to a given value, and another for cold start-up costs, that are considered otherwise. iii) Shut-down costs - represented by a constant. Constraints modelling the following aspects are considered: i) System power balance demand - committed units must satisfy load demand. ii) System reserve requirements - the total amount of generation available in the system, minus the current load demand, must be above a certain value. This condition is related to reliability and quality of service. iii) Unit initial conditions. iv) Unit minimum up and down times - if a unit is o f i it must remain off for at least periods of time. On the other hand, if a unit is on it must remain on for at least Ton periods of time, where ~ ' f f and TOn are a unit minimum down and up time. respectively; v) Unit rate limits - a unit cannot be producing below a minimum production level, or above a maximum production level.
18.4.2
Suitability of Constraint Oriented Neighbourhoods to the UCP
Although general purpose neighbourhoods have been used to solve the UCP (Viana et al., 2OO3), they do not seem very adequate to tackle the problem, both in terms of algorithm robustness and effectiveness.
400
Metaheuristics: Progress as Real Problem Solvers
Two main characteristics of the problem seem to negatively affect the performance of such a neighbourhood: i) It is a true multi-period problem. This requires complex feasibility recovering neighbourhood movement algorithms that usually lead to neighbour solutions that are significantly different from the current one. ii) The high dependency of the load profile on the period of the day. Except for a few abnormal situations, it is easy to detect in a load profile periods corresponding to a peak in load demand, and others corresponding to low load demand. Low load periods are characterised by having most of the system units off. Therefore, assuming for example that we are using the "traditional" neighbourhood, the probability of choosing a period t of the day corresponding to a low load period, and selecting a unit i that is currently off, is high. If the decision is to switch on that unit, the probability of generating "interesting" solutions is low and consequently many solutions will be discarded, leading to a significant increase in computational time.
18.4.3
Implementation details
In general, a Unit Commitment solution is represented by a binary matrix, where each row represents the operation schedule of one unit, over the planning horizon. For a given solution, a pair (i, t) is called a "transition point" if unit i changes its state from on to off or from off to on, in period t. Transition points corresponding to units switching on are likely to be critical when designing neighbourhoods to tackle the UCP. If a unit was off in period t - 1, and is switched on in period t, there is a reasoning behind this decision that should be understood - either the unit is switched on to satisfy some problem constraints (load, reserve, etc.), or simply to allow that a correct diversification is achieved. In the first case, several alternative movements, that should take into account the kind of constraints that are critical, might be applied. Accordingly different alternatives should be studied, thus defining a Constraint Oriented Neighbourhoods approach. Three neighbourhood movements, corresponding to the three sets of hard recovering constraints that will be considered in this implement& tion (demand, reserve and minimum up-time constraints), were defined: Load Movement, Reserve Movement and Up-time Movement. These movements, described below, can be applied in any point of the search
40 1
Constraint Oriented Neighbourhoods
process, according to the evaluation of constraint violation. Furthermore, to allow search diversification, the General Purpose Movement (GPM) considered in (Viana et al., 2003) will be applied, when none of the referred constraints is verified. This neighbourhood consists in randomly choosing one unit i, a period t and a direction dir, that indicates if the changes will be done to the left (before) or to the right (after) of t. Depending on the state of unit i in period t, this change will mean a shut-down or a start-up for a certain amount of time, decided by a set of rules exhaustively described in (Viana et al., 2003).
Initial steps. For implementing the neighbourhood structure considered in this work, the following initial steps are performed. Given a solution, we start by randomly choosing a period t and, for that period, a unit i that is on. Then, one checks what happens to solution feasibility if the unit is switched off in the transition points immediately before and after t. Two things may happen: 1) solution feasibility is maintained, i.e. there was not a "rational" reason for the unit to be on and, therefore, it should be switched off with no further changes in the solution; 2) solution feasibility is not maintained and, in this case, one must analyse which constraint(s) is (are) not verified and accordingly perform a specific movement. Load Movement. The Load Movement is applied whenever load requirements are not met, if a unit (gerof) is switched off in period t l . To restore solution feasibility a procedure that divides the units into expensive and cheap generation units was implemented. To perform this partition, the minimum and maximum production cost, per MW, of each unit and Ah,, respectively) are computed, based on the derivative of the fuel cost function: A(Pi) = aiPi bi. Unit a is said to be cheaper than unit b if A&,, 5 Then b is more expensive than a. Unit a is said to be eventually cheaper than unit b if 5 As described in Figure 18.4, for a given period tl, the Load Movement will first select those units (SUnits) belonging to the set of cheaper units. If there are no such units available, or if they are not sufficient to recover load demand, the units from the set of possibly cheaper units are added to SUnits. After confirming that load can be recovered, if all (or some of) the units in SUnits are switched on (Checkload(SUnits)), gerof is switched off and then, while load is not recovered, units are continuously selected from SUnits to be switched on (RandomlyChooseUnit(SUnits)). For each such unit (ger), we first check for how many periods does that unit need to be switched on (switch on period), to comply with minimum
(Ahin
+
Akin.
402
Metaheuristics: Progress as Real Problem Solvers Algorithm Load Movement(t,, geroff) SUnits = CheaperUnits(t,) if SUnits = {} or production is not enough SUnits = SUnits U PossiblyCheaperUnits(t,) Available Prod = CheckLoad(SUnits) if SUnits # 0 and Available Prod SwitchOff(t,, geroff) While SUnits # {} and production is not enough ger = RandomlyChooseUnit (SUnits) Remove(ger, SUnits) switch on period = StartUpTime(ger) SwitchOnGer(ger, switch on period) CheckProduction(t,)
Figure 18.4. Algorithm Load Movement
up-time constraints, and only then is the unit switched on, in those periods (SwitchOnGer(ger, switch on period)). At the end, we must check if the production in tl is already enough and, if so, the process is finished. Otherwise, a new generator is selected and the algorithm is repeated.
Reserve Movement. The Reserve Movement is applied whenever reserve requirements are not met, even if the load requirements are, if unit i is switched off in period tl. A unit i, leading to this situation, will be called "reserve unit". A "reserve unit" is usually more expensive than the other units on, and it is not producing at its maximum production level. Based on these assumptions, the reasoning behind this movement is to replace the chosen "reserve unit" by another "reserve unit" of lower cost. As described in Figure 18.5, for a given period t l , a Reserve Movement starts by defining the set of possibly cheaper units that are off in that period. To avoid major changes in the solution, this set is reduced to SUnitsl, that considers only the units that can be switched on, only in period tl. Finally, the unit(s) that will be switched on, to recover solution feasibility, is (are) randomly selected from this reduced set. The algorithm proceeds in a way very similar to that proposed for the Load Movement, the only difference being that, in this case, switch on period always equals 1. Up-time Movement. In a state transition point, if by switching that unit off, load and reserve requirements are still met but minimum
Constraint Oriented Neighbourhoods
403
Algorithm Reserve Movement(t,, geroff) SUnits = PossiblyCheaperUnits(t,) SUnits, = ReduceSet(SUnits) Available Prod = CheckLoad(SUnits,) if SUnits, # 0 and Available Prod SwitchOff(t,, geroff) While SUnits, + {} and production is not enough ger = RandomlyChooseUnit (SUnits,) Remove(ger, SUnits,) SwitchOnGer(ger, t,) CheckProduction(t,)
Figure 18.5. Algorithm Reserve Movement
up-time constraints are not, the unit is on only for minimum up time purposes. For such a case, a Up-time Movement is performed. Two situations must be considered. Supposing that the unit is on from t to t1: 1) Move to a solution with the unit on from t
+ 1 to t l +
1.
2) Move to a solution with the unit on from t - 1 to tl - 1.
General algorithm description. The neighbourhood movements described above have been implemented in a Constraint Oriented Neighbourhoods strategy, embedded in a GRASP (Feo and Resende, 1995). The resulting algorithm that was designed for the UCP is described in Figure 18.6. For each GRASP initial solution, Xj7the following procedure is considered. In line 7, a set is built, containing those units that are on in period t, and that are at their minimum production level (P,i,(t)) at the point of transition from off to on (tleft),or at the point of transition from on to off (tright).If there are no units verifying those conditions, a new attempt is made (line 9) to build a set of units, that are on in period t, and that are not at their maximum production level in tl,ft or tright After choosing randomly an unit i from that set, and a period to apply the movement (tl), the possibility of switching off unit i in period tl (xit,) is considered (line 12). This can result in an infeasible solution, as checked in line 13, and if so, a suitable neighbourhood movement is selected and applied (lines 14 and 15). Otherwise, a GPM is applied. The new solution, Y, is then evaluated (line 16) and subject to an accep-
Metaheuristics: Progress as Real Problem Solvers
404 Algorithm CON-UCP
number solutions = 0 Repeat j =0 Build an initial solution Xi Repeat Randomly choose t Units = ObtainUnits P,(t) if Units = Units = ObtainUnits P(t) Randomly choose a unit i from Units t, = Randomly choose(t, )t,, x, = ChangeVariableState(X,) SetConst = CheckConstraintViolation(Xi\xr,) Neighb = SelectNeighbMovement (SetConst ) Y = Generate random solution(Neighb, X,\xitl) PreDisptach(Y) if f(Y) < f(Xj)
=
?+IY
else
X,+1=X, if number solutions = 0 x* = XI+, else if f(X,+,) < f(X*) X* = Xi+, j++ Until Stopping criterion is met number solutions++ Until number solutions = maximum number solutions
Figure 18.6. GRASP with Constraint Oriented Neighbourhoods applied to the UCP
tance criterion. If accepted, it becomes the new current solution of the Local Search phase (line 18). Furthermore, if the new solution is better than the best solution found so far (X*), it becomes the new overall best solution. The algorithm proceeds until the pre-specified number of initial solutions has been reached.
18.5
COMPUTATIONAL EXPERIENCE
The algorithm described above was used to solve the problem instances presented in (Kazarlis et al., 1996). GRASP was chosen for comparison purposes with some previous work (Viana et al., 2003). Ad-
Constraint Oriented Neighbourhoods
405
ditional information on the basic GRASP structure, namely on the Construction Phase step, can be found in that paper. In the following sections we report and discuss the results obtained. We also compare the results with those reported in (Kazarlis et al., 1996), (Valenzuela and Smith, 2002) and (Viana et al., 2003)l. The computational experience reported in (Kazarlis et al., 1996) was performed in a HP Apollo 9000-720, which has a S p ~ C f ~ of 9 52.02. ~ The Sun Ultra 2 with dual 200MHz UltraSPARC CPU, used in (Valenzuela and Smith, 2002), as well as the 500MHz, Pentium PC used in (Viana et al., 2003), have a SPECfp95 of 14.7. Finally, the computational tests presented in this paper, were performed in a 800MHz, Pentium 111, PC with a SPECfp95 of 28.9. The experiments were performed for values of a ranging from 0 to 1, with increments of 0.1, and the maximum number of iterations was set to 200. For each set of parameters, 20 random initial solutions were considered.
18.5.1
Problem instances
The problem instances presented in (Kazarlis et al., 1996) consider a 24 hour planning horizon and the number of units varies from 10 to 100 units. In Table 18.1, the base problem (for 10 units) is presented. The other problems are generated based on this one, by replicating the 10 units several times. The load values are also multiplied by the same increasing ratio and, in all cases, the reserve requirements are considered to be 10% of the load (Table 18.2). In Table 18.1, a, b and c are the coefficients to be used in the fuel cost function. In what concerns transition costs, hot start-up costs are considered when the unit has been off for a number of periods smaller or equal to the value presented in row cold start hours, and cold-start costs are considered otherwise. Shut-down costs are set to zero, for all instances. Finally, the initial state row is related to the unit initial conditions: a positive value (+v) means that the unit has already been
l ~ h e r eare other papers where the instances described in (Kazarlis et al., 1996) where used, e.g. (Juste et al., 1999), (Senjyu et al., 2002). However, to reduce the search space, the authors have slightly changed the problem formulation. Therefore the results are not comparable. 2 ~ h i computer s benchmark, provided by the Standard Performance Evaluation Corporation - SPEC - allows the relative comparison of CPU times obtained in different computer systems. A new benchmark index - SPECfp2000 - is also provided by SPEC. However, a s no information has been provided for the HP Apollo 9000-720, it could not be considered in this paper.
Metaheuristics: Progress as Real Problem Solvers
406 Table 18.1.
Data for the 10 generators problem
Pmax (MW) Pmin (MW) a ($/h) b ($/MWh) c ($/Mw~~) min up (h) min down (h) hot start cost ($) cold start cost ($) cold start hours (h) initial state (h) ., Pmax (MW) Pmin (MW) a ($/h) b ($/MWh) c ($/Mw~~) min up (h) min down (h) hot start cost ($) cold start cost ($) cold start hours (h) initial state (h)
Unit 1 455 150 1000 16.19 0.00048 8 8 4500 9000 5 +8 Unit 6 80
Unit 2 455 150 970 17.26 0.00031 8 8 5000 10000 5 +8 Unit 7 85
Unit 3 130 20 700 16.60 0.002 5 5 550 1100 4 -5 Unit 8 55
Unit 4 130 20 680 16.50 0.00211 5 5 560 1120 4 -5 Unit 9 55
Unit 5 162 25 450 19.70 0.00398 6 6 900 1800 4 -6 Unit 10 55
on for v consecutive periods and a negative value indicates that it has been off (e.g. unit 6 has been off for 3 periods). Table 18.2 presents the load and reserve requirements for a 24 hour planning horizon.
18.5.2
Computational results
Table 18.3 presents the best results reported in (Kazarlis et al., 1996), (Valenzuela and Smith, 2002) and (Viana et al., 2003). In (Kazarlis et al., 1996) the UCP is solved through Lagrangian Relaxation (LR) and Genetic Algorithms (GA). In (Valenzuela and Smith, 2002) it is solved through Genetic Algorithms, Memetic Algorithms (MA) and Memetic Algorithms seeded with an initial solution obtained through Lagrangian Relaxation (LR-MA). LR-MA performed better for all instances, except for the 10 and 20 unit ones, where the best result was achieved by the MA approach. Finally, in (Viana et al., 2003) it is solved with a GRASP algorithm, considering a General Purpose Neighbourhood.
Constraint Oriented Neighbourhoods Table 18.2. Load and reserve requirements Hour 1
Load (MW) 700
Reserve (MW) 70
Hour 13
Load (MW) 1400
Reserve (MW) 140
Table 18.3. Previous computational results (production costs) Problem size
LR
GA
LR-MA
GRASP
Tables 18.4 and 18.5 report the worst and best results obtained with GRASP, for several levels of refinement of the Constraint Oriented Neighbourhoods approach, introduced in this chapter. Table 18.4 reports the results obtained, if only the GPM and the Load Movement are applied (LM). It also presents the results obtained when the three movements introduced in Section 18.4 were implemented (CON1) and applied either in the transition point that immediately precedes t (tleft) or in the transition point immediately after t (tright). Table 18.5 reports the same results when changes are made sequentially before (tleft) and after (tright) the selected period t (CON2). Finally, CON3 differs from CON2 in the sense that, for CON3, one first makes the changes to the left (right) of t and stores the solution (XI). Then, the movements are applied to the right (left) and only if the re-
Metaheuristics: Progress as Real Problem Solvers
408 Table 18.4.
Problem size 10 20 40 60 80 100
Table 18.5.
Problem size 10
Computational results for GRASP with Load Movement and CONl LM Cost of Cost of worst solution best solution 567 570 1 129 930 2 255 970 3 381 020 4 509 270 5 640 040
566 120 1 128 220 2 250 920 3 375 910 4 504 440 5 627 300
CON1 Cost of Cost of worst solution best solution 566 688 1 127 330 2 253 140 3 377 370 4 501 910 5 624 700
565 825 1 126 320 2 248 710 3 371 070 4 494 880 5 615 640
Computational results for GRASP with CON2 and CON 3 CON2 Cost of Cost of worst solution best solution 566 688
565 825
CON3 Cost of Cost of worst solution best solution 566 688
565 825
sulting solution is better than the previous one, it is stored as the current solution. Otherwise, X1 is considered. In Table 18.6 we report, for each approach, the average CPU times that were necessary to obtain a solution equal to, or better than, that of the LR approach. The values are reported to a 800MHz Pentium I11 PC, with a SPECfp95 of 28.9. As shown, the approaches based on CON (LM, CON1, CON2 and CON3) are extremely fast, achieving reductions in CPU time of, at least, 100 times for the 100 unit problem, when CON3 is considered. A graphical representation of the same values, provided in Figure 18.7 for GA, LR-MA, GRASP and CON3, highlights the tremendous decrease in CPU times when CON3 is applied (CPU times are represented in a logarithmic scale).
Constraint Oriented Neighbourhoods Table 18.6. CPU time - comparable values CPU time (sec) Problem size
GA
LR-MA
GRASP
10 20 40 60 80 100
15.45 51.23 188.51 408.19 701.47 1099.6
42.73 145.98 110.38 292.98 337.74 680.57
8.65 290.44 768.57 1341.82 1682.62 2233.99
0
20
40
LM
CON 1
CON2
CON3
84.80 26.37 49.33 81.31 152.50
101.36 1.09 38.78 2.90 9.99 15.01
67.39 16.48 1.08 1.52 4.31 6.77
17 15.27 1.86 1.43 4.59 5.66
60
80
100
Problem size
Figure 18.7. CPU times (log scale)
18.5.3
Comparison of results
In terms of neighbourhood movements, for the same metaheuristic, a comparison between the results show how critical a correct movement definition is for a good performance of the method. As shown, the results obtained by this new approach, based on Constraint Oriented Neighbourhoods, have beaten the general purpose neighbourhood, for all instances, both in terms of efficiency and solution quality. Even for
410
Metaheuristics: Progress as Real Problem Solvers
the more elementary implementation (Table 18.4 - LM), the solutions are considerably better than those obtained with the general purpose neighbourhood studied in (Viana et al., 2003), the results being even improved, for all instances, when all the neighbourhoods described in Section 18.4 are implemented and correctly applied, as reported in Table 18.4 - CON. The second Constraint Oriented Neighbourhoods implementation (see Table 18.5 - CON2), leads to results that, for the 40 and the 100 unit instances, are slightly worse than those presented in Table 18.4 - CON. As mentioned, in this implementation the changes are made sequentially for two periods of time (tl and t2),and the final solution (Xz) is the one selected for future optimisation, even if the first neighbour solution that was generated presents a better result. By doing so, we may miss some interesting solutions during the search process. Finally, for the last implementation (Table 18.5 - CON3), similar to the previous one but selecting the best solution among X1 and X2, there was in general a significative improvement of solution quality, both for the worst and for the best solutions obtained, with an interesting reduction in the required CPU time. The best results obtained with this implementation are also considerably better than those obtained with the GA approach in (Kazarlis et al., 1996). Furthermore, for the larger problems (from 40 to 100 units), the worst results obtained, independently of the parameters set, are also better than those obtained with the GA. When compared with the results presented in (Valenzuela and Smith, 2002), the approach presented in this paper reaches better results for all instances, except for the 80 unit one, where (Valenzuela and Smith, 2002) achieves a slightly better result. Finally, it should be strengthened that, except for the 10 unit problem, the worst results obtained are also significantly better than those reached with LR. Not surprisingly, the approach performs slightly worse for the smaller problems. It seems that when the solution space is small, search procedures closer to "random walks" have a higher probability of reaching good results (though they may take a lot of computational time). Besides, smaller problems can be correctly tackled with many other techniques and the big challenge is on solving large problems, closer to real situations, for which effective and efficient approaches are not available.
Constraint Oriented Neighbourhoods
18.6
CONCLUSIONS
In this paper we have introduced the concept of Constraint Oriented Neighbourhoods for Local Search based metaheuristics, defining its scope of application and testing it in a real complex management problem. The main goal of this search strategy is to obtain robust metaheuristics, less dependent on parameter tuning and therefore more appealing to be used as alternative optimisation tools for supporting decision making. This is achieved by defining several neighbourhood movements, to be applied during the search process in a way that depends on the constraints. A correct definition of these movements produces neighbour solutions that are similar, and that do not involve complex feasibility recovering algorithms. This will hopefully lead to a smoother search and consequently to a good intensification process, that is not as dependent on parameter tuning as usual. As a result, more robust metaheuristics are obtained. For diversification purposes, we do also consider a General Purpose Neighbourhood, to be applied when all hard recovering constraints are violated. To illustrate this idea, GRASP with Constraint Oriented Neighbourhoods has been applied to the Unit Commitment Problem, a rather difficult problem arising in power systems management. Computational experiments on a set of problem instances from the literature, consistently led to better results than others previously obtained, while the required CPU time has been drastically decreased. To conclude, we should strengthen the fact that the computational results achieved were never worse than those obtained by more traditional approaches, like Lagrangian Relaxation, independently of the metaheuristic's parameters. This will hopefully encourage end users to consider metaheuristics as an additional interesting tool for supporting the decision making process, and ultimately promote the use of metaheuristics in commercial software packages for the commitment of power units. As future work, we intend to further formalise and extend the concept of Constraint Oriented Neighbourhoods, and to assess its potential, by applying it to other problems and other metaheuristics. Furthermore, the concept shall also be extended to be able to tackle multiobjective problems.
This work was partially supported by FCT, POSI e FEDER (POSI/SRI/
4 0908/2001)
Metaheuristics: Progress as Real Problem Solvers
REFERENCES Barr, R.S., Golden, B.L., Kelly, J., Stewart, W.R., and Resende, M.G.C. (1995). Designing and reporting on computational experiments with heuristic methods. Journal of Heuristics, 1:9-32. Battiti, R. (1996). Reactive search: Toward self-tuning heuristics. In Rayward-Smith, V.J., editor, Modern Heuristic Search Methods, pages 61-83. John Wiley & Sons. Burke, E., Hart, E., Kendall, G., Newall, J., Ross, P., and Schulenburg, S. (2003). Hyper-heuristics: an emerging direction in modern search technology. In Glover, F. and Kochenberger, G., editors, Handbook of Metaheuristics. Kluwer Academic Publishers. Burke, E.K. and Petrovic, S. (2002). Recent research directions in automated timetabling. European Journal of Operational Research, 140(2): 266-280. Costamagna, E., Fanni, A., and Giacinto, G. (1998). A Tabu Search algorithm for the optimisation of telecommunication networks. European Journal of Operational Research, 106:357-372. Cung, V-D., Martins, S., Ribeiro, C., and Roucairol, C. (2001). Strategies for the parallel implementation of metaheuristics. In Ribeiro, C.C. and Hansen, P., editors, Essays and Surveys on Metaheuristics, pages 263-308. Kluwer Academic Publishers. Czyzac, P. and Jaszkiewicz, A. (1998). Pareto Simulated Annealing a metaheuristic technique for multiple objective combinatorial optimization. Journal of Multi-Criteria Decision Analysis, 7:34-37. Dorigo, M. and di Caro, G. (1999). The ant colony optimization metaheuristic. In Corne, D., Dorigo, M., and Glover, F., editors, New Ideas in Optimization. McGraw-Hill. Ernst, A.T., Jiang, H., Krishnamoorthy, M., and Sier, D. (2004). St& scheduling and rostering: A review of applications, methods and models. European Journal of Operational Research, 153(1):3-27. Feo, T.A. and Resende, M.G.C. (1995). Greedy randomized adaptive search procedures. Journal of Global Optimization, 6:109-133. Gendreau, M., Hertz, A., and Laporte, G. (1994). A Tabu Search heuristic for the vehicle routing problem. Management Science, 40:12761290. Glover, F. and Kochenberger, G. (2003). Handbook of Metaheuristics. Kluwer Academic Publishers, Boston.
Constraint Oriented Neighbourhoods
413
Glover, F., Laguna, M., and Marti, R. (2000). Fundamentals of scatter search and path relinking. Control and Cybernetics, 39(3):653-684. Hansen, M.P. (1997). Tabu search for multiobjective optimization: MOTS. Presented at "The 13th International Conference on Multiple Criteria Decision Making", University of Cape Town, pages 574-586. Hansen, P. and Mladenovik, N. (1997). Variable Neighborhood Search. Computers and Operations Research, 24:1097-1100. Hansen, P. and Mladenovik, N. (2002). Variable neighbourhood search. In Pardalos, P. and Resende, M., editors, Handbook of Applied Optimization. Oxford University Press. Horn, J., Nafpliotis, N., and Goldberg, D.E. (1994). A Niched Pareto Genetic Algorithm for multiobjective optimization. In Proceedings of the lStIEEE Conference on Evolutionary Computation, IEEE World Congress on Computational Intelligence, pages 82-87, Piscataway, New Jersey. Jozefowska, J., Waligora, G., and Weglarz, J. (2002). Tabu list management methods for a discrete-continuous scheduling problem. European Journal of Operational Research, 137:288-302. Juste, K.A., Kita, H., Tanaka, E., and Hasegawa, J. (1999). An Evolutionary Programming solution t o the unit commitment problem. IEEE Transactions on Power Systems, 14:1452-1459. Kazarlis, S.A., Bakirtzis, A.G., and Petridis, V. (1996). A Genetic Algorithm solution to the unit commitment problem. IEEE Transactions on Power Systems, 11233-92. Louren~o,H.R., Martin, O.C., and Stutzle, T. (2003). Iterated Local Search. In Glover, F. and Kochenberger, G., editors, Handbook of Metaheuristics. Kluwer Academic Publishers. Reeves, C.R. (1995). Modern heuristics techniquesfor combinatorial problems. McGraw-Hill. Ribeiro, C., Uchoa, E., and Werneck, R. (2002). A hybrid GRASP with perturbations for the Steiner problem in graphs. INFORMS Journal on Computing, 14:228-246. Sen, S. and Kothari, D.P. (1998). Optimal thermal generating unit commitment: a review. Electrical Power and Energy Systems, 20:443-451. Senjyu, T., Yamashiro, H., Uezato, K., and Funabashi, T. (2002). A unit commitment problem by using Genetic Algorithm based on unit characteristic classification. In Proceedings of the 2002 IEEE Winter Power Meeting, New York, USA.
414
Metaheuristics: Progress as Real Problem Solvers
Serafini, P. (1992). Simulated Annealing for multiobjective optimization problems. In Proceedings of the lehInternational Conference on MCDM, pages 221-248, Taipei. Thompson, J.M. and Dowsland, K.A. (1998). A robust Simulated Annealing based examination timetabling system. Computers & Operations Research, 25:637-648. Valenzuela, J. and Smith, A.E. (2002). A seeded memetic algorithm for large unit commitment problems. Journal of Heuristics, 8(2):173-195. Viana, A. and Sousa, J.P. (2000). Using metaheuristics in multiobjective resource constrained project scheduling. European Journal of Operational Research, 120:359-374. Viana, A., Sousa, J.P., and Matos, M.A. (2003). Using GRASP t o solve the unit commitment problem. Annals of Operations Research, 120(1): 117-132. Wood, A.J. and Wollenberg, B.F. (1996). Power Generation Operation and Control. John Wiley & Sons.