A hybrid optimization approach for setup planning with tolerance constraints

Computer-aided process planning (CAPP) plays an important role in integrated manufacturing system and it can serve as a bridge between CAD and CAM. As a crucial part of CAPP, setup planning is a multi-constraint problem, in which the precision takes priority over efficiency. However, instead of precision constraints, traditional optimization methods have paid much more attention to efficiency requirements. This leads to the reduction in the precision of the final parts. This paper develops an optimization approach for solving computer-aided setup planning problem, which takes into account various constraints, especially the precision requirements specified by designers. First, objective function of the optimization model is formulated and a series of constraints, including feature precedence, tool approaching direction (TAD), and precision requirements are systematically created. Next, the model is solved by using a hybrid particle swarm optimization algorithm. In order to overcome the local optimum trap, mutation and exchange operations are adopted from the genetic algorithm. Finally, a part is tested in the case study and the validation of this method is proved.


Introduction
A CAPP system is usually composed of three consecutive activities: (1) recognize features from given CAD models; (2) determine machining resources according to recognized machining features; (3) select an appropriate setup plan to make the parts machined accurately and efficiently [1]. In this system, setup planning acts as a pivot, which connects recognized features with manufacture resources. The setup planning affects manufacture by production efficiency and manufacture precision. Inappropriate setup planning usually leads to unnecessary machine resource changes, which not only wastes machining time but also decreases the manufacture precision. Although the former only increases the manufacture cost, the latter may cause irretrievable manufacture failure. This indicates that, precision analysis in setup planning is a crucial link, which can never be omitted. Because of this importance, setup planning has always been one of the most popular fields for CAPP investigators. Rule-based and graph-based methods are two main approaches that are utilized in solving the setup problem. Rule-based methods tackle the problem by using existing machining knowledge and experience. In 1998, Huang built a mathematical model for lathe machining automation setup [2], in which geometry, precedence, force and tolerance constraints are taken into consideration. The whole model employs if-then style structure in problem solution. However, this method can only be used in rotational models. Sarma and Wright developed an algorithm to minimize the setups and tool changes in milling [3]. The relative significance of precedence constraints, setup changes and tool changes are stipulated beforehand. Wong and Siu described an expert module, containing transformation algorithm, refinement algorithm and linearization algorithm [4]. An operation preference tree is generated and it is refined by the expert system information. Since the precedence and tolerance relation are not taken into account, this method is only suitable for solving single TAD machining problems. Graph-based methods select the setup solution that affects the machining accuracy as little as possible. In these methods, design specifications of the part are represented as a graph and the setup generation problem is converted into a graph search problem. Zhang, Huang and Mei provide a method to identify optimal datum and setup planning solely based on design specification for rotational parts [5]. Dimensional chain is used to calculate accumulated precision loss in datum selection. A classic graph-theoretical approach is proposed for rotational parts based on tolerance analysis [6,7]. TADs, tolerances, and face types are taking into consideration in this approach. The graph-based approach can illustratively present the tolerance relation between features and divides features into different setups according to the tightness of the relation. However, the feature precedence relations are usually ignored in this method. Except for the above two approaches, other methods are also investigated in solving computer-aided setup planning problem. Zhang proposed a fuzzy approach to process selection [8] and Mei developed a neural network approach to deal with rotational part datum selection [9]. Besides, Hopfield neural networks method is also used for operational sequencing of prismatic parts [10] and setup planning [11]. Intelligent optimization algorithm is an important method in solving CAPP problem. Among which, genetic algorithm is the most widely used algorithm in dealing with the operation selection and sequencing problems [12,13]. Other intelligent optimization algorithms used for process planning includes honey bees mating algorithm [14], graph-based ant colony algorithm [15] and particle swarm optimization algorithm [16]. Adaptive approaches are also proposed, in which the setup solutions are the optimization results of both processes planning and scheduling [17,18]. The optimization algorithms are also implemented in parallel process planning [1] and nonlinear process planning [19]. Setup planning involves in multiple machining factors, like cutting tools, machine centers, geological structures and tolerance specifications. In the view of optimization, all these factors can be transformed into constraints of the intelligent optimization algorithm and can be viewed as the penalty terms in minimizing the object functions. However, all the existing optimization models pay more attention to the scheduling problem, which aims at minimizing the machining cost or the machining time. The machining quality lacks of further investigation in the optimization models. For this reason, the proposed research findings can be well applied in solving scheduling problems, instead of obtaining high precision manufacturing quality in practical processing. In existing optimization algorithms, PSO algorithm has fast searching speed, it is easy to get into the local optimal trap. The traditional GA algorithm has good global searching ability, but its searching efficiency is low. Since the model in this paper involves large amount of constraints, in order to obtain the global optimal solution in a reasonable time, a hybrid PSO-GA algorithm is proposed to solve the setup planning mathematical model.

Problem description
Regarding the computer-aided setup planning, the main difficulty comes from the entanglement of diversity constraints that impose on the process plan by design specifications and machining resources. These constraints contains the tolerance specifications, TADs, part geological and topological structure requirements. At the same time, the precedence relation including feature precedence relationship and different setup sequence.

Objective function
Two goals of the setup planning are : (1) to reduce the number of critical tolerances between features, which belongs to different setups, and (2) to minimize the number of total setups. In addition, in practical production, a setup should be selected such that maximum number of features can be synchronously machined. Also, setup should be selected such that minimum locating errors can be achieved. Technicians often prefer to complete all the machining feature processes within as little setups as possible. This is because the growing setup number will not only increases the product processing time and involves in extra processing resources, but also introduces in unnecessary setup change error, which will influence the final part accuracy. Therefore, the first term of the objective function is to reduce the total number of the setups N. Then, it is advisable to process as many machining features as possible within one setup. In this way, even if the error of the setup changes is large, at least the relative position and geometrical shape of each feature in the same setup will not be affected by the setup change. Therefore, in the second term of the objective function, the standard deviation (SD) of the feature number in each setup is used to evaluate the setup planning. Finally, for those machining features that have a strict precision requirements relation, they should be placed into the same setup as far as possible to avoid the setup change error. The third term in the objective function is the summarization for the precision requirements value (SPR) whose related machining features are separated into different setups. This term is noted as SPR. The objective function of the total weight cost (TWC) can be written as follows: Here, w1, w2 and w3 are the weights.

Constraints
In computer-aided setup planning, the constraints come from different aspects, include tolerance specifications, TADs, and feature precedence relationships. The meanings of various constraints will be illustrated by the example shown in Figure 1. In this figure, the cross sections of a rotational part and its blank are presented. The excessive material is divided into different features and the precision requirements are also presented.     The feature precedence relationship is present in Figure 2.
In this figure, features in Figure 1 are represented as numbers in circles. The solid arrows between two features indicate the direction of the precedence relationship. The dashed arrows represent the precision requirements from datum features to the features with precision requirements. The numbers that near the arrows are the precision value of the requirements. TADs are noted as the small arrow beneath each of the feature and the arrow direction is identical to the TAD.
(1) The precedence relations must be consistent. If there exists one precedence relation between two features and these two features belongs to two different setups, then this relation determines the precedence of these two setups. Assuming more than one pair of feature precedence relation exist between two setups, these relations must have identical direction. In Figure 2, the features painted in dark grey and white consist of two different setups. Between these two setups, two pairs of feature exist feature precedence relations. One is from feature 1 to feature 2 and the other is from feature 7 to feature 14. Since the direction of the two precedence relations are inconsistence, this setup plan is invalid. (2) No cycle routes exist in precedence relation of setups.
Even if constraint in (1) is satisfied, the relation of setups may lead to a cyclical precedence situation. In Figure 3, features in white, dark grey and light grey consist of three setups, which can be noted as setup 1, setup 2 and setup 3 respectively. From the feature precedence between feature 1 and feature 2, setup 1 is processed before setup 2. Then, from the feature precedence between feature 2 and feature 7, setup 2 is processed before setup 3. Next, from the feature precedence between feature 14 and feature 13, setup 3 is processed before setup 1. Obviously, a cyclical precedence situation is formed between setup 1, setup 2 and setup 3. It is an invalid setup plan since the process can be started from nowhere. (3) TAD consistency. The whole features in one setup should at least have one common TAD. Otherwise, some of the feature in this setup cannot be manufactured. For example, in Figure 4, the features in dark grey consist a setup. In this setup, feature 3, feature 8 and feature 13 only have rightwards TAD but feature 2, feature 7 and feature 6 only have leftwards TAD. Since there exists no common TAD between these features, the dark grey setup is invalid. (4) Setup change error constraint. Setup changes will introduce error into final part precision and the value of this error relates to the accuracy of the manufacturing resources, such as machines and fixtures. In some cases, two features with precision requirements will be assigned to different setups. At this time, it should be considered whether the setup change error will affect the precision requirements.
Here, λ is used to represent the setup change error, which reflects the finishing capacity of manufacturing resources. The smaller λ is, the higher the precision that the manufacturing resources can reach, and the smaller the setup change error introduced in the final product. If λ is smaller than the precision requirement, the precision requirement can be satisfied. When λ exceeds the precision requirement, then the precision requirement cannot be achieved. Therefore, if there exists a precision requirement between two features that belong to two different setups, then the precision requirement value must be greater than the value of λ. Otherwise, the precision requirement of the final part will not be satisfied under the current manufacturing situation.

Model solution
This paper adopts a hybrid particle swarm optimization approach to deal with this computer-aided setup planning problem. Figure 5 gives the flow chart of the problem solution and this procedure can be divided into four sections as follow:  part, each particle can be written as a n 1 vector S which defines the n feature distribution in different setups. If the ith feature belongs to the jth setup, then j i S = ) ( . Here, the total number of the particles in the searching space is given as 200. When the particles are initialized, all the features are set in a single setup. This means that all the elements in vector S equals to 1 at the very beginning. Mutation and exchange. PSO algorithm has fast convergence speed, but it is easily trapped in the local optimum. Since genetic algorithm has good global searching ability, mutation and exchange operations of the genetic algorithm are adopted in the hybrid PSO method to overcome the local optimum. Randomly extract the value i within n, , then the mutation operation makes 1 ) ( . Calculate the objective function. The objective function value of the particle is calculated according to the feature setup distribution in vector S. After the calculation, the historical optimal solution of individual particle and the optimal solution of global particles are extracted. Update the particles. By adopting the chromosome crossover operation in the genetic algorithm, the new particles are obtained by intersecting the original particles with the individual historical optimal particles and the global optimal particles respectively.

Case study
The case in Figure 6 is a part adopted from existing case study by Manafi and Nategh [20]. There are seven TADs in this figure, which are ±x, ±y, ±z and -a respectively and they are numbered from 1 to 7. There are totally 23 features to be machined. Five precision requirements exist in this figure, including the relation from F18 to F11, F18 to F21, F22 to F21, F22 to F11 and F19 to F10. The feature details are presented in Table 1. Each feature is manufactured by not less than one operations and the TAD direction can be referenced in Figure 6. In the initial state, all the operations belongs to the same setup. Through exchange and mutation, the number of the setup keeps increasing, and operations are allocated to different setups. If the operation distribution in different setups violates the constraints described above, the penalty function will be added when calculating the target function. The iteration will not stop until the value of the target function converges to the global optimal solution. The final process solution acquired by using this proposed method is illustrated in Table 2. Here, the precision constraint sets the value of λ equals to 0.02.  32   6  1  1  2  5  25  6  1  7  2  5  29  6  1  4  2  5  30  6  1  23  2  5  9  4  2  33  7  6  10  4  2  22  7  6  13  4  2  17  7  6  14  4  2  16  7  6  11  4  2  18  7  6  21  4  2  19  7  6 20 4 2

Conclusion and future work
In this paper, a multi-constraint optimization model has been developed, in which design tolerance requirements are translated into model constraints. To fulfil this goal, an optimization model is formulated with a series of constraints, especially precision constraints. A hybrid PSO-GA algorithm is utilized to solve this model. Compared with existing optimization models, this paper introduces design tolerance requirements into the model, which embodies the design intention more comprehensively. By systematically setting the constraints, the final selected machining practice achieves the balance of efficiency and precision. Future work would concentrate on integrating more process constraints with the optimization model to make this method more practicable and reliable in actual manufacturing.