1 / 21

Global Constraints and Constraint Programming

Global Constraints and Constraint Programming. Michael Maher Loyola University Chicago. Constraint Personalities. There are two kinds of constraints:. Type A aggressive, time-sensitive Type B relaxed, deliberate. Type A Constraints.

Download Presentation

Global Constraints and Constraint Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Global Constraints and Constraint Programming Michael Maher Loyola University Chicago

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

  3. 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).

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

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

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

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

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

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

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

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

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

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

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

  15. Improve on AC • Stronger consistency conditions

  16. Improve on AC • Stronger consistency conditions • Weaker consistency conditions

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

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

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

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

More Related