Upload
deven-lundon
View
214
Download
1
Embed Size (px)
Citation preview
1www.itu.dk
Integrating CSP Decomposition Techniques and BDDs for
Compiling Configuration Problems
Sathiamoorthy SubbarayanIT University of Copenhagen
Denmark
CP-AI-OR 2005
2www.itu.dk
Configuration
An arrangement of parts
Valid Configuration- a valid arrangement
Valid according to some specified rules
NP-Hard problem
4www.itu.dk
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
5www.itu.dk
Interactive Configurator
• Interactively guides the user• Shows only valid extensions• User always in a consistent state
6www.itu.dk
Required Functionalities
• Propagate the user selections• Display the valid choices• Explain reasons for unselectable or
implied options
8www.itu.dk
Previous work
Compile into a Binary Decision Diagram
rulesBDD
generation BDD lookup
offline online
configurator
Com
pila
tion
NP-hard P
BDD
Problem! BDD size could explode
9www.itu.dk
This work
• Configuration rules have hierarchies• Hierarchies close to tree-shape
Tree Decomposition of CSP?
Space reduction? (upto 96%)
Response time reduction? (upto 200x)
11www.itu.dk
Tree Decomposition of CSP
C1
C2
C3 C4
C5
C6C7
C1
C2C3
C4
C5C6
C7
C3
C6
CSP
CSP’
b1
b2
b3 Tree-of-BDDs
12www.itu.dk
Benefit of decomposition
BDD
b1
b2
b3
bdd
Tree-of-BDDs
|b1|+|b2|+|b3| < |bdd|
Potential Space Reduction
-Online Configurators
-Embedded Configurators
13www.itu.dk
Required Functionalities
• Propagate the user selections• Display the valid choices• Explain reasons for unselectable or
implied options
14www.itu.dk
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
15www.itu.dk
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
16www.itu.dk
Example
Assign a=0Assign b=1 e=1 is implied
Explain e=0?
1
1
Explanation b=1
Can also handle priorities
and non-Boolean variables
17www.itu.dk
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 !
18www.itu.dk
Explanations in Tree-of-BDDs
b1
b2
b3
b1’ b2’
b3’
Abstraction
Join
b’
ExplainExplanation
19www.itu.dk
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
20www.itu.dk
Compilation Details
BenchmarkTree(sec)
TreeNodes
Compile (sec) BDD-nodes Peak BDD-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
21www.itu.dk
Time Comparisons
• Response (Propagate+Display)
BenchmarkAverage(sec) Worst(sec)
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
22www.itu.dk
Time Comparisons
• Explanation
BenchmarkAverage(sec) Worst(sec)
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