Chapter B: Lessons Learned Helmut Simonis Cork Constraint - - PowerPoint PPT Presentation

chapter b lessons learned
SMART_READER_LITE
LIVE PREVIEW

Chapter B: Lessons Learned Helmut Simonis Cork Constraint - - PowerPoint PPT Presentation

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization Chapter B: Lessons Learned Helmut Simonis Cork Constraint Computation Centre Computer Science Department University


slide-1
SLIDE 1

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Chapter B: Lessons Learned

Helmut Simonis

Cork Constraint Computation Centre Computer Science Department University College Cork Ireland

ECLiPSe ELearning

Overview Helmut Simonis Lessons Learned 1

slide-2
SLIDE 2

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Licence

This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. To view a copy of this license, visit http: //creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.

Helmut Simonis Lessons Learned 2

slide-3
SLIDE 3

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 3

slide-4
SLIDE 4

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Main Message

New ELearning course for ECLiPSe Modelling and programming with constraints Based on sample problems solved and explained in detail A view on core constraint programming skills Strong dependence on visualization to explain behavior

Helmut Simonis Lessons Learned 4

slide-5
SLIDE 5

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Interesting Things to Come

Which global constraints a system should contain How to interpret search trees The open challenge of debugging global constraints

Helmut Simonis Lessons Learned 5

slide-6
SLIDE 6

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 6

slide-7
SLIDE 7

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Background

Gift grant from Cisco Systems/Silicon Valley Community Foundation Cisco owns open-sourced ECLiPSe system How to expand user-base? Self-taught course in constraint programming Intended for Cisco engineers/programmers Open source/available to community

Helmut Simonis Lessons Learned 7

slide-8
SLIDE 8

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Format

Video lectures Slides Handout Exercises

Helmut Simonis Lessons Learned 8

slide-9
SLIDE 9

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Examples

Website

http://4c.ucc.ie/~hsimonis/ELearning/index.htm

Slides ../introduction/slides.pdf Handout ../introduction/handout.pdf Video ../wavedemo/DEMO/web/web.html

Helmut Simonis Lessons Learned 9

slide-10
SLIDE 10

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 10

slide-11
SLIDE 11

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Central Topics

Basic structure of constraint programs Global constraints User-defined search Optimization Symmetry breaking Choosing the right model Limits of propagation

Helmut Simonis Lessons Learned 11

slide-12
SLIDE 12

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Explaining Concepts

Explain as you go Constraints introduced when used by application Concepts/algorithms explained by example

Helmut Simonis Lessons Learned 12

slide-13
SLIDE 13

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Example: Domain consistent alldifferent

:-lib(ic). :-lib(ic_global_gac). top:- [X,Y] :: 1..2, Z :: 2..5, [T,U] :: 3..5, V :: [2,4,6,7], ic_global_gac:alldifferent([X,Y,Z,T,U,V]).

Helmut Simonis Lessons Learned 13

slide-14
SLIDE 14

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Problem shown as bipartite graph X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 14

slide-15
SLIDE 15

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Find maximal matching (in blue) X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 15

slide-16
SLIDE 16

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Orient graph (edges in matching from variables to values, all others from values to variables), mark edges in matching X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 16

slide-17
SLIDE 17

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Find strongly connected components (green and brown), mark their edges X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 17

slide-18
SLIDE 18

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Find unmatched value nodes (here node 7, magenta) X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 18

slide-19
SLIDE 19

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Find alternating paths from such nodes (in magenta), mark their edges X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 19

slide-20
SLIDE 20

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

All unmarked edges can be removed X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 20

slide-21
SLIDE 21

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Making constraint domain consistent

Resulting graph, constraint is domain consistent X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 21

slide-22
SLIDE 22

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Extended Example

:-lib(ic). :-lib(ic_global_gac). top:- X :: 1..2, Y :: [1,2,7], Z :: 2..5, [T,U] :: 3..5, V :: [2,4,6,7], ic_global_gac:alldifferent([X,Y,Z,T,U,V]).

Helmut Simonis Lessons Learned 22

slide-23
SLIDE 23

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Problem shown as bipartite graph X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 23

slide-24
SLIDE 24

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Find maximal matching (in blue) X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 24

slide-25
SLIDE 25

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Orient graph (edges in matching from variables to values, all others from values to variables), mark edges in matching X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 25

slide-26
SLIDE 26

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Find strongly connected components (green and brown), mark their edges X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 26

slide-27
SLIDE 27

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Find unmatched value nodes (here node 7, magenta) X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 27

slide-28
SLIDE 28

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Find alternating paths from such nodes (in magenta), mark their edges X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 28

slide-29
SLIDE 29

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Continue with alternating paths X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 29

slide-30
SLIDE 30

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No propagation in expanded example

Continue with alternating paths, all edges marked, no propagation, constraint is domain consistent X Y Z T U V 1 2 3 4 5 6 7

Helmut Simonis Lessons Learned 30

slide-31
SLIDE 31

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

No Theoretical Background

Target audience

Engineers Application programmers

Not a course in theoretical computer science Different from current textbooks on CP

Helmut Simonis Lessons Learned 31

slide-32
SLIDE 32

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 32

slide-33
SLIDE 33

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

This was easy ten years ago:

Based on industrial experience

Assignment problems Scheduling Transportation Personal planning

Helmut Simonis Lessons Learned 33

slide-34
SLIDE 34

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

In the meantime

Dramatic improvements for competitors

MILP SAT

Improvements in hardware performance

Helmut Simonis Lessons Learned 34

slide-35
SLIDE 35

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

New Areas

Configuration

In search of a nice example

Placement

Not in ECLiPSe

Networks

In form of MIP/FD hybrids

Helmut Simonis Lessons Learned 35

slide-36
SLIDE 36

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Problems Handled in Course

Must have puzzles! Send+More=Money Sudoku N-queens Shikaku (see Wednesday’s talk)

Helmut Simonis Lessons Learned 36

slide-37
SLIDE 37

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Practical Example Problems

Test plan generation (BIBD) Progressive party problem Routing and wavelength assignment Optical network design Car sequencing Costas arrays Sports scheduling Still to come

Production scheduling Nurse rostering Airport stand allocation

Helmut Simonis Lessons Learned 37

slide-38
SLIDE 38

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Intention

Realistic, life like problems Must address scalability issues Often, problem not completely specified Issue: Hard to verify by hand Complexity still limited, not real problems No attempt at integration

Helmut Simonis Lessons Learned 38

slide-39
SLIDE 39

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

What is CP good for: A Problematic View

CP works if it out-performs everything else See which technique produces best (optimal) solutions Which technique runs fastest A publication game (I like to play too!)

Somebody defines the problem Minute detail, no choices left Counting runtime, choices, backtracks Tiny improvements count

Helmut Simonis Lessons Learned 39

slide-40
SLIDE 40

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

From RWA Chapter

Complete Decomposition Network Dem. MIP MIP-MIP MIP-FD MIP-SAT Opt Avg Opt Avg Opt Avg Opt Avg brezil 100 100 277.14 100 0.91 100 0.01 100 0.03 brezil 200

  • 100

4.45 100 0.03 100 0.07 brezil 300

  • 100

8.08 99 0.07 100 0.15 brezil 400

  • 100

10.93 100 0.13 100 0.27 brezil 500

  • 100

13.09 100 0.23 100 0.44 brezil 600

  • 100

16.77 100 0.31 100 0.69 eon 100 100 33.62 100 1.51 100 0.01 100 0.04 eon 200 100 65.51 100 5.27 100 0.04 100 0.10 eon 300 100 121.27 100 5.60 100 0.09 100 0.24 eon 400 100 116.64 100 7.38 100 0.16 100 0.45 eon 500 100 162.55 100 9.58 100 0.29 100 0.76 eon 600 100 232.91 99 14.04 100 0.40 100 1.20 mci 100 100 20.27 100 2.08 100 0.01 100 0.05 mci 200 100 38.79 100 5.36 100 0.05 100 0.12 mci 300 100 55.78 100 5.83 100 0.10 100 0.29 mci 400 100 109.85 100 8.71 100 0.19 100 0.56 mci 500 100 129.90 100 13.89 100 0.29 100 0.97 mci 600 100 257.70 100 22.56 100 0.45 100 1.55 nsf 100 100 8.17 100 2.38 100 0.02 100 0.05 nsf 200 100 12.75 100 1.81 100 0.05 100 0.15 nsf 300 100 17.01 100 1.98 100 0.10 100 0.35 nsf 400 100 27.36 100 3.54 100 0.17 100 0.71 nsf 500 100 54.60 100 5.77 100 0.31 100 1.26 nsf 600 100 88.72 100 9.09 100 0.43 100 2.07 Helmut Simonis Lessons Learned 40

slide-41
SLIDE 41

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Question

Is MIP-FD decomposition really better than MIP-SAT? Both are good enough Both are clearly better than complete MIP This is only one possible problem variant

For other variant difference is much more significant

Helmut Simonis Lessons Learned 41

slide-42
SLIDE 42

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

A More Meaningful Evaluation

When is a solution good enough? How long does it take to get there?

Total development time, not runtime For whom: beginner, expert, genius?

What happens if you change the problem? Can you explain what is happening? How easy it is to integrate into workflow?

Helmut Simonis Lessons Learned 42

slide-43
SLIDE 43

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Problem: How do we measure/report this?

Usability labs? Instrument IDE? Cost of parallel development Commercial sensitivities Can this be published?

Helmut Simonis Lessons Learned 43

slide-44
SLIDE 44

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 44

slide-45
SLIDE 45

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Global Constraint Catalog (A-C)

all differ from at least k pos all equal all min dist alldifferent alldifferent between sets alldifferent consecutive values alldifferent cst alldifferent except 0 alldifferent interval alldifferent modulo alldifferent on intersection alldifferent partition alldifferent same value allperm among among diff 0 among interval among low up among modulo among seq among var and arith arith or arith sliding assign and counts assign and nvalues atleast atleast nvalue atleast nvector atmost atmost1 atmost nvalue atmost nvector balance balance interval balance modulo balance partition between min max bin packing bin packing capa binary tree bipartite calendar cardinality atleast cardinality atmost cardinality atmost partition change change continuity change pair change partition circuit circuit cluster circular change clause and clause or clique colored matrix coloured cumulative coloured cumulatives common common interval common modulo common partition cond lex cost cond lex greater cond lex greatereq cond lex less cond lex lesseq Helmut Simonis Lessons Learned 45

slide-46
SLIDE 46

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Core Global Constraints

element alldifferent gcc lex-ordering bin packing sequence cumulative regular diffn/disjoint/geost Not sure about: min weight alldifferent gcc with cost cycle nvalue

Helmut Simonis Lessons Learned 46

slide-47
SLIDE 47

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Sources

Good survey papers and PhD thesis

  • W. van Hoeve: alldifferent
  • C. Quimper: alldifferent, gcc
  • Z. Kiziltan: lex ordering

Clear descriptions of specific constraints

P . Shaw: bin packing

  • G. Pesant: regular

Helmut Simonis Lessons Learned 47

slide-48
SLIDE 48

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Families of Constraints

Matching/flow based global constraints

Build graph Find matching/flow Reorient links Find SCC (BFS reachable) Remove unmarked edges

Helmut Simonis Lessons Learned 48

slide-49
SLIDE 49

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Examples

alldifferent gcc alldifferent matrix gcc matrix same sequence

Helmut Simonis Lessons Learned 49

slide-50
SLIDE 50

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Some Constraints Still Opaque

cumulative cycle geost

Helmut Simonis Lessons Learned 50

slide-51
SLIDE 51

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Which Variant to Implement

gcc

Low/high limits or variables for counters Open/closed version

cumulative

Capacity limit or variable End limit Task surface

Helmut Simonis Lessons Learned 51

slide-52
SLIDE 52

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Use in Course

Constraint Sudoku N-queens RWA BIBD Party Sports Car Skikaku Network Design Costas Scheduling Airport Nurse element x x x x alldifferent x x x x x x x gcc x x x x x lex x x x x sequence x x bin packing x cumulative x x somedifferent x x x

Helmut Simonis Lessons Learned 52

slide-53
SLIDE 53

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Open Challenge

How do we implement/test global constraints? No publication, ever No methodology

Helmut Simonis Lessons Learned 53

slide-54
SLIDE 54

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Techniques Used

Profiling Line coverage Generic GAC

Helmut Simonis Lessons Learned 54

slide-55
SLIDE 55

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Profiling

Helmut Simonis Lessons Learned 55

slide-56
SLIDE 56

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Generic GAC: alldifferent_sum

alldifferent_sum(L,N):- (ic:alldifferent(L), sum(L) #= N, labeling(L)) infers ac. Propia library (Le Provost, Wallace)

Helmut Simonis Lessons Learned 56

slide-57
SLIDE 57

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Worst Case Scenario: Progressive Party Problem

Progressive Party Problem Adding stronger global constraint, bin packing (P . Shaw) Found different solution

Variable selection changed by improved propagation? Consistent value removed by bug in constraint?

Helmut Simonis Lessons Learned 57

slide-58
SLIDE 58

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Outline

1

Overview of Course

2

What do you need to know about CP?

3

What is CP good for?

4

A Core Set of Global Constraints

5

Visualization

Helmut Simonis Lessons Learned 58

slide-59
SLIDE 59

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

How do we understand behavior?

Mental model Formal analysis Debugging Tracing Life visualization Post-mortem analysis

Helmut Simonis Lessons Learned 59

slide-60
SLIDE 60

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Design Choices

No deep integration with solver Post-mortem visualization Intermediate file format No view of detailed propagation

Tool not intended for debugging constraint engine

Helmut Simonis Lessons Learned 60

slide-61
SLIDE 61

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Conceptual Model

Stable state at defined program points Granularity

Assign value Post constraint

Show stable state after propagation Do not show individual propagation steps

Helmut Simonis Lessons Learned 61

slide-62
SLIDE 62

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Visualizers

Search tree Variables Constraints

Helmut Simonis Lessons Learned 62

slide-63
SLIDE 63

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Visualization Tool

Developed in Java Show two panes: tree and state Navigate along timeline

Helmut Simonis Lessons Learned 63

slide-64
SLIDE 64

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Visualization Tool: Car Sequencing

Helmut Simonis Lessons Learned 64

slide-65
SLIDE 65

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

How many visualizers do we need?

Develop few primitives

Cell based view Domain vector

Allow aggregation

Vector/matrix General layout

Which global constraints require more?

Task based view for cumulative Matching/flow based representation does not scale

Helmut Simonis Lessons Learned 65

slide-66
SLIDE 66

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

How to Interpret Visualization

Search tree

Good/bad choices Place of backtracking

State

Missing propagation

Helmut Simonis Lessons Learned 66

slide-67
SLIDE 67

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Costas Array Search tree (Size 16)

Deep backtracking Third choice wrong Last choice wrong Value selection strategy useless

1 2 3

114611 335881

4

124619 361038

5

4

4950 14515

3

7156 21155

4

5581 16169

5 7

6966 19916

8

9250 26568

9 10

5

627 1897

3

801 2442

4

6

47 150

3

45 127

4

61 176

7

66 200

8 9 10

66 200

12

9

24 77

3

20 60

4

20 58

7

4 15

8 9

17 46

10

11 34

12

28 98

14

7

6 14

3 4 7

10

12

12

3 7 9 14 8 15 13 5 11 6 2 1

Helmut Simonis Lessons Learned 67

slide-68
SLIDE 68

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Costas Array Search tree (Size 16)

Deep backtracking Third choice wrong Last choice wrong Value selection strategy useless

1 2 3

114611 335881

4

124619 361038

5

4

4950 14515

3

7156 21155

4

5581 16169

5 7

6966 19916

8

9250 26568

9 10

5

627 1897

3

801 2442

4

6

47 150

3

45 127

4

61 176

7

66 200

8 9 10

66 200

12

9

24 77

3

20 60

4

20 58

7

4 15

8 9

17 46

10

11 34

12

28 98

14

7

6 14

3 4 7

10

12

12

3 7 9 14 8 15 13 5 11 6 2 1

Helmut Simonis Lessons Learned 68

slide-69
SLIDE 69

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Costas Array Search tree (Size 16)

Deep backtracking Third choice wrong Last choice wrong Value selection strategy useless

1 2 3

114611 335881

4

124619 361038

5

4

4950 14515

3

7156 21155

4

5581 16169

5 7

6966 19916

8

9250 26568

9 10

5

627 1897

3

801 2442

4

6

47 150

3

45 127

4

61 176

7

66 200

8 9 10

66 200

12

9

24 77

3

20 60

4

20 58

7

4 15

8 9

17 46

10

11 34

12

28 98

14

7

6 14

3 4 7

10

12

12

3 7 9 14 8 15 13 5 11 6 2 1

Helmut Simonis Lessons Learned 69

slide-70
SLIDE 70

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Costas Array Search tree (Size 16)

Deep backtracking Third choice wrong Last choice wrong Value selection strategy useless

1 2 3

114611 335881

4

124619 361038

5

4

4950 14515

3

7156 21155

4

5581 16169

5 7

6966 19916

8

9250 26568

9 10

5

627 1897

3

801 2442

4

6

47 150

3

45 127

4

61 176

7

66 200

8 9 10

66 200

12

9

24 77

3

20 60

4

20 58

7

4 15

8 9

17 46

10

11 34

12

28 98

14

7

6 14

3 4 7

10

12

12

3 7 9 14 8 15 13 5 11 6 2 1

Helmut Simonis Lessons Learned 70

slide-71
SLIDE 71

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Missing Propagation

The model is doing this

Helmut Simonis Lessons Learned 71

slide-72
SLIDE 72

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Missing Propagation

It could be doing that!

Helmut Simonis Lessons Learned 72

slide-73
SLIDE 73

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Comparison (Search Tree, size 16)

Initial Model Improved Model

1 2 3

114611 335881

4

124619 361038

5

4

4950 14515

3

7156 21155

4

5581 16169

5 7

6966 19916

8

9250 26568

9 10

5

627 1897

3

801 2442

4

6

47 150

3

45 127

4

61 176

7

66 200

8 9 10

66 200

12

9

24 77

3

20 60

4

20 58

7

4 15

8 9

17 46

10

11 34

12

28 98

14

7

6 14

3 4 7

10

12

12

3 7 9 14 8 15 13 5 11 6 2 1

1 2 3

55029 106926

4

61250 119643

5

4

2729 5186

3

3284 6345

4

2980 5726

5

3668 7056

8

4011 7927

9

5

351 667

3

373 727

4

6

30 55

3

23 37

4

24 43

7

43 82

8

35 66

12

7

8 15

3

8 9

1 2

3

3 4

14

10

12 14 15 4 8 13 5 11 6 2 1

Helmut Simonis Lessons Learned 73

slide-74
SLIDE 74

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Progressive Party Problem, 9 Time Periods

root 2804 4251
  • 1686
2929
  • 1
2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 6 9 16 17 18 19 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 3 55 3 56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 3 2 1 84 85 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 1 2 11 108 111 117 118 119 120 121 122 123 124 125 126 127 128 129 130 7 132 133 134 5 9 10 8 9 6 7 11 13 135 6 136 6 137 138 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 11 167 12 175 176 177 178 179 180 277 387 10 210 298 5 181 182 183 184 185 2 4 13 186 8 10 12 187 190 191 193 194 204 205 206 207 208 209 210 211 212 213 29 60 11 214 215 216 217 2 7 13 6 13 1 219 1 2 8 220 4 1 3 13 6 221 6 9 8 222 6 9 224 5 233 2 3 4 234 235 34 64 6 236 237 238 19 25 11 239 240 241 242 2 3 8 244 12 248 8 249 12 11 250 9 10 4 12 8 13 11 10 6 3 1 5 7 4 2 9 8 13 2 11 11 7 7 4 6 8 3 12 5 9 2 3 10 1 8 11 5 13 10 5 2 9 9 11 4 1 3 8 1 7 6 11 3 12 4 2 10 1 9 10 1 6 5 5 13 6 7 7 8 9 4 2 3 13 13 7 5 5 3 7 4 3 1 8 2 10 8 2 12 6 4 11 1 9 12 12 4 10 4 7 2 11 9 4 3 3 1 6 2 13 6 7 10 9 5 8 2 3 6 8 1 8 10 3 1 1 9 4 6 2 13 12 7 2 7 3 8 4 11 10 9 5 7 3 4 4 4 6 7 2 2 2 11 8 6 6 5 13 2 1 12 7 9 11 9 5 1 8 3 10 6 8 5 6 13 9 8 1 13 3 9 3 10 8 12 4 6 4 1 1 9 2 2 3 5 11 7
  • Helmut Simonis

Lessons Learned 74

slide-75
SLIDE 75

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

2 Restarts Before Solution Found

root

2804 4251

  • 1686

2929

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15

3 6 9

16 17 18 19 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

3

55

3

56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83

3 2 1

84 85 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107

1 2

11

108 111 117 118 119 120 121 122 123 124 125 126 127 128 129 130

7

132 133 134

5 9

10

8 9

6

7 11

13

135

6

136

6

137 138 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

11

167

12

175 176 177 178 179 180

277 387

10

210 298

5

181 182 183 184 185

2 4

13

186

8 10

12

187 190 191 193 194 204 205 206 207 208 209 210 211 212 213

29 60

11

214 215 216 217

2 7

13

6 13

1

219

1 2

8

220

4

1 3

13 6

221

6 9 8

222

6 9

224

5

233

2 3

4

234 235

34 64

6

236 237 238

19 25

11

239 240 241 242

2 3

8

244

12

248

8

249

12 11

250

9 10 4 12 8 13 11 10 6 3 1 5 7 4 2 9 8 13 2 11 11 7 7 4 6 8 3 12 5 9 2 3 10 1 8 11 5 13 10 5 2 9 9 11 4 1 3 8 1 7 6 11 3 12 4 2 10 1 9 10 1 6 5 5 13 6 7 7 8 9 4 2 3 13 13 7 5 5 3 7 4 3 1 8 2 10 8 2 12 6 4 11 1 9 12 12 4 10 4 7 2 11 9 4 3 3 1 6 2 13 6 7 10 9 5 8 2 3 6 8 1 8 10 3 1 1 9 4 6 2 13 12 7 2 7 3 8 4 11 10 9 5 7 3 4 4 4 6 7 2 2 2 11 8 6 6 5 13 2 1 12 7 9 11 9 5 1 8 3 10 6 8 5 6 13 9 8 1 13 3 9 3 10 8 12 4 6 4 1 1 9 2 2 3 5 11 7

  • Helmut Simonis

Lessons Learned 75

slide-76
SLIDE 76

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Value Choice Strategy Not Focused

root

2804 4251

  • 1686

2929

  • 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15

3 6 9

16 17 18 19 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

3

55

3

56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83

3 2 1

84 85 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107

1 2

11

108 111 117 118 119 120 121 122 123 124 125 126 127 128 129 130

7

132 133 134

5 9

10

8 9

6

7 11

13

135

6

136

6

137 138 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

11

167

12

175 176 177 178 179 180

277 387

10

210 298

5

181 182 183 184 185

2 4

13

186

8 10

12

187 190 191 193 194 204 205 206 207 208 209 210 211 212 213

29 60

11

214 215 216 217

2 7

13

6 13

1

219

1 2

8

220

4

1 3

13 6

221

6 9 8

222

6 9

224

5

233

2 3

4

234 235

34 64

6

236 237 238

19 25

11

239 240 241 242

2 3

8

244

12

248

8

249

12 11

250

9 10 4 12 8 13 11 10 6 3 1 5 7 4 2 9 8 13 2 11 11 7 7 4 6 8 3 12 5 9 2 3 10 1 8 11 5 13 10 5 2 9 9 11 4 1 3 8 1 7 6 11 3 12 4 2 10 1 9 10 1 6 5 5 13 6 7 7 8 9 4 2 3 13 13 7 5 5 3 7 4 3 1 8 2 10 8 2 12 6 4 11 1 9 12 12 4 10 4 7 2 11 9 4 3 3 1 6 2 13 6 7 10 9 5 8 2 3 6 8 1 8 10 3 1 1 9 4 6 2 13 12 7 2 7 3 8 4 11 10 9 5 7 3 4 4 4 6 7 2 2 2 11 8 6 6 5 13 2 1 12 7 9 11 9 5 1 8 3 10 6 8 5 6 13 9 8 1 13 3 9 3 10 8 12 4 6 4 1 1 9 2 2 3 5 11 7

  • Helmut Simonis

Lessons Learned 76

slide-77
SLIDE 77

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

Progressive Party

Clearly impossible to explore search space Either many solutions or good value selection Value selection at end rather poor Probably many solutions

Helmut Simonis Lessons Learned 77

slide-78
SLIDE 78

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

From Shikaku Presentation (Wednesday)

6

36

2

35

6

34

2

33

4

32

4

31

4

30

6

29

6

28

6

27

4

26

3

25

4

24

6

23

9

22

3

21

4

20

6

19

4

18

8

17

3

16

8

15

4

14

4

13

2

12

4

11

4

10

6

9

4

8

6

7

9

6

6

5

4

4

6

3

9

2

4

1 2 2 2 3 3 3 3 3 3 4 10 2 2 2 5 5 6 6 6 11 7 8 9 10 2 2 2 5 5 6 6 6 11 12 8 13 14 5 5 6 6 6 15 8 16 17 18 18 18 18 15 29 16 19 20 21 22 23 24 25 26 27 28 29 30 31 31 32 27 33 30 34 34 35 36

9 1 13 9 1 10 1 15 7 4 7 4 7 4 8 4 9 1 9 1 13 10 9 15 11 7 12 7 4 8 4 9 1 13 10 9 15 11 7 27 15 12 7 12 8 4 29 13 9 1 16 13 9 14 13 10 14 13 14 13 15 11 27 15 7 24 15 12 21 15 4 29 16 22 16 13 22 16 13 10 22 17 26 22 17 14 22 17 14 15 11 27 15 7 24 15 21 15 36 8 25 22 13 30 22 19 10 22 19 17 26 22 19 17 22 19 17 14 19 17 20 19 23 20 23 20 15 11 27 23 20 15 272421 15 7 24 21 36 21 29 22 29 22 16 25 22 13 30 22 26 22 262322 191714 23 22 19 17 31 23 22 19 23 22 20 19 32 23 22 20 27 24 23 15 27 24 23 15 272423 15 7 28 24 21 36 28 24 29 25 29 25 30 26 25 30 26 25 26 17 31 26 19 17 31 26 19 323127 2319 32 27 23 32 27 23 27 23 27 23 15 28 27 24 36 28 33 30 29 30 25 30 26 31 30 26 31 30 26 32 31 35 32 23 32 27 23 32 27 15 36 28 27 24 36 28 36 28 33 29 33 30 25 34 30 34 26 34 31 34 31 35 34 32 36 35 36 27 15 36 27 36 28 27 24 36 28

Helmut Simonis Lessons Learned 78

slide-79
SLIDE 79

Overview of Course What do you need to know about CP? What is CP good for? A Core Set of Global Constraints Visualization

What is still missing?

Explanation of failures

Procedural: Show propagation which leads to failure Declarative: Find conflict set

Comparison of trees

Helmut Simonis Lessons Learned 79

slide-80
SLIDE 80

Some Technical Details Conclusions

Outline

6

Some Technical Details

7

Conclusions

Helmut Simonis Lessons Learned 80

slide-81
SLIDE 81

Some Technical Details Conclusions

How was this generated?

Slides produced with LaTeX beamer class Templates for chapters Visualization imported as pdf files Using inkscape as SVG to PDF converter Allows to produce multiple versions from one source

slides handout article

Helmut Simonis Lessons Learned 81

slide-82
SLIDE 82

Some Technical Details Conclusions

Videos

Recorded and produced with Camtasia Studio Long takes, minimal editing Screen capture at full resolution Produce video in different target formats

Web based (640x480) iPhone (480x320) HD video possible

Helmut Simonis Lessons Learned 82

slide-83
SLIDE 83

Some Technical Details Conclusions

Metrics without Program Development

Slides: 2-4 days per chapter Video: 1:10 ratio for finished product

2-3 trials No fine grain editing Only for bulk production

Helmut Simonis Lessons Learned 83

slide-84
SLIDE 84

Some Technical Details Conclusions

Outline

6

Some Technical Details

7

Conclusions

Helmut Simonis Lessons Learned 84

slide-85
SLIDE 85

Some Technical Details Conclusions

Conclusions

New ELearning course for ECLiPSe Open source material, Creative Commons BY-NC-SA license

Application driven Modelling with global constraints Customizing search

Effort only justifiable through Cisco grant

Helmut Simonis Lessons Learned 85

slide-86
SLIDE 86

Some Technical Details Conclusions

Conclusions

If you are not using visualization, why not? Generic tools, not just for ECLiPSe

Helmut Simonis Lessons Learned 86