Integer Programming Approach to Printed Circuit Board Assembly Time Optimization ∗ Ratnesh Kumar Haomin Li Department of Electrical Engineering University of Kentucky Lexington, KY 40506-0046 Abstract A printed circuit board (PCB) assembly task requires that a set of components be picked from their respective pickup locations and then be placed at their respective placement locations on the card being assembled. A pick-and-place robot is used for automated assembly of PCB’s. The overall assembly time depends on two different decision variables (i) the pickup locations of the components (in general there are several alternative pickup locations available, whereas the placement location of components is fixed and is determined by the card being assembled), and (ii) the sequence in which the pickup and placement of components is performed. In this paper we develop a technique based on integer programming to determine both an optimal assignment of pickup locations as well as an optimal sequence of pickup and placements of the components. We demonstrate that the overall optimization problem is an instance of linear integer programming problem, and hence it is computationally intractable. We obtain near optimal solutions—that are computationally tractable—using the techniques of (i) minimum weight matching for determining an optimal assignment of pickup locations, and (ii) traveling salesman problem for determining an optimum sequence of pickups and placements. Near optimal solutions provide an upper bound for the optimal assembly time; we consider a linear programming relaxation of the problem to obtain a lower bound for the optimal assembly time. The gap between the upper bound and the lower bound provides a measure of closeness of near optimal solutions to an optimal one. Finally, we use simulations to compare the saving in overall assembly time using the techniques developed here and some of the techniques that are currently in use in industrial settings. Key words: Surface mount technology, Printed circuit board Assembly, Integer Programming, Traveling salesman problem, Minimum weight matching Problem This research was supported in part by the Center for Robotics and Manufacturing Systems, University of Kentucky and in part by the National Science Foundation under Grant NSF-ECS-9409712. ∗ 1 1 Introduction A major challenge for any manufacturing industry is to increase its productivity, safety and quality without significantly increasing the per unit cost of production. In recent years, automated and flexible manufacturing [1, 2] systems have received considerable attention from design engineers and other researchers, as they provide an alternative to a higher productivity, increased safety and quality of production. Robots have become an integral part of many of the manufacturing systems, replacing humans from work places, thereby not only increasing the the safety of production but also the productivity and quality of production. In many manufacturing settings, robots are employed to perform a sequence of assembly operations, each of which requires a fixed amount of time. In order to maintain a high rate of productivity, a robot must complete a given sequence of assembly operations in a minimal possible time. For example, in an Electronic Assembly Machine (EAM), which is used for automated assembly of components in Surface Mount Technology or Insertion Pin Technology, a pick-and-place robot is employed to pickup components from a set of pickup slot locations and to place them on the desired locations of the printed circuit board being assembled. Some of the reasons automated assembly machines are becoming increasingly popular in industrial settings are: • Dense boards and tiny surface mount components make manual assembly very difficult if not impossible. • Greater product mix and smaller volume of production require automated assembly, as there is not enough time for acquiring skills for manual assembly. • Automated assembly provides consistent quality. • Automated assembly results in increased rate of production. A typical EAM that is manufactured by Quad Systems Incorporated, Horsham, PA, and its work place arrangement is shown in Figure 1 [3]. This machine is installed in the Surface Mount Technology Laboratory of the Center for Robotics and Manufacturing at the University of Kentucky. The machine has a carriage with a pick-and-place head on it. The carriage moves horizontally on tracks in, say, X-direction, and the head moves along the carriage in a perpendicular horizontal direction, say, Y -direction. These X and Y -direction movements can occur concurrently. The gripper (also called the chuck) on the head can move in the vertical Z-direction for performing pickups and placements; it can also rotate around the vertical axis for performing the proper alignment of components. Thus such a robot essentially has three translational joints and one rotational joint. Components to be assembled are kept in various component feeders around the PCB. Components of relatively smaller sizes and regular shapes are supplied by reel and/or vibration feeders. In these cases, components are picked from a single fixed pickup slot location of the feeder, while the slot location is continually supplied with new components as they are picked and assembled. 2 Y carriage pickup slot locations tracks head placement area camera gripper grippers platform home X Figure 1: Diagram illustrating an EAM and its work place arrangement Components of relatively large sizes and irregular shapes are supplied simply on component trays. Thus each such component has its own pickup slot location. The sequence of operations performed by such a pick-and-place robot can be described as follows [3]: the robot starts from its designated home location, moves to a pickup slot location, gets a component, then moves to the desired placement location on the PCB being assembled, and places it there. After placement, the robot moves to possibly another pickup slot location, gets another component, and repeats the prior sequence of operations. In case components are not of the same size, the robot also changes its gripper by moving to the gripper location during the assembly operation. Also, certain critical components are tested for proper alignment against an upward-looking camera, in which case after picking such critical components and prior to their placements, the robot moves to the camera location. After completing the assembly operation, the robot returns to its home location, and waits for the next PCB to be assembled to arrive. Figure 1 depicts a typical work place arrangement of such an EAM. It is clear that the overall assembly time of a given PCB depends on two decision variables: (i) the assignment of the pickup slot locations (in general several alternative pickup slot locations are available), and (ii) the sequence in which the components are assembled. The problem of determining an optimal sequence of assembly in PCB assembly has been addressed by many researchers in general. In [4] it is formulated as an instance of the traveling salesman problem; [5] studies it as an instance of the directed postman problem; in [6] heuristics such as “type-writer” method and “S-shape” method—which are commonly used in practice for determining sequence of assembly—are compared to a proposed heuristic called “block algorithm” method. The problem of optimal slot assignment has recently been addressed in [7], in which several heuristics are proposed for assignment and reassignment of slots so as to minimize the set-up time. However, as noted above, the two problems are interdependent. We have developed a unified approach to address both these optimization issues. Moreover, we study the optimization problem for the EAM of the type shown in 3 Figure 1. The earlier works cited above do not study this specific problem, and to the best of our knowledge this paper presents the first formal approach to the problem. The rest of the paper is organized as follows. In section 2 we develop the relevant notation as well as describe the problem. In section 3 we present two different formulations of the problem, both based on integer programming approach [8, 9]. Since integer programming is an NP-complete problem [10], we obtain polynomially-computable near-optimal feasible solutions using the first formulation of the problem. This requires techniques for solving minimum weight matching problem [11] and those for solving traveling salesman problem [12]. These near optimal solutions provide upper bounds for the overall assembly time. The second formulation establishes that the optimization problem is an instance of linear integer programming [8]. So a linear programming relaxation of it can be used to obtain a polynomially computable lower bound for the overall assembly time. In section 4 we provide the simulation results of our work, and finally, section 5 concludes the work presented here. An abbreviated version of the paper appeared in [13]. 2 Notation and Problem Statement In this section we introduce the necessary notations and describe the optimization problem for an EAM of the type shown in Figure 1. As described above, due to difference in sizes of components, in general different grippers are needed to complete the assembly of a given PCB. However, since a significant amount of time is spent in interchange of grippers, a gripper, once selected, is not released till all the components that it can assemble have been assembled. Since (i) the time spent during the interchange of grippers is independent of the sequence in which grippers are selected, and (ii) each gripper assembles components of different sizes so that the set of possible pickup slot locations for each of the grippers is mutually exclusive, the optimization problem is that of determining an assignment of pickup slots and a sequence of assembly of components for each of the grippers individually. In other words, the overall assembly problem can be solved by solving identical sub-assembly problems, each with exactly one gripper. Next we formulate one such sub-assembly optimization problem. Let n be the number of components to be assembled on a given PCB. We say that components i and j are of the same type if they are picked from the same pickup slot location. Letting n denote the different component types, we use a type function τ : {1, . . . , n} → {1, . . . , n} to identify components with identical pickup slot locations, i.e., τ (i) = τ (j) if and only if components i and j are picked from the same pickup slot location. The notation τ −1 (l) := {i | τ (i) = l} is used to identify all components of type l. Let m be the total number of available pickup slot locations. Since each component of the same type is assigned the same pickup slot location, we must have n ≤ m. Let [tij ]n×m be a matrix such that for each i and j, tij denotes the travel time from the component location i to the pickup slot location j. The travel times may also include any set-up times such as component pickup times, component placement times, and in case of critical components, camera visit times. Thus an instance of assembly time optimization problem when a single Quad type machine is available consists of numbers n, n, m, the type function τ , and the travel time matrix 4 [tij ]n×m as described above. In order to simplify future notation, given a set S, we use |S| to denote its cardinality, and given an optimization problem P , we use val(P ) to denote its optimal value. 3 Optimization Using Integer Programming In this section we provide two alternative integer programming formulations of the optimization problem introduced in the previous section. Polynomially-computable solution is obtained by further constraining the first formulation thereby providing an upper bound for the overall assembly time, whereas known relaxation techniques can be applied to the second formulation for obtaining lower bounds. 3.1 First Formulation of Optimization Problem A quadratic integer programming based formulation of the optimization problem, is presented here. This is further constrained to obtain two different well known subproblems (i) an instance of minimum weight matching problem for determining an assignment of pickup slot locations, and (ii) an instance of traveling salesman problem for determining sequence of assembly. Let [uik ]n×n ∈ {0, 1}n×n be an n × n–dimensional binary valued decision variable with the interpretation that uik = 1 if and only if component i is assembled immediately before the assembly of component k. Also, [vjl ]m×n ∈ {0, 1}m×n be an m × n–dimensional binary valued decision variable with the interpretation that vjl = 1 if and only if pickup slot location j contains the components of type l. Clearly, there is a motion from ith component location to kth component location visiting jth pickup slot location if and only if uik = vjτ (k) = 1, in which case a travel time of [tij + tkj ] is spent. Thus the optimization problem can be formulated as: (P1) min [uik ]∈{0,1}n×n [vjl ] ∈ {0,1}m×n XX X i≤n j≤m k≤n (tij + tkj )uik vjτ (k) subject to A1. X uik = 1; ∀i ≤ n uik = 1; ∀k ≤ n k≤n A2. X i≤n A3. XX uik ≤ |S| − 1; i∈S k∈S A4. X vjl = 1; ∀l ≤ n j≤m 5 ∀S ⊂ {1, . . . , n} A5. X vjl ≤ 1; ∀j ≤ m l≤n Note that uik represents the number of motions—either zero or one—from component location i to component location k. Since a sequence in which component locations must be visited constitutes a Hamiltonian cycle [12], the decision variables [uik ]n×n must satisfy the corresponding constraints A1-A3 [12]. Constraint A1 requires that there must be exactly one motion exiting each component location; constraint A2 requires that there must be exactly one motion entering each component location; constraint A3 requires that for each proper subset S ⊂ {1, . . . , n} of component locations, the sequence of motions restricted to S must not form a cycle. Constraint A4 requires that each type of component must be assigned to exactly one pickup slot location, which implies that all components of the same type are picked from the same pickup slot location. Constraint A5 requires that each pickup slot location must contain at most one type of component. We next provide a method for obtaining near optimal feasible solutions for P1 using the known solution techniques of minimum weight matching problem and traveling salesman problem. The basic idea is to further constrain P1 so that it reduces to two such subproblems each of which depends only on a single set of decision variables—either [uik ]n×n or [vjl ]m×n . Thus the complexity of the problem is significantly reduced. Consider the objective function of P1: XX X i≤n j≤m k≤n (tij + tkj )uik vjτ (k) = XX X i≤n j≤m k≤n tij uik vjτ (k) + XX X i≤n j≤m k≤n tkj uik vjτ (k) . (1) The first summand represents the total “up-loading time”, i.e., it is the time spent in moving from a component location to a pickup slot location, whereas the second summand represents the total “down-loading time”, i.e., it is the time spent in moving from a pickup slot location to a component location. The second summand in the objective function can be simplified as follows: XX X tkj uik vjτ (k) = X XX tkj uik vjτ (k) j≤m k≤n i≤n i≤n j≤m k≤n = = X X j≤m k≤n X X tkj vjτ (k) X i≤n tkj vjτ (k) uik (2) (3) j≤m k≤n = X X X tkj vjτ (k) j≤m k∈τ −1 (l) l≤n = XX X tkj vjτ (k) XX X tkj vjl j≤m l≤n k∈τ −1 (l) = j≤m l≤n k∈τ −1 (l) 6 (4) = XX j≤m l≤n XX = vjl X k∈τ −1 (l) tjl vjl , tkj (5) j≤m l≤n where equality of (2) follows from the fact that tkj vjτ (k) is a constant with respect to the summation variable i; equality of (3) follows from A2, equality of (4) follows from the fact that if k ∈ τ −1 (l), then τ (k) = l, and tjl := X tkj ; (6) ∀j ≤ m, ∀l ≤ n. k∈τ −1 (l) Thus tjl is the total time spent in moving from pickup slot location j to all component locations of type l. ∗ Let [vjl ]m×n ∈ {0, 1}m×n denote an assignment that minimizes the total “down-loading P P time” j≤m l≤n tjl vjl , i.e., ∗ [vjl ]m×n := arg min [vjl ]∈{0,1}m×n subject to A4-A5 Then for the optimization problem P1 we have: min [uik ]∈{0,1}n×n ,[vjl ]∈{0,1}m×n subject to A1-A5 = min [uik ]∈{0,1}n×n ,[yjl ]∈{0,1}m×n subject to A1-A5 ≤ = = min [uik ]∈{0,1}n×n subject to A1-A5 min [uik ]∈{0,1}n×n subject to A1-A3 min ]∈{0,1}n×n [uik subject to A1-A3 = min [uik ]∈{0,1}n×n subject to A1-A3 XX X i≤n j≤m k≤n i≤n j≤m k≤n XX X i≤n j≤m k≤n XX i≤n k≤n XX i≤n k≤n uik XX (tij + tkj )uik vjτ (k) ) XX X ∗ tij uik vjτ (k) + ∗ tij uik vjτ (k) + j≤m t∗ik uik + ∗ + tij vjτ (k) XX j≤m l≤n tjl vjl (8) ∗ tjl vjl (9) XX ∗ tjl vjl (10) XX ∗ tjl vjl (11) j≤m l≤n XX tij uik vjτ (k) + XX X (7) i≤n j≤m k≤n XX X tjl vjl . j≤m l≤n j≤m l≤n j≤m l≤n ∗ tjl vjl , j≤m l≤n where equality of (8) follows from (1) and (5); inequality of (9) follows from the fact that minimization is performed on a smaller domain; equality of (10) follows from the fact that 7 constraints A4-A5 apply to decision variables [vjl ]m×n which are no more present in the objective function; equality of (11) follows from the fact that the second summand is a constant; and X ∗ t∗ik := tij vjτ ∀i, k ≤ n, (12) (k) ; j≤m is defined in (7). Thus t∗ik is the total time spent in moving from component where location i to the pickup slot location that contains components of the same type as component k, under the pickup slot assignment of (7). It follows from the above analysis that the optimization problem P1 can be constrained to obtain two different subproblems—an instance of the traveling salesman problem and an instance of the minimum weight matching problem, which we mention below: ∗ [vjl ]m×n (TSP) (MWMP) min [uik ]∈{0,1}n×n subject to A1-A3 min [vjl ]∈{0,1}m×n subject to A4-A5 XX i≤n k≤n XX j≤m l≤n t∗ik defined in (12) tjl defined in (6). t∗ik uik ; tjl vjl ; Note that constraints A1-A3 correspond to the traveling salesman problem constraints [12], and constraints A4-A5 correspond to the minimum weight matching problem constraints [11]. We have proved the following result. Theorem 1 Consider the optimization problems P1, TSP, and MWMP defined above. Then val(P1) ≤ [val(TSP) + val(MWMP)]. Thus [val(TSP) + val(MWMP)] provides an upper bound for the optimal assembly time. However, it does not directly provide a polynomially computable upper bound, as although an instance of minimum weight matching problem is of polynomial complexity [11, 14], an instance of traveling salesman problem is NP-complete [10]. Fortunately, there exist several polynomial time algorithms, such as nearest neighbor, nearest insertion, 2-optimality, 3optimality, etc. [12], which yield near optimal feasible solutions and provide an upper bound for the TSP. Thus using these algorithms it is possible to obtain a polynomially computable upper bound for the optimization problem considered here. 3.2 Second Formulation of Optimization Problem In this subsection we establish that the optimization problem is an instance of linear integer programming [8]. Thus techniques and software tools such as LINDO [15] for solving linear integer programming problems can be directly applied. In particular polynomially 8 computable lower bounds for the overall assembly time can be easily obtained by using any of the relaxation techniques such as linear programming relaxation, lagrangian relaxation etc. [8]. Let [πijk ]n×m×n ∈ {0, 1}n×m×n be an n×m×n–dimensional binary valued decision variable with the interpretation that for each i ≤ n, j ≤ m, k ≤ n, πijk = 1 if and only if after placing the ith component, the pick-and-place robot picks a component from the jth pickup slot location and places it at the kth component location. Clearly, a travel time of [t ij + tkj ] is spent if and only if πijk = 1. Thus the optimization problem can be formulated as: (P2) min [πijk ]∈{0,1}n×m×n XX X i≤n j≤m k≤n (tij + tkj )πijk subject to xik := X πijk ; yjk := j≤m B1. X X πijk i≤n xik = 1; ∀i ≤ n xik = 1; ∀k ≤ n k≤n B2. X i≤n B3. XX xik ≤ |S| − 1; ∀S ⊂ {1, . . . , n} i∈S k∈S B4. yjk0 = yjk ; ∀k 0 ∈ τ −1 (τ (k)), ∀k ≤ n, ∀j ≤ m X 1 B5. −1 yjk ≤ 1; |τ (l)| −1 l≤n k∈τ (l) X ∀j ≤ m Since πijk represents the number of motions—either zero or one—from ith component location to kth component location that also visits the jth pickup slot location, x ik represents the total number of motions from ith component location to kth component location that visit any pickup slot location. Hence xik = 1 if and only if component location k is visited immediately after visiting component location i. As noted in the previous subsection, a sequence in which component locations must be visited constitutes a Hamiltonian cycle. Hence xik must satisfy the corresponding constraints B1-B3 [12]. (These constraints are exactly the same as constraints A1-A3 of the formulation given in the previous subsection.) Constraints B4-B5 are needed to ensure that components of the same type are picked from the same slot location, and each slot location contains at most one type of component. yjk represents the total number of motions from jth pickup slot location to kth component location. Note that for each k ≤ n X j≤m yjk = XX j≤m i≤n πijk = XX i≤n j≤m πijk = X xik = 1, (13) i≤n which implies that yjk ≤ 1 for all j ≤ m and k ≤ n. Constraint B4 requires that a component location k is visited from a pickup slot location j if and only if all component locations with 9 components of the same type as component k are visited from jth pickup slot location (which implies that components of the same type are picked from the same pickup slot location). Constraint B5 requires that for each j ≤ m, number of motions from pickup slot location j to component locations with components of different types must not exceed one (which implies that each pickup slot location must contain at most one type of components). Remark 1 It is clear that P2 is an instance of a linear integer programming problem [8, 9] for which techniques of polynomial complexity for computing near optimal feasible solutions are well known. Such solutions provide upper bounds for the overall assembly time. Since it is computationally intractable to obtain an optimal solution of the optimization problem, it is impractical to obtain a direct measure of closeness of near optimal solutions to an optimal one. Hence it is desirable to obtain polynomially computable lower bounds for the overall assembly time: the gap between lower and upper bounds provides an indirect measure of closeness of near optimal solutions to an optimal one. Several algorithms of polynomial complexity are available in literature for obtaining a lower bound for a given linear integer programming problem [8]. In particular, a linear programming relaxation of P2, called LP, is obtained by letting the the decision variables [πijk ]n×m×n take value in the n × m × n– dimensional unit interval [0, 1]n×m×n ⊃ {0, 1}n×m×n . Clearly, val(LP) ≤ val(P2). The technique of lagrangian relaxation [8] can also be considered to obtain a lower bound. Next we prove that P2 is equivalent to P1. Theorem 2 The optimization problems P1 and P2 as defined above are equivalent. Proof: We need to show that the given an instance of P1, it can be reduced to an instance of P2, and vice-versa. We begin by showing that given an instance of P1, it can be reduced to an instance of P2. Using the variables uik and vjl of P1, we need to define the variables πijk of P2, and using the constraints A1-A5 we need to establish the constraints B1-B5. For each i, j, k, define πijk := uik vjτ (k) . With this definition, the objective function of P1 reduces to that of P2. Also, xik := X πijk = j≤m X uik vjτ (k) = uik X vjτ (k) = uik , j≤m j≤m where the last equality follows from constraint A4. Since uik satisfies constraints A1-A3, it follows that xik satisfies constraints B1-B3 as desired. Next consider yjk := X i≤n πijk = X uik vjτ (k) = vjτ (k) X i≤n i≤n 10 uik = vjτ (k) , (14) where the last equality follows from constraint A2. Since yjk = vjτ (k) , it follows that if k 0 is such that k 0 ∈ τ −1 (τ (k)), i.e., τ (k 0 ) = τ (k), then yjk0 = vjτ (k0 ) = vjτ (k) = yjk , which shows that constraint B4 also holds. It remains to show that constraint B5 also holds. In view of constraint A5, it suffices to show for each j and l, X 1 yjk = vjl . (15) −1 |τ (l)| k∈τ −1 (l) Since k ∈ τ −1 (l), we have τ (k) = l. Hence yjk = vjτ (k) = vjl , where the first equality follows from (14). Thus X X 1 1 y = vjl jk |τ −1 (l)| k∈τ −1 (l) |τ −1 (l)| k∈τ −1 (l) X 1 = v 1 jl |τ −1 (l)| −1 k∈τ (l) 1 −1 v |τ (l)| jl |τ −1 (l)| = vjl , = (16) as desired. Next we show that given an instance of P2, it can be reduced to an instance of P1. Using the variables πijk of P2, we need to define the variables uik and vjl of P1, and using the constraints B1-B5 we need to establish the constraints A1-A5. For each i, k, l, define P P uik := xik = j≤m πijk and vjl := yjkl = i≤n πijkl , where kl is such that τ (kl ) = l. Note that it follows from B4 that if k 0 , k 00 are such that τ (k 0 ) = τ (k 00 ), then yjk0 = yjk00 ; this implies that vjl is unambiguously defined. We need to show that with the above definition of uik and vjl the objective function of P2 reduces to that of P1, i.e., we need to prove that πijk = uik vjτ (k) = xik yjk , where the last equality follows from definitions of uik and vjl . We have xik yjk = X j 0 ≤m πij 0 k X i0 ≤n πi0 jk = X X πij 0 k πi0 jk = πijk , j 0 ≤m i0 ≤n where the last equality follows from constraint B2, which states that for each k ≤ n, there exists exactly one particular i ≤ n and one particular j ≤ m such that πijk = 1. It remains to show that constraints A1-A5 also hold. Since uik = xik and constraints B1-B3 hold, it is immediate that constraints A1-A3 hold. In order to see that constraint A4 holds, consider X j≤m vjl = X j≤m yjkl = XX πijkl = j≤m i≤n XX i≤n j≤m 11 πijkl = X i≤n xikl = 1, where kl is such that τ (kl ) = l, and the last equality follows from B2. This proves that constraint A4 holds. Finally, since constraint B5 holds, in order to show that constraint A5 holds, it suffices to show that for each j and l equality of (15) holds. It follows from the definition of vjl that yjk = vjτ (k) , and since k ∈ τ −1 (l), we have τ (k) = l. Hence yjk = vjl if k ∈ τ −1 (l). So the equality of (15) can be derived using a derivation similar to that of (16). The following corollary is an immediate consequence of Theorems 1 and 2: Corollary 1 Consider optimization problems P1, TSP, MWMP, P2, LP as defined above. Then val(LP) ≤ val(P2) = val(P1) ≤ [val(TSP) + val(MWMP)]. 4 Simulation Results Above we have proposed two different methods for optimizing assembly time of a given PCB: first one based on traveling salesman problem (for determining sequence of assembly) and minimum weight matching (for determining assignment of pickup slots); and second one based on linear integer programming (for determining sequence of assembly as well as assignment of pickup slots). In this section we describe the way in which we have implemented the two proposed methods, present some simulation results, and compare the effectiveness of our approach with other approaches that are currently in use in industries. In industrial settings, two different approaches, namely, type-writer method and S-shape method, are commonly used for determining sequence of assembly; and a “greedy assignment” algorithm is commonly used for determining assignment of pickup slots [6]. Figure 2 depicts the two methods for determining sequence of assembly. Both type-writer and S-shape Y Y X X Type-writer method S-shape method Figure 2: Diagram illustrating two commonly used sequencing methods methods use relative x-y coordinate location of each of the components to determine the sequence of assembly, and no information about the inter-component distances is used. In both 12 these methods, components with a smaller y-coordinate are assembled before components with a higher y-coordinate. In type-writer method, components of the same y-coordinate are always assembled in an increasing order of their x-coordinates; however, in S-shape method they are assembled in an increasing order of their x-coordinates and a decreasing order of their x-coordinates, alternately. The greedy assignment algorithm (GA) for determining an assignment of pickup slot locations works simply as follows: Firstly, the component types are prioritized according to their numbers. Thus given two types l1 and l2 , l1 is given priority in assignment of slots over l2 if and only if number of components of type l1 are more than number of components of type l2 , i.e., if |τ −1 (l1 )| > |τ −1 (l2 )|. Next, the types with higher priority are assigned the nearest available slot location. In other words, if type l has the highest priority, then it is assigned to that pickup slot location j ≤ m for which the value tjl as defined in (6) is minimum. (Recall that tjl is the total down-loading time of all the components of type l when it is assigned the pickup slot location j.) Next we describe the technique that we use for the implementation of our proposed approach. We use a commercially available software package called SAS/OR for obtaining a solution of the minimum weight matching problem (MWMP) of the previous section, which determines the assignment of pickup slots. (This software is available on the University of Kentucky Computing Center (UKCC) machine.) Since an instance of MWMP is polynomially solvable, we are able to optimally solve this subproblem. We have developed our own software package called UKTSP for obtaining a near optimal solution of the traveling salesman problem (TSP) of the previous section, which determines the sequence of assembly. We use well known heuristics such as nearest neighbor, nearest insertion, furthest insertion, and random generation to generate an initial assembly sequence; and use other heuristics such as 2-optimality, 3-optimality, and or-optimality to improve upon the initially generated assembly sequence. (Refer to [12] for a detailed description of these heuristics.) This software has been developed on our UNIX based Engineering Computing Center (ECC) machine, and is encoded in the C-programming language. The lower bound for the optimal assembly time is obtained by implementing the second formulation of the problem. We apply the General Algebraic Modeling System software, called GAMS [16], which is available on UKCC, to solve the linear integer programming formulation P2. However in this case we are unable to exploit the inherent structure of the problem. In particular, we need to deal with order1 O(2n ) of subtour elimination constraints of B3. This exponential growth of the number of constraints makes it infeasible to to consider all the subtour elimination constraints, and we relax this constraint by eliminating the most commonly occurring subtours—those of size two. Thus the lower bound we obtain is less tight than that obtainable by the LP relaxation of P2. However by adding “higher order” subtour elimination constraints it is possible to make the lower bounds tighter. A random number generation program available on an ECC machine is used for generating uniformly distributed component location as well as pickup slot location coordinates. We 1 Given two real-valued functions f (·) and g(·), f (·) is said to be of order g(·), denoted O(g(·)), if there exists a constant c such that f (·) ≤ cg(·). 13 require that the coordinates of component locations and those of the pickup slot locations be chosen so as to represent a 32 × 32 work place area, the central 16 × 16 area of which represents the placement area, and the remaining represents the pickup area. We assume for simplicity that (i) no two components are of the same type, i.e., for each l, |τ −1 (l)| = 1, which implies that n = n; (ii) number of possible pickup slot locations is same as the number of types of components, i.e., m = n = n; and (iii) the travel time tij from component location i and pickup slot location j equals the Euclidean distance between them. These assumptions are made only for ease in simulation, and do not reflect any restriction on the scope of our algorithms or software tools. Table 1 summarizes simulation results for 10 different test cases for n = 100. The first column lists the test number; the second column lists the assembly time using type-writer method (TW) together with greedy assignment algorithm (GA); the third column lists the assembly time using S-shape (SS) method together with greedy assignment algorithm; the fourth column lists the assembly time using our approach: TSP together with MWMP; the fifth column lists the percentage improvement over type-writer method together with greedy assignment algorithm; and finally the sixth column lists the percentage improvement over S-shape method together with greedy assignment algorithm. The above simulation results No. TW+GA 1 2 3 4 5 6 7 8 9 10 3394 3136 3260 3339 3280 3324 3061 3453 3193 3238 SS+GA TSP+MWMP 3479 3177 3200 3368 3366 3391 3139 3524 3237 3320 2570 2413 2375 2563 2665 2469 2183 2621 2455 2479 Average: % Reduction wrt TW+GA SS+GA 24.28% 26.13% 23.05% 24.05% 27.15% 25.78% 22.83% 23.90% 18.75% 20.83% 25.72% 27.19% 28.68% 30.46% 24.09% 25.62% 23.11% 24.16% 23.44% 25.33% 24.11% 25.35% Table 1: Table illustrating saving resulting from TSP+MWMP formulation suggest that our proposed approach can considerably improve the assembly time (up to 25%). Table 2 provides a measure of closeness of the near optimal solutions developed using TSP and MWMP to the optimal ones by considering the gap between the upper and lower bounds, which is defined as: " # upper bound − lower bound gap := × 100%. upper bound 14 Since the number of decision variables in P2 is of order O(n3 ) (as opposed to of order O(n2 ) in P1), we obtain the gap for six different cases where n ranges between 10 and 60 (as opposed to n = 100). First column lists the value of n selected; the second column lists the upper bound obtained using the proposed approach of TSP and MWMP; the third column lists the lower bound value obtained using the approach described above; finally the last column lists the gap: n 10 20 30 40 50 60 Upper bound Lower bound Gap(%) 281 279 0.71% 502 499 0.59% 732 730 0.27% 1050 1029 2.00% 1313 1219 7.16% 1689 1532 9.29% Table 2: Closeness of the optimization algorithm The above simulation results suggest that the proposed optimization approach produces solutions that are less that 2% away from the optimal ones when the value of n is small (within 40). However as the value of n increases the chances of the presence of subtours of sizes larger than two increases resulting in conservative lower bounds and higher gap values. One should include higher order subtour elimination constraints to get faithful lower bounds at higher value of n, which, however, will require more powerful computing resources. 5 Conclusion In this paper we have presented two different formulations of the assembly time optimization problem in printed circuit board assembly. The overall assembly time for a given PCB depends upon the assignment of pickup slots as well as sequence of assembly. We have demonstrated that the the overall optimization problem is an instance of the linear integer programming problem, and that the techniques for solving well known combinatorial optimization problems such as minimum weight matching problem and traveling salesman problem can be successfully applied to determine near optimal solutions for the optimization problem. Simulation results show a consistent assembly time saving of 25% over some of the techniques currently in use in industrial settings. Also, the proposed approach is of polynomial time complexity O(n3 ), and provides solutions that are close to the optimal ones. 15 Acknowledgment We would like to thank our colleagues Prof. C. Lee of Department of Mathematics, Prof. L. E. Holloway of Department of Electrical Engineering, and Mr. Rod Heard of Center for Robotics and Manufacturing for useful discussions during the course of this work. References [1] A. A. Desrochers, editor. Modeling and Control of Automated Manufacturing Systems. IEEE Computer Society Press, Washington, DC, 1990. [2] R. K. Jurgen, editor. Computers and Manufacturing Productivity. IEEE Press, New York, NY, 1987. [3] Quad Systems Corporation, Horsham, PA. QuadStar 100 Manual, October 1987. [4] D. Chan and D. Mercier. IC insertion: an application of the traveling salesman problem. International Journal of Productions Research, 27(10):1837–1841, 1989. [5] M. O. Ball and M. J. Magazine. Sequencing of insertion in printed circuit board assembly. Operations Research, 36:192–201, 1988. [6] K. A. Downs, R. J. Linn, and N. L. Martinson. Sequencing methods for single in-line packages in pcb assembly. Manufacturing Review, 5(3):175–183, September 1992. [7] M. Sadiq, T. L. Landers, and G. D. Taylor. A heuristic algorithm for minimizing total production time for a sequence of jobs on a surface mount placement machine. International Journal of Productions Research, 31(6):1327–1341, 1993. [8] G. L. Nemhauser and L. A. Wolsey. Integer and Combinatorial Optimization. John Wiley and Sons, 1988. [9] M. Minoux. Mathematical Programming: Theory and Algorithms. John Wiley and Sons, 1986. [10] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman and Company, 1979. [11] C. H. Papadimitriou and K. Steiglitz. Combinatorial Optimization: Algorithms and Complexity. Prentice Hall, Inc., 1982. [12] E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan, and D. B. Shmoys, editors. The Traveling Salesman Problem. John Wiley and Sons, 1985. [13] R. Kumar and Haomin Li. Assembly time optimization for PCB assembly. In Proceedings of 1994 American Control Conference, pages 306–310, June 1994. 16 [14] E. Lawler. Combinatorial Optimization: Networks and Matroids. Saunders College Publishing, 1976. [15] L. Schrage. User’s manual for linear, integer and quadratic programming with LINDO. The Scientific Press, Redwood City, CA, 1987. [16] A. Brooke, D. Kendrick, and A. Meerhaus. GAMS, A User’s Guide. Scientific Press, Redwood City, CA, 1988. 17