Recent Advances on Bioinspired ComputationView this Special Issue
An Adaptive Evolutionary Algorithm for Traveling Salesman Problem with Precedence Constraints
Traveling sales man problem with precedence constraints is one of the most notorious problems in terms of the efficiency of its solution approach, even though it has very wide range of industrial applications. We propose a new evolutionary algorithm to efficiently obtain good solutions by improving the search process. Our genetic operators guarantee the feasibility of solutions over the generations of population, which significantly improves the computational efficiency even when it is combined with our flexible adaptive searching strategy. The efficiency of the algorithm is investigated by computational experiments.
In most business processes, a set of operations or activities are constrained by precedence relationships that are imposed by technological characteristics of products or services. The precedence constraints represent a typical operational structure constrained by sequentially and/or related operations. Therefore, the determination of operation sequences considering precedence constraints is one of the most important issues in many industrial problems such as production planning, scheduling, and project network planning problems. In most practices, however, sequencing problem is very difficult to solve because of its combinatorial complexity. More often than not, the solution may be impractical to be used in real environment due to system variability, while most managers in charge of operation sequencing want more sturdy and robust solutions. This study considers, specifically, traveling salesman problem with precedent constraints (TSPPC) and aims to obtain more robust and efficient operation sequence with minimum setups.
TSPPC is a variant of traveling salesman problem (TSP) because all nodes should be visited once but in predetermined order. Precedence constraints make TSPPC have the wider range of industrial applications such as scheduling, project management, and process routing. In solution methods, however, TSP is known to be a class of NP-hard problem and TSPPC is even more complicated with additional constraints. Since no exact solution can be obtained in reasonable computational time and a good solution needs to be practical and implementable in real environment, careful development of new solution method is crucial. As a solution technique, we will consider the evolutionary algorithm which is proven to be very effective in large scale of solution space and provides high flexibility in searching strategy.
We will first present a mathematical model of TSPCP as an appropriate network flow model. A new evolutionary algorithm will be introduced and in subsequent sections modifications of algorithm will be proposed for further improvement of solution. Finally, experimental analyses will validate the efficiency of our algorithms.
2. Literature Review
Abundant researchers have been interested in various types of sequencing problem using TSP. Reinelt  developed a traveling salesman problem library (TSPLIB) which is meant to provide researchers with a broad set of test problems from various sources and with various properties. Chen  discussed an AND/OR precedence constrained sequencing problem and formulated it as a state-constrained traveling salesman model and applied the model to assembly scheduling problem. Also, He and Kusiak  developed a mixed integer formulation and a simple and easy heuristic for a single machine scheduling problem with sequence-dependent setup times and precedence constraints. Recently, Su  proposed a unique reasoning method supported by an artificial intelligent technique of case-based reasoning with evolutionary algorithm to solve the TSPPC problem. Lee et al.  suggested a tree-structured precedence graph to solve the problem of selecting and sequencing operations in process planning with the objectives of minimizing the sum of operation processing, setup, and tool change costs with precedence constraints. Lambert [6, 7] formulated a disassembly scheduling problem by modification of two-commodity network flow model including TSPPC problem. Mingozzi et al.  proposed an exact algorithm to solve the problem using dynamic programming and bounding functions to reduce state space graph. Ascheuer et al.  described the implementation of a branch and cut-algorithm and gave computational results for real-world instances and benchmark problems from TSPLIB. Many exact and heuristic algorithms have been developed in the field of operations research (OR) to solve the variants of TSP. However, precedent constraints always bother the researchers in making efficient algorithms because with them the problems become dramatically difficult.
Many researched also used the memetic computational algorithms to solve TSP. Jati and Suyanto  used the firefly algorithm with the discrete distance between two fireflies and the movement scheme. Ouaarab et al.  employed cuckoo search (CS) algorithm inspired by the breeding behavior of cuckoos. They extended and improved CS by reconstructing its population and introducing a new category of cuckoos. In spite of using memetic computation, precedent constraints are still challenging in TSP.
Meanwhile, genetic algorithm is widely accepted as efficient algorithm to be applied in many intractable problems like TSP. Zeng et al.  used genetic algorithm for antenna design. Poland et al.  solved exosensor distribution optimization problem using genetic algorithm to generate globally optimal sensor distributions for a smart home replica kitchen.
Some researchers used genetic algorithms to tackle TSPPC. As one of the first researchers using genetic algorithm for this problem, Potvin  introduced genetic algorithms for traveling salesman problem and its extensions. Recently, more efficient genetic algorithms were developed using some additional techniques such as special decoder, penalty function, and special genetic operator, all of which efficiently generate good feasible solutions by Michalewicz and Fogel . Ghazalli and Murata  used genetic algorithm to find optimal disassembly sequences for disassembling the end-of-life product. He used topological sort method to generate feasible solutions and fix infeasible solutions. Moon et al. [17–19] also proposed a topological sort based evolutionary approach to solve TSPPC and tool selection problem. Yun and Moon  also used a similar technique to solve precedence-constrained sequencing problem. Even though most of these approaches are very simple and easy to implement, a major drawback is that the quality of solution is not satisfactory enough because of randomness of solution generation. Avoiding randomness and guiding to the better choice of solution are essential to improve GA based algorithms.
In this study, we propose an adaptive evolutionary algorithm to improve the computational efficiency and the quality of solutions. The proposed algorithm searches only the feasible solution space by adopting efficient genetic operators and employs adaptive search strategies to adaptively apply the genetic operations on the current population. Throughout this paper, we use “evolutionary algorithm” as the same meaning as “genetic algorithm,” “evolutionary strategies,” and “evolutionary programming,” which are found in many literatures. The objective of this study is to develop an efficient evolutionary process scheme for TSPPC. The algorithm seeks a solution to minimize the total processing time for implementing all the operations with sequence dependent setup times.
3. Mathematical Model of Traveling Salesman Problem with Precedent Constraints (TSPPC)
The mathematical model of TSPPC is quite similar to the traveling salesman problem (TSP). The graph is used to define TSPPC, where and which indicate nodes and arcs, respectively, in graph . In TSPPC, a node corresponds to an operation and an arc to a processing time. To formulate TSPPC, we need to modify the two-commodity network flow model (as discussed by Lambert ) used in TSP as follows.
TSP. The model assumes that each node has one demand unit and the starting node has units to meet the demand of each node. In other words, the salesman starts with units at the starting node and travels to the end node till meeting the demand of all nodes. The simplified commodity network flow model considers only the amounts of belonging when the salesman enters or leaves a node. Then, a mathematical model can be formulated as follows:(i)parametersthe number of nodes;:the distance from node to node ;(ii)decision variables:integer variable which is decreasing aggregate counter; :decreasing partial counter which is decreased with 1 if node is visited next to ;(iii)objective (iv)subject to
The objective function (2) is to minimize total traveling distance in TSP, for example, the total processing time of operations in scheduling problem. Constraints (3) and (4) indicate that all nodes have one preceding and one subsequent node. Constraint (5) represents counter aggregation, where the amount of belonging at each node is calculated by sum of preceding belongings. The total belonging size is restricted by constraint (6). And constraint (6) also makes starting and end condition for the start and end point. Constraint (7) couples counter and flows. Constraint (8) is for counter decrement. The last constraint (9) restricts the decision variables to integer.
Then TSPPC is formulated as follows.
TSPPC. TSPPC has the same constraint sets of TSP and one additional constraint set for precedence relationships between node and as follows:
Constraint (10) indicates that node precedes node .
This section presents our proposed evolutionary method which searches only feasible solution spaces to improve the computational efficiency. The overall procedure of the algorithm is shown in Figure 1. The procedure includes crossover and mutation processes along with adaptive search strategies. The concept of the adaptive scheme is to adaptively change the values of parameters to enhance the search efficiency.
The details of algorithms are described in the following subsections.
4.1. Solution Representation
Since each gene corresponds to an operation, Figure 2 represents an operation sequence as 2-3-1-5-4-6. Also we have information of the precedence constraints as matrix with parameters . If , then operation should be done before operation.
4.2. Initial Solution and Parameter Setup
The initial solutions can be generated by topological sort (Moon et al. , Yun and Moon ). All solutions of the population are evaluated by the degree of fitness. In terms of TSP, the objective is to find a visit sequence with the shortest traveling time through all nodes. The fitness value of each solution is computed as follows: where is the fitness-function value of th chromosome, indicates the setup time of changing operation to operation , and is a binary variable for th chromosome with a value of 1 if node precedes node and 0 otherwise.
We have four parameters to be set for our algorithm: crossover acceptance probability , crossover selection probability , mutation acceptance probability , and mutation selection probability .
The crossover acceptance probability is used to obtain the number of crossover operations over the current population. Similarly, the mutation acceptance probability is used to decide whether a chromosome accepts mutation operation or not and consequently is used to obtain the number of mutation operations over the current population. The crossover selection probability is a probability of selecting a chromosome (as a parent chromosome) on which crossover operation is performed and computed as follows: where Max is the maximum (fitness-function value) among chromosomes.
According to (12), a chromosome with the low fitness-function value has a high probability for selection.
The mutation selection probability is a probability of selecting a gene (as both end points) in chromosome to determine the mutation region and computed is follows: where is the probability to select th gene as a start or end point of mutation region. means the value of th gene. For example, with operation sequence 2-5-3-4-6-1 indicates the setup time of changing operation 2 to operation 5. If a gene is the first or the last one, calculate one side value.
These all parameter values are computed before the algorithm proceeds.
4.3. Genetic Operations
Genetic operations are designed to search only feasible solutions over the entire generations. The modified topological sort that merges two instances into one is considered to generate feasible chromosomes. We can use pc0 and pm0, which are the probabilities of crossover and mutation, respectively.
A crossover is operated according to the value of pc0, which is a crossover probability. If the crossover is accepted, two chromosomes will be selected for crossover. With a cumulative probability of crossover selection probabilities of each chromosome, that is, cumulative , two chromosomes are chosen using a random number generator. Thus, the higher chance of selection goes to a chromosome with the higher crossover selection probability. After two chromosomes are selected in this manner, an offspring through crossover operation on the chromosome is created by incremental inclusion of “selectable” nodes. A node is selectable if all precedent nodes are already included in the current chromosome or no precedent node exists. Our procedure maintains a selectable node set, , until the set is empty. Let be the length of a chromosome and let be the position of genes in the chromosome. The crossover procedure is described as follows.
Step 1. Create a graph of TSPPC. Set
Step 2. Create a selectable node set from .
Step 3. Select two th genes from both parent chromosomes. We have four possible cases as follows:Case 1.Two selected genes are different and found in . Select one arbitrarily.Case 2.Two selected genes are same and found in . Then select that one.Case 3.Only one gene is selected and found in . Then select that one. (This happens when a gene has been removed in the previous iteration.Case 4.No selected genes are found in . Then select a gene (node) from arbitrarily.
Step 4 (update ). Delete the selected node in Step 3 with the corresponding arcs.
Step 5. If , terminate. Otherwise, set and go to Step 2.
Since all genes in a new chromosome are selected from the selectable node set , the precedent constraints are always satisfied, which means the crossover operations search are always the feasible solution spaces. Over the crossover operations, the maximum chromosomes are newly generated from original chromosomes,
A mutation is performed on a chromosome in order to create, by chance, an unexpected good solution. In our algorithm, the mutation is operated according to the value of pm0, mutation acceptance probability. If mutation is accepted, a mutation region is determined so that the mutation is performed on an interval between two genes. With a cumulative probability of mutation selection probabilities of each gene of given chromosome, that is, cumulative , two genes are chosen using a random number generator. This means that the higher chance of selection goes to a gene with the higher mutation selection probability.
After selecting a pair of genes, all genes between the pair are topologically sorted and subject to only their precedence constraints. It is obvious that this mutation operation keeps the feasibility of newly created chromosome because the front part (or the latter part) of the mutation region satisfies the precedence constraints with the mutation region in the original chromosome, and even the mutation region is replaced with other feasible region, the feasibility is still maintained.
The mutation operations create newly maximum chromosomes with original chromosomes,
4.4. Termination Criterion
We have two options to terminate the algorithm. The first one is to set the fixed number of generations, which is easy and popular way. The other criterion is to use the best fitness function value of each generation and check the trend of improvement over the generations. If the best fitness function value at generation is not changed for the certain number of generations, the algorithm stops. This is represented as follows: where is the best fitness-function value at the th generation.
If termination criterion is not satisfied, the algorithm selects chromosomes for the next generation. We may have two options for selection. Firstly, we can choose chromosomes by evaluating the fitness function values among all chromosomes from the original, crossover, and mutation operations. The second way for selection is to use the probability of each chromosome. The chromosome with lower -value has the higher probability for selection as follows: where is the probability that the th chromosome is selected for next generation.
4.5. The Aging of Chromosome
As generations continue, some survival chromosomes are getting older. All organisms experience aging process and may have a peak time to achieve the best performance. We can employ this natural property to improve the searching spaces. With a lifespan value, funeral probability is computed as follows: where is the probability of death and is the age of th chromosome and als is the average lifespan.
A chromosome with the higher funeral probability has the lower chance of survival over the next generation.
4.6. Adaptive Search Strategy
In evolutionary algorithm, the population of generation changes as the generations proceeds. In order to obtain the better solutions, the better population needs to be generated at each generation. We can use this idea to create the search strategy for getting the better solution spaces. Due to the necessity of adaptability to each generation, we use a term of “adaptive” strategy.
For development of adaptive search strategy, we need to identify the characteristics of population. The parameters used in our algorithm can be quite useful to do so. Basically, new chromosomes are created by genetic operations, that is, crossover and mutation operations. This means that modifying the parameters of genetic operations makes the algorithm have the adaptability. We consider the crossover and mutation acceptance probabilities as the parameters for the algorithm to have the adaptability. Table 1 shows how we change the two parameters according to the number of generations and variance of fitness function values of the current population.
Without loss of generality, in evolutionary algorithm we assume that as the number of generations increases, the chance of finding the better solution also increases. In this context, we think that as the number of generations increases, the more crossover operations are necessary because the better solution can be obtained from the more crossover among them, while the number of mutation operations need to be reduced in order to avoid unnecessary solution regions. At the same time, we look into the distribution of fitness function values of chromosomes. If the variance of the fitness function values is high, we need more crossover operations on the population to get the unexplored solutions in the current solution region. In this case, however, the mutation operation does not have to be encouraged in order to avoid unnecessary solution search. We have the opposite statements in case of high variance of fitness function value in population.
The above adaptive search strategies can be simply implemented with the following parameters: where and are the acceptance probabilities of crossover and mutation at th generation, respectively. and are the parameters reflecting the characteristics of problem. is coefficient of variance of population at th generation.
5. Computational Experiments
In this section, we present the results of our experimentation with the proposed algorithm. We investigate the efficiency of genetic operations that avoid the generation of infeasible solution in the next subsection, the behavior of adaptive strategies, and then compare the results against other algorithm, and finally, where possible, the results are compared with the best known solutions.
5.1. Efficiency of Feasible Solution Search
Our approach uses the topological sort and special genetic operation procedures to generate feasible populations. In order to focus on our genetic operations that guarantee the feasibility of solution, we present a general approach that uses a separate feasibility check module and compare the computation results. The overall procedure of the general approach is shown in Figure 3.
For experiments, the initial parameters are given as , and . The experiments are performed on micro-PC with 3.0 GHz processor and 2 GB RAM. Table 2 shows the results of the general approach and our adaptive evolutionary algorithm.
From the results, we observe that two approaches find the best solutions for the small size examples. However, our algorithm is far efficient in computation time for especially large size problems, which is because our algorithm explores only the limited feasible solution space. Also our algorithm shows much better solution results than the general approach. The computation time of the general approach significantly increases as the size of problem increases. This is because the crossover operations on the infeasible chromosomes generate infeasible chromosomes again and it repeats without improving the solution. Since the probability of infeasibility increases as the number of nodes increases, the general approach is getting worse for the large size problems.
5.2. Behavior of Adaptive Search Strategy
Sets of computational experiments have been conducted to explore the behavior of adaptive search strategy. The experiment for 7 nodes sequencing problem is performed and the results are shown in Figure 4.
In the results, we observe that the crossover acceptance probabilities increase according to the number of generations. And when CV of population is high, the acceptance probability of crossover is also high. For example, in Figure 4, the CV of 5th generation is high and so the acceptance probability of crossover is also high. And then the 6th CV is forced to decrease by the increased probability of crossover, which means that the algorithm tries to generate the solutions near the original solutions. When CV is low, the acceptance probability of mutation is high. When the CV at the 7th generation is low, then the acceptance probability of mutation increases and the 8th CV is forced to increase by the increased acceptance probability of mutation. This means that the algorithm generates new solutions far different from the original solutions.
5.3. Comparison against Other Algorithms
In this section, the performance of our approach is compared with the optimization technique by OPL-studio (IBM, Available from: http://www.ilog.com/products/optimization/)  in terms of the computational time and the quality of solutions. Ten experiments are performed for each problem size on micro-PC with 3.0 GHz processor and 1 GB RAM. The results are shown in Table 3. The initial probabilities are given as and and and .
The results show that our algorithm finds the best solution in negligible computation time, while the optimization algorithm requires the considerable computation time and even for 20 nodes problem, it cannot provide a solution in reasonable time.
For the larger size experiments, we use the examples of networks with 25, 35, 45, 70, 85, and 100 nodes. We compared our algorithm with the evolutionary algorithm proposed by Yun and moon  in terms of the computing times and the best solution values. The experiments have been performed on micro-PC with 3.0 GHz processor and 2 GB RAM. The results are shown in Table 4.
In Table 4, we observe that two approaches find the best solutions for various examples, but our algorithm is much more efficient in terms of the computing time.
5.4. Computational Performance against the Best Known Solutions
TSPLIB problems sets are used to verify the performance of the adaptive evolutionary algorithm. We compare the results of our algorithm to the best known values. We use Sequential Ordering Problem (SOP) set. This problem is an asymmetric traveling salesman problem with additional constraints. Given a set of nodes and distances for each pair of nodes, find a Hamiltonian path from node 1 to node of minimal length which takes given precedence constraints into account. Each precedence constraint requires that node have to be visited before node . The initial probabilities are given as and , and . And (8 types of option) = 80 times of experiments for each problem were performed to eliminate the random effects.
The results are shown in Table 5. The table shows the % best value to the best known value for the problem set. We used combined options of termination (T), selection (S), and funeral (F) criterion for each problem and compared all the results. On average, 128–131% performances are obtained for all the problems and T1S2F shows the best option. However, we can employ the best option for the specific problem. For example, T1S2 option is the best for the problem rbg050c.
In Table 6, the best results obtained in Table 5 are compared with the best known values. We use the selection option 2 in Figure 1 and the first termination criterion with max generation = 10,000. On average, 124% result is obtained. When ESC47 and prob.42 are excluded, the average percentage of best value decreases to 112%.
In this paper, we presented an adaptive evolutionary algorithm for solving a traveling salesman problem with precedence constraints (TSPPC). Our algorithm employs genetic operators that guarantee the feasibility of solutions, and as the results the searching spaces are significantly reduced. The algorithm also adopts an adaptive search strategy to adaptively apply the crossover and mutation operations on the current generation, which improves the quality of solution as well as the computational efficiency.
The experimental results show that our proposed approach outperforms other evolutionary algorithm in terms of the quality of solution and computation time. Also, we observe that for the small size problems. The algorithm mostly finds the best solution and for even the large size problems, the quality of solution is not much deteriorated and the computation time is quite less. Finally, the proposed algorithm has wide range of options to be applied in various types of problems. We can use combined options of termination, selection of chromosome, and funeral probability.
For future research, our algorithm can be improved in a way to generate more robust solutions, which means that the deviation from a proposed solution by algorithm does not deteriorate the objective function value much so that more practical applications can be possible in real practices.
Conflict of Interests
The authors declare that there is no conflict of interests regarding the publication of this paper.
G. Reinelt, “TSPLIB. A traveling salesman problem library,” ORSA Journal on Computing, vol. 3, no. 4, pp. 376–384, 1991.View at: Google Scholar
C. L. P. Chen, “AND/OR precedence constraint traveling salesman problem and its application to assembly schedule generation,” in Proceedings of the IEEE International Conference on Systems, Man, and Cybernetics, pp. 560–562, November 1990.View at: Google Scholar
W. He and A. Kusiak, “Scheduling manufacturing systems,” Computers in Industry, vol. 20, no. 2, pp. 163–175, 1992.View at: Google Scholar
A. Mingozzi, L. Bianco, and S. Ricciardelli, “Dynamic programming strategies for the traveling salesman problem with time window and precedence constraints,” Operations Research, vol. 45, no. 3, pp. 365–377, 1997.View at: Google Scholar
A. Ouaarab, B. Ahiod, and X. S. Yang, “Discrete cuckoo search algorithm for the travelling salesman problem,” Neural Computing and Applications, 2013.View at: Google Scholar
S. Zeng, Z. Liu, C. Li, Q. Zhang, and W. Wang, “An evolutionary algorithm and its application in antenna design,” Journal of Bioinformatics and Intelligent Control, vol. 1, no. 2, pp. 129–137, 2012.View at: Google Scholar
M. P. Poland, C. D. Nugent, H. Wang, and L. M. Chen, “Genetic algorithm and pure random search for exosensor distribution optimisation,” International Journal of Bio-Inspired Computation, vol. 4, no. 6, pp. 359–372, 2012.View at: Google Scholar
J.-Y. Potvin, “Genetic algorithms for the traveling salesman problem,” Annals of Operations Research, vol. 63, pp. 339–370, 1996.View at: Google Scholar
Z. Michalewicz and D. Fogel, How to Solve It: Modern Heuristics, Springer, New York, NY, USA, 2004.
Z. Ghazalli and A. Murata, “An integrated TSP-GA with EOL cost model for selecting the best EOL option,” International Journal of Industrial Engineering Computations, vol. 2, no. 4, pp. 775–792, 2011.View at: Google Scholar
E. Horowitz, S. Sahni, and S. Anderson-Freed, Fundamentals of Data Structures in C, Silicon Press Summit, Summit, NJ, USA, 2nd edition, 2007.
Z. Michalewicz, Genetic Algorithms + Data Structures, Springer, New York, NY, USA, 1996.