<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>ReMax - A MaxSAT aided Product (Re-)Configurator</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rouven Walter</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Wolfgang K u¨chlin</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Symbolic Computation Group, WSI Informatics, Universita ̈t Tu ̈bingen</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>We introduce a product configurator with the ability of optimal re-configuration built on MaxSAT as the background engine. A product configurator supported by a SAT solver can provide an answer at any time about which components are selectable and which are not. But if a user wants to select a component which has already been disabled, a purely SAT based configurator does not support a guided re-configuration process. With MaxSAT we can compute the minimal number of changes of component selections to enable the desired component again. We implemented a product configurator - called ReMax - using state-of-the-art MaxSAT algorithms. Besides the demonstration of handmade examples, we also evaluate the performance of our configurator on problem instances based on real configuration data of the automotive industry.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Using Propositional Logic encodings and SAT solving techniques to
answer the question whether a formula is satisfiable or not has a wide
range of applications [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The application of SAT solving for
verification of automotive product documentation for inconsistencies,
e.g. within the bill-of-materials, has been pioneered by Ku¨chlin and
Sinz [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] we considered applications of MaxSAT in automotive
configuration. We mentioned the possible usage of re-configuration with
MaxSAT to make an invalid configuration valid again by keeping the
maximal number of the customer selections. Re-configuration is of
highly practical relevance [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. For example, the after-sales business
in the automotive industry wants to extend, replace or remove
components with minimal effort while keeping the configuration valid.
      </p>
      <p>In this paper, we extend this idea by considering product
configuration in general. We focus on product configuration based on
families of options, because this is the normal case when a user configures
a product. Within a family of options, the user must select exactly one
option out of a regular family or else may select at most one option
out of an optional family. With the focus on families, we can
distinguish two solving approaches:
1. SAT Solving: With a SAT aided product configurator, we can
validate a configuration after each step of the configuration process.
2. MaxSAT Solving: With a MaxSAT aided product configurator,
we can compute an optimal solution for an invalid configuration,
such that a user has to make a minimal number of changes in the
current configuration to regain validity.</p>
      <p>We identify different use cases. We describe them in detail and make
remarks about extensions or variants of them. We also show how a
user process can look like using a MaxSAT aided product
configurator.</p>
      <p>This paper is organized as follows. Section 2 introduces all
relevant mathematical definitions and notations needed for the later
sections. In Section 3 we describe the basic concepts of SAT-based
product configuration. Section 4 shows use cases of SAT aided product
configuration. After that we describe use cases for MaxSAT aided
product configuration in detail in Section 5 and illustrate a possible
configuration process. Sections 6 and 7 describe the techniques we
used for our implementation and experimental results with
benchmarks based on industrial configuration instances. Section 8
describes related work and finally, Section 9 concludes this paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Preliminaries</title>
      <p>We consider propositional formulas with the standard logical
operators :; ^; _; !; $ over the set of Boolean variables X and with
the constants ? and &gt;, representing false and true, respectively. Let
vars(') be the set of variables of a formula '. We call a formula
' satisfiable, if there exists an assignment, a mapping from the set
of Boolean variables X to f0; 1g, under which the formula '
evaluates to 1. The evaluation procedure is assumed to be the standard
evaluation for propositional formulas. The Boolean values 0 and 1
are also referred to as false and true. If no such assignment exists,
we say the formula is unsatisfiable. The question whether a
propositional formula is satisfiable or not is well-known as the satisfiability
(SAT) problem, which is NP-complete.</p>
      <p>In most cases a SAT solver accepts only formulas in conjunctive
normal form (CNF). A formula in CNF is a conjunction of clauses,
where a clause is a disjunction of literals (variables or negated
variables). Let var(l) be the variable of a literal l.</p>
      <p>If a formula ' = Vik=1 Wjm=i1 li;j in CNF is unsatisfiable, we can
ask the question about the maximal number of clauses that can be
satisfied at the same time. This optimization variant of the SAT
problem is called maximum satisfiability (MaxSAT) problem. The
corresponding question about the minimal number of unsatisfied clauses is
analogously called minimum unsatisfiabitlity (MinUNSAT) problem.
A solution to one of the two problems can be used to easily
compute the solution of the other one, because the following relationship
holds: k = MaxSAT(') + MinUNSAT('). It is worth noting that
a model of the optimum of the MaxSAT problem is also a model of
the optimum of the MinUNSAT problem and vice versa. In general,
there are several models for the optimum.</p>
      <p>The MaxSAT problem can be extended in different ways: (i) we
can assign a non-negative integer weight to each clause (denoted with
(C; w) for a clause C and a weight w) and ask for the maximum
sum of weights of satisfied clauses, which is known as the Weighted
MaxSAT problem, (ii) we can split the clauses in hard and soft clauses
and ask for the maximum number of satisfied soft clauses while
satisfying all hard clauses, which is known as the Partial MaxSAT
problem, and finally (iii) we can combine both specifications, which is
known as the Weighted Partial MaxSAT problem. The mentioned
relationship above between the MaxSAT and MinUNSAT problem also
holds for all MaxSAT variants.</p>
      <p>Given a set of Boolean variables F = fM1; :::; Mng and the
restriction that exactly one variable has to be satisfied, Pn
i=1 Mi = 1,
we call the set F a regular family and the elements members of
the family. For example, given a set of Boolean variables E =
fE1; E2; E3g representing the selectable engines of a car. An engine
is chosen if and only if the corresponding variable is set to true. A
car has exactly one engine, which makes the set E a family.</p>
      <p>Given a family F = fM1; :::; Mng with the restriction that
at most one variable has to be true, we call the set F an
optional family. For example, given a set of Boolean variables AC =
fAC1; AC2; AC3; AC4g representing the selectable air conditioners
of a car. An air conditioner is an optional feature in a car, but there
can be at most one air conditioner. This makes the set AC an optional
family.</p>
      <p>The restrictions of a regular family or an optional family are
special cases of cardinality constraints, which restrict the number of
satisified variables of a set of Boolean variables to be f ; &lt;; =; &gt;
; g a non-negative integer k. The restriction for a regular family
can be encoded in CNF with the following two formulas, while an
optional family can be encoded by using only the second formula:</p>
      <sec id="sec-2-1">
        <title>1. At least one satisfied variable: Wn</title>
        <p>
          i=1 Mi
2. At most one satisfied variable: Vin=1 Vjn=i+1(:Mi _ :Mj )
The given encodings for the two special cases = 1 and 1 are very
simple and require only O n2 clauses without adding new
auxiliary variables. There are also encodings using auxiliary variables in
exchange for a fewer number of clauses [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>Since we consider only regular and optional family types, more
general cardinality constraints than the above-mentioned special
cases are not necessary and thus not considered in this paper. In the
context of automotive configuration, we usually deal with rules and
families of certain model series. For example, the number of seats
is fixed and therefore we do not need to handle a family of seats
where we would need a cardinality constraint to restrict the selection
of seats between two and four.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Product Configuration Concepts for</title>
    </sec>
    <sec id="sec-4">
      <title>SAT-Configuration</title>
      <p>In this section, we describe the basic concept of SAT-based product
configuration. We concentrate on rules in Propositional Logic,
because in our main application context of automotive configuration
we always deal with this type of rules. Along with the set of rules
we consider families, which results in the following definition for
product configuration:
Definition 1. (Product Configuration Instance2) A product
configuration instance is a triple (R; F ; S):</p>
      <p>Set R = f'1; : : : ; 'kg, where 'i is a propositional formula.
Set F = fF1; : : : ; Fmg, where Fi is a family.</p>
      <p>Mapping S : Sim=1 vars(Fi) ! fno; yesg (N 0 [ f1g).
2 In the configuration literature a product configuration instance is a solution
for a configuration problem, whereas we refer to the term as a description
of a product configuration problem.</p>
      <p>The following relation holds between rules and families:</p>
      <sec id="sec-4-1">
        <title>S vars(R) S F.</title>
        <p>R2R F2F</p>
        <p>The rules R describe the relationship among the family members
of the different families. They determine the possible valid
combinations. The set F contains all optional and regular families. The
mapping S represents the selections and deselections of the family
members in respect of a priority. For simplicity reasons we will only
use the term selections to refer to both selections and deselections.
There are three main cases for a member s:
1. S(s) = (c; 0) with c 2 fno; yesg:</p>
        <p>The user made no decision about the member (priority 0).
2. S(s) = (c; p) with c 2 fno; yesg and p 2 N 1:</p>
        <p>The user made a selection (priority greater zero).
3. S(s) = (c; 1) with c 2 fno; yesg:</p>
        <p>The user made an indispensable (hard) selection (infinity priority).
We abbreviate the mapping S for a member s as follows: For a
positive selection we write a positive literal s and for a negative selection
we write the negative literal :s. We can then write a single tuple
(s; p) with p 2 N 0 [ f1g and describe the mapping S as a set of
tuples. For simplicity reasons we leave each member s with priority
0 out of S in the given examples of this paper.</p>
        <p>The set S of selections can be seen as a partial assignment
given by the user of the product configurator and can be divided
in two disjoint sets of positive and negative selections: Pos(S) :=
f(s; p) j (s; p) 2 S and s is a positive literalg and Neg(S) :=
f(s; p) j (s; p) 2 S and s is a negative literalg.</p>
        <p>The priority of a selected member is only relevant when it comes
to the question of re-configuration. Then the priorities represent the
users preferences.</p>
        <p>Example 1. We consider a product configuration instance
(R; F ; S), where R and F describe components of a computer
system and dependencies among them. Table 1 shows the families and
Table 2 shows the rules. Let S = ;, which means a user has not
made selections so far.</p>
        <p>Family</p>
        <p>Type</p>
        <p>Members
M (Mainboard) regular
V (Videocard) regular
C (CPU) regular
P (Power Supply) regular
CD (CD-Device) optional
CR (Card-Reader) optional</p>
        <p>M1; M2; M3; M4
V1; V2; V3; V4; V5
C1; C2; C3; C4
P1; P2
CD1; CD2; CD3</p>
        <p>CR1; CR2
We will now define the criteria of a valid configuration:
Definition 2. (Valid Configuration) A product configuration instance
is called a valid configuration if the following formula is satisfiable:
^ R ^ ^ CC(F) ^
Where CC(F) are the appropriate cardinality constraints of a family
(described in the preliminaries).</p>
        <p>If a configuration instance is valid, the corresponding (partial)
variable assignment (also called model or configuration solution) is
of interest, because the variable assignment describes which
members are chosen and which are not.</p>
        <p>A configuration solution is in general not complete, e.g. when the
selections S made by a user contain selections with priority 0.</p>
        <p>After defining the basic product configuration concepts, we will
go into more detail in the next section by describing which use cases
of a SAT aided product configurator exist and finally by showing an
iterative process of SAT aided product configuration.
4</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>SAT aided Product Configuration</title>
      <p>With SAT solving a product configurator can validate a user’s
selection and also compute the selectable members for the remaining
families. The overall plan is quite simple: Each selection of an
option results in a true valuation of that option. Regular families result
in propagations of the value false to the remaining options, after one
family member has been selected. Given a partial valuation, it is easy
to compute by SAT solving which of the remaining options can still
be selected, and which must be set to true or false, respectively, as a
consequence of previous selections.</p>
      <p>We describe these use cases in detail in the following subsections
and afterwards consolidate them in an iterative user process.
4.1</p>
    </sec>
    <sec id="sec-6">
      <title>Use Case: Validation &amp; completion of a (partial) selection</title>
      <p>Given a product configuration instance (R; F ; S), we can validate
the selections with a SAT solver by checking the formula of
Definition 2 for satisfiability. Algorithm 1 shows the procedure. Only
selections with a priority 6= 0 are taken into account for the
validation.</p>
      <p>Algorithm 1: Validation &amp; completion of a (partial) selection
Input: (R; F ; S)
Output: (result; model), where result is true if the (partial)
selection is valid, otherwise false and model is a
complete variable assignment
return SAT</p>
      <p>V CNF(R) ^
R2R</p>
      <p>V CC(F) ^
F2F</p>
      <p>V
(s;p)2S;p6=0
s
!</p>
      <p>
        Because most SAT solvers take CNF as input, we write CNF(R)
to indicate the transformation of an arbitrary rule to its CNF
representation. In practice we use a polynomial formula
transformation [
        <xref ref-type="bibr" rid="ref12 ref15">15, 12</xref>
        ] to get an equisatisfiable formula to avoid the potentially
exponential blow-up that occurs when using the distributive law.
      </p>
      <p>If the configuration instance is valid, the algorithm also returns
a complete variable assignment. This complete variable assignment
gives an example which selections have to be made to complete the
given configuration instance. In general, the given model is not uniqe
and there exist several models.</p>
      <p>Example 2. We reconsider the computer system configuration
Example 1. In the following two selection examples, we do not use
priorities because we just want to check the validity of the selections.
1. S = fM1; V4g leads to a valid configuration, which can be
completed to fM1; V4; C3; P1; CD3; CR2g.
2. S = fM1; C1g leads to an invalid configuration, because M1
requires P1 and C1 requires P2, but due to the family constraints,
both cannot be selected at the same time.
4.2</p>
    </sec>
    <sec id="sec-7">
      <title>Use Case: Computation of selectable members</title>
      <p>During the configuration process a user would like to know which
of the remaining family members are still selectable, i.e. which
selections lead to a valid configuration. We can compute the selectable
members by validating the (partial) selections with a SAT solver.
Algorithm 2 shows the procedure. We iteratively make one SAT call for
each member and check if selecting this member is valid.
Algorithm 2: Computation of selectable members
Input: (R; F ; S)
Output: Mapping V from SF2F F to fno; yesg indicating
whether a member is selectable or not
V Initialize mapping
foreiafch m 2 SF2F F do</p>
      <p>V CNF(R) ^
R2R</p>
      <p>V CC(F) ^
F2F</p>
      <p>V
(s;p)2S;p6=0
s ^ m
!
SAT
then</p>
      <p>V
else</p>
      <p>V
return V
Remarks:
(m; yes)
(m; no)</p>
      <p>After the computation of selectable members, the SAT aided
product configurator can display the result to the user (i.e. by disabling all
non-selectable members). Then the user knows about the selectable
members.
1. In the special case S = ;, in which no selection has been made by
the user so far, the computation of the selectable members
implicitly brings up members which can never be part of a valid
configuration (redundant members) and members which have to be part
of each valid configuration (forced members).
2. The performance of Algorithm 2 can be improved. If a family
already contains a positively selected member, then we know that
all remaining members are not selectable anymore due to the
family constraints. We just have to check families with no positively
selected member.</p>
      <p>The performance can be improved further. We use an incremental
and decremental SAT solver, which allows us to load all rules,
family constraints and selections first and check each member m
by adding and removing the unit clause m from the SAT solver.
We do not have to load the invariant constraints repeatedly for
each check.</p>
      <p>Example 3. We compute the selectable members for our computer
system configuration (see Example 1):
1. S = ;: Table 3 shows the remaining selectable members.
2. S = fM1; V4g: Table 4 shows the remaining selectable members.</p>
      <p>Selectable Memb.</p>
      <p>Non-Selectable Memb.
1. Valid configuration: In the case of a valid configuration, the user
can continue selecting members. Additionally, to guide the user
we can compute the selectable members for the current
configuration. After new selections, the process iterates.
2. Invalid configuration: In the case of an invalid configuration, the
user has to take back one or more of the previously made
selections. The user can validate each backtracking step again until a
valid configuration state is reached.</p>
      <p>Remark: If a given complete example model l1 ^ : : : ^ ln in the
SAT case does not satisfy the demands of the user, she can exclude
this model by adding the hard clause :l1 _ : : : _ :ln. Then
another complete model will be produced if one exists, otherwise we
encounter the UNSAT case.</p>
      <p>In a SAT aided product configuration process described above, the
user is left to herself when it comes to the question which
selections should be undone to regain a valid configuration. Perhaps the
user made a selection of a highly desired member, which she does
not want to take back. Now the user has to try different
configuration changes by herself and a guidance is missing which one to
choose. This is the point where MaxSAT aided product
configuration can help. We will describe re-configuration use cases in detail in
the following section.
5</p>
    </sec>
    <sec id="sec-8">
      <title>MaxSAT aided Product (Re-)Configuration</title>
      <p>In this section we describe how re-configuration can be done with
partial (weighted) MaxSAT as a background engine. We show two
basic use cases, describe possible variations of them and finally
integrate the re-configuration step into our iteractive user process.
5.1</p>
    </sec>
    <sec id="sec-9">
      <title>Use Case: Re-configuration of the selections</title>
      <p>During the configuration process we may reach a state where we have
an invalid configuration. The cause of the conflict can be one or both
of the following:</p>
      <sec id="sec-9-1">
        <title>1. The selections S conflict with the rules R. 2. The selections S conflict with the family constraints.</title>
        <p>We have to re-configure either the rules or the selections to
regain validity. For now we consider all rules as hard limitations that
we can not soften, which is the common case. We will discuss
reconfiguration of rules later in Section 5.4.</p>
        <p>Considering the rules as a hard restrictions, the question arises,
how many of the selections can be kept maximally to reach a valid
configuration. Remember, a user may have done multiple selections
at once without validating the current configuration and without
considering the selectable members. Therefore, removing only the last
selection does not lead to a valid configuration again in general. Also
the last selection could be of infinity priority, so it is no option for
the user to remove the last selection.</p>
        <p>To answer the question we set the selections as soft unit clauses
and re-configure the selections with a partial MaxSAT solver. The
following encoding represents our requirements:</p>
        <p>Hard</p>
        <p>:=
Soft :=
[ CNF(R) [ [ CC(F) [
R2R</p>
        <p>[
(s;p)2S;p6=0;p6=1</p>
        <p>F2F
fsg</p>
        <p>[
(s;p)2S;p=1
fsg
Selections with priority 1 are also considered as indispensable and
will be encoded as hard unit clauses. Only dispensable selections will
be re-configured. Algorithm 3 shows the re-configuration procedure.</p>
        <p>With the resulting model, we can give the user an example of a
complete selection which requires a minimal number of changes in
order to regain a valid configuration compared to the original
selections. Or, the other way round, the model gives an example about
how to keep the maximal number of selections.</p>
        <p>Algorithm 3: Re-Configuration of a (partial) selection
Remark: As desribed before we use a transformation like Tseitin
or Plaisted-Greenbaum instead of CNF(R) in practice. Even though
the Tseitin and Plaisted-Greenbaum transformations are only
equisatisfiable, this is not an issue for MaxSAT when converting
formulas into hard clauses. Since the Tseitin and Plaisted-Greenbaum
transformations share the same models on the original variables, one
can easily verify that the search space between the converted and the
original instance remains the same.</p>
        <p>Extensions:</p>
        <p>The described use case can be extended as follows:
1. User constraints: A user can add additional constraints
considered as hard clauses.</p>
        <p>If, e.g., mainboard M1 is selected, the user definitely wants video
card V2 to be selected. But if mainboard M2 is selected, the user
definitely wants video card V5 to be selected. Then we add the
rules (M1 ! V2) ^ (M2 ! V5) as constraints to the rules R.
2. Focus on selection: For each family an option “choose one of the
selected” can be offered to add a constraint such that only positive
selected members within a family will be considered during the
re-configuration computation.</p>
        <p>E.g. if a user focuses on mainboards M1; M3; M4, a hard clause
(M1 _ M3 _ M4) will be added to the rules R.</p>
        <p>Example 4. We continue our canonical Example 1: Table 5 shows
multiple selections of members within families and a result model
re-configuration. For all selections shown we choose priority 1, that
means no selection in this example is an indispensable one.</p>
      </sec>
    </sec>
    <sec id="sec-10">
      <title>Use Case: Re-Configuration of the selections with priorities</title>
      <p>In the previous use case we treated all soft clauses as equivalent. A
user may prefer one member over the other, which results in
priorization of the selected members. We can handle priorities with
Partial Weighted MaxSAT solving. The encoding for this use case is
basically the same as before, but now we bring priorities into play.
Algorithm 4 shows the complete computation procedure.
Algorithm 4: Re-Configuration of a (partial) selection with
priorities
Input: (R; F ; S)
Output: (optimum; model), where optimum is the minimal
number of priority points to change to regain a valid
configuration and model is a model for the optimum</p>
      <sec id="sec-10-1">
        <title>Hard ;</title>
      </sec>
      <sec id="sec-10-2">
        <title>Soft ;</title>
        <p>foreach R 2 R do</p>
      </sec>
      <sec id="sec-10-3">
        <title>Hard Hard [ CNF(R)</title>
        <p>foreach F 2 F do</p>
      </sec>
      <sec id="sec-10-4">
        <title>Hard Hard [ CC(F)</title>
        <p>else
Result: We have to make 5 changes minimally to regain a valid
configuration. Without the focus set for the video cards family V , we
We reconsider the process of Figure 1 in Step 3a. UNSAT where the
user gets the feedback that her current selections lead to an invalid
configuration. With a SAT solver only, the user has to try by herself
which selections have to be undone to regain a valid configuration.
But now, we can help the user at this point by using re-configuration
with MaxSAT. Figure 2 illustrates both Use Cases 5.1 and 5.2
embedded in a product configuration process using MaxSAT.</p>
        <p>User</p>
        <p>3a. No solutio n
1. Re-configurate
1. No solution: If the indispensable selections (with priority 1)
collide with the rules or the family constraints, then there is no
solution. In this case, the user has to weaken some of the indispensable
selections in order to make a re-configuration possible. The user
can use high priorities to weaken the desired members to ensure
they will be preferred over other selections.
2. Solution: If the indispensable selections can be satisfied, then
there exists a solution with an optimum for the prioritized
selections. In this case, the user will be told about the optimum, i.e.
about the number of minimal changes to regain a valid
configuration. Also, an example model with the optimum will be given to
the user.</p>
        <p>Remark: Similiar to the SAT aided configuration process the
following holds: If the given complete example model l1 ^ : : : ^ ln in
the solution case does not satisfy the demands of the user, she can
exclude this model by adding the hard clause :l1 _ : : : _ :ln. Then
another model with the same optimum will be produced, if one
exists. If there is no other model with the same optimum, the next best
optimum under the new conditions will be computed with an
example model.</p>
        <p>In case there is no solution and a user just do not want to weaken
her selections with priority 1, we can consider weakening the rules.
In the next section, we will describe this possibility in detail.
5.4</p>
      </sec>
    </sec>
    <sec id="sec-11">
      <title>Use Case: Re-configuration of rules</title>
      <p>It is possible that the selections a user made have no solution when
trying to re-configure them. Assuming the rules themselves are not
contradictory, then the cause for no solution are too many selections
with priority 1. There are two cases which can occur or both at the
same time:
1. Violation of the family constraints: If a user selects more than
one member of a family with infinity priority, the family
constraints are violated.
2. Violation of rules: If a user does not violate the family
constraints, then the selected members with priority infinity are in
collision with the rules.</p>
      <p>The first case can be handled by a product configurator by simply
not allowing to choose more than one member with priority infinity
or giving the user a warning message when doing so.</p>
      <p>In the second case, if the user is not willing to soften her selections,
we can not re-configure the selections w.r.t. the rules. But when we
have a closer look at the rules, there may be some rules, which we
can soften, e.g. when a rule is not a physical or technical
restriction, but only exists for marketing or similiar purposes. A company
may be willing to violate or change some of these rules to build the
product. Knowing the miminum number of rule changes in order to
permit a desired vehicle configuration can help in managing the set
of marketing rules.</p>
      <p>For this use case, we extend Definition 1 by an additional mapping
SR : R ! (N 0 [ f1g), which represents the priorities of the
rules a user made. After softening some of the rules this way we can
re-configure the rules by maximizing the number of satisfied rules,
respectively violating only a minimal number of rules. Algorithm 5
shows this procedure more formally.</p>
      <p>Algorithm 5: Re-Configuration of rules
else
else</p>
      <sec id="sec-11-1">
        <title>Hard S</title>
      </sec>
      <sec id="sec-11-2">
        <title>Soft S</title>
        <p>foreach F 2 F do</p>
      </sec>
      <sec id="sec-11-3">
        <title>Hard Hard [ CC(F)</title>
        <p>foreach R 2 R ^ SR(R) 6= 0 do
if p = 1 then</p>
      </sec>
      <sec id="sec-11-4">
        <title>Hard Hard [ CNF(R)</title>
        <p>
          Since a rule R is an arbitrary formula, we can not just convert
R to its CNF and add the resulting clauses as soft clauses. In
general, some of these clauses will be satisfied and some not. Instead we
want to maximize the number of rules. In other words, we are facing
a group MaxSAT problem [
          <xref ref-type="bibr" rid="ref2 ref6">2, 6</xref>
          ], where each CNF(R) is a group of
clauses. The goal of group MaxSAT is to satisfy the maximum
number of groups. A group is satisfied if all clauses within the group are
satisfied.
        </p>
        <p>
          The group MaxSAT problem can be reduced to a partial MaxSAT
problem as follows: For each non-indispensable rule R we introduce
a new variable bR and add the hard clauses CNF(bR ! R).
Additionally we add a unit soft clause fbRg for each new variable. Each
satisfied variable bR implies the whole group of clauses in CNF(R)
to be satisfied. Therefore, satisfying a maximal number of the newly
introduced variables satisfies a maximal number of the corresponding
formulas. On the other hand, with the help of the newly introduced
variables, we can identify, from the resulting model, which
formulas are satisfied and show this result to the user. For a more detailed
explanation, see [
          <xref ref-type="bibr" rid="ref2 ref6">2, 6</xref>
          ].
        </p>
        <p>Extension: Of course, rules can also have different priorities and
we can extend this use case by assigning priorities to rules and
selections to compute the maximal sum of priority points. This extension
can be realized analogously as described for Use Case 5.2, thus we
will not describe it explicitly.
6</p>
      </sec>
    </sec>
    <sec id="sec-12">
      <title>Implementation techniques</title>
      <p>
        We implemented the above SAT-based and MaxSAT-based use cases
in one product configurator — called ReMax — on top of our
uniform logic framework, which we use for commercial applications
within the context of automotive configuration. Our SAT solver
provides an incremental and decremental interface. We maintain two
versions (Java and .NET) and decided to implement ReMax using
.NET 4.0 with C# along with the WPF Framework for the GUI.
We implemented state-of-the-art partial (weighted) MaxSAT solvers
Fu&amp;Malik, PM2 and WPM1 on top of our SAT solver [
        <xref ref-type="bibr" rid="ref1 ref5">5, 1</xref>
        ].
      </p>
    </sec>
    <sec id="sec-13">
      <title>Experimental Results</title>
      <p>1. WPM1: An unsat core-guided approach with iterative SAT calls.</p>
      <p>
        In each iteration a new blocking variable will be added to each
soft clause within the unsat core [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
2. msu4: An unsat core-guided approach with iterative SAT calls
using a reduced number of blocking variables [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>We implemented WPM1 on top of our own SAT solver while msu4
is an external solver3.</p>
      <p>Our environment for the benchmarks has the following hardware
and software settings. Processor: Intel Core i7-3520M, 2,90 GHz;
Main memory: 8 GB. WPM1, based on .NET 4.0, runs under
Windows 7 while msu4 runs under Ubuntu 12.04.</p>
      <p>For Use Case 5.2 we created three categories as follows: Out of
30%, 50% and 70% of the families one member is selected randomly
with a random priority between 1 and 10. The rules have infinity
priority. In general, this leads to an invalid configuration because the
rules are violated. For each category we created 10 instances.</p>
      <p>Table 8 shows the results for each category as average time in
seconds. The abbreviation “exc.” means that the time limit of 30 minutes
was exceeded. As we can see, msu4 performs very well in all
categories with reasonable times from less than one second up to about
25 seconds. Our solver WPM1 also has reasonable times from about
2 seconds up to about 28 seconds, but exeeds the time limit in two
categories for the instance M02_01.</p>
      <p>Problem
M01_01
M01_02
M01_03
M02_01
M02_02
30%</p>
      <p>50%
WPM1
msu4</p>
      <p>WPM1
msu4</p>
      <p>70%</p>
      <p>WPM1</p>
      <p>For Use Case 5.4 we created three categories as follows: Out of
30%, 50% and 70% of the families one member is selected randomly
with infinity priority, which leads to an invalid configuration in
general because the rules are violated. But this time, we assign all rules
a priority of 1. For each category we created 10 instances.</p>
      <p>Table 9 shows the results for each category as average time in
seconds. As we can see, both solvers can handle all instances in each
category in reasonable time. While WPM1 takes from about 3
seconds up to about 72 seconds, the external solver msu4 takes from less
than one second up to about 9 seconds in the worst case.
3 http://logos.ucd.ie/web/doku.php?id=msuncore
WPM1
msu4
8</p>
    </sec>
    <sec id="sec-14">
      <title>Related Work</title>
      <p>
        Another approach for re-configuration uses answer set programming
(ASP) on a decidable fragment of first-order logic [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Hence the
used language is more expressive. With the growing performance of
SAT solvers in the last decade, SAT solving in turn has been used to
solve problem instances of ASP [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
      </p>
      <p>
        An algorithm for computing minimal diagnoses using a conflict
detection algorithm is introduced in [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. A minimal subset of
constraints is called a diagnosis if the original constraints without
are consistent. Although this approach is described for constraints
of first-order sentences, the technqiues can be generalized to a wide
range of other logics.
      </p>
      <p>
        The indicated idea above is further improved in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], where an
algorithm — called FastDiag — is introduced which computes a
preferred minimal diagnosis while improving performance.
      </p>
      <p>We did not consider works dealing with explanations like MUS
(Minimal Unsatisifable Subset) iteration. When using MUS iteration
for re-configuration, a user not only has to manually solve each
conflict, but also will not necessarily solve the conflicts in an optimal
manner, i.e. only changing a minimal number of selections.
9</p>
    </sec>
    <sec id="sec-15">
      <title>Conclusion</title>
      <p>We described product configuration for propositional logic based rule
sets which are widely used in the automotive industry. We showed
applications of SAT solving by two use cases. Furthermore, we
showed use cases of how MaxSAT can be used for product
configuration when it comes to an invalid configuration. With MaxSAT we
are able to re-configure an invalid configuration in an optimal way,
i.e. we can compute the minimal number of necessary changes. We
embedded both scenarios in configuration processes showing how a
user can be guided during the configuration process.</p>
      <p>We presented an implementation of a product configurator —
ReMax — supporting all of the described use cases using
state-of-theart SAT and MaxSAT solving techniques. From real automotive
configuration data from two different German premium car
manufacturers we created synthetic product configuration benchmarks for the
presented use cases. Besides our own MaxSAT solver we used the
external solver msu4 to measure and compare the performance. As
our experimental results show, we can re-configure those problem
instances in reasonable time. Since some problem instances could be
solved within a few seconds, our product configurator could be used
as an interactive tool in these cases. Other problem instances took
over a minute in the worst case, but is still more than adequate for
a responsive batch service. While this may seem long, we were told
that the manual configuration of an order without tool support by a
trial and error process may well take on the order of half an hour.</p>
      <p>We do not claim that our approach is currently fit for use as
a consumer configurator. However, many business units of a car
manufacturer, such as engineering or after sales are in need of a
(re-)configurator that feeds directly off the engineering product
documentation. E.g., many test prototypes must be built before start of
production with a varying set of options.</p>
      <p>Expert users sometimes need some complete car configurations
which cover all valid combinations of a subset of options, e.g. for
testing purposes. With a SAT based (re-)configurator, an expert user
can start the configuration from the desired options instead of
tediously following the given configuration process in a usual sales
configurator. At any time, the user can ask the configurator for “any
completion” or, using MaxSAT, for a “minimal completion” of the
partial configuration to a complete configuration.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Carlos</given-names>
            <surname>Anso</surname>
          </string-name>
          <article-title>´tegui, Maria Luisa Bonet, and Jordi Levy, 'Solving (weighted) partial MaxSAT through satisfiability testing'</article-title>
          ,
          <source>in Theory and Applications of Satisfiability Testing - SAT</source>
          <year>2009</year>
          , ed.,
          <source>Oliver Kullmann</source>
          , volume
          <volume>5584</volume>
          of Lecture Notes in Computer Science,
          <volume>427</volume>
          -
          <fpage>440</fpage>
          , Springer Berlin Heidelberg, (
          <year>2009</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>Josep</given-names>
            <surname>Argelich</surname>
          </string-name>
          and Felip Many, '
          <article-title>Exact Max-SAT solvers for overconstrained problems</article-title>
          .',
          <source>Journal of Heuristics</source>
          ,
          <volume>12</volume>
          (
          <issue>4-5</issue>
          ),
          <fpage>375</fpage>
          -
          <lpage>392</lpage>
          , (
          <year>September 2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>A.</given-names>
            <surname>Felfernig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Schubert</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Zehentner</surname>
          </string-name>
          , '
          <article-title>An efficient diagnosis algorithm for inconsistent constraint sets'</article-title>
          ,
          <source>Artificial Intelligence for Engineering Design, Analysis and Manufacturing</source>
          ,
          <volume>26</volume>
          (
          <issue>1</issue>
          ),
          <fpage>53</fpage>
          -
          <lpage>62</lpage>
          , (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Gerhard</given-names>
            <surname>Friedrich</surname>
          </string-name>
          , Anna Ryabokon, Andreas A.
          <string-name>
            <surname>Falkner</surname>
          </string-name>
          , Alois Haselbo¨ck, Gottfried Schenner, and Herwig Schreiner, '
          <article-title>(re)configuration using answer set programming'</article-title>
          ,
          <source>in IJCAI-11</source>
          Configuration Workshop Proceedings, eds.,
          <string-name>
            <surname>Kostyantyn</surname>
            <given-names>Shchekotykhin</given-names>
          </string-name>
          , Dietmar Jannach, and Markus Zanker, pp.
          <fpage>17</fpage>
          -
          <lpage>24</lpage>
          , Barcelona, Spain, (
          <year>July 2011</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Zhaohui</given-names>
            <surname>Fu</surname>
          </string-name>
          and Sharad Malik, '
          <article-title>On solving the partial MAX-SAT problem'</article-title>
          ,
          <source>in Theory and Applications of Satisfiability Testing-SAT</source>
          <year>2006</year>
          , eds., Armin Biere and
          <string-name>
            <given-names>Carla P.</given-names>
            <surname>Gomes</surname>
          </string-name>
          , volume
          <volume>4121</volume>
          of Lecture Notes in Computer Science,
          <volume>252</volume>
          -
          <fpage>265</fpage>
          , Springer Berlin Heidelberg, (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>Federico</given-names>
            <surname>Heras</surname>
          </string-name>
          , Antnio Morgado, and
          <string-name>
            <surname>Joo</surname>
          </string-name>
          Marques-Silva,
          <article-title>'An empirical study of encodings for group MaxSAT'</article-title>
          , in Canadian Conference on AI, eds.,
          <source>Leila Kosseim and Diana Inkpen</source>
          , volume
          <volume>7310</volume>
          of Lecture Notes in Computer Science, pp.
          <fpage>85</fpage>
          -
          <lpage>96</lpage>
          . Springer, (
          <year>2012</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Wolfgang</given-names>
            <surname>Ku</surname>
          </string-name>
          <article-title>¨chlin and Carsten Sinz, 'Proving consistency assertions for automotive product data management'</article-title>
          ,
          <source>Journal of Automated Reasoning</source>
          ,
          <volume>24</volume>
          (
          <issue>1-2</issue>
          ),
          <fpage>145</fpage>
          -
          <lpage>163</lpage>
          , (
          <year>2000</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Fangzhen</given-names>
            <surname>Lin</surname>
          </string-name>
          and
          <string-name>
            <given-names>Yuting</given-names>
            <surname>Zhao</surname>
          </string-name>
          , 'ASSAT:
          <article-title>Computing answer sets of a logic program by SAT solvers</article-title>
          .',
          <source>Artifical Intelligence</source>
          ,
          <volume>157</volume>
          (
          <issue>1-2</issue>
          ),
          <fpage>115</fpage>
          -
          <lpage>137</lpage>
          , (
          <year>August 2004</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>Peter</given-names>
            <surname>Manhart</surname>
          </string-name>
          , '
          <article-title>Reconfiguration - a problem in search of solutions'</article-title>
          ,
          <source>in IJCAI-05</source>
          Configuration Workshop Proceedings, eds.,
          <source>Dietmar Jannach and Alexander Felfernig</source>
          , pp.
          <fpage>64</fpage>
          -
          <lpage>67</lpage>
          , Edinburgh, Scotland, (
          <year>July 2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Joa</surname>
          </string-name>
          <article-title>˜o Marques-Silva, 'Practical applications of boolean satisfiability'</article-title>
          ,
          <source>in Discrete Event Systems</source>
          ,
          <year>2008</year>
          .
          <source>WODES</source>
          <year>2008</year>
          . 9th International Workshop on,
          <fpage>74</fpage>
          -
          <lpage>80</lpage>
          , IEEE, (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Joa</surname>
          </string-name>
          <article-title>˜o Marques-Silva and Jordi Planes, 'Algorithms for maximum satisfiability using unsatisfiable cores'</article-title>
          ,
          <source>in Proceedings of the Conference on Design, Automation and Test in Europe, DATE '08</source>
          , pp.
          <fpage>408</fpage>
          -
          <lpage>413</lpage>
          . IEEE, (
          <year>2008</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>David</surname>
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Plaisted</surname>
          </string-name>
          and Steven Greenbaum, '
          <article-title>A structure-preserving clause form translation'</article-title>
          ,
          <source>Journal of Symbolic Computation</source>
          ,
          <volume>2</volume>
          (
          <issue>3</issue>
          ),
          <fpage>293</fpage>
          -
          <lpage>304</lpage>
          , (
          <year>September 1986</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <surname>Raymond</surname>
            <given-names>Reiter</given-names>
          </string-name>
          , '
          <article-title>A theory of diagnosis from first principles'</article-title>
          ,
          <source>Artificial Intelligence</source>
          ,
          <volume>32</volume>
          (
          <issue>1</issue>
          ),
          <fpage>57</fpage>
          -
          <lpage>95</lpage>
          , (
          <year>April 1987</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <surname>Carsten</surname>
            <given-names>Sinz</given-names>
          </string-name>
          , '
          <article-title>Towards an optimal CNF encoding of boolean cardinality constraints', in Principles and Practice of Constraint Programming-CP</article-title>
          <year>2005</year>
          ,
          <article-title>ed</article-title>
          .,
          <source>Peter van Beek, Lecture Notes in Computer Science</source>
          ,
          <volume>827</volume>
          -
          <fpage>831</fpage>
          , Springer Berlin Heidelberg, (
          <year>2005</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>G. S.</given-names>
            <surname>Tseitin</surname>
          </string-name>
          , '
          <article-title>On the complexity of derivations in the propositional calculus'</article-title>
          ,
          <source>Studies in Constructive Mathematics and Mathematical Logic</source>
          ,
          <string-name>
            <surname>Part</surname>
            <given-names>II</given-names>
          </string-name>
          ,
          <fpage>115</fpage>
          -
          <lpage>125</lpage>
          , (
          <year>1968</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <surname>Rouven</surname>
            <given-names>Walter</given-names>
          </string-name>
          , Christoph Zengler, and Wolfgang Ku¨chlin, '
          <article-title>Applications of MaxSAT in automotive configuration'</article-title>
          ,
          <source>in Proceedings of the 15th International Configuration Workshop</source>
          , eds.,
          <source>Michel Aldanondo and Andreas Falkner</source>
          , pp.
          <fpage>21</fpage>
          -
          <lpage>28</lpage>
          , Vienna, Austria, (
          <year>August 2013</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>