An assembly node N of a dynamic assembly structure is complete if for every child part there is at least one assembly variant of N that uses the child part. However, sometimes there are parts in child nodes which are not constructible for any assembly variant of N . These parts are never included in any assembly variant of level 0 of the dynamic
structure. Definition 34 introduces a formal definition for a complete assembly node. Afterwards we present SAT-based algorithms to identify incomplete assembly nodes.
Definition 34. (Completeness of a DAS) Let D be a dynamic assembly structure.
a) (Completeness of a Material Node) Consider a pair (N, Nc) for an assembly node N ∈ assemblyNodes(D) and a child structure node Nc∈ children(N ).
Assembly node N is complete w.r.t. to material node mc ∈ matNodes(Nc) iff
for all product types t ∈ types(D) holds: there exists a material node m ∈ matNodes(N ) such that m and mc can be selected simultaneously for at least one
valid vehicle of product type t, i.e., the constraints con(m) and con(mc) can be
satisfied simultaneously in conjunction with ϕPD(t). Otherwise, material node mc
is called an orphan.
We call assembly node N complete w.r.t. child structure node Nciff assembly node N is complete for every material node mc∈ matNodes(Nc).
b) (Completeness of an Assembly Node) An assembly node
N ∈ assemblyNodes(D) is complete iff N is complete for each child structure node Nc∈ children(N ).
c) (Completeness of a DAS) A dynamic assembly structure D is complete iff every assembly node N ∈ assemblyNodes(D) is complete.
Figure 3.14: Illustration of several (non-)completeness cases
Figure3.14illustrates different cases of completeness and incompleteness of a DAS. The set of models of the material nodes is represented by Venn diagrams. Case a) shows the correct behavior, i.e., the set of models of every child material node (mc1, mc2, mc3)
shares models with at least one parent material node (m1, m2, m3, m4). Case b) shows
incorrect behavior, i.e., the set of models of the child material nodes mc1 and mc3 share
none models with any of the parent material nodes.
Example 23. (Completeness Example) We reconsider the example dynamic assembly
structure from Example 21. To simplify the example we do not take the product de- scription formula into account. All structure nodes of the DAS are complete except for structure node 40.
Material node 503 with constraint ¬a ∧ b ∧ c is an orphan: None of the constraints A (material node 401) or ¬a ∧ ¬b (material node 402) is satisfiable in conjunction with ¬a ∧ b ∧ c.
Material node 602 with constraint ¬a∧b is an orphan: None of the constraints a (material node 401) or ¬a ∧ ¬b (material node 402) is satisfiable in conjunction with ¬a ∧ b.
Algorithm 3.11: Completeness of an assembly node: verifyCompleteness(N ) Input: Assembly node N ∈ assemblyNodes(D) of a DAS D
Output: true if completeness holds for all covered product types, otherwise false
1 foreach product type t ∈ types(D) do 2 solver ← new inc/dec CDCL SAT solver 3 solver. add(ϕPD(t))
4 foreach structure node Nc∈ children(N ) do 5 foreach mc∈ matNodes(Nc) do
6 isOrphan ← true
7 foreach material node m ∈ matNodes(N ) do 8 if solver. sat(con(m) ∧ con(mc)) then
9 isOrphan ← false
10 break
11 if isOrphan then 12 return false 13 return true
Algorithm3.11 shows the basic algorithm for verifying the completeness of an assembly node N of a DAS D. The algorithm iterates over the covered product types types(D) (Line 1) and checks for each product type t ∈ types(D) the completeness separately. After a new solver object is created (Line 2) the product description formula ϕPD(t) is
added to the solver (Line 3). The algorithm iterates over every child structure node
Nc ∈ children(N ) (Line 4) and every child material node mc∈ matNodes(Nc) (Line 5).
Lines 6–12 describe the completeness verification of structure node N and a child struc- ture node Nc: For every material node m ∈ matNodes(N ) the algorithm checks if con(m)
and con(mc) are satisfiable in conjunction (Line 8). For the satisfiable case the child
material node mcis no orphan since a constructible parent material node has been found.
The loop is stopped (Line 10). For the unsatisfiable case the child material node mc
returned (Line 12). If every combination could be verified the algorithm returns true (Line 13).
Theorem 3. (Correctness of verifyCompleteness) For an assembly node N ∈ assemblyNodes(D) of a dynamic assembly structure D the Algorithm 3.11 re- turns true iff the assembly node N is complete according to Definition 34.
Proof. The algorithm returns false only in Line 12. In this case the variable isOrphan
is set to true, which means that none of the conjunctions ϕPD(t) ∧ con(m) ∧ con(mc)
are satisfiable for a material node m ∈ matNodes(N ).
In contrast, if true is returned (Line 13), there is at least one satisfiable conjunction found for the material nodes m and mcfor each material node mc∈ matNodes(Nc), each
child structure node children(N ) and each product type t ∈ types(D).
Theorem 4. (Complexity of verifyCompleteness) For an assembly node N ∈ assemblyNodes(D) of a dynamic assembly structure D the Algorithm 3.11 takes
| types(D)| · | matNodes(N )| · X
Nc∈children(N )
|matNodes(Nc)|
calls to the SAT solver in the worst case. In the best case it takes | matNodes(N )| calls to the SAT solver.
Proof. In the best case the first tested product type t ∈ types(D) and the first tested
material node mc ∈ matNodes(Nc) of the first child structure node Nc ∈ children(N )
violates the completeness property of assembly node N . In this case, the most inner loop iterates over all material nodes m ∈ matNodes(N ) with one SAT check in each iteration. Afterwards false is returned. In the worst case the assembly node N is complete. In this case for each product type t ∈ types(D) the three inner loops iterate over all possible combinations of material nodes resp. child structure nodes resulting in | matNodes(N )| ·
P
Nc∈children(N )| matNodes(Nc)| calls for each product type t ∈ types(D).
Algorithm3.11returns false as soon as any incompleteness is found, otherwise it returns true. In practice, however, it is useful to actually know where incomplete situations occur for the false case. Algorithm 3.12 shows an altered algorithm which does the very same verification but gathers all incomplete situations in a set. The set consists of a mapping from the product type to a set of material nodes which are all orphans. Algorithm3.12first initializes the result set E with an initial mapping (Line 1). For each found incomplete behavior, the result set E is updated (Line 13). If every combination is checked, the result set E is returned (Line 14). The worst case complexity in terms of the number of SAT calls is the same as for the previously considered Algorithm 3.11. Algorithm 3.12 can be further improved as shown in Algorithm 3.13. In the improved version, the inc/dec interface of the SAT solver is exploited by adding the formula
Algorithm 3.12: Computation of all material nodes violating the completeness
property of an assembly node: computeCompletenessViolations1(N )
Input: Assembly node N ∈ assemblyNodes(D) of a DAS D
Output: A mapping E from product types to sets of material nodes which are
orphans
1 E ← {(t, ∅) | t ∈ types(D)}
2 foreach product type t ∈ types(D) do 3 solver ← new inc/dec CDCL SAT solver 4 solver. add(ϕPD(t))
5 foreach structure node Nc∈ children(N ) do 6 foreach mc∈ matNodes(Nc) do
7 isOrphan ← true
8 foreach material node m ∈ matNodes(N ) do 9 if solver. sat(con(m) ∧ con(mc)) then
10 isOrphan ← false 11 break 12 if isOrphan then 13 E ← (E \ {(t, X)}) ∪ {(t, X ∪ {mc})} 14 return E W
m∈matNodes(N )con(m) once for each product type (Line 5). Adding this constraint en-
sures that at least one material node of matNodes(N ) is selected. This constraint re- mains constant independently of the considered child structure node Nc. Then we can
check whether a child material node mc ∈ matNodes(Nc) is consistent to this restric-
tion. If testing con(mc) results in unsatisfiability, the child material node is an or-
phan. The worst case complexity in terms of the number of SAT calls is | types(D)| ·
P
Nc∈children(N )|matNodes(Nc)|. Therefore, Algorithm3.13 has a better worst time com-
plexity than the previous described approach.
There are various possible reasons why an assembly node can become incomplete. Among others the following mistakes in the product documentation can cause an incomplete as- sembly node:
a) A missing material node in assembly node.
b) The selection constraint of a material node is too restrictive.
c) The orphan material node of the child structure node is mistakenly added and should be removed.
Algorithm 3.13: Computation of all material nodes violating the completeness
property of an assembly node (improved): computeCompletenessViolations2(N )
Input: Assembly node N ∈ assemblyNodes(D) of a DAS D
Output: A mapping E from product types to sets of material nodes which are
orphans
1 E ← {(t, ∅) | t ∈ types(D)}
2 foreach product type t ∈ types(D) do 3 solver ← new inc/dec CDCL SAT solver 4 solver. add(ϕPD(t)) 5 solver. add W m∈matNodes(N )con(m)
6 foreach structure node Nc∈ children(N ) do 7 foreach mc∈ matNodes(Nc) do
8 if solver. unsat(con(mc)) then
9 E ← (E \ {(t, X)}) ∪ {(t, X ∪ {mc})} 10 return E
The reasons listed above may interleave and thus, it is hard to tell which reason is responsible for the incomplete assembly node. A final answer about the correct reason(s) can only be made by a documentation expert of the specific division.
We performed experimental evaluations for all presented algorithms for the verification of completeness. See Subsection3.4.6 for the results.