Comparison of Interactive Configurators based on BDDs and Search

Document Sample
Comparison of Interactive Configurators based on BDDs and Search Powered By Docstoc
					  Integrating CSP Decomposition
Techniques and BDDs for Compiling
      Configuration Problems
        Sathiamoorthy Subbarayan
       IT University of Copenhagen
                Denmark


              CP-AI-OR 2005


                              www.itu.dk   1
           Configuration


        An arrangement of parts

Valid Configuration- a valid arrangement

Valid according to some specified rules

           NP-Hard problem



                         www.itu.dk       2
               Examples

•   Bike
•   Car
•   PC
•   Power-Backup Systems
•   Controllers
•   Business Software




                           www.itu.dk   3
     Problem Representation


Constraint Satisfaction Problem (CSP)
• A set of variables and their domains
• A set of rules/constraints on variable
  values



Configuration
- A legal assignment to all variables

                           www.itu.dk      4
     Interactive Configurator

• Interactively guides the user
• Shows only valid extensions
• User always in a consistent state




                          www.itu.dk   5
     Required Functionalities

• Propagate the user selections
• Display the valid choices
• Explain reasons for unselectable or
  implied options




                          www.itu.dk    6
    Binary Decision Diagrams




A compressed representation of solutions

                         www.itu.dk    7
                         Previous work

Compile into a Binary Decision Diagram


                                                              configurator
 Compilation




                                BDD
                 rules       generation   BDD        lookup




                         offline                 online




                P-h ard                               P
               N
               Problem! BDD size could explode
                                                www.itu.dk                   8
              This work

• Configuration rules have hierarchies
• Hierarchies close to tree-shape

      Tree Decomposition of CSP?

            Space reduction?
              (upto 96%)

        Response time reduction?
              (upto 200x)
                          www.itu.dk     9
     CSP to BDD compilation



 C1
        C3    C4


 C2          C5
                            bdd
        C6
C7



      CSP                  BDD




                    www.itu.dk    10
            Tree Decomposition of CSP
                                     C1
       C1                                  C3
              C3    C4               C2
                                                     C3
                                                          C4
       C2          C5
                                                     C6
                                                          C5


      C7
              C6
                                          C7    C6
                                                          CSP’
CSP
                    b1
                             b2



                        b3
                             Tree-of-BDDs

                                   www.itu.dk              11
   Benefit of decomposition

  b1
             b2
                                     bdd
   b3


Tree-of-BDDs                        BDD

        Potential Space Reduction
       |b1|+|b2|+|b3| < |bdd|
        -Online Configurators
        -Embedded Configurators

                                www.itu.dk   12
     Required Functionalities

• Propagate the user selections
• Display the valid choices
• Explain reasons for unselectable or
  implied options




                          www.itu.dk    13
             Explanations

• A partial assignment by the user might
  cause some options unselectable /implied
• Explanation for such an option is the
  subset of the partial assignment that
  makes the option unselectable/implied
• When user assignments are given
  priorities, we might need minimum
  explanations




                           www.itu.dk   14
Explanations in single BDD case
             Variant of Shortest path
               problem in DAG
             • Assigned variable (v=val)
                – 0 for ’val’ edges
                – 1 for other edges
             • Other variables
                – 0 for their edges
             • Shortest path from root to 1
               -node corresponds to an
               explanation




                       www.itu.dk       15
        Example
         Assign a=0
         Assign b=1
    1
           e=1 is implied
1

           Explain e=0?

           Explanation b=1


          Can also handle priorities
         and non-Boolean variables




                   www.itu.dk          16
Don’t Care variables for Explain
             • In the example, necessary
               variables are: a,b, and e
             • Variables c and d are hence
               don’t cares for Explain


                    Abstraction !




                       www.itu.dk       17
      Explanations in Tree-of-BDDs

b1            Abstraction   b1’             b2’
         b2


                                    b3’
 b3
                                                Join




              Explanation                              b’
                                  Explain




                                   www.itu.dk               18
             Experiments
• Four Benchmarks
  – PC
  – Renault
  – Two PSR instances
• 10000 random interactions
• Comparison of:
  – Space usage
  – Average and Worst time for Responses
  – Average and Worst time for Explanations
• Tools
  – CLab: an existing single BDD-based tool
  – iCoDE: implementation of the tree-of-BDDs
                            www.itu.dk        19
               Compilation Details


                              Compile (sec)    BDD-nodes       Peak BDD-nodes
              Tree     Tree
Benchmark
              (sec)   Nodes   CLab   iCoDE    CLab     iCoDE   CLab    iCoDE
    PC        0.04     16     0.11    0.19    16494    4458     80K     40K
 Renault      0.25     73     119     77      455796   17602   2500K    80K

 psr-1-32-1    2       114    0.46     4      56923    8917    600K    600K

 psr-1-32-1    2       114     2       9      246775   22101   1200K   1200K




                                                  www.itu.dk              20
         Time Comparisons

• Response (Propagate+Display)

                  Average(sec)      Worst(sec)
   Benchmark
                 CLab     iCoDE    CLab    iCoDE

       PC        0.004    0.0001   0.050   0.006
     Renault     0.070    0.0003   0.452   0.020
    psr-1-32-1   0.016    0.0010   0.057   0.038
    psr-1-32-2   0.037    0.0002   0.618   0.107




                                    www.itu.dk     21
        Time Comparisons

• Explanation

                  Average(sec)     Worst(sec)
   Benchmark
                 CLab    iCoDE    CLab    iCoDE

       PC        0.004    0.010   0.010   0.030
     Renault     0.160    0.088   0.440   0.921
    psr-1-32-1   0.031    1.208   0.067   2.155
    psr-1-32-2   0.122    5.38    0.329   10.78




                                     www.itu.dk   22
               Conclusion

• Decomposition results in
  – Space reduction
  – Shorter responses
• Tree-of-BDDs can scale higher than the
  single BDD approach
• Future work include:
  – BDD variable orderings
  – Multi-valued Decision Diagrams
  – different decomposition techniques



                             www.itu.dk   23

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:7/24/2013
language:English
pages:23