MIC’2001 - 4th Metaheuristics International Conference
679
Solving the Rural Postman Problem by Memetic Algorithms Ana Maria Rodrigues∗‡
Jos´e Soeiro Ferreira∗†
∗
INESC PORTO Rua Jos´e Falc˜ ao 110, 4050-315 Porto, Portugal Email:
[email protected] †
Faculdade de Engenharia da Universidade do Porto Rua Roberto Frias,4200-465 Porto, Portugal Email:
[email protected]
‡
Instituto Superior de Contabilidade e Administra¸ca ˜o do Porto Rua Jaime Lopes de Amorim, 4465-111 S.Mamede de Infesta, Portugal
1
Introduction
The Rural Postman Problem (RPP), as an Arc Routing Problem (ARP), consists of determining a minimum cost tour of a specified arc set of a graph (G=(V,A)) but, with the particularity that only a subset R (R ⊆ A) of arcs is required to be traversed at least once. RPPs are applied in a variety of practical contexts, namely the industrial interesting case of path optimization for components cutting operations. The RPP is NP-hard which makes the search of the global optimum a very difficult task. So, in general, heuristics have been used to obtain near optimal solutions. These heuristics are referred in Section 2, together with the definition of the RPP. In this paper, a new approach, based on Memetic Algorithms (MA), is introduced 1 . A MA can be understood, as described in Section 3, as a Genetic Algorithm with a local search operator to aggregate memetic information, i.e., after the recombination and mutation phases, a local search is applied to the resulting solution. The authors are not aware of applications of MA to the RPP. Section 4 presents a MA to solve the problem exposed in Section 2, the Rural Postman Problem (RPP). In a few words, the procedure consists of 13 individuals, called agents, organized in a ternary tree structure where, each one, handles two tours (the best tour until that moment and the current solution). Recombination and local search are, in this method, the key issues to a near-optimal solution, keeping the organization of the tree and the diversity of the population. At last, in Section 5, computational results and industrial applications will illustrate the new MA approach.
2
The Rural Postman Problem
The Arc Routing Problems (ARPs) consist of determining a minimum cost traversal of a specific arc subset of a graph, G=(V,A). These problems appear in a variety of practical contexts. Common 1 ”Memetic”
results of the word meme that denote the idea of imitation in cultural transmission
Porto, Portugal, July 16-20, 2001
680
MIC’2001 - 4th Metaheuristics International Conference
examples include mail, fuel and newspaper deliveries, trash collection, school bus routing, snow removal, electrical lines and gas mains inspection, etc.[5]. Famous ARPs are the K¨ onisberg Bridge Problem (KBP) and the Chinese Postman Problem (CPP). In the KBP, the question is to determine whether there exists a closed walk traversing exactly once each of the seven bridges. The CPP consists of determining a minimum length closed walk traversing each edge of a graph at least once. If only a subset R (R ⊆ A) of arcs is required to traverse, the problem is known as the Rural Postman Problem (RPP)[5]. The arcs can be directed, undirected or both. RPP, like the Traveling Salesman Problem (TSP), is a NP-hard problem. NP problems are often tackled by heuristics and metaheuristics due to the difficulty of using exact approaches to optimality (global). C´ordoba et al. in [4] propose an heuristic algorithm for the RPP based on Monte Carlo methods. The basis of the idea is to simulate a vehicle traveling randomly over a graph. The vehicle starts on a randomly selected node of a graph. It moves, randomly, from a node to an adjacent node. At each step, the destination is selected on the basis of certain probabilities. The vehicle returns to the initial node once all the required edges have been traversed. All the process is repeated a specified number of times and the shortest one is considered as the output of the algorithm. A standard algorithmic strategy in RPPs is, at the beginning, to determine an augmentation of the graph to transform it unicursal. The second step is to obtain an Eulerian cycle. In the first part, heuristics can be used. These heuristics often embed matching algorithms or shortest spanning tree algorithms to generate an augmented graph that satisfies the unicursality conditions [5]. To generate Eulerian graphs two techniques, as in TSP, are commonly used. In Undirected Rural Postman Problem (URPP) the problem is formulated as an integer linear program, generally with a large constraint set (similarity with the symmetric TSP). In [5], two integer linear programming formulations are presented for the URPP. The first formulation suggested by Christofides and the second proposed by Corber´ an and Sanchis. Directed Rural Postman Problem (DRPP), a generalization of the asymmetric TSP, is defined on a ¯ = (V, R), RPP reduces to a directed graph G=(V,A) where A is now a set of directed arcs. Whenever G CPP. Generally, G=(V,A) is transformed in G’=(V’,A’), a unicursal graph. To solve DRPPs, some authors solve the spanning arborescence relaxation of the problem, coupled with branch and bound [5]. Christifides et al. [2], present an heuristic for the DRPP. This heuristic could be explained in three fases: ¯ the connected graph obtained by the shortest spanning arborescence rooted to an 1. Construct G, arbitrary vertex connecting all the components induced by the required arcs, R 2. Add arcs in a least-cost manner so that, in any vertex, the number of incoming arcs and the number of outgoing arcs is equal 3. Determine an Eulerian circuit on the augmented graph Christofides et al. [2] also proposed a mathematical programming formulation and an exact algorithm. The authors are not aware of any applications of MA to the RPP. In fact, concerning Metaheuristics in general, only the paper [6] is known.
3
Memetic Algorithms
Genetic Algorithms (GAs) developed by Holland in the 1960s and 1970s, is a class of procedures of adaptive search inspired on the evolutionary principles of the genetic populations in nature for generating more fit individuals. The reason of this denomination (Genetic Algorithms) is the analogy between a representation of a complex structure using a vector of components and the idea of a genetic Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
681
structure in the chromosome. Around 1985, a new class of ”knowledge-augmented GA”, also called ”hybrid GAs”, appeared [7]. The basic idea of those methods is to include all knowledge from the problem domain. Later [8] they started to be recognized with the term ”Memetic Algorithms” (MAs), meaning evolutionary algorithms in which local search plays a significant part. The word ”meme” has been introduced by Dawkins in his book ”The Selfish Gene” to denote the idea of a unit of imitation in cultural transmission. Dawkins, in 1990, wrote about it: ”Examples of memes are tunes, ideas, catch-phrases, clothes fashions, ways of making pots or of building arches. Just as genes propagate themselves in the gene pool by leaping from body to body via sperms and eggs, so memes propagate themselves in the meme pool by leaping from brain to brain via a process which, in the broad sense, can been called imitation” [3].
viguram It is usual that Recombination and Mutation produce solutions that do not belong to the local optima space ”(...) but a local optimizer can repair such solutions to produce children that lie within this subspace, yielding a memetic algorithm”, citing Radcliffe and Surry in [12]. A MA can be understood as a GA with a local search operator to aggregate memetic information, i.e., after the recombination and mutation phases, a local search is applied to the resulting solutions. Pablo Moscato et al. [1] enumerate some essential features that a good implementation must combine: 1. a suitable recombination and mutation operators (inherent to any GA) 2. an effective and fast local search algorithm (crucial in MAs) 3. hierarchically structured population 4. advanced data structures and smart codification mechanisms The process begins with a certain number of individuals. For each individual the initial state (solution) can be randomly chosen or given according to an heuristic. After the initialization, each individual makes local search trying to find a local optimum or to improve up his fitness to a predetermined level. The next step is the interaction between the individual and other members of the population. A number of distinguishable individuals compete and cooperate with the other individuals during the search [11, 9, 8]. The Cooperation behavior can be understood as the interchange of information like the mechanism of crossover in GA. The Competition behavior is similar to the selection process in GA (the selection of better individuals by a procedure where individuals subsome each other’s positions according to their relative fitness).
4
Solving the RPP by MAs
A description follows of how MA are used to solve the RPP. In the method implemented, the population is composed of 13 agents, with initial solutions, as a ternary tree of three levels, i.e., subpopulations of four individuals each, where each node represents one agent, thus: 1. Each subpopulation is composed by one ”leader” node and three supporters (follower) 2. The leader of a subpopulation (or cluster) is always better fitted than its supporters At any moment in time, each agent of the optimizing population will be handling two tours. They are: • Pocket Tour - the best tour found or received by that agent Porto, Portugal, July 16-20, 2001
682
MIC’2001 - 4th Metaheuristics International Conference
• Current Tour - the one actually being optimized using the heuristic assigned to that agent The best tour of each agent is updated each time a new ”current” tour, of a smaller length, is obtained [10]. To maintain the organized structure of the tree, the three points below are crucial: 1. Whenever a Current is better than its Pocket, they are switched, so that the latter plays the role of a ”memory” of good solutions 2. If the Pocket solution of the follower is better than the Pocket solutions of a leader, the results are exchanged to keep the hierarchy 3. Keep the agents of a subpopulation in an increasing order of their values in ”Pocket”
All agents optimize their ”current” tours with periods of local search. After they have reached a local minimum the tree is updated and they recombine. A new population arises with feasible solutions, that must be organized according to the fitness of their agents and all the process will be repeated. After a series of recombinations and local search steps, the population naturally loses diversity. To avoid this situation some procedures must be taken, such as: • the individuals involved in the recombination, that usually take place between individuals that belong to the same subpopulation, must occur, sometimes, between individuals of different subpopulations; • if Pocket and Current references stay without switch for a ”long time”, a mutation operator must be applied
5
Computational Results and Industrial Applications
The resolution of the RPP has an important industrial application in perspective: a complex path planning problem appearing in the manufacturing of components for woodworking tools. Components of small size and of irregular shapes must be cut out from circular (expensive) plates made of tungsten with a thin diamond layer, using an electrified copper string cutting tool - see Figure 1.
Nesting
Small pieces n0
n1
n2
n3
n4
n5
Path Optimization
n6
Figure 1: Nesting Problem
This procedure must be carried out in a continuous way, the cutting tool never leaves the cutting surface, and it is specially important to minimize the cutting path/time. Various other practical restrictions must be taken into account. Moreover, there is an obvious connection (and dependence) to the related Porto, Portugal, July 16-20, 2001
MIC’2001 - 4th Metaheuristics International Conference
683
nesting and visibility checking problems, which are extra contributions to the complexity of the path optimization problem. Nesting involves the generation of good layouts, in the circular plates, of the irregular pieces to be cut; Visibility checking is necessary to create possible ways, bridges or extra non required edges to connect the components - irregular pieces, so that the cutting tool may move among them. The computational results obtained illustrate the new MA approach and also allowed a comparison with other results achieved by different methods, both in what concerns published works and the above mentioned industrial case.
References [1] Luciana Buriol, Paulo M. Fran¸ca, and Pablo Moscato. Recursive Arc Insertion: A New Local Search Embedded in a Memetic Algorithm for the Asymetric Salesman Problem. Submited to Journal of Heuristics, page 34, Oct 1999. [2] Nicos Christofides, V. Campos, A. Corber´an, and E. Mota. An Algorithm for the Rural Postman Problem on a Directed Graph. Mathematical Programming Study, 26:155–166, 1986. [3] David Corner, Marco Dorigo, and Fred Glover. New Ideas in Optimization. McGraw-Hill Publishing Company, 1999. [4] P. Fern´ andez C´ordoba, L.M. Garc´ıa Raffi, and J.M. Sanchis. A Heuristic Algorithm based on Monte Carlo methods for the Rural Postman Problem. Computers Ops. Res., 25(12):1097–1106, 1998. [5] H.A. Eiselt, Michel Gendreau, and Gilbert Laporte. Arc Routing Problems, Part II: The Rural Postman Problem. Operations Research, 43(3):399–414, 1995. [6] Myung-Ju Kang and Chi-Geun Han. Solving the Rural Postman Problem using a Genetic Algorithm with a Graph Transformation. RR: Dept. of Computer Engineering, Kyung Hee University, 1998. [7] Alexandre S. Mendes, Paulo M. Fran¸ca, and Pablo Moscato. Fuzzy-Evolution Algorithms Applied to Scheduling Problems. R.Rep.: Departamento de Engenharia de Sistemas, Universidade de Campinas, Brazil, 2000. [8] Pablo Moscato. On Evolution, Search, Optimization, Genetic Algorithms and Martial Arts Towards Memetic Algorithms. Technical Report, Caltech Concurrent Computation Program, C3P Report 826, 1989. [9] Pablo Moscato and Michael G. Norman. A ”Memetic” Approach for the Travelling Salesman Problem. Implementation of a Computational Ecology for Combinatorial Optimization on MessagePassing Systems. M. Valero et al. eds, Proceedings of the International Conference on Parallel Computing and Transputer Applications, Barcelona, Spain, pages 177–186, 1992. [10] Pablo Moscato and Fernando Tinetti. Blending Heuristics with a Population-Based Approach: A ”Memetic” Algorithm for the Traveling Salesman Problem. R.Rep.: Universidad Nacional de La Plata, 1994. [11] Michel Norman and Pablo Moscato. A Competitive-Cooperative Approach to Complex Combinatorial Search. Proceedings of the 20th Joint Conference on Informatics and Operations Research, Buenos Aires, Argentina, pages 3.15–3.29, 1991. [12] Nicholas J. Radcliffe and Patrick D. Surry. Formal Memetic Algorithms. R.Rep.: Edinburgh Parallel Computing Center, King’s Buildings, University of Edinburgh, 1994.
Porto, Portugal, July 16-20, 2001