Global Constraints Toby Walsh National ICT Australia and University of New South Wales www.cse.unsw.edu.au/~tw.

Slides:



Advertisements
Similar presentations
Examples for Discrete Constraint Programming
Advertisements

February 14, 2002 Putting Linear Programs into standard form
DCS Lecture how to solve it Patrick Prosser. Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Non-binary Constraints Toby Walsh
Maximal Independent Subsets of Linear Spaces. Whats a linear space? Given a set of points V a set of lines where a line is a k-set of points each pair.
Algorithms and applications
CP nets Toby Walsh NICTA and UNSW. Representing preferences Unfactored Not decomposable into parts E.g. assign utility to each outcome Factored Large.
IENG313 Operation Research I
ECBL: An Extended Corner Block List with Solution Space including Optimum Placement Shuo Zhou,Sheqin Dong, Xianlong Hong,Yici Cai Dept. of Computer Science.
CS 473Lecture X1 CS473-Algorithms I Lecture X Dynamic Tables.
SENSITIVITY ANALYSIS. luminous lamps produces three types of lamps A, B And C. These lamps are processed on three machines X, Y and Z. the full technology.
Artificial Variables, 2-Phase and Big M Methods
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh NICTA and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh NICTA and University of New South Wales
Constraint Programming Toby Walsh UNSW and NICTA.
Pesquisa Operacional Exemplo de Análise de Sensibilidade no Solver.
IEOR 4004: Introduction to Operations Research Deterministic Models January 22, 2014.
2 x /10/2015 Know Your Facts!. 8 x /10/2015 Know Your Facts!
IEOR 4004 Midterm Review (part I)
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 16 Integer Programming.
Distributed Constraint Satisfaction Problems M OHSEN A FSHARCHI.
Transportation Problem
DIRECTIONAL ARC-CONSISTENCY ANIMATION Fernando Miranda 5986/M
Production Mix Problem Graphical Solution med lrg Electronics Cabinetry Profit (10,20) (Optimal Product Mix!) Profit.
Chapter 8: The Solver and Mathematical Programming Spreadsheet-Based Decision Support Systems Prof. Name Position (123) University.
Computational Facility Layout
Constraint Satisfaction taking advantage of internal structure of states when paths don’t matter.
Constraint Networks (cont.) Emma Rollón Postdoctoral researcher at UCI April 1st, 2009.
BINARY/MIXED-INTEGER PROGRAMMING ( A SPECIAL TYPE OF INTEGER PROGRAMMING)
Constraint Satisfaction Problems Russell and Norvig: Parts of Chapter 5 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2004/home.htm Prof: Dekang.
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Adopt Algorithm for Distributed Constraint Optimization
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Linear Programming. Introduction: Linear Programming deals with the optimization (max. or min.) of a function of variables, known as ‘objective function’,
Constraint Satisfaction Problems and Consistency Restoration Florent Launay Undergraduate student at FIT.
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
G53CLP Constraint Logic Programming Modeling CSPs – Case Study I Dr Rong Qu.
CPSC 322, Lecture 35Slide 1 Finish VE for Sequential Decisions & Value of Information and Control Computer Science cpsc322, Lecture 35 (Textbook Chpt 9.4)
Decision Theory: Sequential Decisions Computer Science cpsc322, Lecture 34 (Textbook Chpt 9.3) April, 12, 2010.
Introduction to Quantitative Techniques
Constraint Programming for Supply Chain Management J. Christopher Beck Cork Constraint Computation Centre (4C) SCM Information Day, Nov.
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
WOOD 492 MODELLING FOR DECISION SUPPORT
1 1 Slide © 2005 Thomson/South-Western MANAGMENT SCIENCE n Chapter 1: Introduction Problem solving and decision making; quantitative analysis and decision.
1 Lic Presentation Memory Aware Task Assignment and Scheduling for Multiprocessor Embedded Systems Radoslaw Szymanek / Embedded System Design
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
Constraint Satisfaction Problems Russell and Norvig: Chapter 3, Section 3.7 Chapter 4, Pages CS121 – Winter 2003.
Chapter 4 Linear Programming Models. Introduction All of the models in this chapter are linear models Which means: Target cell is ultimately (possibly.
PSU CS 370 – Introduction to Artificial Intelligence 1 Constraint Satisfaction Problems.
© 2008 Thomson South-Western. All Rights Reserved Slides by JOHN LOUCKS St. Edward’s University.
CSCI 5240 Combinatorial Search and Optimization with Constraints
Operations Research Chapter one.
CSCI 5240 Combinatorial Search and Optimization with Constraints
Introduction to Linear Programs
Greedy Technique.
CSCI 5240 Combinatorial Search and Optimization with Constraints
Introduction to Operations Research
CS 160 Introduction to Computer Science
Chapter 3: Finite Constraint Domains
Planning and Scheduling in Manufacturing and Services
Integer Linear Programming
Presentation transcript:

Global Constraints Toby Walsh National ICT Australia and University of New South Wales

Course outline ● Introduction ● All Different ● Lex ordering ● Value precedence ● Complexity ● GAC-Schema ● Soft Global Constraints ● Global Grammar Constraints ● Roots Constraint ● Range Constraint ● Slide Constraint ● Global Constraints on Sets

Constraint programming ● “Constraint programming represents one of the closest approaches computer science has yet made to the Holy Grail of programming: the user states the problem, the computer solves it”. – Gene Freuder, Constraints, April 1997

My Da Vinci code Sol= [ S,E,N,D, M,O,R,E, M,O,N.E.Y], Sol :: [0..9], S<>0, M<>0. alldifferent(Sol), 1000*S+100*E+10*N+D+ 1000*M+100*O+10*R+E= 10000*M+1000*O+100*N+10*E+Y, label(Sol).

My Da Vinci code Sol= [ S,E,N,D, M,O,R,E, M,O,N.E.Y], Sol :: [0..9], S<>0, M<>0. alldifferent(Sol), 1000*S+100*E+10*N+D+ 1000*M+100*O+10*R+E= 10000*M+1000*O+100*N+10*E+Y, label(Sol). ? Sol = [9,5,8,7,1,0,8,2]

Suduko Puzzle = [X11,X12,X13, …X19, X21,X22, ………X29,.. X91,X92, ……….X99] Puzzle :: 1..9 alldifferent([X11,..X19]) alldifferent([X21,..X29]).. alldifferent([X11,..X91]).. alldifferent([X11,..X33])..

Application areas ● Scheduling ● Timetabling ● Assignment – personnel – stand allocation ● Network configuration ● Configuration ● Bioinformatics ●...

Constraint satisfaction ● Decision variables: – X1, X2, X3... ● Domain of values: – red, yellow, green,... ● Constraints – binary relations like X1=/= X2 – non-binary relations like NValues([X1,..Xn],3)

Constraint optimization ● Many problems are in fact optimization – Maximize profit – Minimize costs –... ● Optimization = sequence of decision problems – Feasibility constraints – Optimization constraint: Sum(i,ai.Xi) <= Cost ● Branch and bound

Solving constraint satisfaction problems ● Systematic methods – Extend partial solutions – Search (branching) and – Inference (enforcing a local consistency) ● Local search methods – Complete solution – Repair based

Solving constraint satisfaction problems ● Systematic methods – Pick a variable and a value to assign it ● Branching heuristic – Enforce a local consistency property ● This prunes values of future uninstantiated variables – If a domain is wiped out, backtrack – Else repeat

Tree search

Branching heuristics ● Variable ordering – most constrained variable, fail first – e.g. smallest domain, domain/degree ● Value ordering – most promising value – succeed first

Arc consistency ● X=a has support iff it occurs in an assignment that satisfies the constraint ● A constraint is arc consistent iff each value in the domain of each variable has support ● Enforce arc consistency by deleting values without support – Exists maximal arc consistent domains ● For non-binary constraints, arc consistency called generalized arc consistency (GAC) or hyper arc consistency

Enforcing arc consistency ● X1, X2 in {red,blue} ● X3 in {red,blue,green} ● X1=/=X2, X1=/=X3, X2=/=X3 ● All three binary inequalities are arc consistent – e.g X3=red has support X1=blue in X1=/=X3

Enforcing arc consistency ● X1, X2 in {red,blue} ● X3 in {red,blue,green} ● AllDifferent(X1,X2,X3) ● Now enforcing GAC on AllDifferent constraint prunes – X3=red and X3=blue – These values have no support! – X3=green has two supports: – X1=red, X2=blue and X1=blue, X2=red

Bound consistency ● Max and min values have supports which lie between max and min values in each domain ● Also used with set variables – Set variable typically represented by – Upper bound = elements that can be in set – Lower bound = elements that must be in set – Equivalently 0/1 vector representing characteristic function ● Bound consistency on characteristic function rep – Upper bound = Union of possible supported values – Lower bound = Intersection of possible supported values

Global constraints Richer modelling Richer solving....

Comparison with Operations Research ● CP – rich modelling language – many different global constraints – variable indexing – fast local inference on these global constraints – good for finding feasible and tightly constrained solutions ● (I)LP – everything has to be a linear inequality – limited range of solution methods (simplex,...) – good at proving optimality

Variable indexing ● OR people jealously look at our ability to index with a variable – Array like “look up” – E.g. sports scheduling ● forall(i in Teams, k i Weeks) Plays[Plays[i,k]]=i – Not possible in ILP – Simple global “element” constraint ● element(X,[a_1,..,a_m],Y) iff a_X = Y

Global constraints ● Any non-binary constraint – AllDifferent – Nvalues – Element – Lex ordering – Stretch constraint – Sequencing constraint – Cummulative constraint –... – Beldiceanu's large catalog ● Each comes with an efficient propagator...

To be or not to be a global constraint? ● [Bessiere and Van Hentenryck CP 03] ● Semantically global – no constraint decomposition ● Operationally global – no constraint decomposition on which we do the same pruning (e.g. GAC on All Different) ● Algorithmically global – complexity disadvantage to use decomposition (e.g. FC on All Different)

Why global constraints? ● Richer modelling – simple models (e.g. variable indexing) – easy to prototype and maintain ● Richer solving – propagators provide “global” view otherwise missing in CP – can making solving competitive with OR methods

Conclusions ● Constraint programming is a powerful paradigm for solving many combinatorial optimization problems ● Global constraints are integral to this success ● As we shall see, there are many different types of global constraints – However, a few are central like AllDifferent, Roots, Range, Slide,...