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

Slides:



Advertisements
Similar presentations
Constraint Satisfaction Problems
Advertisements

Computational Intelligence Winter Term 2009/10 Prof. Dr. Günter Rudolph Lehrstuhl für Algorithm Engineering (LS 11) Fakultät für Informatik TU Dortmund.
G5BAIM Artificial Intelligence Methods
Constraint Satisfaction Problems Russell and Norvig: Chapter
Adopt Algorithm for Distributed Constraint Optimization
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
© Imperial College London Eplex: Harnessing Mathematical Programming Solvers for Constraint Logic Programming Kish Shen and Joachim Schimpf IC-Parc.
Constraint Optimization Presentation by Nathan Stender Chapter 13 of Constraint Processing by Rina Dechter 3/25/20131Constraint Optimization.
Optimization : The min and max of a function
Optimization of thermal processes2007/2008 Optimization of thermal processes Maciej Marek Czestochowa University of Technology Institute of Thermal Machinery.
Best-First Search: Agendas
19 April 2013Lecture 4: Associating Narrowing Functions to Constraints1 Associating Narrowing Functions to Constraints Jorge Cruz DI/FCT/UNL April 2013.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
Nikolaj Bjørner Microsoft Research Lecture 3. DayTopicsLab 1Overview of SMT and applications. SAT solving, Z3 Encoding combinatorial problems with Z3.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Constraint Satisfaction Problems
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
Michael Heusch - IntCP 2006 Modeling and solving of a radio antennas deployment support application with discrete and interval constraints.
12 April 2013Lecture 1: Interval Constraints Overview1 Interval Constraints Overview Jorge Cruz DI/FCT/UNL April 2013.
Optimization Methods One-Dimensional Unconstrained Optimization
26 April 2013Lecture 5: Constraint Propagation and Consistency Enforcement1 Constraint Propagation and Consistency Enforcement Jorge Cruz DI/FCT/UNL April.
Chapter 5 Outline Formal definition of CSP CSP Examples
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
LP formulation of Economic Dispatch
Metaheuristics The idea: search the solution space directly. No math models, only a set of algorithmic steps, iterative method. Find a feasible solution.
Constraint Satisfaction Problems
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
Building “ Problem Solving Engines ” for Combinatorial Optimization Toshi Ibaraki Kwansei Gakuin University (+ M. Yagiura, K. Nonobe and students, Kyoto.
Constraint Satisfaction Problems (CSPs) CPSC 322 – CSP 1 Poole & Mackworth textbook: Sections § Lecturer: Alan Mackworth September 28, 2012.
Design of an Evolutionary Algorithm M&F, ch. 7 why I like this textbook and what I don’t like about it!
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Computer Animation Rick Parent Computer Animation Algorithms and Techniques Optimization & Constraints Add mention of global techiques Add mention of calculus.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
Exact and heuristics algorithms
Solving Problems by searching Well defined problems A probem is well defined if it is easy to automatically asses the validity (utility) of any proposed.
1 Constraint Reasoning for Differential Models Jorge Cruz CENTRIA - Centre for Artificial Intelligence DI/FCT/UNL June 2009.
Branch-and-Cut Valid inequality: an inequality satisfied by all feasible solutions Cut: a valid inequality that is not part of the current formulation.
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Satisfaction Problems University of Berkeley, USA
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Making Path-Consistency Stronger for SAT Pavel Surynek Faculty of Mathematics and Physics Charles University in Prague Czech Republic.
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
Finding Optimal Solutions to Cooperative Pathfinding Problems Trevor Standley Computer Science Department University of California, Los Angeles
Numerical Methods for Inverse Kinematics Kris Hauser ECE 383 / ME 442.
Wolfgang Runte Slide University of Osnabrueck, Software Engineering Research Group Wolfgang Runte Software Engineering Research Group Institute.
Automatic Test Generation
Nonlinear Programming Prepared by Lee Revere and John Large
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
LPSAT: A Unified Approach to RTL Satisfiability
Chapter 6. Large Scale Optimization
Integer Programming (정수계획법)
Multi-Objective Optimization
Constraint Satisfaction Problems
Artificial Intelligence
Constraints and Search
Integer Programming (정수계획법)
Constraint satisfaction problems
CS 8520: Artificial Intelligence
Constraint Satisfaction Problems
Computer Animation Algorithms and Techniques
Constraint satisfaction problems
Chapter 6. Large Scale Optimization
Presentation transcript:

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 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 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 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 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 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 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 Complete Search: Backtracking –Efficient Backtracking: dependency directed Constructive Methods Analyse dependencies Backtrack in non- chronological order “greatest of the least” –Inneficiency: late detection of deadends

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

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

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

12 Repairing Methods Even treatment of all variables X1X2X3X4X1X2X3X X1X x X2X x

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

14 Repairing Methods Difficulty - Escaping from Local Optima Restarts / Stochastic methods

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 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 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

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

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 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 D (1/0) G s-a Encoding “stuck-at” faults (S-buffers) G s-a D (0/1)

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 Incompleteness of CP Modeling 5 Valued Logic does not detect the fault Test ab=x0 detects b s-a-1 x xx

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

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 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 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 (a) x y z (b) z (c) z

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 Experimental Results (1) Evaluation of Maxx on ISCAS circuits MTP 100 and Maxx improvements over Atalanta

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

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

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 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 Solving CCSPs Branch and Prune algorithms Prune: Constraint Propagation Branch: Isolate Solutions

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 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 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 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 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 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 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= B-consistency r=1

41 Experimental Results (2) Determination of Protein Structure (6 atoms) 2B3BGH x y z x y z x y z t (ms)  1 in << 7 secs

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  = n OS 2 y n y n TSA y n y

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

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 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 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 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 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 Phase 2: Constraint Propagation Good d Max Min Intersection In Constraint Out Constraint d d Exclusion Zone Good NoGood Exclusion Zone NoGood

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 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 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 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