© J. Christopher Beck 20051 Lecture 11: Constraint Programming 1.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Non-binary Constraints Toby Walsh
Algorithm Design Methods (I) Fall 2003 CSE, POSTECH.
University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming J. Christopher Beck Dept. of Mechanical & Industrial.
University of Toronto Mechanical & Industrial Engineering An Introduction to Constraint Programming Part II: Solving Scheduling Problems J. Christopher.
Constraint Systems Laboratory February 18, 2009 CSP Modeling Examples CSP: Examples Industrial applications: scheduling, resource allocation, product configuration,
ICS-271:Notes 5: 1 Lecture 5: Constraint Satisfaction Problems ICS 271 Fall 2008.
Lecture 6: Job Shop Scheduling Introduction
© J. Christopher Beck Lecture 7: Shifting Bottleneck.
© J. Christopher Beck Lecture 17: Tabu Search.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
Constraint Processing and Programming Introductory Exemple Javier Larrosa.
Lecture 10: Integer Programming & Branch-and-Bound
© J. Christopher Beck Lecture 12: Constraint Programming 2.
© J. Christopher Beck Lecture 15: CP Search.
Happy Spring Break!. Integrating Planning & Scheduling Subbarao Kambhampati Scheduling: The State of the Art.
Solving Problems with Constraints Karen E. Petrie.
An Approximation of Generalized Arc-Consistency for Temporal CSPs Lin Xu and Berthe Y. Choueiry Constraint Systems Laboratory Department of Computer Science.
CPSC 322, Lecture 12Slide 1 CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12 (Textbook Chpt ) January, 29, 2010.
Constraint Satisfaction Problems
1 Methodological Basics. Layout and DesignKapitel 1 / 2 (c) Prof. Richard F. Hartl 1.1 Complexity  We solve problems in production and logistics by using:
1 Consistency algorithms Chapter 3. Spring 2007 ICS 275A - Constraint Networks 2 Consistency methods Approximation of inference: Arc, path and i-consistecy.
© J. Christopher Beck Lecture 18: Timetabling with Workforce Capacity.
8-1 Problem-Solving Examples (Preemptive Case). 8-2 Outline Preemptive job-shop scheduling problem (P-JSSP) –Problem definition –Basic search procedure.
Ch 13 – Backtracking + Branch-and-Bound
Chapter 5 Outline Formal definition of CSP CSP Examples
© J. Christopher Beck Lecture 22: Local Search for Sports Scheduling.
Advanced Constraint Processing, Fall 2009 An Efficient Consistency Algorithm for the Temporal Constraint Satisfaction Problem Berthe Y. Choueiry & Lin.
1 Lecture 4 Maximal Flow Problems Set Covering Problems.
Lecture 8: Dispatch Rules
Constraint Programming for Supply Chain Management J. Christopher Beck Cork Constraint Computation Centre (4C) SCM Information Day, Nov.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Introduction to Job Shop Scheduling Problem Qianjun Xu Oct. 30, 2001.
© J. Christopher Beck Lecture 5: Project Planning 2.
© J. Christopher Beck Lecture 13: Modeling in Constraint Programming.
Computer Science CPSC 322 Lecture 13 Arc Consistency (4.5, 4.6 ) Slide 1.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Decision Diagrams for Sequencing and Scheduling Andre Augusto Cire Joint work with David Bergman, Willem-Jan van Hoeve, and John Hooker Tepper School of.
Constraint Satisfaction CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Artificial Intelligence CS482, CS682, MW 1 – 2:15, SEM 201, MS 227 Prerequisites: 302, 365 Instructor: Sushil Louis,
Wednesday, January 29, 2003CSCE Spring 2003 B.Y. Choueiry Directional Consistency Chapter 4.
Constraints and Search Toby Walsh Cork Constraint Computation Centre (4C) Logic & AR Summer School, 2002.
CONSTRAINT-BASED SCHEDULING AND PLANNING Speaker: Olufikayo Adetunji CSCE 921 4/08/2013Olufikayo Adetunji 1 Authors: Philippe Baptiste, Philippe Laborie,
© J. Christopher Beck Lecture 10: (Full) Shifting Bottleneck.
An Introduction to Artificial Intelligence Lecture 5: Constraint Satisfaction Problems Ramin Halavati In which we see how treating.
1 Inventory Control with Time-Varying Demand. 2  Week 1Introduction to Production Planning and Inventory Control  Week 2Inventory Control – Deterministic.
Arc Consistency CPSC 322 – CSP 3 Textbook § 4.5 February 2, 2011.
Put a different number in each circle (1 to 8) such that adjacent circles cannot take consecutive numbers.
CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
Arc Consistency and Domain Splitting in CSPs CPSC 322 – CSP 3 Textbook Poole and Mackworth: § 4.5 and 4.6 Lecturer: Alan Mackworth October 3, 2012.
Using Constructive Search in Resource Scheduling By Andrei Missine.
© J. Christopher Beck Lecture 16: Local Search.
Search Control.. Planning is really really hard –Theoretically, practically But people seem ok at it What to do…. –Abstraction –Find “easy” classes of.
Constraint Programming for the Diameter Constrained Minimum Spanning Tree Problem Thiago F. Noronha Celso C. Ribeiro Andréa C. Santos.
Constraint Satisfaction Problems/Programming ZUI 2012/2013.
Roman Barták (Charles University in Prague, Czech Republic) ACAT 2010.
ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information Systems.
Project Scheduling Lecture # 1.
Constraint Satisfaction Problems (CSPs)
Constraint Satisfaction Problems Lecture # 14, 15 & 16
Lecture 8: Dispatch Rules
Lecture 11: Tree Search © J. Christopher Beck 2008.
Branch and Bound.
Number partitioning.
Lecture 9: Tabu Search © J. Christopher Beck 2005.
Constraint Satisfaction
Directional consistency Chapter 4
We have the following incomplete B&B tree:
Consistency algorithms
Presentation transcript:

© J. Christopher Beck Lecture 11: Constraint Programming 1

© J. Christopher Beck Outline The Crystal Maze & CP Heuristics, propagation, B&B Propagation Temporal Propagation Constraint Based Analysis Heuristics Slack & Flexibility

© J. Christopher Beck Crystal Maze Place the numbers 1 through 8 in the nodes such that: Each number appears exactly once ? ? ? ? ? ? ?? –No connected nodes have consecutive numbers

© J. Christopher Beck Modeling Each node  a variable {1, …, 8}  values in the domain of each variable No consecutive numbers  a constraint (v i, v j )  |v i – v j | > 1 All values used  all-different constraint

© J. Christopher Beck Heuristic Search ? ? ? ? ? ? ?? 18 {1, 2, 3, 4, 5, 6, 7, 8}

© J. Christopher Beck Inference/Propagation ? ? ? ? ? ? ?? 18 {1, 2, 3, 4, 5, 6, 7, 8}

© J. Christopher Beck Inference/Propagation ? ? ? ? ? ? ?? 18 {3, 4, 5, 6} {3, 4, 5, 6, 7}{2, 3, 4, 5, 6}

© J. Christopher Beck Branch-and-Bound Inference is a form of bounding Branches are pruned when we know there is no solution below them May need to backtrack (if the heuristic decision has made a mistake) In an optimization context, once a solution is found you need to backtrack to search for a better one

© J. Christopher Beck With CP You Are … Guaranteed to find a solution if one exists If not you can prove there is no solution But you need to have enough time! On average, for many problems you can find a solution within a reasonable time CP is commercially successful for scheduling and other applications

© J. Christopher Beck The Core of CP Modeling How to represent the problem Heuristic search How to branch How much effort to find a good branch Inference/propagation How much effort Backtracking

© J. Christopher Beck Heuristic Search or Propagation? ? ? ? ? ? ? ?? 18 {1, 2, 3, 4, 5, 6, 7, 8} There must be a 1 or 8 here. Why?

© J. Christopher Beck Propagators for Scheduling 3 examples Temporal propagation (easy) Constraint-based analysis (medium) Edge-finding (tricky) – next lecture

© J. Christopher Beck Temporal Propagation (Arc Consistency - AC) [0[20[35[4540]60]75]85] [20[40[55[6540]60]75]85]20 The same as CPM!

© J. Christopher Beck Constraint-Based Analysis (CBA) Operations on the same unary capacity resource What can you infer here?

© J. Christopher Beck CBA Rules For all pairs of activities, A i and A j : Case 1: If lft i – est j < p i + p j  lft j – est i then A i must be before A j. Case 2: If p i + p j > lft j – est i and p i + p j > lft i – est j then dead-end. Case 3: If p i + p j  lft j – est i and p i + p j  lft i – est j then either OK. On the same unary-capacity resource

© J. Christopher Beck CBA Find all CBA inferences A A A 2 5 A