Optimum route selection in hole-making operations using a dynamic programming-based method

Hole-making is a type of machining processes that are specifically used to cut a hole into a part. The objective of interest in hole-making operations is to reduce the summation of tool airtime and tool switching time in order to reduce total processing time. This objective is affected by the sequence through which operations are done. This problem is formulated as a zero–one nonlinear mathematical programming model. In this paper, a dynamic programming-based method is developed to solve the proposed mathematical model and obtain the globally optimum solutions. An illustrative example is given to show the application and efficiency of the proposed method for optimizing the sequence of hole-making operations in a typical industrial part. The quality of solutions obtained by the proposed method is compared to those obtained by both branch-and-bound method and an ant algorithm available in the literature. The computational experiments reflect the high efficiency of our proposed method. Subjects: Industrial Engineering & Manufacturing; Operational Research/Management Science; Operations Research; Production, Operations & Information Management


Introduction
Hole-making operations such as drilling, reaming, and tapping compose a large portion of machining processes for most industrial parts. Due to the point-to-point tool movement in hole-making and requiring different tools for making each hole, a considerable amount of the manufacturing time is spent on switching tools and moving the table from one hole to another. Merchant (1985) reported that tool movement and tool switching time take 70% of the total time in a manufacturing process,

PUBLIC INTEREST STATEMENT
In the process of machining several industrial parts such as dies and electronic or plastic injection molds, hole-making operations like drilling, reaming, and tapping account for a huge segment of processing. Tool travel takes a considerable amount of time, as a result of the point-to-point machining aspect in hole-making. In this paper, a dynamic programming-based method is proposed to determine the optimum sequence resulting in minimum value for summation of tool airtime and tool switching time in hole-making operations. The computational results experienced in this research indicate that the proposed method provides very promising solutions. on average. This shows the importance of optimization of hole-making operations to reduce the total machining time, which directly improves productivity of manufacturing systems.
Despite the importance of tool path optimization, it has not been duly attempted in the literature (Castelino, D'Souza, & Wright, 2003). Kolahan and Liang (2000) used a Tabu search (TS) approach to minimize the total processing cost for hole-making operations. They considered four issues as decision variables. These are (a) tool travel routing; (b) tool switch scheduling; (c) tool-hole grouping; (d) selection of cutting speed for each tool-hole combination (operation). These issues are interconnected and concurrently contribute to the total processing cost. The objective of this research is to determine the number of required tools for each hole and cutting parameters for each tool-hole grouping. Then, tool travel routing and tool switching scheduling are determined with respect to the operations of each hole.
A new approach based on particle swarm optimization has been developed by (Onwubolu & Clerc, 2004) for solving a simple case of the drilling path optimization problem. In this research, it is assumed that all the holes on the work piece need one kind of tool to get completed and the problem is to optimize the path of tool travel. Ghaiebi and Solimanpur (2007) considered optimization of hole-making operations when a hole may need several tools to get completed and used an ant algorithm to solve the problem. They have formulated the hole-making problem as a zero-one nonlinear mathematical model. The objective is to determine the sequence of all operations in such a way that the summation of tool airtime and tool switching time is minimized.
The works cited above are heuristic methods and hence provide a near-optimal solution for this problem. An exact solution approach based on dynamic programming is developed in this paper to globally optimize the problem of interest. Although commercial computer packages existing in the software markets can globally solve this problem, computational results reported in this paper reveal that the computation time is significantly in favor of the proposed algorithm compared to Lingo Software which solves the problem through a branch-and-bound approach.
Hereafter, the paper is organized as follows. Section 2 describes the problem of interest and its computational complexity. Section 3 provides a general knowledge about dynamic programming method. Section 4 presents the proposed mathematical model. A dynamic programming-based method is developed for solving the proposed mathematical model in Section 5. Section 6 includes an illustrative example. Section 7 contains the computational results and compares the solutions obtained by the proposed method with an ant algorithm and LINGO 8.0 Software. Section 8 includes conclusions and scope for future works.

Description
To completely make a hole, different kinds and sizes of tools may be needed. This is specially the case when the diameter of the hole to be made is so large. In this case, first the hole is made by small-sized tools and then in the next stages, it is enlarged to the size of interest by large-sized tools. It is common in practice that several holes need a particular tool and a hole may need different tools. Therefore, the selected sequence of operations can directly affect the total time of hole-making. The time needed to move from a hole to another one is called as airtime in the literature (Onwubolu & Clerc, 2004). This movement depends upon the structure of machine tool as it may take place by moving the spindle or the worktable itself. In order to reduce the airtime, it may be initially thought that a hole should be finished through different tools before movement into another hole. Although in this way the total airtime is reduced but the switching time will be increased. On the other hand, one may decide to process all the holes which need the tool currently in use. Although this decision will decrease the total switching time, it can result in a huge increment in total airtime. So the problem of optimization of hole-making operations is to determine the sequence by which a particular set of holes should be made by a specific set of tools in order to minimize the summation of tool airtime and tool switching time. When each hole needs only one tool, the hole will be visited only once. In this case, the problem can be treated as a traveling salesman problem (TSP). However, the problem attempted in this paper cannot be treated as a standard TSP because of the following reasons: (1) it is assumed in this paper that several tools are needed to make a hole. This assumption implies that each hole (city) will be visited more than once. (2) In a standard TSP, cities can be visited in any order and there is no precedence relationship between them. In the problem considered in this paper, however, several operations are done by different tools on a hole to completely make it. Each operation of a hole is represented by a node (city) in our formulation. Therefore, each city (operation) can be visited only when its preceding operations (cities) have already been visited. Therefore, the dynamic programming technique available in the literature for solving a standard TSP cannot be used to solve the problem at hand. We discuss in the following the way by which the airtime needed to move between two holes can be computed. A typical CNC drilling machine has a fixed spindle, so its worktable will move in both x and y directions. The table moves in such a way that the spindle is above the position of hole. In order to calculate the distance between holes and also between the holes and the starting point, one can define different functions. It depends upon the structure of machine tool, as its table moves in both directions simultaneously or in one direction at a time. Due to the popularity of drill presses moving in one direction at a time, without loss of generality, a rectilinear function is used in this paper to formulate the distance between different holes. Suppose the distance between hole h located at coordinates (x h , y h ) and hole h′ located at (x h ′, y h ′) is d hh ′, so the rectilinear distance between holes h and h′ can be expressed by In situations that the worktable moves at both directions simultaneously, the distance function between holes can be expressed by Since the drilling machines considered in this paper move in only one direction at a time, so the x and y motions are sequentially done in step motors. A typical step motor moves in directions x and y with rotational speeds N x and N y on average, respectively. The rotational speeds in revolutions per minute (rpm) are reduced by g x and g y , respectively, through gearboxes and are then transformed into linear motions measured in millimeters. Therefore, the linear velocities in the x and y directions are (Onwubolu & Clerc, 2004): where r x and r y are the radius of the driving gears in the x and y directions, respectively. Since the the y direction, the airtime needed to move the worktable from hole h to hole h′, a hh ′ is given as follows: In situations where holes are to be made on a 3D work piece, the distance between holes can be calculated in a similar way with respect to the moving mechanism of the machine. After calculating the distance between holes, the remaining stages of the proposed dynamic programming algorithm remains the same. (1) (2)

Complexity
The size of search space, i.e. total number of possible sequences, for this problem is as follows: where n h is the number of operations required for making hole h and H is the total number of holes.
In real-world problems, these parameters are large and the number of solutions for this problem grows drastically. For instance, to make eight holes requiring 3, 2, 2, 3, 2, 2, 2, 2 operations, respectively, the number of possible sequences is 5,557,616,064,000. Metaheuristics such as simulated annealing, TS, genetic algorithm, and ant colony optimization (ACO) are able to provide near-optimal solutions to NP-hard problems with relatively little computational effort (McMullen, 2001). Thus, application of these approaches will result in near-optimal solutions and optimality is not guaranteed.
In this paper, a dynamic programming-based method is proposed to find global optimum solution of this problem.

Dynamic programming
Sociological, economic, and physical pressures in all areas of modern life have generated an accelerated demand for high-level decision-making based upon limited information about the processes being controlled. A systematic and concerted mathematical study of such decision-making situations was initiated by Bellman (1957). This pioneering work was based upon the fundamental system-theoretic notion of feedback, i.e. the decision rules should be based upon the current (and perhaps past) states of the process under study. Bellman and his colleagues continued to develop the feedback decision-making concept under the name of "dynamic programming." The majority of problems of true practical concern were computationally intractable due to the limited state of the computing art at that time. As time goes on, a combination of rapid progress in computer technology, coupled with the development of refined computational procedures, has made it practical for solving a wide variety of problems in economics, engineering, operations research, mathematics, etc. (Lin & Lee, 2007). Dynamic programming is an optimization approach that transforms a complex problem into a sequence of simpler problems; its essential characteristic is the multistage nature of the optimization procedure.
In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time.
The most important issue in dynamic programming method is that all the solutions of an optimization problem are not checked. Just some of the solutions are checked to find the global optimum solution.
The central requirement of a dynamic programming model is that the optimal sequence of decisions from any given state be independent of the sequence that leads up to that state. All computational procedures are based on this requirement known as the "principle of optimality." This principle may conceptually be thought as follows: given an optimal trajectory from point A to point C, the portion of the trajectory from any intermediate point B to point C must be the optimal trajectory from B to C. In Figure 1, if the path I-II is the optimal path from A to C, then according to the principle of optimality path II is the optimal path from B to C. The proof by contradiction for this case is immediate. Assume that some other path, such as II', is the optimum path from B to C, then path I-II' has less cost than path I-II. However, this contradicts the fact that I-II is the optimal path from A to C, and hence II must be the optimal path from B to C.

Notation
The following notations are used in the proposed mathematical model.

Objective function
In this paper, the objective is to minimize the summation of tool airtime and tool switching time. For this purpose, a mathematical model is made to calculate the summation of these two factors in a typical sequence. Suppose operation i is done in order k, so in this case the variable x ik is equal to 1. Similarly, if processing of operation j takes place in order k + 1, the variable x j(k+1) is equal to 1. Assuming that the time needed to do operation j immediately after operation i is w ij , the total airtime and tool switching time required to do operation j immediately after operation i can be mathematically represented by Consequently, the total airtime and tool switching time needed to complete all the operations can be formulated as a minimization problem as follows:

Constraints
Constraints of the proposed model are as follows: w ij x ik x j,k+1 .
Min  Constraints (8) ensure that each operation is assigned to only one position in the sequence. Similarly, Constraints (9) guarantee that only one operation is assigned to each position of the sequence. Constraints (10) ensure that the precedence relation between the operations of each hole is satisfied. Constraints (11) confine the decision variables into zero-one values.

The proposed method
The proposed dynamic programming-based method consists of the following steps.
(1) Number the operations from 1 to N consecutively.
(2) Calculate the matrix W (total movement time between operations).
In the following subsections, implementation of these steps in the proposed method is described.

Numbering the operations
In the proposed method, operations are numbered from 1 to N consecutively. In this method, a complete solution is represented through a string of N numbers each representing a particular operation. For example, let us consider making four holes in a work piece in which the number of required operations for each hole (n h ) are 3, 2, 2, and 1, respectively ( Figure 2). As seen in Figure 2, eight operations are to be done on this work piece. The operations have been numbered from 1 to 8. In numbering, the precedence of operations has been considered meaning that a preceding operation has a smaller number than a succeeding one. A typical solution for this problem can be 1-2-8-4-5-6-3-7. By this representation, it is meant that at the first stage the worktable must move from starting point to the coordinates of hole 1 to do the two first operations (op1, 2). After that, it moves to the coordinates of hole 4 to do operation 8. Then it moves to the coordinates of hole 2 to do its two operations (op4, 5). After that worktable moves to the coordinates of hole 3 and then moves to the coordinates of hole 1 to do operation 3. It finally comes back to hole 3 to do operation 7. The worktable ultimately returns back to the starting point.

Calculation of matrix W
An entry w ij in matrix W indicates the time required to do operation j immediately after operation i. In fact, w ij indicates the summation of tool airtime and tool switching time from operation i to operation j. This matrix also contains the movement time between start point and the operations. Let e i and e j denote the holes related to operations i and j, respectively. Similarly, suppose d i and d j denote the tools required for doing operations i and j, respectively. So the time required to do operation j immediately after operation i, is the summation of tool airtime from hole e i to hole e j and switching time from tool d i to tool d j . Therefore, the time needed to do operation j immediately after operation i is 2, ..., N; k = 2, 3, ..., N. (11) x ik ∈ 0, 1 ∀ i, k.
All elements of matrix W are calculated in this way except the following items.
(1) Only the first operation of holes can appear at the beginning of sequence. For example, as shown in Figure 2, moving from start point to operations 1, 4, 6, 8 is possible, but it is prohibited to operations 2, 3, 5, 7. Therefore, in matrix W, we set w 0i = ∞ for i = 2, 3, 5, 7.
(2) The last operation after which the worktable returns back to the starting point should be one of the last operations of one of holes. For example, in Figure 2, operations 3, 5, 7, 8 can be the last operation of sequence, but it is prohibited to operations 1, 2, 4, 6. Therefore, in matrix W, we set w i0 = ∞ for i = 1, 2, 4, 6.
(3) When operations i and j are related to the same hole, we set w ij = ∞ unless j = i + 1. For example, in Figure 2, w 13 = w 21 = w 31 = w 32 = w 54 = w 76 = ∞.

Recursive equation
Let p i denote the predecessor of operation i. It is mathematically defined as follows: Let the notation V k j 1 , j 2 , j 3 , … , j k :i denote the minimum time required to begin from starting point and do operation i when operations j 1 , j 2 , j 3 , …, j k have been done before operation i. Hence, index k is the number of operations done before operation i. (13) and (14) that a problem with N operations is solved in N − 1 stages.

Identify optimum sequence of operations
Finally, the optimum sequence of operations is obtained through the backtracking of the recursive calculations done.

Illustrative example
Let us consider the illustrative work piece shown in Figure 3 to demonstrate application of the proposed algorithm. First of all, the tool airtime should be calculated. To do so, the distance between holes and starting point is calculated through a rectilinear distance function as follows: (12) If operation i has no predecessor i − 1 otherwise . The moving speed in both directions in a typical drilling machine is assumed 1,000 mm/min. Now, the tool airtime is obtained by Hence, the airtime needed to move between different points can be calculated as follows: Therefore, the airtime matrix is obtained as follows: In this matrix, column 1 stands for start point, and columns 2 and 3 stand for holes 1 and 2, respectively. The tool change time matrix (matrix B) is assumed as follows:  The time unit in matrix B is in second. As seen in Figure 3, operations 1 and 3 have no predecessor and operation 1 is the predecessor of operation 2. Therefore, vector P is obtained as P = 0 1 0 .
The elements of matrix W are calculated through the instructions discussed in Section 5.2.

Computational results
The proposed dynamic programming-based method was coded in Fortran 90 and run on a Pentium IV, 1.7 GHz PC. In order to evaluate performance of the proposed method, its results are compared with the branch-and-bound (B&B) algorithm implemented in Lingo Software and the ant algorithm developed for this problem by Ghaiebi and Solimanpur (2007). These methods are compared in terms of the objective function value (OFV) and computation time. To compare these methods, 13 problems were generated whose raw data including the following items are available in the Appendix 1: (1) Number of holes in each problem (H).
(2) Total number of operations in each problem (N).
(3) X-coordinate of each hole ([X]). The results of mentioned methods are shown in Table 1. As shown in Table 1, the OFVs resulted from B&B and the proposed DP are same for problems 1-10, whereas B&B couldn't solve problems 11, 12, and 13 due to the size of these problems. The proposed DP method and B&B have obtained the globally optimum solution for problems 1-10. However, the OFV obtained by ACO method is worse than that of B&B and proposed DP in problems 4-13, while it is the same for problems 1, 2, and 3 for all methods. As seen in Table 1, while B&B couldn't solve problems 11, 12, and 13, the computation time of the proposed DP is extremely less than that of B&B in problems 1-10. In comparison with ACO, the computation time of the proposed DP is relatively higher than that of ACO. However, the following should be noted: (1) The proposed dynamic programming is an exact solution method which guarantees the global optimality. Therefore, it is quite expectable that an exact solution approach will take more computation time than a metaheuristic one. (2) Although computation time of DP is more than that of ACO, it can be considerably compensated by saving manufacturing time. For example, let us consider problem No. 13 (in Table 1) for which the computation time of DP is 50804 s and it is 0.1 s for ACO. Suppose this part has an annual production volume of 100,000 pieces. If the sequence obtained by proposed DP is used for manufacturing this part, total manufacturing time will be 100,000 × 451.5 = 45,150,000 s and it will be 100,000 × 489 = 48,900,000 s for the solution of ACO. Therefore, the solution obtained by the proposed DP can save manufacturing time about (48,900,000-45,150,000) = 3,750,000 s. It is obviously rationale to consume 50804 s (14.1 h) extra computation time to save 3,750,000/3,600 = 1,041.7 h in manufacturing stage during a year. If this company works 8 h a day, this saving is equivalent to (1,041.7-14.1)/8 = 128.45 working days.

Conclusion
In this paper a dynamic programming-based method is proposed to determine the optimum sequence resulting in minimum value for summation of tool airtime and tool switching time in holemaking operations. The developed method has been solved for 13 test instances and results have been compared with branch-and-bound method and an ant algorithm. The comparison between proposed dynamic programming method and B&B indicate that the proposed method is more effective than B&B method and able to find global optimal solution for all the solved problems. Despite the high computational time of proposed method, the quality of solutions is much better than ACO. So this disadvantage can be considerably compensated by saving manufacturing time.
Furthermore, this method can be used in process planning of work pieces that have different holes to be done with multiple tools. The proposed algorithm is also able to consider user-defined sets of tools. This enables the process planner to introduce the existing tools to the algorithm. The proposed algorithm will then determine the optimum way of making the holes on a particular part with respect to the tools available in the workshop. The proposed approach can be extended to capture the following aspects in future researches.
(1) The proposed method can be applied to the programming of CMM machine to determine the global sequence to measure the features with its probe.
(2) This method can be applied to tool path optimization in CAD/CAM field with technological constraints in processes like patch-by-patch milling or rapid prototyping.
(3) This method can be used in determining optimum sequence of spot welding by a robot in a typical automobile industry.
(4) The proposed method can be simply used to select the optimum sequence of sheet metal bending operations with geometrical constraints.
(5) The proposed DP method can be coupled with heuristics like ACO to reduce the computational time of DP method.