Global Constraints and Constraint Programming Michael Maher Loyola University Chicago.

Slides:



Advertisements
Similar presentations
Course Summary What have we learned and what are we expected to know?
Advertisements

Order encoding x i ↔ (X ≥ i)(X = 3) = [1,1,1,0,0] Problem (hard) Problem (hard) Solution CNF Encoding Finite Domain Problem Solving Model Constraint Model.
Introduction. IC-Parc2 ECLiPSe Components Constraint Logic Programming system, consisting of  A runtime core Data-driven computation, backtracking, garbage.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Domain Engineering Silvio Romero de Lemos Meira
Artificial Intelligence Constraint satisfaction problems Fall 2008 professor: Luigi Ceccaroni.
Wednesday, January 29, 2003CSCE Spring 2003 B.Y. Choueiry Constraint Consistency Chapter 3.
Generating Implied Constraints via Proof Planning Alan Frisch, Ian Miguel, Toby Walsh Dept of CS University of York EPSRC funded project GR/N16129.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Constraint Satisfaction Problems
Jean-Charles REGIN Michel RUEHER ILOG Sophia Antipolis Université de Nice – Sophia Antipolis A global constraint combining.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Support: UCARE grant awarded to Chris Reeson & CAREER Award # from the National Science Foundation. To the public: –Illustrate the power of CP For.
Documentation ITV Model-based Analysis and Design of Embedded Software Techniques and methods for Critical Software Anders P. Ravn Aalborg University August.
A game of logic where the player must assign the numbers 1..9 to cells on a 9x9 grid. The placement of the numbers must be such that every number must.
© J. Christopher Beck Lecture 11: Constraint Programming 1.
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
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD LOGIC.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Unit 1 Equations, Inequalities, and Functions. Unit 1: Equations, Inequalities, and Functions Overview: In this unit you will model real-world solutions.
1 Constraint Programming: An Introduction Adapted by Cristian OLIVA from Peter Stuckey (1998) Ho Chi Minh City.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
Math 021. * Interval Notation is a way to write a set of real numbers. The following are examples of how sets of numbers can be written in interval notation:
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
University Course Timetabling with Soft Constraints Hana Rudova, Keith Murray Presented by: Marlien Edward.
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Constraint Satisfaction Problems Chapter 6. Review Agent, Environment, State Agent as search problem Uninformed search strategies Informed (heuristic.
Embedding Constraint Satisfaction using Parallel Soft-Core Processors on FPGAs Prasad Subramanian, Brandon Eames, Department of Electrical Engineering,
A Logic Meta-Programming Approach to support the Co-Evolution of Object-Oriented Design and Implementation Roel Wuyts , PROG.
Hande ÇAKIN IES 503 TERM PROJECT CONSTRAINT SATISFACTION PROBLEMS.
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
CP Summer School Modelling for Constraint Programming Barbara Smith 4. Combining Viewpoints, Modelling Advice.
Linear Inequalities and Absolute Value Inequalities.
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.
Math I Cluster Quiz Data. Math I Unit 2 Represent & Solve Equations & Inequalities Graphically.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
It is the fuel of modern life Business are run Government rule Scientists Industries Education However, building and maintaining software is hard and getting.
Section 2.5 Linear Inequalities in One Variable (Interval Notation)
Some Thoughts to Consider 5 Take a look at some of the sophisticated toys being offered in stores, in catalogs, or in Sunday newspaper ads. Which ones.
Algebra Review. Systems of Equations Review: Substitution Linear Combination 2 Methods to Solve:
Lessons that inspire critical reasoning and problem solving in mathematics.
Math 71A 4.3 – Equations and Inequalities Involving Absolute Value 1.
Automatic Test Generation
Linear Inequalities in One Variable
Constraint Programming
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Consistency Methods for Temporal Reasoning
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Solve System by Linear Combination / Addition Method
Integer Programming (정수계획법)
Foundations of Constraint Processing
CSP Search Techniques Backtracking Forward checking
Heart of algebra Eye of Newt Pancreas of Arithmetic
1.5 Linear Inequalities.
Math I Quarter I Standards
Functions and Their Graphs
Integer Programming (정수계획법)
The Chain Rule Section 3.4.
Linear Equations A linear first-order DE looks like Standard form is
Unit 1 Representing Real Numbers
Part II General Integer Programming
The Chain Rule Section 2.4.
Solving a System of Linear Equations
Common Core Vs Kansas Standards
Consistency algorithms
Bell Work Solve and Check x = y – 5.6 = 34.2 x = -68
Presentation transcript:

Global Constraints and Constraint Programming Michael Maher Loyola University Chicago

Constraint Personalities Type A aggressive, time-sensitive Type B relaxed, deliberate There are two kinds of constraints:

Type A Constraints Composition of constraints is totally understood by a constraint solver  Intervals in Solver, CHIP, …  Domains in CSP  Linear inequalities in CLP(R)  Term equations in Prolog  Linear inequalities in Math Prog These constraints can be solved algorithmically (at low cost).

Constraint Solver Constraint store holding all active Type A constraints. On-line algorithms for deciding consistency, implication, … Constraint store changes by addition/undo/deletion of constraints.

Type B Constraints Composition of constraints is at best partly understood  Global constraints  Arithmetic constraints in Solver, CHIP, …  Constraints in CSP  Integrality in Math Prog These are the reason we do search.

In FD solvers, arithmetic inequalities are Type B constraints. From x + y ≤ z, z ≤ y + 2 the system does not understand x ≤ 2. Intervals are Type A constraints. From x :: 1..5 and x :: 3..7 the system understands x :: 3..5.

 Type B constraints are implemented as propagators of Type A constraints x :: 1..3, y :: 2..6 x + y ≤ z z ≤ y + 2 z :: 3.. z :: 3..8

Global Constraints Collections of many small constraints that are treated as a unit  alldifferent  cumulative  cycle  etc Not global !

Global Constraints Implementations of global constraints are encapsulations of on-line algorithms  alldifferent  cumulative  cycle  etc Often (?) the implementations are based on CO techniques.

Constraint Programming is a software architecture that supports the combination of CO algorithms to solve problems.

Arc Consistency Ideally, an implementation will propagate all information expressible with Type A constraints that is a consequence of the Type B constraint.  If B & c → c’ then c → c’ This is a general form of arc consistency.

Arc Consistency The definition covers many existing definitions:  Arc consistency in CSP  Interval consistency in FD  Echidna consistency  Hull consistency  Rule consistency

Arc Consistency Existing forms of arc consistency only admit unary Type A constraints. They are all weakenings of arc consistency in CSP. We can also use other Type A constraints (like ordering x ≤ y) to get different, not weaker, consistencies.

Minimum min(x, y, z) For AC we need the following propagations, among others:  min(x, y, z) → z ≤ x, z ≤ y  x ≤ y, min(x, y, z) → z = x  u ≤ x, u ≤ y, min(x, y, z) → u ≤ z Implementing non-unary AC is hard.

Improve on AC Stronger consistency conditions

Improve on AC Stronger consistency conditions Weaker consistency conditions

Improve on AC Stronger consistency conditions consider more than one global constraint at a time Weaker consistency conditions

Improve on AC Stronger consistency conditions consider more than one global constraint at a time Weaker consistency conditions avoid or delay complete propagation

Exercises for COs Define and implement new global constraints Define and implement constraint solver for new class of constraints Introduce us to the Dark Arts

Exercises for BRs Formulate and implement BR in a conjunctive constraint context Extend BR to situations where tests for consistency are not complete.