4.3 Analyzing the BOM
4.3.1 Computing Necessary and Superfluous Parts
In Sections 4.2.1 and 4.2.2 we saw two algorithms to compute necessary and inadmis- sible options in the high level configuration. These two algorithms can be adjusted to work on physical parts instead of high level customer options. Each physical part has a usage constraint which determines its usage in vehicles. It can happen that such a usage constraint is not satisfiable for any constructible vehicle according to the PDFs of the product types covered by the BOM at hand. In this case the physical part is superfluous in the BOM since it can never be built in any vehicle. On the other hand, the usage constraint may evaluate to true for any valid vehicle—in this case the physical part is a necessary part and has to be built into every vehicle.
Definition 4.3| Superfluous and Necessary parts Given a BOM b, a material node n
is superfluous if for every covered product type t ∈ types(b) the usage constraint constraint(n)evaluates to false for every valid vehicle according to PDF(t). The node n is necessary if for every type t ∈ types(b) the constraint constraint(n) evaluates to true for any valid vehicle.
Besides the BOM b, both algorithms require the PDF of each covered product type t∈ types(b). As for all following tests on the low level, the high level configuration is always required in order to test only the valid configurations of each product type. Algorithm 4.5 presents the procedure to compute the superfluous parts of a BOM b. Each material node n ∈ NM(b)is tested against each covered product type t. A material n is superfluous if its usage constraint cannot evaluate to true for any product type t. Initially each material node is considered as a potentially superfluous part (Line 1). Now each product type t is tested. Therefore a new CDCL solver is created and the PDF(t) is added to the solver (Lines 3/4). We also need to add each type determining option of t to the solver (Lines 5/6). Since type determining options can be used in the usage constraints of the BOM, we need to know which TDOs the product type at hand has selected. The inner loop (Line 7–14) tests each material node n which can still be a superfluous part. Therefore the solver is marked and the usage constraint of n is added to the solver (Lines 8/9). It is then important to add the unknown variables of the usage constraint negatively to the solver (Lines 10/11). Since a BOM covers many product types, its usage constraints may contain many options which are not known in the product type at hand. Whenever a product type t is found where there exists a valid vehicle for which the usage constraint constraint(n)evaluates to true (Line 12), the respective node n is removed from the set of potential superfluous parts. When the algorithm terminates, PScontains all superfluous parts.
Theorem 4.7| Correctness of superfluousParts When Algorithm 4.5 terminates, the
set PScontains exactly the superfluous parts of a given BOM b with respect to its covered product types.
Proof Following the flow of Algorithm 4.5 each material node n is initially in PS
(Line 1). The only alteration of PStakes place in Line 13. A node n is removed of PSwhen the SAT solver call in Line 12 returns SAT. Since the usage constraint
Algorithm 4.5 |Compute the superfluous parts: superfluousParts(b) Input: A BOM b
Output: A set PSof superfluous parts of b 1 PS= NM(b)
2 foreachproduct type t ∈ types(b) do
3 solver= new incremental/decremental CDCL SAT solver 4 solver.add(PDF(t))
5 foreach o∈ tdovals(t) do 6 solver.add(o)
7 foreachmaterial node n ∈ PSdo 8 solver.mark()
9 solver.add(constraint(n))
10 foreach v∈ vars(constraint(n)) with v /∈ O(t) ∪ tdovals(t) do
11 solver.add(¬v)
12 if solver.solve() = SAT then 13 PS= PS\ {n}
14 solver.undo() 15 return PS
constraint(n)was added positively to the SAT solver (Line 9), this means that there exists a valid vehicle configuration according to PDF(t) such that the usage constraint evaluates to true and therefore the part of material node n is used in this configuration. According to Definition 4.3 in this case the node n cannot be a superfluous part. If a node n is never removed from PS, there exists no valid configuration for any covered product type t ∈ types(b) such that the usage constraint was satisfiable. In this case according to Definition 4.3 the node is indeed
superfluous.
Theorem 4.8| Complexity of superfluousParts For a bill of materials b Algorithm 4.5
takes |types(b)| · |NM(b)|calls to the SAT solving algorithm in the worst case. In the best case it takes |NM(b)|calls to the SAT solving algorithm.
Proof In the worst case each part n ∈ NM(b)is superfluous. In this case the method
solver.solve()never returns SAT and no node n ∈ NM(b)is removed from PS. In this case the inner loop (Lines 7–14) always loops over all material nodes for each product type. Therefore we have |types(b)| ·|NM(b)|calls to solver.solve() in Line 12. In the best case no part is superfluous and the first tested product type thas for each node n a valid vehicle configuration according to PDF(t) such that constraint(n)evaluates to true. In this case each node n is removed from PSin the first run of the outer loop (Lines 2–14) and for each subsequent run the inner loop runs over an empty set PSand therefore solver.solve() is not called again. Then we have NM(b)calls to solver.solve() at all.
4.3 Analyzing the BOM
The computation of the necessary parts proceeds completely analogously to Algo- rithm 4.5. Only one line has to be altered. Instead of adding constraint(n) to the solver in Line 9, the negated constraint ¬constraint(n) has to be added. In this case the SAT solver call in Line 12 returns SAT if there is a valid vehicle of the currently tested product type t for which the usage constraint of n evaluates to false. In this case the part cannot be necessary according to Definition 4.3. The proofs of correctness and complexity can be adopted literally. The altered algorithm is denoted by necessaryParts(b) for a BOM b.
Remark For the computation of superfluous and necessary parts the tree structure of the
BOM b does not play a role. The inner nodes can be ignored and only the set of material nodes NM(b)is relevant for both algorithms.
This section is concluded by an example which demonstrates Algorithm 4.5.
Example 4.2| Superfluous Parts We consider three product types t1, t2, and t3with
the following type determining options:
Type TDOs
t1 {(engine, MOT1), (steering, LH), (transmission, AUTO)}
t2 {(engine, MOT2), (steering, RH), (transmission, AUTO)}
t3 {(engine, MOT1), (steering, LH), (transmission, MANUAL)}
For simplicity all product types have the same high level configuration. We have two option families:
1. G = {oG
1,oG2,oG3}for GPS systems, and 2. E = {oE
4,oE5}for entertainment systems, and three options without a family:
1. o6for support for Chinese characters in the headunits, 2. o7for special Japan support, and
3. o8for speech assistance in the vehicle.
The set of rules R(ti) = {r1,r2,r3,r4,r5}contains five rules: 1. r1= oG1 −→ oE4
2. r2= oE4 −→ ¬oG2 3. r3= oE5 −→ ¬oG3 4. r4= ¬(o6∧ o7) 5. r5= o8−→ (oG1 ∧ oE4)
We consider a BOM b with types(b) = {t1,t2,t3}with the following six material nodes:
Number Description Usage Constraint
n1 Head Unit 1 o8∧ oG2
n2 Head Unit 2 LH ∧ (oG1 ∨ oG2 ∨ oG3)
n3 Head Unit 3 RH ∧ (oG1 ∨ oG2 ∨ oG3)
n4 Head Unit 4 MOT1 ∧ RH ∧ (o7∨ o8)
n5 Head Unit 5 MOT2 ∧ oE4
n6 Special Cable MANUAL
We look at the execution of Algorithm 4.5: superfluousParts(b).
1) Initially we have PS = {n1,n2,n3,n4,n5,n6}. In the first iteration of the outer loop the product type t1is analyzed. The inner loop finds a satisfying assignment for the node n2. All other nodes have no satisfying assignment for t1. Therefore after this iteration we have PS= {n1,n3,n4,n5,n6}. 2) Now product type t2is tested. We find satisfying assignments for the nodes
n3and n5 which get deleted from PS. After this iteration we have PS = {n1,n4,n6}.
3) In the last iteration the type t3is tested. We find a satisfying assignment for the node n6 which is deleted from PS. The algorithm finally returns PS= {n1,n4}as superfluous parts.
The part n1 can never be used because according to the HLC (rule r5and the option family G) there can be no vehicle with o8and oG2. Part n4can never be used because there is no product type with MOT1 and RH in the covered product types.