 Research
 Open Access
 Published:
Modelling and optimizing a system for testing electronic circuit boards
MathematicsinIndustry Case Studies volume 8, Article number: 4 (2017)
Abstract
In this article we consider a difficult combinatorial optimization problem arising from the operation of a system for testing electronic circuit boards (ECB). This problem was proposed to us by a company that makes a system for testing ECBs and is looking for an efficient way of planning the tests on any given ECB. Because of its difficulty, we first split the problem into a covering subproblem and a sequencing subproblem. We also give a global formulation of the test planning problem. Then we present and discuss results pertaining to the covering and sequencing subproblems. These results demonstrate that their solution yields testing plans that are much better than those currently used by the company. Finally we conclude our article by outlining avenues for future research.
Introduction
In this article we study the operations of a system for testing Electronic Circuit Boards (ECBs) that uses flying probes. Our study was carried out in cooperation with a company that will be referred to as the Company in what follows. We first describe the broad outlines of this system (called the FP system); further details will be given in the following sections. The FP system includes eight shuttles: four shuttles that are above the board and four shuttles that are below the board. To each shuttle are attached some probes (usually two or three probes). The board being tested contains nets, each of which can be viewed as a wire with a finite number of points of interest (or simply points). For the purposes of this study, a net is a set of points whose coordinates are known. Note that the nets are pairwise disjoint, i.e., no point belongs to more than one net.
Given a subset R of nets, a test consists of assigning certain probes to nets in R so that one point in each net is touched by one probe; the set of probes that may be used to touch a given point is known in advance and depends upon the test being carried out. Hence a test consists, formally, of a collection of nets and a family of probe sets (one set of probes for each point in each net involved in the test). The probes must touch the points simultaneously, which means that there must be a matching between a subset Q of the probes and the collection R of nets. Of course such a matching need not exist: its existence depends upon the locations of the eight shuttles. Figure 1 displays two tests, one of which can be carried out in the current configuration but the other cannot.
In general, given a configuration of shuttles, only a fraction of the tests can be carried out. Thus several configurations must be computed in order to ensure that all the tests are covered. (Note that the initial configuration, which is also the final one, is given in advance.) Moving the shuttles from one configuration to the next requires some time, which can be evaluated if one knows the coordinates of the shuttles within their successive configurations. The objective of the Company is to minimize the total time needed to move the shuttles between configurations, with the constraint that each test is covered by at least one configuration. The system currently used by the Company yields poor results, in the sense that the number of configurations needed to cover all the tests is far too large, resulting in many unnecessary shuttle moves. Hence the problem was proposed to us by the Company at the FieldsMITACS Industrial ProblemSolving Workshop (see Chen S, Gustafsson J, Marcotte O, Morfin M, Pugh M: Improved optimization for a testing system with two mobility layers, in Proceedings of the FieldsMITACS Industrial ProblemSolving Workshop, forthcoming).
The planning problem just described is similar to the Travelling Salesman Problem (TSP), one of the basic problems in combinatorial optimization (see Applegate et al. [2]). We conjecture that in its general form, the planning problem is as difficult to solve as the TSP. Although we are not aware of any previous work on the planning problem, there are similarities between our problem and two classes of problems that have been considered already: geometric covering problems (see for instance the article by Arkin and Hassin [3] and the article by Ahn et al. [1]) and some generalizations of the TSP. One of these generalizations is the Travelling Politician Problem (see Riordan [19]). Other generalizations include the Covering Salesman Problem (see the article by Current and Schilling [5]) and the Clustered Travelling Salesman Problem (CTSP), discussed in an article by Laporte and Palekar [11] that includes an application of the CTSP to a circuit design problem.
The Generalized Travelling Salesman Problem (GTSP) has received a fair amount of attention (see for example the articles [12–15] by Laporte and his colleagues). Some authors have proposed transforming a GTSP instance into a TSP instance (for an example see Dimitrijevic and Saric [6]). Others have proposed a Lagrangianbased approach for the asymmetric GTSP (Noon and Bean [17]) or a branchandcut algorithm for the symmetric GTSP (Fischetti et al. [8]). Fischetti et al. [7] have studied the symmetric GTSP polytope. Recently Pop [18] and Kara, Guden, and Koc [10] have proposed new formulations for the GTSP. In spite of the similarities between the planning problem and the various problems we have just mentioned, our problem seems to be completely new and a major portion of the present article will be devoted to its formulation as a mathematical program.
As mentioned before, although the objective of the Company is to minimize the total time needed to move the shuttles between configurations, the main difficulty faced by the Company is the large number of configurations required to cover all the tests in the system that it currently uses. Hence our first objective is to try to reduce the number of configurations. To achieve this we tackle the planning problem in two steps. First we construct a partition of the set of tests into subsets that can be carried out within a single configuration. We call this problem the covering problem since we are looking for a family of configurations that covers each and every test. Then we solve the optimal sequence problem in order to find the best sequence of configurations (using only those configurations that are in the solution of the covering problem). Since the decomposition of the planning problem into a covering problem and a sequencing problem does not always yield an optimal solution, we also present a global formulation of the planning problem.
Our article is organized as follows. The “Methods” section deals with the modelling and solution of the planning problem. It includes a subsection on shuttles and probes; a subsection on power chains and avoidance of collisions; a subsection on probes, points of interest, and reachability constraints; subsections on incompatibility constraints and tests and feasibility constraints, respectively; a subsection on the partial covering problem; a subsection on a greedy algorithm for the covering problem; a subsection on the optimal sequence problem; and finally a subsection on a global formulation of the planning problem. The article continues with a section on “Results and discussion” and ends with the “Conclusion” section.
Methods
Shuttles and probes
We assign the indices 0,1,…,7 to the eight shuttles in the following way: the shuttles that are above the board are labelled 0, 1, 2, 3 in the clockwise order starting with the frontleft shuttle and the shuttles below are labelled 4, 5, 6, 7 in a similar way. Hence Shuttle 0 is the frontleft shuttle that is above the board, Shuttle 1 is the backleft shuttle above the board, Shuttle 2 the backright shuttle above the board, and so on. The dimensions of each shuttle are 195 mm (in the horizontal direction) and 160 mm (in the vertical direction). The dimensions of the board are 1050 mm (in the horizontal direction) and 850 mm (in the vertical direction). We will use these constants in the model but obviously they can be replaced by other constants if the covering problem must be solved for another system. Each shuttle has a preferred corner, corresponding to the point where its power chain is attached to the board. For instance, the preferred corner of the frontleft shuttle that is above (resp. below) the board is the frontleft corner of this shuttle.
The initial configuration is the configuration in which the preferred corner of each shuttle is located at the corresponding board corner. For instance, the initial coordinates of the preferred corner of the backleft shuttle are (0,850). A given board cannot be introduced into (or removed from) the FP system unless it is in the initial configuration. Hence when the board is introduced into the FP system, one computes the tests that can be carried out within this configuration before considering other configurations.
In our model the xcoordinate of Shuttle k (for k∈{0,1,…,7}) will be denoted by S _{2k } and its ycoordinate by S _{2k+1}: those two expressions are variables since we are looking for “good” configurations and the goal of the model is to find them. The probes, which can come into contact with points of interest (or points, for short), are attached to their respective shuttles. The number of probes in the system under consideration is 21. The expression k(p) will denote the shuttle to which the probe p is attached, for p in {0,1,2,…,20}. For each shuttle we also know its xoffset and yoffset, denoted respectively by O _{ p1} and O _{ p2}. (Note that O _{ p1} and O _{ p2} are constants, not variables.) The coordinates of the point where the probe p is attached to the shuttle k(p) are thus equal to S _{2k(p)}+O _{ p1} and S _{2k(p)+1}+O _{ p2}, respectively.
Power chains and avoidance of collisions
In this subsection we first address the problem of modelling the avoidance of collisions above the board, specifically collisions

between the power chain of a given shuttle and any other shuttle;

between the power chains of any two shuttles; and

between two shuttles.
Figure 2 describes the board regions considered when studying collisions. We will first consider modelling the avoidance of collisions between the power chain of a given shuttle and any other shuttle. Figure 3 illustrates the forbidden region corresponding to the frontleft shuttle for each of five cases (note that Case 2 is illustrated by two subcases), where the forbidden region denotes (roughly) the region that can be occupied by the power chain of the frontleft shuttle. Each of the five cases is described precisely below. Our definition of forbidden region is too strict, in the sense that a shuttle or power chain could occupy part of the forbidden region without interfering with the power chain of the shuttle under consideration. A more precise definition, however, would be very difficult to model, since a power chain is a flexible object containing several springs and may assume many different positions.
We now give the (mathematical) description of forbidden region that we will use. Let (S _{0},S _{1}) denote the coordinates of the preferred corner of the frontleft shuttle. We first define the large rectangle: if S _{1} is at least 460, the large rectangle denotes the set
if S _{1} is less than 460, it denotes the set
If S _{0} is at most 350, the forbidden region is precisely the large rectangle. If S _{0} is greater than 350, the forbidden region is the set difference between the large rectangle and the small rectangle, where the latter is defined as
We now turn to the five cases that arise when considering the avoidance of collisions between the power chain of the frontleft shuttle and any other shuttle. In Fig. 3 the frontleft shuttle is depicted in red, the other shuttle in blue, and the forbidden region in black.
Let \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) denote the coordinates of the avoidance corner of the “other” shuttle (which is anonymous for the time being). This avoidance corner is the frontleft corner of the other shuttle. Here are the five cases, which are not mutually exclusive:

1.
the other shuttle is included within the vertical strip (i.e., \(S^{\prime }_{0} \geq S_{0}\) holds);

2.
the other shuttle is included within the upper horizontal strip (i.e., \(S^{\prime }_{1} \geq \text {max} \{460,S_{1}\}\) holds) and S _{1} is at least equal to 300;

3.
the other shuttle is included within the upper horizontal strip (i.e., \(S^{\prime }_{1} \geq S_{1} + 160\) holds) and S _{1} is at most equal to 300;

4.
the other shuttle is included within the lower horizontal strip (i.e., \(S^{\prime }_{0} \geq 350\) and \(S^{\prime }_{1} + 160 \leq 300\) hold), S _{0} is at least equal to 350, and S _{1} at least equal to 300;

5.
the other shuttle is included within the lower horizontal strip (i.e., \(S^{\prime }_{0} \geq 350\) and \(S^{\prime }_{1} + 160 \leq S_{1}\) hold), S _{0} is at least equal to 350, and S _{1} at most equal to 300.
To model these collision avoidance constraints, we define five binary variables y _{ r } (for r∈{0,1,2,3,4}), each of which corresponding to one of the cases listed above. The first constraint below means that one of the five cases must be chosen in order to verify that the avoidance corner (i.e., the frontleft corner of the “other” shuttle) does not belong to the forbidden region. The second, third, and fourth constraints ensure that if y _{ i−1} (for i in {1,2,3,4,5}) has the value 1, the conditions on S _{0} and S _{1} in Case i are indeed verified. The fifth (resp. eighth) constraint ensures that the coordinates \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) satisfy the conditions in Case 1 (resp. 3). Finally the sixth and seventh (resp. ninth and tenth, eleventh and twelfth) constraints ensure that \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) satisfy the conditions in Case 2 (resp. 4, 5).
We now simplify these constraints as follows.
The above constraints are “abstract” in the sense that \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) represent the avoidance corner of an anonymous shuttle. Actually, to model the requirement that there is no collision between the power chain of the frontleft shuttle and any other shuttle, we need three groups of 12 constraints, each corresponding to one of the following shuttles: the backleft shuttle (\(S^{\prime }_{0} = S_{2}\), \(S^{\prime }_{1} = S_{3}  160\)), the backright shuttle (\(S^{\prime }_{0} = S_{4}  195\), \(S^{\prime }_{1} = S_{5}  160\)), and the frontright shuttle (\(S^{\prime }_{0} = S_{6}  195\), \(S^{\prime }_{1} = S_{7}\)). We then obtain a complete set of constraints for the frontleft shuttle, i.e., 36 constraints. This set requires the introduction of 15 binary variables. We need similar sets of constraints and binary variables for the other shuttles. In total there will be 60 binary variables and 144 constraints.
We must now model the requirement that two avoidance regions cannot overlap, so as to ensure that two power chains cannot “cross.” Consider the avoidance region of the frontleft shuttle and its relationships with the other avoidance regions.

Given that no two shuttles intersect (see below) and no shuttle has a nonempty intersection with the avoidance region of any other shuttle, it is enough to impose the condition S _{3}≥S _{1} in order to prevent the avoidance regions of the frontleft and backleft shuttles from having a nonempty intersection.

The backright shuttle cannot belong to the lower horizontal region (or at least the part of the lower horizontal region that is not already in the vertical region). Otherwise the avoidance region of the backright shuttle would have a nonempty intersection with the frontleft shuttle or the avoidance region of the frontleft shuttle. In practice this means that the variables y _{8} and y _{9} must equal 0.

The frontright shuttle cannot belong to the upper horizontal region (or at least the part of the upper horizontal region that is not already in the vertical region). Otherwise the avoidance region of the frontright shuttle would have a nonempty intersection with the frontleft shuttle or the avoidance region of the frontleft shuttle. In practice this means that the variables y _{11} and y _{12} must equal 0.
The above conditions will ensure that there is no collision between the power chains in pairs of shuttles that include the frontleft shuttle. Similar conditions are needed for the three other pairs of shuttles. Therefore to avoid collisions between power chains (on one hand) and shuttles or other power chains (on the other), we can use the above constraints (after forcing some variables to equal 0) and add the following constraints to the model.
Finally we turn to collisions between shuttles. We consider again the frontleft shuttle and assume that \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) are the coordinates of the frontleft corner of the “other” shuttle. The variable y _{60} (resp. y _{61}, y _{62}, y _{63}) takes the value 1 if and only if the “other” shuttle is to the left (resp. above, to the right, below) of the frontleft shuttle. The following constraints ensure that the two shuttles will not overlap.
We obtain the following system after simplifying them.
As before, the variables \(S^{\prime }_{0}\) and \(S^{\prime }_{1}\) must be replaced by the correct expressions for every shuttle other than the frontleft shuttle. The three other pairs (backleft and backright, backleft and frontright, backright and frontright) must also be taken into account. For this kind of constraints a total of 24 binary variables and 30 relations are needed.
We now have a complete system of constraints preventing collisions between shuttles and power chains that are above the board. Of course a similar system is required for the shuttles and power chains that are below the board. All these constraints will be referred to as the collision avoidance constraints and denoted by CAC(S _{ u },y _{ r }), where the variables of the form y _{ r } are the auxiliary variables.
Probes, points of interest, and reachability constraints
We now introduce the binary variables X _{ α p } for every point α and every probe p, where X _{ α p } is a binary variable that equals 1 if and only if probe p (attached to the shuttle k(p)) can reach the point α (whose coordinates are denoted by P _{ α1} and P _{ α2}, respectively). We wish to model the constraint that if X _{ α p } equals 1, then the probe p can actually reach the point α. Given the system we are studying, this amounts to saying that if X _{ α p } equals 1, the expression S _{2k(p)}+O _{ p1}−P _{ α1} should be at most 30.0 and the expression S _{2k(p)+1}+O _{ p2}−P _{ α2} at most 33.5. In other words, if X _{ α p } equals 1, the following relations must be satisfied.
We can rewrite them as follows.
The variable S _{2k(p)} (resp. S _{2k(p)+1}) must satisfy the above constraints if X _{ α p } equals 1; otherwise it is bounded from above (resp. below) by its upper (resp. lower) bound. Here are the constraints that we include into the model.
These inequalities (called reachability constraints) are required for each couple (α,p). The set of reachability constraints will be denoted by REACH(S _{ u },X _{ α p }).
Incompatibility constraints
These constraints are not necessary for modelling our problem but allow us to strengthen its linear programming relaxation. Assume that α and β denote two points of interest and p and q two probes attached to the same shuttle. It is easy to derive from the reachability constraints some conditions implying that X _{ α p } and X _{ β q } cannot both equal 1. So for each pair of couples (α,p) and (β,q) satisfying those conditions, we may add the constraint X _{ α p }+X _{ β q }≤1 to the model. In practice we do not add all the incompatibility constraints to the model: rather we solve its linear relaxation and add to the model all such constraints that are violated in the current optimal solution and verify X _{ α p }≥0.2 and X _{ β q }≥0.2 in the current optimal solution. The set of all incompatibility constraints included into the model will be denoted by INC(X _{ α p }).
Tests and feasibility constraints
Given the current configuration (i.e., a set of values for the variables S _{ u } representing the shuttles coordinates), we wish to determine whether a specific test can be carried out or not. We introduce, for each ℓ, a binary variable Y _{ ℓ } that may take the value 1 only if the test ℓ can be carried out within the current configuration. We must find a way of relating the value of Y _{ ℓ } to those of the X _{ α p }. First we show that the test ℓ can be performed within the current configuration if and only if there is a matching of a certain type in a bipartite graph (denoted G _{ ℓ }) that we now describe. Let N _{ ℓ } denote the set of nets involved in test ℓ and U _{ ℓ } the set of points belonging to some net in N _{ ℓ }. The graph G _{ ℓ } contains two kinds of vertices: the points in U _{ ℓ } and the probes. It contains an edge between point α and probe p if and only if probe p can be used to touch point α within the test ℓ (i.e., the couple (α,p) is admissible) and X _{ α p } equals 1. Recall that the admissibility of the couple (α,p) depends upon ℓ. We denote by E _{ ℓ } the set of admissible couples for test ℓ. In Fig. 4 all the edges in E _{ ℓ } are represented: the green edges are those defining graph G _{ ℓ } and the black edges represent couples (α,p) that are admissible but verify X _{ α p }=0. Note that Net 0 (resp. Net 1, Net 2) is the set {0,1,2} (resp. {3,4,5}, {6,7,8}).
From the definition of “carrying out a test,” it follows that a test can be performed within the current configuration if and only if G _{ ℓ } contains a matching saturating exactly one point within each net in N _{ ℓ }. For instance the green graph G _{ ℓ } in Fig. 4 contains the matching {(1,10),(4,7),(8,12)}, showing that probe 10 (resp. 7, 12) can touch point 1 (resp. 4, 8) in Net 0 (resp. 1, 2). Hence the test ℓ can be carried out within the current configuration. We now observe that finding a matching saturating exactly one point within each net in N _{ ℓ } is equivalent to finding a system of distinct representatives for the collection of sets {Z _{ i }}, where Z _{ i } is the set of probes that can be used to touch a point in the net i, i.e.,
and P denotes the set of probes. A classical theorem in combinatorial optimization asserts that the collection of sets \(\phantom {\dot {i}\!}\{Z_{i}\}_{i \in N_{\ell }}\) has a system of distinct representatives if and only if the condition
is satisfied for every subset M of N _{ ℓ } (see in particular the seminal text by Ford and Fulkerson [9] and the book by Chvátal [4]). This theorem can be rephrased as follows: the collection \(\phantom {\dot {i}\!}\{Z_{i}\}_{i \in N_{\ell }}\) has a system of distinct representatives if and only if the condition
holds for every set Q verifying \(\overline {Q} = M1\) (where \(\overline {Q}\) denotes the complement of Q).
Let M denote any nonempty subset of N _{ ℓ } and U(M) the union of all the points belonging to nets in M. The statement
is equivalent to the statement
by the definition of the Z _{ i }. We thus obtain the following proposition.
Proposition 2.1
The graph G _{ ℓ } contains a matching saturating exactly one point within each net in N _{ ℓ } if and only if the inequalities
hold for all sets M, Q such that M is not empty, Q is a subset of probes, and \(\overline {Q}\) equals M−1 (where \(\overline {Q}\) denotes the complement of Q).
For each test ℓ we include into our model the constraints
for all sets M, Q such that M is not empty, Q is a subset of probes, and \(\overline {Q}\) equals M−1. They will be called feasibility constraints and denoted by FEAS(X _{ α p },Y _{ ℓ }). Proposition 2.1 implies that if Y _{ ℓ } equals 1, then the graph G _{ ℓ } contains a matching of the required type and test ℓ can be carried out within the current configuration.
For an illustration we give the feasibility constraints for the test represented in Fig. 4. First we assume that M equals 1 and write the following constraints.
For the case where M equals 2, we need all the constraints of the form
for some probe q. For instance, if M consists of nets 0 and 1 and q equals 6, we have
Finally, for the case where M equals 3, we need all the constraints of the form
for some pair of probes {q,q ^{′}}. For instance, if q equals 6 and q ^{′} equals 7, we have
When the model containing these feasibility constraints returns a solution, one must do a little bit of work to compute the couples (α,p) that describe the implementation of test ℓ (for each ℓ). Actually it suffices to solve a bipartite matching problem in the graph G _{ ℓ } corresponding to this solution. We now comment on the number of feasibility constraints for a given ℓ. Assuming that there are 21 probes (as in the case of our data sets), this number equals
and grows rapidly as a function of N _{ ℓ }. This is not an issue because in our data sets N _{ ℓ } is almost always less than five. Nonetheless one might ask why we do not model directly the requirement that there be a matching between nets and probes (in order to carry out a specific test). The reason is that to do so, we would need to introduce variables of the form X _{ α p ℓ } and the resulting model would contain too many variables.
If one does not want to use the above feasibility constraints when N _{ ℓ } is at least three (note that the number of constraints equals 276 when N _{ ℓ } contains three nets!), an alternative is to introduce the supplementary variables X _{ α p ℓ } and the following constraints.
The partial covering problem
It is natural to ask the following question: what is the maximum number of tests that can be carried out while the system is in a given configuration? This problem, which we call the partial covering problem, can be formulated as follows: maximize the function \(\sum _{\ell } Y_{\ell }\) subject to the collision avoidance constraints CAC(S _{ u },y _{ r }), the reachability constraints REACH(S _{ u },X _{ α p }), the incompatibility constraints INC(X _{ α p }), the feasibility constraints FEAS(X _{ α p },Y _{ ℓ }), the lower and upper bound constraints on all the variables, and the integrality constraints on the binary variables. The resulting mixed integer linear program can be solved by using a commercial solver.
A greedy algorithm for the covering problem
The covering problem can be solved in a heuristic fashion through repeated calls of an algorithm for solving the partial covering problem. This method is summarized in Algorithm 1. Note that in the first line of the loop body, \({\mathcal {T}}\) can be replaced by a subset of tests. Then one must determine which of the omitted tests are covered by the configuration C before removing them from \({\mathcal {T}}\).
The optimal sequence problem
Let \({\mathcal {C}}\) be the set of configurations computed by the above algorithm and n its cardinality. Thus \({\mathcal {C}}\) is of the form {C _{1},C _{2},…,C _{ n }}, where C _{ i } denotes the ith configuration (C _{1} being the initial configuration). Let also d(C _{ i },C _{ j }) denote the time taken by the FP system to go from the configuration C _{ i } to the configuration C _{ j }. We wish to compute the best sequence of configurations, i.e., a sequence (C _{1}=C _{ σ(1)},C _{ σ(2)},…,C _{ σ(n)},C _{1}) (where σ denotes a permutation) that minimizes
When a shuttle moves from one configuration to the next, it travels at the same speed in the horizontal direction as in the vertical direction, and thus the time it takes to do so is proportional to the L _{ ∞ } distance between the respective positions of the shuttle in the two configurations. Hence we assume that d(C _{ i },C _{ j }) is the L _{ ∞ } distance between C _{ i } and C _{ j }.
Since the distances are symmetric (meaning that d(C _{ i },C _{ j })=d(C _{ j },C _{ i }) holds for any pair {i,j}), we can model the optimal sequence problem as a Travelling Salesman Problem (TSP) on an undirected graph. The TSP itself can be modelled by using degree constraints (each vertex must be of degree 2) and subtour elimination constraints (enforcing the condition that there be at least two edges between a subset S of vertices and its complement, for any S verifying 2≤S≤n−2). We introduce the binary variables z _{ ij } for 1≤i<j≤n, where z _{ ij } equals 1 if and only if the edge ij belongs to the tour. Here is the integer programming formulation of the optimal sequence problem.
subject to
A global formulation of the planning problem
We now give a formulation of the planning problem that is global but unlikely to be solved for large data sets. In this formulation we are looking for several configurations at once, so that each test is covered by at least one configuration. We assume that there are at most n configurations. We introduce a group of variables \(\left (S^{i}_{u}, y^{i}_{r}, X^{i}_{\alpha p}, Y^{i}_{\ell } \right)\) for each i∈{1,2,…,n}, that is, for each potential configuration. The variable \(Y^{i}_{\ell }\) equals 1 if and only if the test ℓ is covered by the configuration represented by the shuttles coordinates \(S^{i}_{u}\). For each i the vector \(\left (S^{i}_{u}, y^{i}_{r}, X^{i}_{\alpha p}, Y^{i}_{\ell } \right)\) must satisfy the constraints in \(CAC \left (S^{i}_{u}, y^{i}_{r} \right)\), \(REACH \left (S^{i}_{u}, X^{i}_{\alpha p} \right)\), \(INC \left (X^{i}_{\alpha p} \right)\), and \(FEAS \left (X^{i}_{\alpha p}, Y^{i}_{\ell } \right)\), as well as the bound and nonnegativity constraints on the variables and the integrality constraints on all the variables except the \(S^{i}_{u}\).
To these constraints one must add constraints ensuring that each test is covered by at least one configuration. These constraints can be expressed as \(\sum _{i=1}^{n} Y^{i}_{\ell } \geq 1\) for every ℓ. We now introduce variables and constraints to model the choice of the optimal configuration sequence. For i in {1,2,…,n}, let w _{ i } be a binary variable that equals 1 if and only if Configuration i is chosen. For any nonempty proper subset S of {1,2,…,n}, let w _{ S } be a binary variable that equals 1 if and only if S contains at least one of the chosen configurations. As in the subsection “Methods”, we introduce the variables z _{ ij } defined as follows: z _{ ij } (for 1≤i<j≤n) equals 1 if and only if Configuration i appears immediately before or after Configuration j in the sequence of configurations. Finally we let d _{ ij } denote the L _{ ∞ } distance between Configurations i and j. We can now propose a model for choosing an optimal configuration sequence.
subject to
This model is a mixed integer program with linear constraints and a nonlinear objective function. It can be linearized by introducing the nonnegative real variables D _{ ij }, where D _{ ij } stands for the product d _{ ij } z _{ ij } for each i and j with i<j. After replacing the objective function by \(\sum _{i=1}^{n1} \sum _{j=i+1}^{n} D_{ij}\) and adding the constraints D _{ ij }≥d _{ ij }−M(1−z _{ ij }) (where M is a constant larger than any distance between two configurations), we obtain a model of our problem that is actually a mixed integer linear program.
We expect that n (the maximum number of configurations) will be relatively small for most data sets, i.e., smaller than 30. If the number of tests is large, however, the above MILP will be hard to solve and one will have to investigate the use of column generation or other decomposition techniques for solving our problem. We also note that the set of solutions of this model exhibits many symmetries. This difficulty could be partially overcome by introducing the constraints w _{ i }≥w _{ i+1} (for i in {1,2,…,n−1}) into the model.
Results and discussion
In this section we present results pertaining to the solution of the covering and sequencing subproblems. As mentioned in the subsection “Methods”, the global formulation cannot be used for large data sets, particularly the kind of data sets that the Company must handle. We start by describing the format of each data set, consisting of a probe file, a point file, and a test file. The probe file contains the description of each probe, namely: a numerical identifier; the string “top” or “bot” to indicate whether the shuttle to which the probe is attached is on top or on bottom of the board; a string indicating the position of that shuttle (for instance “fl” refers to a frontleft shuttle); and the coordinates of the point of attachment of the probe with respect to the preferred corner of the shuttle to which it is attached. Here is an example of such a description.
0 top fl 65.0 79.0
This means that Probe 0 is attached to the frontleft shuttle on top of the board and that it is attached to this shuttle at the point of coordinates (65.0,79.0) (since the preferred corner of a frontleft shuttle is the point of coordinates (0.0,0.0)). The point file contains the description of each point, i.e., a numerical identifier and the coordinates of that point. For example the line corresponding to Point 0 is the following.
0 525.0 425.0
The test file consists of a sequence of test descriptions (each of which occupying several lines). For instance the description of Test 4908 is as follows.
Note that the second number on the first line represents the number of nets within the test (2, in this example). Therefore the first line in the test description is followed by the description of the first net, Net 9816, followed by the description of the second one, Net 9817. Net 9816 consists of three points, represented by their identifiers and whose coordinates are stored in the point file. The points in question are Points 3120, 3121, and 3122, and each point identifier is followed (on the next line) by the list of probes that may touch that particular point. Naturally Net 9817 is described in a similar fashion. Table 1 summarizes the characteristics of the four instances that we used for our tests. It turns out that some of the tests in each of the four data sets are infeasible, i.e., there are tests that no configuration can “cover.” For this reason our program begins by determining which tests are infeasible through solving a series of partial covering problems (each with a data set consisting of one test). Then we solve the partial covering problem (see section “Methods”) for the remaining tests, each of which is feasible. Note that we did not include into the model the tests that consist of 5 nets or more, because the corresponding feasibility constraints (see the subsection “Methods”) are too numerous. In any case only Dataset 3 contains such tests and there are only 6 of them.
In our experiments we solved the covering problem by using Cplex to find a solution of each of the partial covering problems. Note that Cplex implements a branchandbound algorithm for solving mixed integer linear programming problems (see Nemhauser and Wolsey [16] for a description of the branchandbound method). Our initial intention was to solve the covering problem by solving partial covering problems until all the tests had been covered, as explained in the subsection “Methods”. Unfortunately the number of constraints of our model is huge and including into it all the feasible tests consumed too much memory. Therefore instead of solving a partial covering problem including all the feasible tests, we included at most 400 tests in each of the successive partial covering problems solved by our algorithm. The configuration obtained after solving a given partial covering problem may actually cover more than the number of covered tests indicated in the solution; therefore we look for all the tests covered by the current configuration before solving the next partial covering problem.
The mixed integer linear program (MILP) corresponding to a partial covering problem has a weak linear relaxation and many of its solutions have the same objective function value. Hence finding a (provably) optimal solution of a given partial covering problem takes too much time and we decided to put a limit on its execution time. For each of the four data sets, we tried three such limits: 90 seconds, 180 seconds, and 270 seconds, respectively. For instance, in Table 2, the identifier 7700FC180 refers to an experiment with data set 7700FC in which we let the Cplex MILP algorithm run for at most 180 seconds when attempting to solve a partial covering problem. We ran our tests on a machine with an Intel Core i7860, 2.80GHz, and a 2G memory.
Intuitively, if we spend more time finding a good solution for each of the partial covering problems, we should be able to cover all the tests with fewer configurations and hence obtain a better solution of the planning problem. With one exception (Dataset490), the results in Table 2 show that spending 270 seconds to solve each partial covering problem always yields a solution that is better (i.e., of smaller length) than those obtained after spending only 90 or 180 seconds on each partial covering problem. This is true even if spending 90 or 180 seconds on each partial covering problem yields a solution with fewer configurations. Overall the results are very encouraging, because the system currently in use at the Company produces plans that may include hundreds of configurations while our solutions include fewer than 30 configurations. The real time consumed for computing a solution is considered reasonable by the Company, since the time needed to test a single board is itself substantial. Therefore it is feasible to spend one hour or so preparing the sequence of configurations that will be used for testing a specific board.
Conclusion
In this article we have shown that the use of modelling and mathematical programming yields solutions of the test planning problem that are much better than those currently used by the Company. The new solutions can be obtained within times that are reasonable. Our results indicate that the system currently used by the Company could be replaced by a system based on mathematical programming. More work remains to be done, however, in order to strenghten the formulation of the partial covering problem. In particular we would like to find new families of cutting planes, whose introduction into the model will speed up the solution process and thus yield better solutions of the partial covering problem. Another avenue is to design heuristics (not making use of MILP models) in order to cover a large number of tests with few configurations. One could then use the MILP model described in section “Methods” to cover the remaining tests, presumably those complicated tests that include three or more nets. These improvements may enable us to find solutions of the planning problem that are as good as those reported in this article but take less time to compute. As for the model in the subsection “Methods”, we could test it on small data sets and then look for more sophisticated approaches for solving it, in the hope of computing solutions for realworld problems within reasonable times.
References
Ahn HR, Bae SW, Demaine ED, Demaine ML, Kim SS, Korman M, Reinbacher I, Son W (2011) Covering points by disjoint boxes with outliers. Comput Geometry 44(3):178–90.
Applegate DL, Bixby RE, Chvátal V, Cook WJ (2006) The Traveling Salesman Problem: a computational study. Princeton Series in Applied Mathematics. Princeton University Press, Princeton.
Arkin EM, Hassin R (1994) Approximation algorithms for the geometric covering salesman problem. Discret Appl Math 55(3):197–218.
Chvátal V (1983) Linear programming. Freeman and Company, WH. New York.
Current JR, Schilling DA (1989) The Covering Salesman Problem. Transp Sci 23(3):208–13.
Dimitrijevic V, Saric Z (1997) An efficient transformation of the generalized traveling salesman problem into traveling salesman problem on digraphs. Inf Sci 102:105–10.
Fischetti M, Gonzales JJS, Toth P (1995) The symmetric generalized traveling salesman polytope. Networks 26:113–23.
Fischetti M, Gonzales JJS, Toth P (1997) A Branchandcut Algorithm for the Symmetric Generalized Traveling Salesman Problem. Oper Res 45:378–94.
Ford LR, Fulkerson DR (1962) Flows in Networks. Princeton University Press, Princeton.
Kara I, Guden H, Koc ON (2012) New formulations for the generalized traveling salesman problem In: Proceedings of the 6th International Conference on Applied Mathematics, Simulation, Modelling World Scientific and Engineering Academy and Society (WSEAS), 60–5.. Stevens Point, Wisconsin.
Laporte G, Palekar U (2002) Some applications of the clustered travelling salesman problem. J Oper Res Soc 53:972–6.
Laporte G, AsefVaziri A, Sriskandarajah C (1996) Some applications of the generalized traveling salesman problem. J Oper Res Soc 47:1461–7.
Laporte G, Mercure H, Nobert Y (1987) Generalized travelling salesman problem through n sets of nodes: the asymmetrical cases. Discret Appl Math 18:185–97.
Laporte G, Nobert Y (1983) Generalized travelling salesman problem through n sets of nodes: an integer programming approach. INFOR 21:61–75.
Laporte G, Semet F (1999) Computational evaluation of a transformation procedure for the symmetric generalized traveling salesman problem. INFOR 37:114–20.
Nemhauser GL, Wolsey LA (1988) Integer and combinatorial optimization. Wiley, New York.
Noon CE, Bean JC (1991) A Lagrangian based approach for the asymmetric generalized traveling salesman problem. Oper Res 39:623–32.
Pop, PC (2007) New integer programming formulations of the generalized traveling salesman problem. Am J Appl Sci 4(11):932–7.
Riordan T (2011) Solving the problem of the traveling politician. https://eqn.princeton.edu/2011/12/_text_goes_here/. Accessed 2 Feb 2017.
Funding
Some of the work described in this article was carried out while Mario Morfin was a postdoctoral fellow at the Company. His two internships were supported by Mitacs Inc. and NSERC, respectively, and were also partially supported by the Company.
Author information
Authors and Affiliations
Contributions
The four authors started collaborating with the Company during the 2010 FieldsMITACS Industrial ProblemSolving Workshop. Together they proposed a first attempt at modelling the problem submitted by the Company to the workshop. MM then spent two semesters at the Company in order to understand and improve the system the Company is currently using. His work was supervised by SC. MM and OM worked on the model presented in our article and OM completed the computational work and the article itself. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
None of the authors has any competing interests (financial or otherwise) regarding the work described in this article.
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License(http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Chen, S.Y., Marcotte, O., Morfin Ramírez, M.L. et al. Modelling and optimizing a system for testing electronic circuit boards. MathematicsinIndustry Case Studies 8, 4 (2017). https://doi.org/10.1186/s4092901700120
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s4092901700120
Keywords
 Electronic circuit board
 Combinatorial optimization
 Covering
 Mixed integer programming
 Travelling salesman problem