Download presentation

Presentation is loading. Please wait.

Published byMoris Stephens Modified about 1 year ago

1
© J. Christopher Beck Lecture 12: Constraint Programming 2

2
© J. Christopher Beck Outline Quick CP Review More propagation Edge Finding The Overall CP Loop

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

4
© J. Christopher Beck Generic CP Algorithm Assert Commitment Propagators Start Success Solution? Make Heuristic Decision Backtrack Technique Failure Nothing to retract? Dead-end?

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

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

7
© J. Christopher Beck This Lecture Another propagator Edge Finding Exclusion “Big Picture CP” Solve the cut out example

8
© J. Christopher Beck Edge-Finding Exclusion S est(S) lft(S) 25

9
© J. Christopher Beck Edge-Finding Exclusion Sest(S)lft(S)

10
© J. Christopher Beck Exclusion Rules For all non-empty subsets, S, and activities A S: (lft(S) - est(S) < dur A + dur(S)) (lft(S) - est A < dur A + dur(S)) est A est(S) + dur(S) (lft(S) - est(S) < dur A + dur(S)) (lft A - est(S) < dur A + dur(S)) lft A lft(S) - dur(S) On the same, unary capacity resource

11
© J. Christopher Beck Edge Finding Exclusion Run CBA & Edge Finding Exclusion on the following activities A A A

12
© J. Christopher Beck Propagators Summary Analyze the current state in order to find new constraints that are implied Make commitments (e.g., remove values) that would otherwise have to be searched over Never make a mistake!

13
© J. Christopher Beck Heuristics/Branching Use the structure of the search state (e.g., flexibility) to guide the heuristic decisions (“commitment”) Could be mistaken – and so you might need to backtrack

14
© J. Christopher Beck Generic CP Algorithm Assert Commitment Propagators Start Success Solution? Make Heuristic Decision Backtrack Technique Failure Nothing to retract? Dead-end?

15
© J. Christopher Beck CP on Cut Out Problem Run CP on the cut out problem Use CBA, EF Exclusion Flexibility Heuristic Activities Jobs1234 1M1, 9M2, 8M3, 4M4, 4 2M1, 5M2, 6M4, 3M3, 6 3M3, 10M1, 4M2, 9M4, 2

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google