{'fraction_non_alphanumeric': 0.03227741330834114, 'fraction_numerical': 0.013158388003748828, 'mean_word_length': 4.766536964980545, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Improved Ant Colony Optimization Approach for Optimization of Process Planning

Computer-aided process planning (CAPP) is an important interface between computer-aided design (CAD) and computer-aided manufacturing (CAM) in computer-integrated manufacturing environments (CIMs). In this paper, process planning problem is described based on a weighted graph, and an ant colony optimization (ACO) approach is improved to deal with it effectively. The weighted graph consists of nodes, directed arcs, and undirected arcs, which denote operations, precedence constraints among operation, and the possible visited path among operations, respectively. Ant colony goes through the necessary nodes on the graph to achieve the optimal solution with the objective of minimizing total production costs (TPCs). A pheromone updating strategy proposed in this paper is incorporated in the standard ACO, which includes Global Update Rule and Local Update Rule. A simple method by controlling the repeated number of the same process plans is designed to avoid the local convergence. A case has been carried out to study the influence of various parameters of ACO on the system performance. Extensive comparative experiments have been carried out to validate the feasibility and efficiency of the proposed approach.


Introduction
Process planning for prismatic parts is a very complex and difficult process. For a prismatic part with complex structures and numerous features, process planning involves selecting machining operations for every feature and sequencing them considering precedence constraints, choosing available manufacturing resources, determining setup plans, and machining parameters, and so forth. In CAPP systems, these activities can be carried out simultaneously to achieve an optimal plan, thus the manufacturing efficiency could be largely increased or the production cost could be decreased. So, process planning problem is well known as a combinatorial optimization problem with constraints. With the advance of computer technology, some artificial intelligence (AI) techniques are used to solve combinatorial optimization problem. For example, some bioinspired algorithms are applied in complex decision-making process of solve combinatorial optimization problem [1][2][3].
In this paper, an improved ant colony optimization (ACO) approach is proposed to deal with process planning problem based on a weight graph. The weighted graph consists of nodes, directed arcs, and undirected arcs, which denote operations, precedence constraints among operation, and the possible visited path among operations, respectively. Ant colony goes through the operation nodes on the graph along the directed/undirected arcs. The heuristic information of operation nodes and pheromone amount on the arcs will guide ant colony to achieve the optimal nodes set and arc set, which represents the optimal solution with the objective of minimizing total production costs (TPCs). Some efforts have been adopted to improve the efficiency of the approach.

Previous Related Works
In the past two decades, CAPP has received much attention [4][5][6][7]. Many optimization approaches have been developed and widely applied for solving process planning problem, such as knowledge-based reasoning approach [8,9], genetic algorithm (GA) [1,5,10], artificial neural networks (ANN) [11], graph manipulation [7,12], tabu search approach (TS) [6,13], simulated annealing algorithm (SA) [13,14], artificial immune system (AIS) [15], particle swarm optimization (PSO) [16,17], and ant colony optimization (ACO) [18,19]. 2 The Scientific World Journal Zhang et al. [5] constructed a novel computer-aided process planning model consisting of operation selecting and operation sequencing. A GA is proposed for process planning based on the model considering a job shop manufacturing environment. GA is used to select machining resources and sequence operations simultaneously. Ma et al. [14] modeled the constraints of process planning problems in a concurrent manner. Precedence relationships among all the operations are used to generate the entire solution space with multiple planning tasks. Based on the proposed model, an algorithm based on simulated annealing (SA) is proposed to search for the optimal solution. Li et al. [6] consider the process planning problem as a constraint-based optimization problem and propose a tabu search-based algorithm to solve it. In the proposed algorithm, costs of the machines and tools, machine changes, tool changes, setups, and penalty against good manufacturing practices are taken as the evaluation criteria. Precedence constraints between features and the corresponding operations are defined and classified according to their effects on the plan feasibility and processing quality. Chan et al. [15] model the machine tool selection and operation allocation of flexible manufacturing systems and solve process problem by a fuzzy goal-programming approach based on artificial immune systems. Guo et al. [16] proposed a PSO approach for process planning problem. The initial process plans randomly generated are encoded into particles of the PSO algorithm. To avoid falling into local optimal and improve moving efficient of the particles, several new operators have been developed. Penalty strategy is used considering the evaluation of infeasible particles. Krishna and Mallikarjuna Rao [18] proposed a novel approach to apply the ant colony algorithm as a global search technique for process planning problem by considering various feasibility constraints.
Recently, to improve the quality of results and efficiency of the search, many hybrid approaches are developed for process planning problem, for example, GA + SA [13], graph manipulation + GA [7], and local search algorithm + PSO [20]. Li et al. [6] developed a hybrid genetic algorithm and a simulated annealing approach for optimizing process plans for prismatic parts. They modeled the process planning as a combinatorial optimization problem with constraints. The evaluation criterion was the combination of machine costs, cutting tool costs, machine change costs, tool change, and setup costs. Ding et al. [20] proposed a hybrid approach to incorporate a genetic algorithm, neural network, and analytical hierarchical process (AHP) for process planning problem. A globally optimized fitness function is defined including the evaluation of manufacturing rules using AHP, calculation of cost and time, and determination of relative weights using neural network techniques. Huang et al. [7] model the process planning problem as a combinatorial optimization problem with constraints and developed a hybrid graph and genetic algorithm (GA) approach. In the approach, graph theory accompanied with matrix theory is embedded into the main frame of GA. The precedence constraints between operations are formulated in an operation precedence graph (OPG). An improved GA was applied to solve process planning problem based on the operation precedence graph (OPG).
Wang et al. [21] proposed an optimization approach based on particle swarm optimization (PSO) to solve the process planning problem and introduced a novel solution representation scheme for the application of PSO. In the hybrid approach, two kinds of local search algorithms are incorporated and interweaved with PSO evolution to improve the best solution in each generation.
Although significant improvements have been achieved for process planning problem, there still remains potential for further improvement [22]. For example, optimization approach needs to be improved to be more efficient, and a more reasonable constraint modeling and handling mechanism needs to be developed; also, some practical manufacturing environment should be considered, and the approach should provide the multiple alternative optimal plans. Especially, some bioinspired algorithms are improved to solve the complicated combination optimization problem [23,24]. The attempt to use these algorithms to solve process planning problem should be performed to explore the more excellent results.

Graph-Based Process Planning Problem
In CAPP, a part is generally described by manufacturing features, which are geometric forms having machining meanings, such as holes, slots, and bosses. In the process planning for the part, the manufacturing features will be recognized by analyzing the geometrical and topological information of the part, which include position, dimensions, tolerance, and surface finish. A feature may be mapped to one or several sets of operation types (OPTs) [5]. An OPT refers to an operation without any attachment of machine ( ), tool ( ), and tool approach direction (TAD).
For an operation, there are a set of Ms, Ts, and TADs under which the operation can be executed. As a result, for a part, the process plan is a set of operations, which is represented as follows: where OP is the th operation of the part, which is defined as follows: where OPT is the th alternative operation of the th operation of the part, which is defined as follows: where , , and TAD are the index of the machine, tool, and TAD respectively, by which the alternative operation OPT is executed.
In process planning for a part, two tasks have to be done, namely, selecting operation OP for each feature of the part and sequencing operations. And, also, they must be carried out simultaneously to achieve an optimal process plan against a predetermined criterion. Due to the geometrical and manufacturing constraints between manufacturing features, operation sequencing must take into account the precedence The Scientific World Journal 3  constraints between operations, which must be satisfied by the final operations sequence. Many constraints and rules have been proposed and summarized [1,5,7]. In general, these precedence constraints are as follows [19]: (1) primary surfaces prior to secondary surfaces, (2) planes prior to its associated features, (3) rough machining operation prior to finish machining operation, (4) datum surfaces prior to its associated features, and (5) some good manufacturing practice.
To construct process plan with the ACO approach, the process planning problem has to be visualized and represented by a weighted graph. The weighted graph is denoted as = ( , , ), where is a set of nodes, is a set of directed arcs, and is a set of undirected arcs. The nodes of stand for all of the operations OP . corresponds to the precedence constraints between the operations of the parts. represents the set of arcs connecting all possible combinations of the nodes. Both and represent possible paths for ants travelling from one node to another. The ants are basically free to travel along the paths unless there is a precedence constraint specified by . In this paper, an example part is used to illustrate the weighted graph [2].
The alternative operations for the example in Figure 1 are listed in Table 1. The precedence constraints for the example are listed in Table 2. Figure 2 is the weighted graph for the example part. The set of nodes includes five nodes, 1 , 2 , 3 , 4 , and 5 , which represent the operations OP 1 , OP 2 , OP 3 , OP 4 , and OP 5 . The set of directed arcs includes four arcs, 1 , 2 , 3 , and 4 , which represent the precedence constraints 1, 2, 3, and 4. The set of undirected arcs includes six arcs, 1 , 2 , 3 , 4 , 5 , and 6 . While applying the ACO in the process planning by the weighted graph, the ant colony will be placed on the initial node visited by the ant colony first. The initial node determines which operation can be executed first. For the weighted graph in Figure 2, the nodes 1 and 5 are likely to be selected as the initial source node, since operations OP 1 and OP 5 have no precedence operations. To facilitate the execution of ACO in process planning, a dummy node acting as the initial node is added to connect the possibly executed operations first in the weighted graph. The initial node is used to connect the nodes 1 and 5 .

Process Plan Evaluation Criterion
Lots of process planning evaluation criteria have been proposed in the past literatures. The criterion of minimum production cost is generally used. The production cost evaluating process plans comprise five factors: machine processing cost (MC), tool processing cost (TC), machine change cost (MCC), tool change cost (TCC), and set-up change cost (SCC) [6,8,9,12,13]. The calculation procedures of these cost factors are described in detail below:

4
The Scientific World Journal

Dummy node
Directed arc representing the precedence constraints between operations Undirected arc representing the possible paths between operations (1) total machine cost (TMC): where is the total number of operations and MC is the machine cost of the th machine for an operation, a constant for a specific machine; (2) total tool cost (TTC): where TC is the tool cost of the th tool for an operation, a constant for a specific machine; (3) total setup cost (TSC): where SCC is the setup cost and NS is the number of setups, which can be calculated by where TAD is the th TAD; (4) total machine change cost (TMCC): where MCC is machine change cost and NMC is number of machine change, which can be calculated by where is the machine for the th operation; (5) total tool change cost (TTCC): where TCC is the tool change cost and NTC is the number of tool change, which can be calculated by (10) and where is the th tool.
The definition of machine change, tool change, and setup change has been illustrated in detail [6,9]. In this paper, the combination of TWC, TTC, TMCC, TTCC, and TSCC will be used as the objective of process planning problem, which The Scientific World Journal 5 can be defined as total production cost (TPC) andcalculated by TPC = 1 * TMC + 2 * TTC + 3 * TMCC In (14), 1 , 2 , 3 , 4 , and 5 are weights of TMC, TTC, TMCC, TTCC, and TSCC, respectively, the value of which is limited in {0, 1}. These weights can be assigned referring to the active situations, which provides the flexibility to customize the optimization objective function according to various situations [13].

The Proposed ACO Algorithm
The proposed ACO algorithm basically generates solutions by standard ACO procedures [2]. As described in Section 3, the directed graphs are used to represent the process planning problem [19,25]. The approach in this paper is to solve the process planning problems using the ACO algorithm which corresponds to finding a path of the directed graph, where all necessary nodes have to be visited to complete the process plan, so that the objective of process planning is minimized. The explanations for symbols used are listed in the Symbols section.

Heuristic Information.
To choose the next visiting node, the ant is guided by the heuristic information V on the node and the pheromone amount V on the arc linking the source node and possible destination node V. V is defined simply by a greedy heuristic where is a positive constant, and it can be set by trial and error. Therefore, the nodes with the smaller processing cost have the higher heuristic information amount and these nodes have more attraction for the ant . PC is the processing cost of the selected node operation and it is calculated as follows: MC is illustrated in (4). TC is illustrated in (5). 1 and 2 are illustrated in (14).

Selection Probability.
The heuristic information and the pheromone amount constructed a probability of moving from a node to another node for an ant. The more the pheromone amount on the arcs and the heuristic information on the nodes, the higher the selective probability. For the ant , the selective probability V from the source node to the destination node V can be given as follows: where and denote the weighting parameters controlling the relative importance of the pheromone amount and the heuristic information, respectively. is the set of nodes allowed at the next step for the ant .
In order to adjust the convergence speed of the algorithm, a simple pheromone updating strategy is proposed in the standard ACO, which includes two pheromone updating rules. Local Update Ruler for the elite process plan is incorporated into Global Update Ruler. Three types of process planning solutions are specified at different stages of the algorithm so as to incorporate the pheromone updating strategy. Iteration best process plan PP denotes the best process plan generated in the current iteration by the total number of ants , whose TPC is . Restart best process plan PP denotes the best process plan generated since the last restart of the algorithm, whose TPC is . Algorithm best process plan PP denotes the best process plan generated since the start of the algorithm, whose TPC is . avg is the average TPC since the restart of the algorithm and is calculated as follows:

Global Update Ruler.
The pheromone level is initially set at 0 on every arc. Pheromone intensity on the arcs is dynamically updated after ant colony has completed process plans.
The amount of pheromone deposited on the arcs by an ant is proportional to respective . The process plans with smaller will accumulate a greater amount of pheromone on their corresponding arcs. To avoid unlimited accumulation of the pheromone, the pheromone also evaporates at every round of iterations. The pheromone amount V can be given as follows: where is an evaporation coefficient of the pheromone on the arc linking the source node and possible destination node V. Δ V is the quantity of the pheromone increments on the arc( , V) generated by the ant after each iteration. Also, it can be given as where is a positive constant. is the TPC by the ant .

Local Update Rule.
Local Update Rule is introduced so that the elite process plan solutions are used to update the pheromone on the arcs again, which will accelerate the convergence of the algorithm to the optimal process plan. The iteration best process plan PP is first identified from all the ant process plans PP . If the is smaller than that of , is replaced by . Similarly, if is smaller than that of , is replaced by . Local Update Rule is used to update the pheromone intensity on the arcs again while update of and 6 The Scientific World Journal occurs.The pheromone amount V can be calculated as (19), and Δ V will be calculated as follows: where is a positive constant. is the TPC by the ant .

Termination.
If all of the ants almost constructed the same process plan repeatedly at the early stage of the ACO algorithm, the algorithm would fall into the local convergence, which leads to failure in the exploration of new paths for the subsequent iteration. This is derived from an extraordinary accumulation of pheromone placed on the same set of arcs visited by the ants. Once the algorithm has fallen into the local convergence, the output of process planning would not be the optimal result, even far from the optimal results. To void the local convergence, the parameter of rpt controlling the repeated number of the same process plan is set in advance. When the adjacent two process plans are completely the same, the variable of rpt will increase by 1; otherwise rpt will be reset to be 0. When rpt reaches rpt , it means that no improvement on the solutions is made in the recent iterations. The ants may have converged to local optimal results. If the two events of rpt = rpt and ite < ite are satisfied simultaneously, it is considered that the local convergence occurs and the algorithm will be restarted. For the case where the algorithm is restarted, all the pheromones are reset to their initial value 0 , ite isreset to be 0, and is reinitialized. In this case, the ants are able to escape from one particular solution to other possible paths and hence the search space will be increased. If the only event of ite = ite is satisfied, the resulting process plan will be output and algorithm will be terminated.

Experiments and Results
Two experiments have been conducted to illustrate and validate the feasibility and efficiency of the proposed approach. In the first experiment and the crucial parameters of the approach are determined. The second experiment is used to compare this approach with typical ACO, TS, GA, and SA methods.
Two prismatic parts are used for the case experiments. The first prismatic part (Part 1) used by Zhang et al. [5] is illustrated in Figure 3. It consists of 14 STEP-defined manufacturing features and 14 machining operations. The machining information and precedence constraints are given in Tables 3 and 4. The second prismatic part (Part 2) used by Li et al. [13] is illustrated in Figure 4. The machining information and precedence constraints are given in Tables 5 and 6.

Simulation Experiments.
When ACO is applied in process planning, those parameters including , , , , , ,   The Scientific World Journal   experiments are dominated to test the effect of various parameters. In each experiment, one parameter is changed and the other parameters are fixed, and the effect of the changed parameter on the algorithm properties was analyzed at different levels. The process planning problem for Part 1 is used to illustrate how the crucial parameters are determined. It is assumed that all the machines and tools are available; namely, 1 -5 in (14) and (16) are set as 1.
Those parameters may be analyzed from three aspects, namely, initial parameters of ACO ( , , , , and 0 ), problem data ( ite and rpt ), and problem size ( , ). Firstly, the positive constants and in (15), (20), and (21) are determined according to problem size, which includes average PC of each operation node and average TPC of process plan appearing in the previous paper. For Part 1, while the initial pheromone intensity on all the arcs 0 is set to 1, and are fixed at 50 and 2000, respectively. Secondly, since an updating strategy including two updating rules is applied in the proposed ACO, the maximum iteration number ite just needs to guarantee the algorithm convergence. The maximum repeat number rpt affects the performance of ACO and optimization result.
Thirdly, initial parameters of ACO algorithm affect the performance of process planning using ACO. The effect is described and illustrated by an analysis of the application of the proposed ACO algorithm in the process planning problem for Part 1. Number of ants has important effect on the convergence speed. If is too small, searching randomness of ACO will increase and the computation time will be long. If is too large, the optimization rate will become very slow. Generally, value of is considered according to the problem size. In the case of problems with = 0.75, = 1, = 1, 0 = 1, = 50, = 2000, ite = 300, and rpt = 5, 10 trials were separately conducted by varying the values of ∈ {10, 25, 40}. The average results of the experiment are summarized in Figure 5.
All the hills and troughs on the TPC of and in Figures 5(a) and 5(b) denote the restart of the algorithm. They indicate that the local convergence avoidance mechanism takes effect to direct the ants from one solution region to another. Figure 5(b) shows that there are 10, 7, and 5 restarts corresponding to = 10, = 25, and = 40 within the 300 iterations. Figure 5(c) shows that the compared results under = 10, = 25, and = 40. Accordingly, was determined as 25.
A suitable can ensure good computational efficiency and algorithm stability. In the case of problems with = 25, = 1, = 1, 0 = 1, = 50, = 2000, ite = 300, and rpt = 5, 10 trials were separately conducted by varying the values of ∈ {0.25, 0.5, 0.75}. The average results of achieved by the algorithm best process PP are summarized in Figure 6.
50 trials were separately conducted to evaluate the performance of the proposed approach. The results show that these parameters have a good performance at values = 25,

10
The Scientific World Journal  Table 8: One of the best process plans for Part 1.   Table 8 and the corresponding simulation results of and are in Figure 7. Figure 7 shows that there are 7 restarts within the 300 iterations. When iterations are between 34 and 38, the ants repeatedly generate plans without any further improvement on the TPC under 1143. The local convergence avoidance mechanism is triggered to renew all the pheromone trails and bring the ants to other search regions. Therefore, the first restart occurs on the iteration 39, on which the ants are released to construct process plans with a TPC of 1348. Although it is larger than 1143, the ACO algorithm is able to bring the ants to the better solutions again.
The above experiments are based on Part 1. To ensure that these parameters are applicable in other situations, the extensive comparative experiments for Part 2 will use the same chosen parameters.

Extensive Comparative Experiments.
Three conditions are used to test proposed algorithm for the sample parts [6,13].
In Table 12, the TPCs generated by the proposed ACO are compared with those of GA and SA approach by Li et al. [13], TS by Li et al. [6], and the ACO by Liu et al. [19] The comparing results show that the proposed algorithm is better than the other algorithms. Under condition (1), a lower TPC (2435.0) has been found using the improved ACO approach, and the mean TPC (2456.1) is better than the costs of other four algorithms. Under condition (2), a lower TPC (1970.0) has been found using the improved ACO approach. Under condition (3), the minimum TPC (2580) is the same as the TS [6]. The mean TPC generated by proposed approach is better than the other algorithms under the three conditions.

Conclusions
An improved ACO approach is developed to solve the process planning optimization problem for prismatic parts. The approach is characterized by the following aspects.
(1) A weighted graph is used to represent process planning problem. The graph includes nodes set, directed arcs set, and undirected arcs set, which denote operations, precedence constraints between the operations, and possible visited path connecting the nodes, respectively.
(2) A pheromone updating strategy proposed in the proposed ACO is incorporated in the standard ACO, which includes Global Update Rule and Local Update Rule. A simple method by controlling the repeated number of the same process plan is designed to avoid the local convergence.
In a further study, a deep discussion of selecting the ACO approach parameters is conducted. In addition, the multiobjective optimization will be incorporated into the ACO approach for handling the multiobjective process planning problem.

Conflict of Interests
All of authors declare that there is no conflict of interests regarding the publication of this paper.