In the following, we formally define the CTW problem and define valid and optimal solutions of a CTW instance. We investigate the complexity of the problem and prove it to be NP-hard, but also show that specific subclasses of the problem can be solved in polynomial time. Finally, we discuss the relationship to the TSP problem more formally.
Formalization of the cable tree wiring problem
The cable tree wiring problem CTW can be considered as a scheduling problem where an optimal schedule for inserting each given cable end into its designated cavity needs to be determined. Note that two different cable ends can never be inserted into the same cavity and one cable end cannot be inserted into two different cavities. As this matching of cable ends to cavities is given initially, the insertion of cable end i in its designated cavity hence uniquely determines a job ci, which we formally define as follows:
Definition 1 (Job)
A job ci is defined as the task of inserting a cable end i into its corresponding cavity.
The CTW problem can be considered as the problem of finding an optimal schedule for executing these jobs while satisfying certain constraints. The schedule is described by the permutation sequence of insertions on a single machine executing the jobs as fast as possible. For each insertion operation, the robot arm has to pick up the cable from a fixed position in the storage, then travel to the cavity on the palette, plug the cable, and then travel back to the storage to pick up the other cable end or the next cable. The travel times of the robot arm are identical for all valid permutation sequences, because the layout is given and fixed and thus, they do not need to be considered in the problem formalization.Footnote 2
We consider two types of cables, which we denote as one-sided and two-sided cables. For two-sided cables, both ends must be inserted into cavities. For one-sided cables only one of their ends needs to be inserted into a cavity. We define the following convention for labeling the corresponding jobs, which is illustrated in Fig. 2:
Definition 2 (Labeling of jobs, job pair 〈c
i, c
j〉)
Let b be the number of two-sided cables in a CTW instance. We label the two ends of a two-sided cable i and j = b + i, where \(i = 1, \dots , b\). Every two-sided cable hence defines a job pair 〈ci, cj〉 where \(i\in \{1, \dots , b\}\) and j = b + i. Let n be the number of one-sided cables in a CTW instance labeled with \(i = 2b+1, \dots , 2b+n\). The one-sided jobs are hence the jobs ci where \(i = 2b+1, \dots , 2b+n\).
A solution of a CTW instance with k = 2b + n jobs is described by a permutation \(\mathcal {P}\) of length k. This permutation sequence is an ordered set in which each job occurs exactly once.
Definition 3 (Solution \({\mathscr{P}}\))
Let p(ci). be the position of a job ci in \({\mathscr{P}}\). \({\mathscr{P}}\) is a solution of the CTW problem if p is an invertible function from \(\{c_{i}\}_{i\in \{1, \dots , k\}}\) to \(\{1, \dots , k\}\) such that
$$ \begin{array}{@{}rcl@{}} &&\forall x \in \{1, \dots, k\} \exists ! i \in \{1, \dots, k\} \text{ s.t. } p(c_{i}). = x \end{array} $$
(1a)
$$ \begin{array}{@{}rcl@{}} &&\forall i, j \in \{1, \dots, k\} \text{with} i \neq j : p(c_{i}). \neq p(c_{j})\text{ ,} \end{array} $$
(1b)
where ∃! means that there exists a unique one.
As mentioned in the introduction, the position of a job in the permutation sequence is restricted by the behavior of cables and the machine. To capture these restrictions, constraints are formulated over the jobs. These constraints occur in three different forms:
Definition 4 (Atomic Precedence Constraint, sets \({\mathscr{A}}\) and \({\mathscr{A}}_{s}\))
Let ci and cj be two jobs in a CTW instance. An atomic precedence constraint ci ⊲ cj with \(i, j \in \{1, \dots , k\}\) and i≠j specifies that job ci must be executed before job cj. The set of all atomic precedence constraints in a CTW instance is denoted by \({\mathscr{A}}\). We further define another set of soft atomic precedence constraints \({\mathscr{A}}_{s}\), which do not necessarily have to be satisfied by a valid solution permutation \({\mathscr{P}}\), but will lead to a penalty when violated. The two sets are disjoint, i.e., \({\mathscr{A}} \cap {\mathscr{A}}_{s} = \emptyset \). A solution \({\mathscr{P}}\) satisfies a (soft). atomic precedence constraint \(c_{i} \triangleleft c_{j} \in {\mathscr{A}} \cup {\mathscr{A}}_{s}\) if and only if \( {\mathscr{P}} \vdash p(c_{i}). < p(c_{j})\).
Given any arbitrary pair of jobs ci and cj, an atomic precedence constraint ci ⊲ cj or cj ⊲ ci may or may not occur in a problem instance. Sometimes, even both constraints can occur, which renders a problem instance unsatisfiable, because for example the layout of harnesses was chosen in an unfortunate way.
Disjunctive precedence constraints \({\mathscr{D}}\) combine two atomic precedence constraints in a disjunction and occur in a limited syntactic form in CTW.
Definition 5 (Disjunctive Precedence Constraint, set \({\mathscr{D}}\))
Given a job pair 〈ci, cj〉 of a two-sided cable and a job cl from another one-sided or two-sided cable, two syntactic forms of disjunctive precedence constraints can occur in a CTW instance:
-
1.
\({\mathscr{D}}_{1}: c_{l} \triangleleft c_{i} \vee c_{l} \triangleleft c_{j}\)
-
2.
\({\mathscr{D}}_{2}: c_{l} \triangleleft c_{i} \vee c_{j} \triangleleft c_{l}\) or switching i and j: cl ⊲ cj ∨ ci ⊲ cl
For \(l \in \{1, \dots , k\}\) and a job pair 〈ci, cj〉 with \(i \in \{1, \dots , b\}\) and j = i + b, a solution \({\mathscr{P}}\) satisfies the constraint
-
\((c_{l} \triangleleft c_{i} \vee c_{l} \triangleleft c_{j}). \in {\mathscr{D}}_{1} \) if and only if \( {\mathscr{P}} \vdash p(c_{l}). < p(c_{i}). \) or \( {\mathscr{P}} \vdash p(c_{l}). < p(c_{j})\)
-
\((c_{l} \triangleleft c_{i} \vee c_{j} \triangleleft c_{l}). \in {\mathscr{D}}_{2} \) if and only if \( {\mathscr{P}} \vdash p(c_{l}). < p(c_{i}). \) or \( {\mathscr{P}} \vdash p(c_{j}). < p(c_{l})\).
Note that two constraints of the form cl ⊲ ci ∨ cl ⊲ cj and ci ⊲ cl ∨ cl ⊲ cj (cl and ci flipped). can never occur in the set \({\mathscr{D}}_{1}\) for the same problem instance, because a cable has at most two ends, i.e., two job pairs 〈ci, cj〉 and 〈cl, cj〉 cannot exist together in the same instance. Furthermore, note that whenever a disjunctive constraint for three jobs ci, cj, cl occurs in \({\mathscr{D}}_{1}\) with 〈ci, cj〉 being a job pair, a constraint in \({\mathscr{D}}_{2}\) can never be present for the same three jobs and vice versa. For the set \({\mathscr{D}}_{2}\), both variants of the constraint with ci and cj being flipped can occur within the same instance.
Direct successor constraints formalize coupled tasks in a CTW instance. A Zeta machine can insert the end i of one cable into a cavity, put the other end of the same cable j into storage for later insertion, and continue to work on a new cable. Some cables are too short for storing and thus require that the wiring of the cable must proceed without interruption. Note that direct successor constraints are specific to cavities, not cables. Depending on the position of the cavity on the palette, storage of one end might be possible, but storage of the other end might be not.
Definition 6 (Direct Successor Constraint, set \({\mathscr{S}}\))
Let 〈ci, cj〉 be a job pair. A direct successor constraint \(c_{i} \blacktriangleleft c_{j}\) (or \(c_{j} \blacktriangleleft c_{i}\)). formulates an atomic precedence constraint, which requires that the cable end j of a two-sided cable is immediately inserted after i is inserted or anytime before i (or i to follow immediately after or anytime before j respectively). A solution \({\mathscr{P}}\) satisfies a direct successor constraint \(c_{i} \blacktriangleleft c_{j}\) for a job pair 〈ci, cj〉 if and only if \({\mathscr{P}} \vdash p(c_{j}). = p(c_{i}). + 1\) or \({\mathscr{P}} \vdash p(c_{j}). < p(c_{i})\).
Direct successor constraints can also be formulated as atomic precedence constraints by adding the atomic constraint ci ⊲ cj to \({\mathscr{A}}\) and additional disjunctive constraints of the syntactic form \({\mathscr{D}}_{2}\) to specify that all other cavities must either come before or after the job pair 〈ci, cj〉, however, this formulation is less compact:
$$ p(c_{i}). = p(c_{j}). +1 \leftrightarrow c_{i} \triangleleft c_{j} \wedge \forall c_{l} (i \neq l \neq j). c_{l} \triangleleft c_{i} \vee c_{j} \triangleleft c_{l} $$
(2)
We now define a valid solution of a CTW instance as a solution, which satisfies all constraints defined for the instance.
Definition 7 (Valid Solution)
Let I be a CTW instance with b two-sided and n one-sided cables, i.e., k = 2b + n jobs, and sets of constraints \({\mathscr{A}}\), \({\mathscr{A}}_{s}\), \({\mathscr{D}}\), and \({\mathscr{S}}\). A permutation \({\mathscr{P}}\) is a valid solution for I if and only if \({\mathscr{P}}\) satisfies all constraints in \({\mathscr{A}} \cup {\mathscr{D}} \cup {\mathscr{S}}\). Note that if k = 0, all constraint sets are empty and any permutation of length 0 is a solution for the instance.
As an illustrating example consider a CTW instance with cables A, B and C, where A and B are two-sided cables defining the job pairs 〈c1, c3〉 and 〈c2, c4〉 respectively and C is a one-sided cable defining the job c5. This instance has parameters k = 5 and b = 2 and is subject to the following constraints:
$$ \begin{array}{@{}rcl@{}} c_{3}\!\!\!\!\!\!\!\!\! & \triangleleft~ ~c_{4} \\ c_{4}\!\!\!\!\!\!\!\!\! & \triangleleft~~c_{1} \\ c_{5}\!\!\!\!\!\!\!\!\! & \triangleleft~ ~c_{4} \\ c_{2} ~\triangleleft &c_{5} \vee c_{2} \triangleleft c_{1}\\ c_{4}\!\!\!\!\!\!\! & \blacktriangleleft ~c_{2} \end{array} $$
Of the 5! = 120 possible job permutations, only 8 are valid solutions satisfying all the constraints. One example of such a valid solution is the permutation (c5, c3, c4, c2, c1)
Optimal solutions of CTW instances
In practice, one is not only interested in valid solutions, but in solutions of minimal cost. Four different cost functions are of interest. The first three cost functions aim to increase the robustness of the cable wiring actions by introducing penalties when a job pair is interrupted, because interrupting the processing of a job pair and storing cables into storage can increase the risk of the robot arm in getting caught in stored cables. Furthermore, putting a cable end into storage and working on another cable, which is captured by the first cost function, can increase production time. The fourth function aims at keeping the violation of soft atomic constraints at a minimum. On the one hand, violating a soft atomic constraint allows the machine to make more flexible moves during wiring, but on the other hand, it can impact robustness negatively.
-
1.
S = Number of interrupted job pairs, i.e., cable ends that are temporally added to the cable storage by the machine to pick up another cable for insertion.
-
2.
M = Maximum number of cables that are contained in storage simultaneously.
-
3.
L = Longest time a cable end resides in storage expressed in terms of number of jobs.
-
4.
N = Number of violated soft atomic precedence constraints in \({\mathscr{A}}_{s}\).
The formalization of the four criteria S, M, L and N, makes repeated use of the indicator function \(\mathbb {I}\). An indicator function \(\mathbb {I}_{A}(x)\) for a set A returns 1 when x lies in the set A, and 0 otherwise. More formally, the indicator function \(\mathbb {I}_{A}\) of a set A is defined as
$$ \mathbb{I}_{A}(x). = \begin{cases} 1 & \text{if } x \in A\\ 0 & \text{otherwise} \end{cases} $$
(3)
Criterion S counts how many of the job pairs were interrupted in a solution.
where
and
is the indicator function of the set
.
To determine the criterion M, i.e., the maximum number of cables that are stored simultaneously, we have to count for each job cl in the solution, how many job pairs exist where one end is plugged before cl, but the other end is plugged after cl, i.e., how many job pairs are interrupted by a given job cl.
where
and
is the indicator function of the set
. Note that in this case, the set
depends on j.
The optimization criterion L is determined by measuring the number of jobs between job ci and job ci+b for each \(i\in \{1, \dots , b\}\), i.e., for each job pair, and takes the maximum value obtained for all job pairs. Note that if there are no jobs between two cable ends, the cable is plugged directly without accessing the storage.
$$ L = \begin{cases} 0 & \text{if } b = 0\\ \underset{ i \in \{1, \dots, b\}} {\max} \left( |p(c_{i}). - p(c_{i+b}). | -1\right). & \text{otherwise} \end{cases} $$
(6)
For criterion N, we count the number of violated soft atomic constraints from the set \({\mathscr{A}}_{s}\), so
where
and
is the indicator function of the set
.
Assuming k ≠ 0, all four criteria are bounded by a lower value of 0 and an upper value depending on the size of the solution k = 2b + n as follows:
\(0 \leqslant S \leqslant b < k\)
\(0 \leqslant M \leqslant b < k\)
\(0 \leqslant L \leqslant k-1 < k\)
\(0 \leqslant N \leqslant \frac {k \cdot (k-1)}{2} < k^{2}\) as there can be at most \(\frac {k \cdot (k-1)}{2}\) soft atomic precedence constraints in a solution, otherwise the constraint graph contains a cycle and the instance is unsatisfiable.
As our objective function, we define the weighted sum of the four criteria S, M, L and N. By the weight assigned to each criterion, we want to ensure that their possible values fall into non-overlapping intervals, in order to ensure that solvers prioritize optimizing for the criteria based on a fixed ranking order: S before M before L before N. The value of N for the instances in the benchmark set that we consider is more tightly bound than the worst possible bound, i.e., in the benchmark set we always have N < k instead of N < k2. It is thus sufficient to weight the four objectives by powers of k to eliminate the influence of one to the others. For all experiments in this paper, we therefore use the weighted sum as defined in (8). below as optimization objective:Footnote 3
$$ k^{3} \cdot S + k^{2} \cdot M + k \cdot L + N $$
(8)
For the example considered above and the solution (c5, c3, c4, c2, c1), this formula returns costs 161 (S = M = N = 1, L = 2), which makes this solution one of the two optimal solutions for this instance.
NP-hardness of the CTW problem
We now prove that the CTW problem is NP-hard by a reduction from the Maximum Acyclic Subgraph problem. Note that for this reduction, we assume the presence of soft atomic constraints and one-sided cables.
Theorem 1 (NP-hardness of CTW)
The Cable Tree Wiring Problem (CTW). is NP-hard.
Proof of Sketch
We prove NP-hardness by a reduction from the Maximum Acyclic Subgraph problem (MAS). Let us assume an MAS instance where we are given a directed graph G = (V, E), where \(V=\{1, \dots , n\}\) is the set of vertices of G and E is the set of directed edges of G. A solution to the MAS problem is a maximal set \(E^{\prime }\subseteq E\) of edges such that the resulting graph \(G^{\prime }=(V, E^{\prime })\) is a directed acyclic graph. This problem is known to be NP-hard [33].
We now construct a CTW instance as follows. Let the set of vertices V correspond to jobs of one-sided cables \(c_{1}, \dots , c_{n}\). For each of the edges e = (v, w). ∈ E, where v corresponds to job cj and w to job ck, we introduce a soft precedence constraint cj ⊲ ck. The graph G hence corresponds to the constraint graph of the CTW instance.
The solution to the CTW problem is then a permutation \({\mathscr{P}}\) of the jobs with minimal cost, so with the fewest violated soft precedence constraints (since we have no pairs of jobs in this instance). Let \(E^{\prime }\) be the set of all edges corresponding to soft atomic precedence constraints that are not violated by the permutation. By the optimality of the solution for the CTW instance, the set \(E^{\prime }\) is the largest such set permitting a valid wiring sequence. Note further that a valid solution is possible if and only if the constraint graph has no cycles.
The set \(E\setminus E^{\prime }\) is hence the smallest set of edges that needs to be removed from G to obtain a directed acyclic graph, and so \(G^{\prime }=(V,E^{\prime })\) is the maximum acyclic subgraph of G. The solution to the CTW hence gives a solution to the Maximum Acyclic Subgraph problem. Since the solution size is clearly polynomial in the size of the MAS instance, it is a polynomial many-one reduction, proving that CTW is NP-hard. □
Since our proof relies on the presence of soft atomic constraints, the complexity of the CTW problem without soft atomic precedence constraints is still open. Note further, that NP-completeness of the corresponding CTW decision problem follows from Theorem 1. For the special case that only (hard). atomic precedence constraints and no two-sided cables occur in an instance, the CTW problem can be solved in polynomial time.
Lemma 1 (CTW with only hard atomic constraints)
A CTW instance with only one-sided cables and
\({\mathscr{A}}_{s} = {\mathscr{D}} = {\mathscr{S}} = \varnothing \)
can be solved in polynomial time.
Proof of Sketch
First construct the constraint graph of the CTW instance by creating a vertex i for every job ci and adding a directed edge from i to j to the graph if and only if the precedence constraint ci ⊲ cj exists in \({\mathscr{A}}\). By applying Kahn’s algorithm [32] to the constraint graph, we obtain a topological ordering, which is necessarily a valid permutation satisfying all the precedence constraints. Note that Kahn’s algorithm has time complexity O(k + e), where k is the number of jobs and e is the number of constraints in the CTW instance. The CTW instance can thus be solved in polynomial time. □
Based on the relationship to the Traveling Salesperson problem that we discuss in the next subsection, we conjecture that the CTW problem is NP-hard once two-sided cables are added even if only the set \({\mathscr{A}}\) of atomic precedence constraints is non-empty and all other constraint sets are empty. We also conjecture that the CTW problem restricted to containing only disjunctive precedence constraints is NP-hard. Disjunctive precedence constraints can be compiled away by converting the constraint set of disjunctive precedence constraints into disjunctive normal form (DNF). where each disjunct only contains atomic constraints. The compilation can lead to an exponential “blow-up” in the number of disjuncts only containing atomic precedence constraints [40]. Solution length remains polynomially bounded in this potentially larger search space, i.e., membership in NP remains unchanged. Proving these conjectures is not straightforward as the CTW problem is a TSP variant with only tour-dependent edge costs, but no static edge costs, for which we could not find any formal complexity proofs.
If we, however, restrict a CTW instance to only contain direct successor constraints, it can be solved in linear time.
Lemma 2 (CTW with only direct successor constraints)
A CTW instance with k = 2b + n jobs and b two-sided and n one-sided cables where \({\mathscr{A}} = {\mathscr{A}}_{s} = {\mathscr{D}} = \emptyset \) and \( {\mathscr{S}} \not =\emptyset \) can be solved in linear time O(k)
Proof of Sketch
As a direct successor constraint can only be defined for an end of a two-sided cable, an optimal solution permutation with cost 0 can be constructed by first wiring all job pairs of the two-sided cables without interruption and then adding the jobs for the one-sided cables:
$$ \mathscr{P} = c_{1}, c_{1+b}, c_{2}, c_{2+b}, \dots, c_{b}, c_{2b}, c_{2b+1}, \dots, c_{2b+n} $$
This sequence ensures that if a direct successor constraint is defined for some job cj, either the other cable end is directly following or preceding it. □
Relationship of CTW to TSP
The CTW problem can be considered as a variant of the traveling salesman problem (TSP). where cavities represent cities that need to be visited. TSP variants with precedence constraints have been studied in a number of papers with [35] being one of the first references, but see also [42, 52] for more recent overviews. The CTW problem can also be considered as a variant of the pickup and delivery TSP problem, where the pickup and delivery locations can be exchanged with each other, but the tour should visit them directly. Closely related variations of the pickup and delivery problem have been studied in [11, 60, 64], but none of them is identical to the CTW variant.
In the underlying graph, a city (job). is connected with any other city unless a precedence constraint ci < cj is given, which removes the edge cj↦ci from the graph and also excludes all (sub)paths cj⋯↦⋯ci from the tour. Direct successor constraints remove even more edges from the graph, enforcing the edge ci↦cj as the only outgoing edge of ci in the graph. In the resulting partially connected graph, we need to compute a hamiltonian path, but not a hamiltonian cycle, because we do not need to return to the starting job after having visited each job exactly once. Computing a hamiltonian path on general graphs is NP-complete. On complete graphs, i.e., in the unlikely case that no precedence constraints are given, the problem can be solved in linear time [56].
Note that the time to complete each wiring operation is independent of the position of a cavity in the permutation, because the robot arm of the machine begins each wiring operation from the storage location, where the cables are prepared, moves to the cavity, and back to the storage. Travel times can only be influenced by choosing a different layout, i.e., moving a harness on the palette closer to the cable storage, but once the layout is fixed, travel costs are identical for all permutations. Thus, travel times in a CTW instance are constant and do not need to be considered in the problem formalization. This makes our problem at first glance different from routing problems, which usually minimize travel time. However, we will show now how to encode our storage costs as edge costs.
Recall, that we have defined the underlying graph of this problem as follows: Each node represents a job and two nodes are connected unless a precedence constraint ci < cj is given, which removes the edge cj↦ci. A direct successor constraint between ci and cj further removes all outgoing edges from ci except the edge ci↦cj. Given a job pair of a two-sided cable 〈ci, cj〉 and a further job cl where l ≠ i, j, we define the edge costs as follows:
-
Edges ci↦cj and cj↦ci have costs 0, because we plug the two ends of the two-sided cable immediately after one another.
-
For an edge ci↦cl with l ≠ j, costs are either 0 or 1 depending on whether the other end of the cable was visited on the tour to ci or not.
-
If cj was visited on the tour to ci, then edge ci↦cl has cost 0 because ci is the “second” end of the cable that we take out of storage for plugging.
-
If cj was not visited, then edge ci↦cl has cost 1 because we put cj into storage to work on the cable for cl.
In the same way, costs are assigned to cj↦cl. Intuitively, the edge cost is equal to 1 if a “remaining” cable end is put into storage and a new cable is picked for wiring, otherwise the edge cost is 0.
Let \(1, \dots , k\) be the cable ends in a CTW instance with corresponding jobs \(c_{1}, \dots , c_{k}\). Suppose further, as before, that b of the cables are two-sided. Let q(x). denote the inverse of the function p introduced in Definition 3, i.e., for a given position x, the function q returns the job cj at position x in the permutation sequence \({\mathscr{P}}\). We define a tour \({\mathscr{P}}\) in the graph to be a sequence of jobs (which correspond to nodes). \(q(1), \dots , q(k)\), where for each \(x \in \{1, \dots , k-1\}\) an edge between node q(x). and q(x + 1). exists. A solution tour is Hamiltonian and visits every node in the graph exactly once.
Let \(\mathfrak {c}\left (q(x). \mapsto q(x+1)\right )\) be the cost of an edge q(x)↦q(x + 1). S is the total number of interrupted job pairs, so the number of edges with cost 1 occurring on the path. Hence, S can be defined as
$$ S = \sum\limits_{x=1}^{2b+n-1}\mathfrak{c}\left( q(x). \mapsto q(x+1)\right). $$
(9)
We show that this definition of S in (9). is equivalent to our original definition of S in (4). Equation (9). can be rewritten as
$$ = \sum\limits_{x=1}^{2b+n-1} \mathbb{I}_{K}(x). $$
where K = {x∣ other end of the cable end corresponding to job q(x). is put into storage}. K is the set of all positions x in the tour such that the edge q(x)↦q(x + 1). has cost 1. An edge q(x)↦q(x + 1). has cost 1 if and only if the other end of the cable end plugged in job q(x). has not been plugged before q(x). and is not plugged right after q(x), which is equal to
$$ {\kern3mm} = \sum\limits_{j=1}^{b} \sum\limits_{x=1}^{2b+n-1} \mathbb{I}_{K^{+}_{j}}(x). + \mathbb{I}_{K^{-}_{j}}(x). $$
where \(K^{+}_{j} = \{x \mid q(x). = j \wedge x+1 < p(c_{j+b})\}\) and \(K^{-}_{j} = \{x \mid q(x). =j+b \wedge x+1 < p(c_{j-b})\}\). \(K^{+}_{j}\) is the set of positions in the permutation (tour). where a two-sided cable end j, where j is at most b, is plugged and such that the other end of j has not been plugged before q(x). and is not plugged right after q(x). The set \(K^{-}_{j}\) is defined similarly for j between b + 1 and 2b. This can then be further simplified to
$$ {\kern3mm} = \sum\limits_{j=1}^{b} \left( \sum\limits_{x=1}^{2b+n-1} \mathbb{I}_{K^{+}_{j}}(x)\right). + \left( \sum\limits_{x=1}^{2b+n-1}\mathbb{I}_{K^{-}_{j}}(x)\right). $$
which again can be simplified by joining the sets \(K^{+}_{j}\) and \(K^{-}_{j}\) for all x.
$$ = \sum\limits_{j=1}^{b} \mathbb{I}_{S^{+}}(j). + \mathbb{I}_{S^{-}}(j). $$
where S+ = {j∣p(cj). + 1 < p(cj+b)} and S− = {j∣p(cj+b). + 1 < p(cj)}. With S+ ∪ S− = S and S = {i∣|p(ci). − p(ci+b)| > 1} as defined in (4), we obtain
$$ =\sum\limits_{j=1}^{b} \mathbb{I}_{S}(j). $$
as required, which shows that the cable tree wiring problem can indeed be seen as a variant of the TSP problem combining precedence constraints and time-dependent edge costs.