550 likes | 726 Views
Christophe Jermann LINA/CNRS, University of Nantes Joint work with: Bertrand Neveu, Gilles Trombettoni I3S/CNRS-INRIA, University of Nice. InterBlock-Backtracking : Exploiting Structure in Numerical CSPs Solving. Outline. IBB: a general framework for solving decomposed NCSPs Principle
E N D
Christophe Jermann LINA/CNRS, University of Nantes Joint work with: Bertrand Neveu, Gilles Trombettoni I3S/CNRS-INRIA, University of Nice InterBlock-Backtracking: Exploiting Structure in Numerical CSPs Solving
Outline • IBB: a general framework for solving decomposed NCSPs • Principle • Inputs • Process • IBB+Interval: an instance of IBB • Interval solving • Interblock Filtering • Experiments • Conclusion & Future directions
Outline • IBB: a general framework for solving decomposed NCSPs • Principle • Inputs/Parameters • Process • IBB+Interval: an instance of IBB • Interval solving • Interblock Filtering • Experiments • Conclusion & Future directions
IBB: general sight • Main ideas in [Bliek et al, CP98] • Since then, made a general framework • Parameters: fix to obtain one instance of IBB • a (set of) solving method(s) • a backtracking process • optional: a set of “add-ons” • Inputs: • a decomposed numerical CSP (NCSP) • Output: • One (or all the) solution(s) of the NCSP
Numerical CSPs • Defined by (X,D,C) where: • X: a set of variables • D: a set of continuous domains, one for each xX • C: a set of constraints (equations, inequalities, …) on X • Applications: • Physics: forces, electrical measurements… • Design & Geometry: distances, angles, … • Program verification: instructions with floats, … • Robotics: kinematic constraints, … • …
Decomposed NCSPs • Decomposed(S) = ({S1, S2, …, S3}, <, +) • Si = well-constrained sub-NCSP • < = partial order for Si’s solving • + = partial solutions combination operator Such that Sol(S1)+Sol(S2)+…+Sol(S3) = Sol(S) • Why decompose ? • Divide & conquer => reduce solving complexity • Several kinds of decompositions : • Equational [Michelucci et al. 1996], [Bliek et al. 1998], … • Geometric [Hoffmann et al 1995], [Jermann et al. 2000], … • …
Solving methods • NCSP system of (non-linear) equations/inequalities • Symbolic: Groebner basis, … • Numeric: Local (Newton-Raphson, …), Homotopy, Interval, … Generally, the structure is under-exploited IBB allows to generically exploit the structure identified by decomposition
Exploiting structure • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B E F D H I G J
Exploiting structure • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B E F D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B E F D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B E F D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F xE,yE D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F xE,yE xF,yF D H I G J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F xE,yE xF,yF D H I G YD J
Exploiting structure xA,yA xC,yC xJ,yJ • Sub-NCSP = block • A subset of constraints • All the induced variables • Input variables (computed in another block) • Output variables (computed in the block) • Partial order DAG A C B xB,yB E F xE,yE xF,yF D H I G YD xG,yG xH,yH xI,yI J
Solving process xA,yA xC,yC xJ,yJ • Choosing a total order: • Compatible with the partial order • Fixes a static block ordering for backtracking purpose xB,yB xE,yE xF,yF YD xG,yG xH,yH xI,yI
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Choosing a total order: • Compatible with the partial order • Fixes a static block ordering for backtracking purpose xB,yB 1 xE,yE xF,yF 2 3 YD xG,yG xH,yH xI,yI 5 4
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Solving each block in sequence • with a solving method which can differ from block to block Search Tree Block 1 xB,yB 1 Solving Method 1 => Internal Search Tree 1 => 2 solutions: B1 and B2 xE,yE xF,yF 2 3 YD xG,yG xH,yH xI,yI 5 4
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Solving each block in sequence • with a solving method which can differ from block to block Search Tree Block 1 xB,yB B1 Solving Method 2 => Internal Search Tree 2 => 2 solutions: E1 and E2 Depending on B1 1 Block 2 xE,yE xF,yF 2 3 YD xG,yG xH,yH xI,yI 5 4
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Solving each block in sequence • with a solving method which can differ from block to block Search Tree Block 1 xB,yB B1 1 Block 2 xE,yE xF,yF E1 2 3 YD xG,yG xH,yH xI,yI 5 4 No Solution in Block 5
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking: • On “no solution” Search Tree Block 1 xB,yB B1 1 Block 2 xE,yE xF,yF E1 2 3 Backtracking YD xG,yG xH,yH xI,yI 5 4 No Solution in Block 5
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking: • On “no solution” => block solving should be complete for this purpose Search Tree Block 1 xB,yB B1 1 Block 2 xE,yE xF,yF E1 E2 2 3 F1,D1,G1,H1,I1 YD xG,yG xH,yH xI,yI 5 4 One global solution B1,E2,F1,D1,G1,H1,I1
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking: • On “no solution” • Or on “next solution” => block solving should be complete for this purpose Search Tree Block 1 xB,yB B1 Backtracking for completion 1 Block 2 xE,yE xF,yF E1 E2 2 3 F1,D1,G1,H1,I1 YD xG,yG xH,yH xI,yI 5 4 One global solution B1,E2,F1,D1,G1,H1,I1
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking => solving several times the same block … but not the same problem ! • Input variables = parameters => Blocks = parametric NCSPs Search Tree Block 1 xB,yB B2 B1 1 Block 2 Block 2 The constraints have changed depending on B2 xE,yE xF,yF E1 E2 2 3 YD xG,yG xH,yH xI,yI 5 4 One global solution B1,E2,F1,D1,G1,H1,I1
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking => solving several times the same block … but not the same problem ! • Input variables = parameters => Blocks = parametric NCSPs Search Tree Block 1 xB,yB B2 B1 Solving Method 3 => Internal Search Tree 3 => 2 solutions: E3 and E4 Depending on B2 1 Block 2 Block 2 xE,yE xF,yF E1 E2 2 3 YD xG,yG xH,yH xI,yI 5 4 One global solution B1,E2,F1,D1,G1,H1,I1
Solving a DAG of Blocks xA,yA xC,yC xJ,yJ • Backtracking => solving several times the same block … but not the same problem ! • Input variables = parameters => Blocks = parametric NCSPs Search Tree Block 1 xB,yB B2 B1 1 Block 2 Block 2 xE,yE xF,yF E1 E2 E3 E4 2 3 YD xG,yG xH,yH xI,yI 5 4 All the global solutions
Intelligent Backtracking xB,yB xE,yE xF,yF yD xG,yG xH,yH xI,yI • Possible InterBlock Backtracking • BT: Chronological Backtracking • GBJ: Graph-based Backjumping [Dechter, 1990] • GPB: Generalized Partial-Order BT [Bliek, 1998] xC,yC xA,yA 1 xJ,yJ 2 3 5 4
Intelligent Backtracking xB,yB xE,yE xF,yF yD xG,yG xH,yH xI,yI • Possible InterBlock Backtracking • BT: Chronological Backtracking • GBJ: Graph-based Backjumping [Dechter, 1990] • GPB: Generalized Partial-Order BT [Bliek, 1998] xC,yC xA,yA 1 xJ,yJ 2 3 BT 5 4
Intelligent Backtracking xB,yB xE,yE xF,yF yD xG,yG xH,yH xI,yI • Possible InterBlock Backtracking • BT: Chronological Backtracking • GBJ: Graph-based Backjumping [Dechter, 1990] • GPB: Generalized Partial-Order BT [Bliek, 1998] xC,yC xA,yA 1 xJ,yJ 2 3 GBJ GPB BT 5 4
Intelligent Backtracking xB,yB xE,yE xF,yF yD xG,yG xH,yH xI,yI • Possible InterBlock Backtracking • BT: Chronological Backtracking • GBJ: Graph-based Backjumping [Dechter, 1990] • GPB: Generalized Partial-Order BT [Bliek, 1998] xC,yC xA,yA 1 GPB xJ,yJ 2 3 GBJ GBJ GPB BT 5 4
Intelligent Backtracking xB,yB xE,yE xF,yF yD xG,yG xH,yH xI,yI • Possible InterBlock Backtracking • BT: Chronological Backtracking • GBJ: Graph-based Backjumping [Dechter, 1990] • GPB: Generalized Partial-Order BT [Bliek, 1998] xC,yC xA,yA 1 + = with the recompute condition GPB xJ,yJ 2 3 GBJ GBJ+ GBJ GPB BT 5 4
IBB: extending the framework • Specific treatments as add-ons: • Generally, depending on the solving methods • Choose the strategy of application (before/after/during a block solving, …) • E.g.: • Pre-conditioners, • Propagators, • Inequalities checkers, • …
Outline • IBB: a general framework for solving decomposed NCSPs • Principle • Inputs • Process • IBB+Interval: an instance of IBB • Interval solving • Interblock Filtering • Experiments • Conclusion & Future directions
IBB + Interval • Solving method = Interval constraint programming techniques • Backtracking: BT, GBJ & GPB => 3 instances in fact • An interesting add-on: Inter-Block Filtering (IBF) • Propagates domain reductions in following blocks
Interval solving • 3 operations: Search space = cross-product of the domains (intervals) (x-1)2 -3=y y y<x/3 x -x2+3=y
Interval solving • 3 operations: • Filtering: reduces the bounds of the domain of each variable using a local consistency (x-1)2 -3=y y y<x/3 x -x2+3=y
Interval solving • 3 operations: • Filtering: reduces the bounds of the domain of each variable using a local consistency (x-1)2 -3=y y y<x/3 x -x2+3=y
Interval solving • 3 operations: • Filtering: reduces the bounds of the domain of each variable using a local consistency • Splitting: splits search space into parts to be explored individually => a search-tree appears (x-1)2 -3=y y y<x/3 x -x2+3=y
Interval solving • 3 operations: • Filtering: reduces the bounds of the domain of each variable using a local consistency • Splitting: splits search space into parts to be explored individually => a search-tree appears • Existence: checks if a unique solution exists in the current sub-search-space (x-1)2 -3=y y y<x/3 x -x2+3=y
InterBlock Filtering A C B Block 1 Principle: Use local consistency to propagate the reductions during the solving of current blocks in related blocs
InterBlock Filtering E1 A C A C B B E2 Block 2 Block 1
InterBlock Filtering E1 A C A C B B E2 Block 2 Block 1 E1 A C B E2 F Block 3
InterBlock Filtering E1 A C A C B B E2 Block 2 Block 1 E1 E1 A C A C B B E2 E2 F F Block 3 Block 4 D??
InterBlock Filtering E1 A C A C B B E2 Block 2 Block 1 E1 E1 A C A C B B E2 E2 F F Block 3 Block 4 D?? Using IBF, E1 incompatibility can be detected in Block 2 by propagating on Block 4
Benchmarking • Implemented as a C++ prototype • Run on a PIII 935 • Experimental protocol: • Parameters: ~12 instances of IBB+Interval • Interval Solving: (uses ILOG Solver 5.0) • Filtering: 2B, 3B, Box, Bound, 2B+Box, 3B+Bound; best choice per problem (usually 2B+Box or 3B) • Splitting:classical interval bisection • Existence:always and only with Box and Bound • Backtracking: BT, GBJ, GPB, with or without + • InterBlock Filtering: with or without • Inputs: • NCSPs: 8 from CAD, 4 domain sizes • Decomposition:best among 4 methods