Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 On the Integration of Constraint Propagation and Local Search Pedro Barahona Department of Computer Science Faculty of Science and Technology New University.

Similar presentations


Presentation on theme: "1 On the Integration of Constraint Propagation and Local Search Pedro Barahona Department of Computer Science Faculty of Science and Technology New University."— Presentation transcript:

1 1 On the Integration of Constraint Propagation and Local Search Pedro Barahona Department of Computer Science Faculty of Science and Technology New University of Lisbon

2 2 Summary Constraint Solvers for CSP and CSOP –Pure Methods (Propagation, Local Search,...) –Hybrid Methods Integration of Propagation & Local Search –Digital Circuits Testing –Handling Continuous Domains –Determination of Protein Structure Conclusions

3 3 CSP and CSOP CSP: Contraint Satisfaction Problems Given variables V 1 to V n, find values in their respective domains D 1... D n that satisfy Constraints C 1 to C p. Constraints C i  D 1 x D 2 x... x D n CSOP: Contraint Sat & Optimisation Problems Given variables V 1 to V n, find values in their respective domains D 1... D n that satisfy Constraints C 1 to C p and, additionally, optimise some objective function F Objective Function F: D 1 x D 2 x... X D n  R

4 4 Constraint Solving Methods Algebraic Approach –Available in some specific domains –Examples: Boolean, Rational Numbers Search Methods –General Purpose –Finite Domains, Integers, Real Numbers, Intervals, Sets, Strings,... Variety of Search Techniques –Constructive vs. Repairing

5 5 Constructive Methods General Idea –Iterative narrowing of the possible values of the variables within their domains, until a completely characterised solution is found Different Techniques for Narrowing –Assign Values to Variables (Finite Domains / Satisf.) –Split Current Domains (Continuous Domains / Optim.) Key Issues –Early detection of dead ends –Efficient Backtracking

6 6 Repairing Methods General Idea –Starting with a completely characterised solution, somehow unsatisfactory, search for a better solution in its neighbourhood. Key issues –Selection of neighbour –Escaping from local optima –Search the whole solution space –Stopping criteria

7 7 Comparison of Methods Constructive Methods –Complete –Inherently satisfaction methods Optimisation considered in heuristics and deadends (BB) More adequate for few and sparse feasible solutions Repairing Methods –Incomplete –Adaptation of solutions from similar problems –Inherently optimisation methods Satisfaction encoded in the optimising function More adequate for many feasible solutions

8 8 Complete Search: Backtracking –Efficient Backtracking: dependency directed Constructive Methods 13 42 54 53 5123 Analyse dependencies Backtrack in non- chronological order “greatest of the least” –Inneficiency: late detection of deadends

9 9 Constructive Methods –What kind of propagation? 11 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 4 3 4 4 44 Propagate “Conflicts” Avoid irrelevant backtracking Complete Search: Backtracking + Propagation –Early detection of deadends - propagation

10 10 Constructive Methods What kind of propagation –Trade-of: pruning vs. complexity

11 11 Constructive Methods Difficulty with Backtracking –Typically Chronological –Costly backtracking of early errors 0101010101010101 01010101 0101 01 X1X2X3X4X1X2X3X4 X

12 12 Repairing Methods Even treatment of all variables 0101010101010101 01010101 0101 01 X1X2X3X4X1X2X3X4 0010 X1X1 1010 x X2X2 1110 x

13 13 Repairing Methods Satisfaction via Optimization Modeling issue: Definition of Neighbourhood Objective Function = 3 # Violations (attacks) Neighbourhood: Permutations

14 14 Repairing Methods Difficulty - Escaping from Local Optima Restarts / Stochastic methods 2 3 1 3 0

15 15 Pure vs. Hybrid Approaches Compete or Cooperate Many Examples of Cooperation –Operations Research –Constraint Programming Examples from Operations Research –Integer Programming with Linear Programming LP provides Bounds for IP –Nonlinear and Linear Programming Stepwise Linearization

16 16 Pure vs. Hybrid Approaches Constraint Programming –Global Constraints improve Propagation Graph Theory / OR Methods with Propagation –Integer Programming and Propagation Cutting Planes (CPLEX and ECLiPse) Benders Decomposition –Continuous Domains Interval Arithmetic (Newton) Quadratic Optimization –Propagation and Local Search

17 17 Experiments with CP and LS Optimisation of Test Patterns (Digital Circuits) –Francisco Azevedo Global-Hull Consistency (Continuous Domains) –Jorge Cruz Determination of Protein Structure (NMR Data) –Ludwig Krippahl

18 Interaction of Constraint Programming and Local Search for Optimisation Problems Francisco Azevedo & Pedro Barahona

19 19 Introduction Scope: Optimisation problems in the field of Automatic Test Pattern Generation (ATPG) Goal: For a given stuck-at fault, find a test (an input vector) with the maximum number of unspecified bits. Approach: Integration of branch-and-bound CLP with Local Search (in a cycle CP LS) with multi-valued logics Key feature - Different encodings in CP and LS.

20 20 CP Modeling: 5-valued Logic 5 valued logic to encode dependency/ignorance –Values D/ D encode dependency on a fault –Value X encodes “don’t know” situations G s-a-0 1 1 D (1/0) G s-a-0 1 0 0 Encoding “stuck-at” faults (S-buffers) G s-a-1 01 0 D (0/1)

21 21 CP Modeling: 5-valued Logic _ Goal: An output D/D that maximises # X inputs Encoding normal behaviour in 5-valued Logic DD X 0 0 D X X x

22 22 Incompleteness of CP Modeling 5 Valued Logic does not detect the fault Test ab=x0 detects b s-a-1 x xx

23 23 Improving Completeness (1) Naming unspecified values, including inversion parity, improves detection of faults x

24 24 Improving Completeness (2) Modelling still incomplete final output should have value 1 Multiple Sources of Unspecified Values ABZ=A.B 0Arg0 1 id-0id0 id A -p A B -p B Z -0 x

25 25 Integration CP and LS Constraint Propagation (weaker then full arc- consistency) finds solutions efficiently (Still) Incomplete CP Model Maximisation in usual Branch and Bound would still be incomplete CP solutions as seeds for LS optimisation LS uses a complete logic Interesting neighbours heuristically detected with such logic

26 26 Annotations in Logic for LS Complete LS Model Heuristic for “good” neighbours Dependency on (single) unspecified values {}:0 0 0 (a) x y z {x/ x-0}:0 0 1 (b) z {x/ x-0, y/ y-0}:1 1 1 (c) z 0 0 0 (a) x y z 0 0 1 (b) z 1 1 1 (c) z

27 27 Annotations in Logic for LS Simulation 0/1 output does not depend on inputa, which may flip to x Example Local Search (over original test ab=00)

28 28 Experimental Results (1) Evaluation of Maxx on ISCAS circuits MTP 100 and Maxx improvements over Atalanta

29 29 Experimental Results (2) Breakdown of Maxx Performance MTP 1000 and Maxx improvements over MTP 100

30 30 Maintaining Global Hull Consistency with Local Search for Continuous CSPs Jorge Cruz & Pedro Barahona

31 31 Introduction Scope: Continuous Constraint Satisfaction Problems for Decision Support Goal: Find an enclosure of the solution space where a decisor may look for “good” solutions. Approach: Maintaining Global Hull Consistency as the basic Constraint Propagation Method Key Feature: Local Search in Enforcement Algorithms

32 32 Under-Constrained CCSPs Representation of Continuous Domains F-intervalR F [r 1..r 2 ] [f 1.. f 2 ] r [  r ..  r  ] F-box Canonical solution

33 33 Solving CCSPs Branch and Prune algorithms Prune: Constraint Propagation Branch: Isolate Solutions

34 34 Based on Interval Arithmetic Hull-consistency Decomposes constraints into sets of primitive constraints x 3 +xy+y 5 =3  { Z 1 = X 3 ; Z 2 = XY ; Z 3 = Y 5 ; Z 1 +Z 2 +Z 3 =3 } Enforces consistency on the bounds of each domain Box-consistency Does not decompose constraints Enforces consistency on domain bounds combining the Interval Newton method with spliting F(x,y) = x 3 +xy+y 5 -3=0 X n = x m - F(x m, Y)  X n-1 F’ (X n-1,Y) Basic CP Methods for CCSPs

35 35 Higher Order Consistency Basic Methods are often Insufficient Higher Order Consistency Criteria 3B- consistency, nB consistency (Hull) if n-2 bounds are fixed then the problem is Hull-consistent Bound-consistency, nBound consistency (Box) if n-2 bounds are fixed then the problem is Box-consistent However, these higher order methods may still be insufficient Our Approach: Global Hull Consistency (GH)

36 36 Global Hull Consistency Each bound of the domain of each variable is justified by a canonical solution for the global set of constraints. Decision Support Context (“many” solutions) Requirement: search for extreme solutions

37 37 Hull Consistency Enforcing Algorithms Several Algorithms were tried OS1, OS2: Independent search for each bound of each variable OS3: Alternate search for the bounds of all variables TSA: Alternate search keeping some tree search structure of the domains Common goal: search for canonical solutions Alternatives: Pure splitting or local search

38 38 Local Search in GH Enforcing Find a canonical solution within a box canonical solution ? x y upper bound of x minimization initial point Newton’s vector new point Newton’s vector minimization new point Stops when: converges find a solution

39 39 Hull Consistency Enforcing Algorithms Newton’s Vector f(x,y)=0 g(x,y)=0 h(x,y)=0 Constraints: X F Current Point : X 0 F(X0)0F(X0)0 goal:  X F(X 0 +  X)=0 Newton’s vector By the Taylor expansion (ignoring higher order terms): F(X 0 +  X)= F(X 0 )+J·  X Jacobian 0  X= - J -1 F(X 0 ) Singular Value Decomposition

40 40 Experimental Results (1) The need for Global Hull (toy examples): x 2 + y 2  1 x 2 + y 2  2 Box-consistency 3B-consistency Global Hull-consistency  Ø x 2 + y 2 + z 2  2 x 2 + y 2 + z 2  3 Global Hull-consistency 4B-consistency  Ø Box-consistency r=1.415 3B-consistency r=1

41 41 Experimental Results (2) Determination of Protein Structure (6 atoms) 2B3BGH x 4 -1.001.. 1.415-0.056.. 0.049-0.004.. 0.004 y 4 0.585.. 3.0011.942.. 2.0471.996.. 2.004 z 4 -1.415.. 1.416-1.415.. 1.415-1.415.. 1.415 x 5 -0.415.. 2.0010.998.. 1.0020.999.. 1.001 y 5 -0.001.. 2.001 0.999.. 1.001 0.999.. 1.001 z 5 -1.415.. 1.416-1.415.. 1.415-1.415.. 1.415 x 6 -2.001.. 2.001-1.110.. 1.053-1.008.. -0.992 y 6 -0.001.. 2.001-0.894.. 1.169 0.999.. 1.001 z 6 -2.001.. 2.001-1.483.. 1.483-1.420.. 1.402 t (ms)107 38062 540  1 in << 7 secs

42 42 Experimental Results (2) How useful is Local Search ? Time (s) Max Storage (F-boxes) kLS  =10 -1  =10 -2  =10 -3  =10 -1  =10 -2  =10 -3 2 n2.9911.37600+304760 OS 2 y14.9738.46600+141624 3 n41.01150.21359.69223753 y19.1475.98234.653825 2 n10.1660.96600+332678676506 TSA y44.7947.59600+22162116764 3 n42.52184.38600+52207843 y38.6397.88275.8599185392

43 43 PSICO Combining Constraint Programming and Optimisation to Solve Macromolecular Structures Ludwig Krippahl & Pedro Barahona

44 44 Introduction Scope: Fast Interpretation of data collected in Nuclear Magnetic Resonance (NMR) experiments. Goal: Determine Protein Structure from inter- atomic distances provided by NMR data. Approach: Combining CP with local search optimisation (in continuous domains) Key Feature: CP and Local Search acting on different models

45 45 Motivation (1) Protein (amino acid) sequence, coded in the genes, determines its structure (shape) which, in turn, determines much of its functionality CatalysisSignaling Regulation Motion Function Genes Structure

46 46 Motivation (2) NMR avoids crystalisation and other costly procedures, but requires fast data post- processing (to correct interpretation errors) What we want What NMR provides C GlycinLeuc in Tyrosine N O H WYLLHWST Basic Knowledge

47 47 Overall Method Phase 1: Establish Distance Constraints From Basic Knowledge From NMR Data In: | X i - X j |  U ij Out: | X i - X j |  L ij Phase 2: Approximate Solution Constraint Propagation Phase 3: Repair Solution Local Search

48 48 Phase 1: Domain Modeling Domains modeled as 3-D boxes Good NoGood Distance Out In x 1, y 1 x y x 2, y 2 abc Modeling allows “arc-consistency” stronger than “bounds-consistency”

49 49 Phase 2: Constraint Propagation Good d Max Min Intersection In Constraint Out Constraint d d Exclusion Zone Good NoGood Exclusion Zone NoGood

50 50 Change representation to torsion angles (i.e the chemical bond allow some rotation) Phase 3: Local Search (Optimisation) Fit approximate solution from CP to the torsion angle model Optimise overall constraint violation (Conjugate Gradient Method)

51 51 Fit CP solution to the torsion angle model Phase 3: Local Search (Optimisation) min p* are CP positions and p(  ) those determined by torsion angles  min C j (  ) are penalties for violation of distance constraints, and A jj (  ) penalties associated to implicit atomic “collisions”. Optimise overall constraint violation (via Conjugate Gradient Method)

52 52 Experimental Data (Desulforedoxin dimer, …) Experimental Results DYANA Time:  10 hours Solutions:  1Å PSICO Time: 9 min 1 min (CP) 8 min (15 LS solutions) Solutions RMSD:  2.3 Å Constraints Violated:  15% 520 atoms  8000 constraints where > 800 provided from NMR > 7000 from amino acid knowledge

53 53 Conclusions Several Methods to solve CSP and CSOP Constraint Propagation Local Search Opportunities for Cooperation but... Careful Modeling Seek advantages from complementary nature Adequacy to satisfaction /optimisation Ease of modeling


Download ppt "1 On the Integration of Constraint Propagation and Local Search Pedro Barahona Department of Computer Science Faculty of Science and Technology New University."

Similar presentations


Ads by Google