Scheduling and SAT Emmanuel Hebrard Toulouse Outline Introduction - - PowerPoint PPT Presentation

scheduling and sat
SMART_READER_LITE
LIVE PREVIEW

Scheduling and SAT Emmanuel Hebrard Toulouse Outline Introduction - - PowerPoint PPT Presentation

Scheduling and SAT Emmanuel Hebrard Toulouse Outline Introduction 1 Scheduling and SAT Encoding 2 Scheduling and SAT Heuristics 3 Scheduling and SAT Hybrids 4 Conclusion 5 2 / 53 Outline Introduction 1 Preamble Scheduling


slide-1
SLIDE 1

Scheduling and SAT

Emmanuel Hebrard Toulouse

slide-2
SLIDE 2

Outline

1

Introduction

2

Scheduling and SAT Encoding

3

Scheduling and SAT Heuristics

4

Scheduling and SAT Hybrids

5

Conclusion

2 / 53

slide-3
SLIDE 3

Outline

1

Introduction Preamble Scheduling Background SAT Background

2

Scheduling and SAT Encoding

3

Scheduling and SAT Heuristics

4

Scheduling and SAT Hybrids

5

Conclusion

3 / 53

slide-4
SLIDE 4

Scheduling with Boolean Satisfiability

4 / 53

slide-5
SLIDE 5

Scheduling with Boolean Satisfiability Number of hits for the Google query ”Scheduling problem” with ...

4 / 53

slide-6
SLIDE 6

Scheduling with Boolean Satisfiability Number of hits for the Google query ”Scheduling problem” with ... 130,000

”Mixed Integer Programming” ”Constraint Programming” ”Boolean Satisfiability” OR ”Integer Linear Programming”

4 / 53

slide-7
SLIDE 7

Scheduling with Boolean Satisfiability Number of hits for the Google query ”Scheduling problem” with ... 130,000 60,000

”Mixed Integer Programming” ”Constraint Programming” ”Boolean Satisfiability” OR ”Integer Linear Programming”

4 / 53

slide-8
SLIDE 8

Scheduling with Boolean Satisfiability Number of hits for the Google query ”Scheduling problem” with ... 130,000 60,000 21,000

”Mixed Integer Programming” ”Constraint Programming” ”Boolean Satisfiability” OR ”Integer Linear Programming”

4 / 53

slide-9
SLIDE 9

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ...

5 / 53

slide-10
SLIDE 10

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP

5 / 53

slide-11
SLIDE 11

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

5 / 53

slide-12
SLIDE 12

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

◮ Apparent issue, the numerical aspect can often be avoided 5 / 53

slide-13
SLIDE 13

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

◮ Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been good

5 / 53

slide-14
SLIDE 14

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

◮ Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been good

◮ They have made huge progress in the past 10 years 5 / 53

slide-15
SLIDE 15

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

◮ Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been good

◮ They have made huge progress in the past 10 years

All the approaches discussed here were developed in the last 5 years

5 / 53

slide-16
SLIDE 16

Scheduling with Boolean Satisfiability Important theoretical results

◮ [Cook-Levin] theorem: “First” NP-complete problem ◮ [Schaefer]’s dichotomy theorem

Efficient algorithms (CDCL) Successful in Circuit design, Model checking, Planning, ... Association of scheduling and SAT not as natural as MIP or CP Somewhat counter-intuitive (Boolean vs. Range, logical operator)

◮ Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been good

◮ They have made huge progress in the past 10 years

All the approaches discussed here were developed in the last 5 years Recent progress in SAT algorithms opens new research opportunities

5 / 53

slide-17
SLIDE 17

Scheduling Problems Terminology Tasks (preemptive, non-preemptive) Resources (disjunctive, cumulative, reservoir,...) Objectives (makespan, tardiness, flow time,...) Side constraints (precedence, time windows, time lags,...)

6 / 53

slide-18
SLIDE 18

Scheduling Problems Terminology Tasks (preemptive, non-preemptive) Resources (disjunctive, cumulative, reservoir,...) Objectives (makespan, tardiness, flow time,...) Side constraints (precedence, time windows, time lags,...) Tip of the iceberg SAT-based methods have been applied to a very small subset scheduling problems.

◮ Minimization of makespan for non-preemptive tasks and disjunctive

resources

6 / 53

slide-19
SLIDE 19

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 Problem description A set of non-preemptive tasks

slide-20
SLIDE 20

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Problem description A set of non-preemptive tasks Organized in jobs (sequences)

slide-21
SLIDE 21

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Problem description A set of non-preemptive tasks Organized in jobs (sequences) Requiring one of m disjunctive resources

slide-22
SLIDE 22

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Problem description A set of non-preemptive tasks Organized in jobs (sequences) Requiring one of m disjunctive resources

slide-23
SLIDE 23

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Problem description A set of non-preemptive tasks Organized in jobs (sequences) Requiring one of m disjunctive resources

slide-24
SLIDE 24

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Problem description A set of non-preemptive tasks Organized in jobs (sequences) Requiring one of m disjunctive resources

slide-25
SLIDE 25

Jobshop Scheduling Problem t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Cmax

20 50 25 50

Problem description A set of non-preemptive tasks Organized in jobs (sequences) Requiring one of m disjunctive resources Objective: minimize the total duration (Cmax)

7 / 53

slide-26
SLIDE 26

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF)

8 / 53

slide-27
SLIDE 27

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a

8 / 53

slide-28
SLIDE 28

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g)

8 / 53

slide-29
SLIDE 29

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g) Algorithms

8 / 53

slide-30
SLIDE 30

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g) Algorithms Stochastic local search (GSAT, WalkSat,...)

8 / 53

slide-31
SLIDE 31

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g) Algorithms Stochastic local search (GSAT, WalkSat,...) Survey propagation

8 / 53

slide-32
SLIDE 32

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g) Algorithms Stochastic local search (GSAT, WalkSat,...) Survey propagation DPLL: Tree search + Unit propagation

8 / 53

slide-33
SLIDE 33

Boolean Satisfiability (SAT) Problem Boolean variables (atoms) Propositional logic formula (often CNF) Literals: a, a Clauses: (a ∨ f ∨ g), (a ∨ f ∨ g), (a ∨ b), (b ∨ c ∨ g) Algorithms Stochastic local search (GSAT, WalkSat,...) Survey propagation DPLL: Tree search + Unit propagation CDCL: Conflict Driven Clause learning

8 / 53

slide-34
SLIDE 34

Conflict Driven Clause Leaning (CDCL)

9 / 53

slide-35
SLIDE 35

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002 9 / 53

slide-36
SLIDE 36

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)

◮ Unit propagate: if a must be true, then a cannot satisfy a clause 9 / 53

slide-37
SLIDE 37

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)

◮ Unit propagate: if a must be true, then a cannot satisfy a clause ◮ a ∨ b ∨ c effectively becomes b ∨ c 9 / 53

slide-38
SLIDE 38

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)

◮ Unit propagate: if a must be true, then a cannot satisfy a clause ◮ a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)

◮ Extract a learned clause ◮ Backjump several levels and unit-propagate the learned clause 9 / 53

slide-39
SLIDE 39

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)

◮ Unit propagate: if a must be true, then a cannot satisfy a clause ◮ a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)

◮ Extract a learned clause ◮ Backjump several levels and unit-propagate the learned clause

Adaptive branching heuristics (weight conflicting literals)

9 / 53

slide-40
SLIDE 40

Conflict Driven Clause Leaning (CDCL) “Evolved” from DPLL Turning point: clause learning ([GRASP] then [Chaff])

◮ First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)

◮ Unit propagate: if a must be true, then a cannot satisfy a clause ◮ a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)

◮ Extract a learned clause ◮ Backjump several levels and unit-propagate the learned clause

Adaptive branching heuristics (weight conflicting literals) And also: restart, simplify the clause base, forget clauses, etc.

9 / 53

slide-41
SLIDE 41

CDCL: Example f a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-42
SLIDE 42

CDCL: Example f a g a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-43
SLIDE 43

CDCL: Example f a g b h a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-44
SLIDE 44

CDCL: Example f a g b h i a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-45
SLIDE 45

CDCL: Example f a g b h i j a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-46
SLIDE 46

CDCL: Example f a g b h i j c k l a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-47
SLIDE 47

CDCL: Example f a g b h i j c k l d m a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-48
SLIDE 48

CDCL: Example f a g b h i j c k l d m e n

  • j

a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

slide-49
SLIDE 49

CDCL: Example f a g b h i j c k l d m e n

  • j

⊥ a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

10 / 53

slide-50
SLIDE 50

CDCL: Example h n

  • j

(h ∨ o ∨ j ∨ n)

11 / 53

slide-51
SLIDE 51

CDCL: Example h n

  • j

(h ∨ o ∨ j ∨ n)

11 / 53

slide-52
SLIDE 52

CDCL: Example h n

  • j

(h ∨ o ∨ j ∨ n) ≡ (h ∧ o ∧ n) → j

11 / 53

slide-53
SLIDE 53

CDCL: Example f a g b h i j c k l d m e n

  • j

⊥ f , a, b, c, d, e g, i, k, l, m ⊥

  • n

h j j

slide-54
SLIDE 54

CDCL: Example f a g b h i j c k l d m e n

  • j

⊥ n

  • j

h f , a, b, c, d, e g, i, k, l, m ⊥

  • n

h j j

slide-55
SLIDE 55

CDCL: Example f a g b h i j c k l d m e n

  • j

⊥ n

  • j

h g f , a, b, c, d, e i, k, l, m ⊥

  • n

h j j g

12 / 53

slide-56
SLIDE 56

CDCL: Example f a g b h i j c k l d m e n

  • j

⊥ a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

13 / 53

slide-57
SLIDE 57

CDCL: Example f a g b h i j a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i

13 / 53

slide-58
SLIDE 58

CDCL: Example f a g b h i j a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i g ∨ h ∨ j ∨ n

13 / 53

slide-59
SLIDE 59

CDCL: Example f a g b h i j n a ∨ f ∨ g a ∨ b ∨ h a ∨ c a ∨ i ∨ l a ∨ k ∨ j b ∨ d b ∨ g ∨ n b ∨ f ∨ n ∨ k c ∨ k c ∨ k ∨ i ∨ l c ∨ h ∨ n ∨ m c ∨ l d ∨ k ∨ l d ∨ g ∨ l g ∨ n ∨ o h ∨ o ∨ j ∨ n i ∨ j d ∨ l ∨ m e ∨ m ∨ n f ∨ h ∨ i g ∨ h ∨ j ∨ n

13 / 53

slide-60
SLIDE 60

Outline

1

Introduction

2

Scheduling and SAT Encoding Formulation into SAT Scheduling by encoding into SAT

3

Scheduling and SAT Heuristics

4

Scheduling and SAT Hybrids

5

Conclusion

14 / 53

slide-61
SLIDE 61

CNF encoding The way we encode problems into SAT has a huge impact on efficiency

◮ Encoding of Planning problems ◮ Encoding of CSP (Direct, Log, AC-encoding) ◮ Encoding of Pseudo-Boolean (Adder, Sorter) 15 / 53

slide-62
SLIDE 62

Direct Encoding Domain An atom iv for each pair (xi, v ∈ D(xi))

◮ iv ⇔ xi = v (for instance: 2 ↔ 0100)

Must take at least a value: i1 ∨ i2 ∨ . . . ∨ in Must take at most one value:

v=w∈D(xi) iv ∨ iw

16 / 53

slide-63
SLIDE 63

Direct Encoding Domain An atom iv for each pair (xi, v ∈ D(xi))

◮ iv ⇔ xi = v (for instance: 2 ↔ 0100)

Must take at least a value: i1 ∨ i2 ∨ . . . ∨ in Must take at most one value:

v=w∈D(xi) iv ∨ iw

Complexity O(n2) space: n(n − 1)/2 binary clauses and one n-ary clause. There are different ways to encode the constraints.

16 / 53

slide-64
SLIDE 64

Constraints: Tuple Encoding Example of constraint: xi < xj xi 1 2 3 4 xj 1 i1 ∨ j1 i2 ∨ j1 i3 ∨ j1 i4 ∨ j1 2 i2 ∨ j2 i3 ∨ j2 i4 ∨ j2 3 i3 ∨ j3 i4 ∨ j3 4 i4 ∨ j3

17 / 53

slide-65
SLIDE 65

Constraints: Tuple Encoding Example of constraint: xi < xj xi 1 2 3 4 xj 1 i1 ∨ j1 i2 ∨ j1 i3 ∨ j1 i4 ∨ j1 2 i2 ∨ j2 i3 ∨ j2 i4 ∨ j2 3 i3 ∨ j3 i4 ∨ j3 4 i4 ∨ j3 Costly (in space) and weak (in propagation) O(n2) binary clauses. i4(xi = 4) and j1(xj = 1) are inconsistent, but not unit propagated.

17 / 53

slide-66
SLIDE 66

Constraints: AC Encoding [Kasif 90] Example of constraint: xi < xj assignment atom support xi = 1 i1 ∨ j2 ∨ j3 ∨ j4 xi = 2 i2 ∨ j3 ∨ j4 xi = 3 i3 ∨ j4 xi = 4 i4 ∨ ⊥

18 / 53

slide-67
SLIDE 67

Constraints: AC Encoding [Kasif 90] Example of constraint: xi < xj assignment atom support xi = 1 i1 ∨ j2 ∨ j3 ∨ j4 xi = 2 i2 ∨ j3 ∨ j4 xi = 3 i3 ∨ j4 xi = 4 i4 ∨ ⊥ Same space complexity, better propagation O(n) n-ary clauses i4(xi = 4) and j1(xj = 1) are unit clauses.

18 / 53

slide-68
SLIDE 68

Order Encoding [Crawford & Backer 94] Domain An atom iv for each pair (xi, v ∈ D(xi))

◮ iv ⇔ xi ≤ v (for instance: 2 ↔ 0111)

Bound propagation:

◮ If xi ≤ v then xi ≤ v + 1 ◮

v∈D(xi) iv ∨ iv+1

19 / 53

slide-69
SLIDE 69

Order Encoding [Crawford & Backer 94] Domain An atom iv for each pair (xi, v ∈ D(xi))

◮ iv ⇔ xi ≤ v (for instance: 2 ↔ 0111)

Bound propagation:

◮ If xi ≤ v then xi ≤ v + 1 ◮

v∈D(xi) iv ∨ iv+1

Complexity O(n) space (n − 1 binary clauses)

19 / 53

slide-70
SLIDE 70

Constraints: BC Encoding Example of constraint: xi < xj relation clause xi > 0 ⇒ xj > 1 ⊥ ∨j1 xi > 1 ⇒ xj > 2 i1 ∨ j2 xi > 2 ⇒ xj > 3 i2 ∨ j3 xi > 3 ⇒ xj > 4 i3∨ ⊥

20 / 53

slide-71
SLIDE 71

Constraints: BC Encoding Example of constraint: xi < xj relation clause xi > 0 ⇒ xj > 1 ⊥ ∨j1 xi > 1 ⇒ xj > 2 i1 ∨ j2 xi > 2 ⇒ xj > 3 i2 ∨ j3 xi > 3 ⇒ xj > 4 i3∨ ⊥ Better complexity and same propagation on some linear constraints O(n) space (n binary clauses) i3(xi ≤ 3) and j1(xj > 1) are unit clauses.

20 / 53

slide-72
SLIDE 72

Log Encoding [Walsh 00] Domain An atom ik for each value in [1, . . . , ⌊log2 ub⌋] (assuming D(x) = [0, . . . , ub])

◮ ub

k=1 2k ∗ ik = v ⇔ xi = v (for instance: 2 ↔ 01)

For interval domains, no need for extra clauses

21 / 53

slide-73
SLIDE 73

Log Encoding [Walsh 00] Domain An atom ik for each value in [1, . . . , ⌊log2 ub⌋] (assuming D(x) = [0, . . . , ub])

◮ ub

k=1 2k ∗ ik = v ⇔ xi = v (for instance: 2 ↔ 01)

For interval domains, no need for extra clauses Complexity O(log2 n) space Propagation Encoding constraints is trickier, and less powerful

21 / 53

slide-74
SLIDE 74

Other Encodings Many more! Mix of direct and order encoding [lazy-FD, Numberjack] Mix of AC and log encoding [Gavanelli 2007] Mix of order and log encoding [Sugar, Tamura et al. 2006]

22 / 53

slide-75
SLIDE 75

Other Encodings Many more! Mix of direct and order encoding [lazy-FD, Numberjack] Mix of AC and log encoding [Gavanelli 2007] Mix of order and log encoding [Sugar, Tamura et al. 2006]

◮ Log encoding in a base B and order encoding inside a digit ◮ Excellent results on scheduling benchmarks! (with CDCL solvers) 22 / 53

slide-76
SLIDE 76

Order Encoding, Now and Then Progress of SAT solvers From a few hundreds variables in the 90’s to millions now

23 / 53

slide-77
SLIDE 77

Order Encoding, Now and Then Progress of SAT solvers From a few hundreds variables in the 90’s to millions now [Crawford & Backer 94] Instances from Sadeh, with 10 jobs, 5 operations each (45m cutoff) Tableau solved 90% of the instances (about 2 min when it did)

23 / 53

slide-78
SLIDE 78

Order Encoding, Now and Then Progress of SAT solvers From a few hundreds variables in the 90’s to millions now [Crawford & Backer 94] Instances from Sadeh, with 10 jobs, 5 operations each (45m cutoff) Tableau solved 90% of the instances (about 2 min when it did) [Tamura, Tanjo & Banbara] Same instances used during the CSP Solver Competition Similar model, hardware of course incomparable, MiniSat

23 / 53

slide-79
SLIDE 79

Order Encoding, Now and Then Progress of SAT solvers From a few hundreds variables in the 90’s to millions now [Crawford & Backer 94] Instances from Sadeh, with 10 jobs, 5 operations each (45m cutoff) Tableau solved 90% of the instances (about 2 min when it did) [Tamura, Tanjo & Banbara] Same instances used during the CSP Solver Competition Similar model, hardware of course incomparable, MiniSat The hardest instance requires a few 100s conflicts at the most

23 / 53

slide-80
SLIDE 80

Closing the Open Shop Instances [Gueret & Prins]: hard for local search, extremely easy for SAT/CP [Taillard]: Large, but relatively easy [Brucker]: Three open instances

24 / 53

slide-81
SLIDE 81

Closing the Open Shop Instances [Gueret & Prins]: hard for local search, extremely easy for SAT/CP [Taillard]: Large, but relatively easy [Brucker]: Three open instances results All instances solved and proved optimal

◮ The two hardest instances were decomposed into 120 subproblems, and

required up to 13h to solve

24 / 53

slide-82
SLIDE 82

Closing the Open Shop Instances [Gueret & Prins]: hard for local search, extremely easy for SAT/CP [Taillard]: Large, but relatively easy [Brucker]: Three open instances results All instances solved and proved optimal

◮ The two hardest instances were decomposed into 120 subproblems, and

required up to 13h to solve

First approach to close the open shop!

24 / 53

slide-83
SLIDE 83

Solving vs. Encoding

25 / 53

slide-84
SLIDE 84

Solving vs. Encoding [Tamura et al.]’s encoding is better than order encoding

25 / 53

slide-85
SLIDE 85

Solving vs. Encoding [Tamura et al.]’s encoding is better than order encoding

◮ However, the huge difference with respect to [Crawford & Backer 94] is

due to the solver

25 / 53

slide-86
SLIDE 86

Solving vs. Encoding [Tamura et al.]’s encoding is better than order encoding

◮ However, the huge difference with respect to [Crawford & Backer 94] is

due to the solver

It is now possible to efficiently solve some scheduling problem simply by formulating it as a CNF formula

25 / 53

slide-87
SLIDE 87

Outline

1

Introduction

2

Scheduling and SAT Encoding

3

Scheduling and SAT Heuristics A SAT-like Approach Comparison with the State of the Art

4

Scheduling and SAT Hybrids

5

Conclusion

26 / 53

slide-88
SLIDE 88

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

27 / 53

slide-89
SLIDE 89

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

27 / 53

slide-90
SLIDE 90

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

◮ Yet many solvers solved them ([Sugar], [Choco], [Mistral]) 27 / 53

slide-91
SLIDE 91

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

◮ Yet many solvers solved them ([Sugar], [Choco], [Mistral])

Experiment with Weighted degree [Boussemart et al. 04]

27 / 53

slide-92
SLIDE 92

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

◮ Yet many solvers solved them ([Sugar], [Choco], [Mistral])

Experiment with Weighted degree [Boussemart et al. 04]

◮ Similar simple model in [Mistral], same observation [Grimes] 27 / 53

slide-93
SLIDE 93

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

◮ Yet many solvers solved them ([Sugar], [Choco], [Mistral])

Experiment with Weighted degree [Boussemart et al. 04]

◮ Similar simple model in [Mistral], same observation [Grimes] ◮ Open shop instances closed by [Tamura et al.] can be solved to

  • ptimality in a few minutes

27 / 53

slide-94
SLIDE 94

A SAT-like Approach [Grimes & Hebrard 09] CSP Solver Competition: scheduling benchmarks

◮ Some hard instances ◮ Generic format (XCSP), the notions of resource is lost, no global

constraint

◮ Yet many solvers solved them ([Sugar], [Choco], [Mistral])

Experiment with Weighted degree [Boussemart et al. 04]

◮ Similar simple model in [Mistral], same observation [Grimes] ◮ Open shop instances closed by [Tamura et al.] can be solved to

  • ptimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive scheduling problems?

27 / 53

slide-95
SLIDE 95

Constraint Model t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

20 50 80 60 45 20 50 30 40

Cmax

20 50 25 50

Model A Variable for the start time of each task: ti ∈ [0, . . . , Cmax].

◮ Precedence constraints: ti + pi ≤ ti+1. 28 / 53

slide-96
SLIDE 96

Constraint Model t2 t7 t9 b2,7 b2,9 b7,9 Model A Variable for the start time of each task: ti ∈ [0, . . . , Cmax].

◮ Precedence constraints: ti + pi ≤ ti+1.

A Boolean Variable standing for the relative order of each pair of conflicting tasks (disjunct):

◮ Binary Disjunctive constraints: bij =

0 ⇔ ti + pi ≤ tj 1 ⇔ tj + pj ≤ ti

29 / 53

slide-97
SLIDE 97

Search Strategy

30 / 53

slide-98
SLIDE 98

Search Strategy Adaptive heuristic Branch on Boolean variables only (order tasks on machines) Minimum domain over weighted degree [Boussemart et al. 04]

30 / 53

slide-99
SLIDE 99

Search Strategy Adaptive heuristic Branch on Boolean variables only (order tasks on machines) Minimum domain over weighted degree [Boussemart et al. 04] Guided search Follow the branch corresponding to the best solution [Beck 07] ≃ phase-saving heuristic in SAT [Pipatsrisawat & Darwiche 07]

30 / 53

slide-100
SLIDE 100

Search Strategy Adaptive heuristic Branch on Boolean variables only (order tasks on machines) Minimum domain over weighted degree [Boussemart et al. 04] Guided search Follow the branch corresponding to the best solution [Beck 07] ≃ phase-saving heuristic in SAT [Pipatsrisawat & Darwiche 07] Restarts Geometric [Walsh 99], nogoods on restarts [Lecoutre et al. 07]

30 / 53

slide-101
SLIDE 101

Search Strategy Adaptive heuristic Branch on Boolean variables only (order tasks on machines) Minimum domain over weighted degree [Boussemart et al. 04] Guided search Follow the branch corresponding to the best solution [Beck 07] ≃ phase-saving heuristic in SAT [Pipatsrisawat & Darwiche 07] Restarts Geometric [Walsh 99], nogoods on restarts [Lecoutre et al. 07] Almost no problem specific method

30 / 53

slide-102
SLIDE 102

CP or SAT? Many similarities with SAT:

◮ Search variables are Boolean ◮ Propagation is very basic ◮ SAT-based search strategies 31 / 53

slide-103
SLIDE 103

CP or SAT? Many similarities with SAT:

◮ Search variables are Boolean ◮ Propagation is very basic ◮ SAT-based search strategies

Some differences Faster propagation, but no clause learning

31 / 53

slide-104
SLIDE 104

CP or SAT? Many similarities with SAT:

◮ Search variables are Boolean ◮ Propagation is very basic ◮ SAT-based search strategies

Some differences Faster propagation, but no clause learning Restarts + weighted degree “simulates” CDCL behavior?

31 / 53

slide-105
SLIDE 105

Experiment on Jobshop and Variants

32 / 53

slide-106
SLIDE 106

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine 32 / 53

slide-107
SLIDE 107

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine ◮ Add the transition times in the disjunct 32 / 53

slide-108
SLIDE 108

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine ◮ Add the transition times in the disjunct

Maximum time lags

◮ Maximum duration between consecutive tasks in a job 32 / 53

slide-109
SLIDE 109

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine ◮ Add the transition times in the disjunct

Maximum time lags

◮ Maximum duration between consecutive tasks in a job ◮ Precedences with negative durations 32 / 53

slide-110
SLIDE 110

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine ◮ Add the transition times in the disjunct

Maximum time lags

◮ Maximum duration between consecutive tasks in a job ◮ Precedences with negative durations

Just in Time scheduling

◮ Penalties for earliness and tardiness of each job 32 / 53

slide-111
SLIDE 111

Experiment on Jobshop and Variants Sequence-dependent setup times

◮ Transition between tasks on a machine ◮ Add the transition times in the disjunct

Maximum time lags

◮ Maximum duration between consecutive tasks in a job ◮ Precedences with negative durations

Just in Time scheduling

◮ Penalties for earliness and tardiness of each job ◮ Simple decomposition to express the new objective 32 / 53

slide-112
SLIDE 112

Experimental Protocol This simple model was run on several standard benchmarks

◮ 1 hour cutoff ◮ 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)

◮ The cutoff may be different ◮ The hardware is different 33 / 53

slide-113
SLIDE 113

Experimental Protocol This simple model was run on several standard benchmarks

◮ 1 hour cutoff ◮ 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)

◮ The cutoff may be different ◮ The hardware is different

Average % deviation (with respect to a method M in {MIP, CP, LS})

100 ×

  • instance x

M objective(x) − SAT objective(x) #instances × best objective(x)

33 / 53

slide-114
SLIDE 114

Experimental Protocol This simple model was run on several standard benchmarks

◮ 1 hour cutoff ◮ 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)

◮ The cutoff may be different ◮ The hardware is different

Average % deviation (with respect to a method M in {MIP, CP, LS})

100 ×

  • instance x

M objective(x) − SAT objective(x) #instances × best objective(x)

◮ Negative: how much worse than M (when it is) 33 / 53

slide-115
SLIDE 115

Experimental Protocol This simple model was run on several standard benchmarks

◮ 1 hour cutoff ◮ 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)

◮ The cutoff may be different ◮ The hardware is different

Average % deviation (with respect to a method M in {MIP, CP, LS})

100 ×

  • instance x

M objective(x) − SAT objective(x) #instances × best objective(x)

◮ Negative: how much worse than M (when it is) ◮ Positive: how much better than M (when it is) 33 / 53

slide-116
SLIDE 116

Jobshop - Cmax - Taillard

JSP Setup Time-lag No-wait JiT −1.5 −1 −0.5 % Deviation LS [1] CP [2] MIP (no data) JSP Setup Time-lag No-wait JiT −1.5 −1 −0.5 % Deviation [1] i-TSAB (Tabu Search)

  • E. Nowicki and C. Smutnicki
  • J. of Scheduling (2005)

[2] SGMPCS (Ilog Scheduler)

  • J. C. Beck

JAIR (2007)

34 / 53

slide-117
SLIDE 117

Jobshop with setup times - Cmax - Brucker & Thiele

JSP Setup Time-lag No-wait JiT −2 2 4 % Deviation LS [3] CP [2] MIP (no data) JSP Setup Time-lag No-wait JiT −2 2 4 % Deviation [3] GA / Tabu Search Gonzalez, Vela, and Varela ICAPS (2008) [2] SGMPCS (Ilog Scheduler)

  • J. C. Beck

JAIR (2007)

35 / 53

slide-118
SLIDE 118

Jobshop with time lags - Cmax - Lawrence (modified)

JSP Setup Time-lag No-wait JiT 5 10 15 20 % Deviation LS [4] CP [2] MIP (no data) JSP Setup Time-lag No-wait JiT 5 10 15 20 % Deviation [4] Memetic algorithm Caumond, Lacomme and Tchernev Computers & OR (2008) [2] SGMPCS (Ilog Scheduler)

  • J. C. Beck

JAIR (2007)

36 / 53

slide-119
SLIDE 119

“No-wait” Jobshop - Cmax - Lawrence

JSP Setup Time-lag No-wait JiT 10 20 % Deviation LS [5] CP [2] MIP [6] JSP Setup Time-lag No-wait JiT 10 20 % Deviation [5] Hybrid Tabu Search Bozejko and Makuchowski Computers & IE (2009) [2] SGMPCS (Ilog Scheduler)

  • J. C. Beck

JAIR (2007) [6] CPlex

  • J. J. J. van den Broek

PhD thesis (2009)

37 / 53

slide-120
SLIDE 120

Jobshop - earliness/tardiness - Beck & Refalo; Morton & Pentico

JSP Setup Time-lag No-wait JiT 100 200 300 % Deviation LS [7] CP [8] MIP [9] JSP Setup Time-lag No-wait JiT 100 200 300 % Deviation [7] LNS (CP/LP) Danna and Peron Ilog Tech. Report (2003) [8] Hybrid CP/LP Beck and Refalo Annals of OR (2003) [9] CPlex Danna, Rothberg, Le Pape CPAIOR (2003)

38 / 53

slide-121
SLIDE 121

SAT Strategies Often comparable or better than the state of the art

39 / 53

slide-122
SLIDE 122

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? 39 / 53

slide-123
SLIDE 123

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? ◮ On benchmarks that received less attention? 39 / 53

slide-124
SLIDE 124

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? ◮ On benchmarks that received less attention?

Adaptive heuristics are extremely powerful

39 / 53

slide-125
SLIDE 125

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? ◮ On benchmarks that received less attention?

Adaptive heuristics are extremely powerful

◮ Effective at detecting bottlenecks 39 / 53

slide-126
SLIDE 126

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? ◮ On benchmarks that received less attention?

Adaptive heuristics are extremely powerful

◮ Effective at detecting bottlenecks ◮ Often better than dedicated CP approaches to prove optimality 39 / 53

slide-127
SLIDE 127

SAT Strategies Often comparable or better than the state of the art

◮ On benchmarks that are more favorable? ◮ On benchmarks that received less attention?

Adaptive heuristics are extremely powerful

◮ Effective at detecting bottlenecks ◮ Often better than dedicated CP approaches to prove optimality ⋆ Even this “pseudo” learning helps! 39 / 53

slide-128
SLIDE 128

Outline

1

Introduction

2

Scheduling and SAT Encoding

3

Scheduling and SAT Heuristics

4

Scheduling and SAT Hybrids Lazy clause generation Satisfiability Modulo Theories

5

Conclusion

40 / 53

slide-129
SLIDE 129

SAT Hybrids Pure reformulation is surprisingly efficient

41 / 53

slide-130
SLIDE 130

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good

41 / 53

slide-131
SLIDE 131

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good Hybridization

41 / 53

slide-132
SLIDE 132

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good Hybridization SAT-based learning AND CP-based propagation

41 / 53

slide-133
SLIDE 133

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good Hybridization SAT-based learning AND CP-based propagation

◮ What is the best tradeoff? 41 / 53

slide-134
SLIDE 134

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good Hybridization SAT-based learning AND CP-based propagation

◮ What is the best tradeoff? ◮ Does there need to be a tradeoff? 41 / 53

slide-135
SLIDE 135

SAT Hybrids Pure reformulation is surprisingly efficient However, simply using an adaptive heuristic and restart seems at least as good Hybridization SAT-based learning AND CP-based propagation

◮ What is the best tradeoff? ◮ Does there need to be a tradeoff?

Lazy Clause Generation SAT Modulo Theories

41 / 53

slide-136
SLIDE 136

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy & Stuckey 09] Architecture Channel a CP and SAT representations

◮ Search and propagation in CP ◮ Efficient domain representation and propagators 42 / 53

slide-137
SLIDE 137

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy & Stuckey 09] Architecture Channel a CP and SAT representations

◮ Search and propagation in CP ◮ Efficient domain representation and propagators ⋆ Produce clauses to explain the pruning ⋆ Just enough to extract a conflict 42 / 53

slide-138
SLIDE 138

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy & Stuckey 09] Architecture Channel a CP and SAT representations

◮ Search and propagation in CP ◮ Efficient domain representation and propagators ⋆ Produce clauses to explain the pruning ⋆ Just enough to extract a conflict ◮ The SAT formulation is generated lazily (learned during search) 42 / 53

slide-139
SLIDE 139

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

slide-140
SLIDE 140

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

decision

slide-141
SLIDE 141

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

decision filtering

slide-142
SLIDE 142

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

decision filtering explanation (clause generation)

slide-143
SLIDE 143

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

decision filtering explanation (clause generation) unit propagation

slide-144
SLIDE 144

Lazy Clause Generation Architecture Search Domains Propagators Unit Literals Clause Database

decision filtering explanation (clause generation) unit propagation channeling

43 / 53

slide-145
SLIDE 145

Lazy-FD: Example xi < xj Initial representation CP view SAT view D(xi) {1, . . . , 4} i1 ∨ i2, i2 ∨ i3 D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4 constraint xi < xj constraint C(xi, xk, . . .)

44 / 53

slide-146
SLIDE 146

Lazy-FD: Example xi < xj Some constraint reduces the domain of xi to {2, . . . , 5} CP view SAT view D(xi) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3 D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4 constraint xi < xj constraint C(xi, xk, . . .)

44 / 53

slide-147
SLIDE 147

Lazy-FD: Example xi < xj An explanation clause T ∨ i1 is produced, and the unit literal i1 is propagated CP view SAT view D(xi) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3 D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4 constraint xi < xj constraint C(xi, xk, . . .) T ∨ i1

44 / 53

slide-148
SLIDE 148

Lazy-FD: Example xi < xj The propagator for xi < xj is triggered and reduces the domain of xj CP view SAT view D(xi) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3 D(xj) {3, . . . , 5} j2 ∨ j3, j3 ∨ j4 constraint xi < xj constraint C(xi, xk, . . .) T ∨ i1

44 / 53

slide-149
SLIDE 149

Lazy-FD: Example xi < xj An explanation clause is also produced CP view SAT view D(xi) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3 D(xj) {3, . . . , 5} j2 ∨ j3, j3 ∨ j4 constraint xi < xj ii ∨ j2 constraint C(xi, xk, . . .) T ∨ i1

44 / 53

slide-150
SLIDE 150

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Schutt, Feydy, Stuckey & Wallace 09] Resource Constrained Project Scheduling Problem (RCPSP) Cumulative resources, each task has a demand rk for the resource k

45 / 53

slide-151
SLIDE 151

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Schutt, Feydy, Stuckey & Wallace 09] Resource Constrained Project Scheduling Problem (RCPSP) Cumulative resources, each task has a demand rk for the resource k Model Formulated using sums on the order encoding A fixed number of runs with a dedicated heuristic, then VSIDS (adaptive heuristic)

45 / 53

slide-152
SLIDE 152

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Schutt, Feydy, Stuckey & Wallace 09] Resource Constrained Project Scheduling Problem (RCPSP) Cumulative resources, each task has a demand rk for the resource k Model Formulated using sums on the order encoding A fixed number of runs with a dedicated heuristic, then VSIDS (adaptive heuristic) Results Favorable comparison with state of the art approaches

◮ MCS (implemented on top of Ilog-Scheduler [Laborie 05]) ◮ CP approach by [Liess & Michelon 08] ◮ MIP approach by [Kon´

e et al.]

45 / 53

slide-153
SLIDE 153

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Schutt, Feydy, Stuckey & Wallace 09] Resource Constrained Project Scheduling Problem (RCPSP) Cumulative resources, each task has a demand rk for the resource k Model Formulated using sums on the order encoding A fixed number of runs with a dedicated heuristic, then VSIDS (adaptive heuristic) Results Favorable comparison with state of the art approaches

◮ MCS (implemented on top of Ilog-Scheduler [Laborie 05]) ◮ CP approach by [Liess & Michelon 08] ◮ MIP approach by [Kon´

e et al.]

54 open instances closed!

45 / 53

slide-154
SLIDE 154

SAT Modulo Theories (SMT) Framework to hybrid dedicated solvers (Theories, or T-Solvers) with CDCL solvers

◮ T-Solver view: a set of propositions each represented by a literal in F ◮ CDCL-Solver view: a CNF formula F partially representing the problem

CDCL-Solver makes decisions and analyzes the conflicts T-Solver detects conflicts and/or propagates and generates explanation clauses

46 / 53

slide-155
SLIDE 155

SMT Solver Architecture Search Literals Clauses Database T-Solver

slide-156
SLIDE 156

SMT Solver Architecture Search Literals Clauses Database T-Solver

decision

slide-157
SLIDE 157

SMT Solver Architecture Search Literals Clauses Database T-Solver

decision Unit propagation

slide-158
SLIDE 158

SMT Solver Architecture Search Literals Clauses Database T-Solver

decision Unit propagation channeling propagation

slide-159
SLIDE 159

SMT Solver Architecture Search Literals Clauses Database T-Solver

decision Unit propagation channeling propagation explanation

47 / 53

slide-160
SLIDE 160

Several Theories T-Solvers Linear Real Arithmetic, Arrays, Bit-Vectors, Equality with Uninterpreted Functions,

48 / 53

slide-161
SLIDE 161

Several Theories T-Solvers Linear Real Arithmetic, Arrays, Bit-Vectors, Equality with Uninterpreted Functions, Difference Logic (i.e. formulas contain atoms of the form x − y ≤ k).

48 / 53

slide-162
SLIDE 162

Several Theories T-Solvers Linear Real Arithmetic, Arrays, Bit-Vectors, Equality with Uninterpreted Functions, Difference Logic (i.e. formulas contain atoms of the form x − y ≤ k). SMT for scheduling Satisfiability Modulo Difference Logic.

48 / 53

slide-163
SLIDE 163

Example: Jobshop Scheduling problem t1 t2 t3 t4 t5 t6

2 6 5

z

5 4 3

49 / 53

slide-164
SLIDE 164

Example: Jobshop Scheduling problem t1 t2 t3 t4 t5 t6

2 6 5

z

5 4 3

T-Solver view

s1 − s2 ≤ −2 s3 − s4 ≤ −4 s5 − s6 ≤ −5 s2 − z ≤ −5 s4 − z ≤ −4 s6 − z ≤ −3 a − s1 ≤ 0 a − s3 ≤ 0 a − s5 ≤ 0 z − a ≤ 15 l1≺5 ⇔ s1−s5 ≤ −2 l5≺1 ⇔ s5−s1 ≤ −5 l2≺4 ⇔ s2−s4 ≤ −5 l4≺2 ⇔ s4−s2 ≤ −4 l3≺6 ⇔ s3−s6 ≤ −6 l6≺3 ⇔ s6−s3 ≤ −3

49 / 53

slide-165
SLIDE 165

Example: Jobshop Scheduling problem t1 t2 t3 t4 t5 t6

2 6 5

z

5 4 3

T-Solver view

s1 − s2 ≤ −2 s3 − s4 ≤ −4 s5 − s6 ≤ −5 s2 − z ≤ −5 s4 − z ≤ −4 s6 − z ≤ −3 a − s1 ≤ 0 a − s3 ≤ 0 a − s5 ≤ 0 z − a ≤ 15 l1≺5 ⇔ s1−s5 ≤ −2 l5≺1 ⇔ s5−s1 ≤ −5 l2≺4 ⇔ s2−s4 ≤ −5 l4≺2 ⇔ s4−s2 ≤ −4 l3≺6 ⇔ s3−s6 ≤ −6 l6≺3 ⇔ s6−s3 ≤ −3

CDCL-Solver view l1≺5 ∨ l5≺1 l2≺4 ∨ l4≺2 l3≺6 ∨ l6≺3

49 / 53

slide-166
SLIDE 166

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −6 −5 −5 −3 −4 15

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-167
SLIDE 167

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −6 −5 −5 −3 −4 15 −3

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-168
SLIDE 168

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −5 −3 −5 −3 −6 −4 15

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-169
SLIDE 169

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −6 −5 −5 −3 −4 15 −6

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-170
SLIDE 170

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −6 −5 −5 −3 −4 −5 15 −6

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-171
SLIDE 171

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−2 −6 −5 −5 −3 −4 −5 −4 15 −6

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-172
SLIDE 172

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−6 −5 −5 −3 −5 −2 −5 −4 15 −6

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3

50 / 53

slide-173
SLIDE 173

Example: Jobshop Scheduling Reasoning: detection of negative cycles ([Bellman-Ford]) a t1 t2 t3 t4 t5 t6 z

−6 −5 −5 −3 −5 −2 −5 −4 15 −6

l1≺5 ⇔ s1 − s5 ≤ −2 l5≺1 ⇔ s5 − s1 ≤ −5 l2≺4 ⇔ s2 − s4 ≤ −5 l4≺2 ⇔ s4 − s2 ≤ −4 l3≺6 ⇔ s3 − s6 ≤ −6 l6≺3 ⇔ s6 − s3 ≤ −3 Learned clause l5≺1 ∨ l2≺4

50 / 53

slide-174
SLIDE 174

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Ans´

  • tegui et al. 11]

51 / 53

slide-175
SLIDE 175

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Ans´

  • tegui et al. 11]

Two fomulations Time encoding Task encoding

51 / 53

slide-176
SLIDE 176

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Ans´

  • tegui et al. 11]

Two fomulations Time encoding Task encoding Results More robust than lazy-FD

51 / 53

slide-177
SLIDE 177

Results on Resource Constrained Project Scheduling Problem (RCPSP) [Ans´

  • tegui et al. 11]

Two fomulations Time encoding Task encoding Results More robust than lazy-FD State of the art for RCPSP!

51 / 53

slide-178
SLIDE 178

Outline

1

Introduction

2

Scheduling and SAT Encoding

3

Scheduling and SAT Heuristics

4

Scheduling and SAT Hybrids

5

Conclusion

52 / 53

slide-179
SLIDE 179

Conclusion

53 / 53

slide-180
SLIDE 180

Conclusion Scheduling with SAT is not as bad as it sounds

53 / 53

slide-181
SLIDE 181

Conclusion Scheduling with SAT is not as bad as it sounds Generic algorithms can sometimes be difficult to match

◮ Adaptive heuristics ◮ Clause learning 53 / 53

slide-182
SLIDE 182

Conclusion Scheduling with SAT is not as bad as it sounds Generic algorithms can sometimes be difficult to match

◮ Adaptive heuristics ◮ Clause learning

Nogood learning [Schiex & Verfaillie 93] and explanation for global constraints [Rochart & Jussien 03], disjunctive resource [Vil´ ım 05]?

◮ Somehow it does not have the same impact as in SAT 53 / 53

slide-183
SLIDE 183

Conclusion Scheduling with SAT is not as bad as it sounds Generic algorithms can sometimes be difficult to match

◮ Adaptive heuristics ◮ Clause learning

Nogood learning [Schiex & Verfaillie 93] and explanation for global constraints [Rochart & Jussien 03], disjunctive resource [Vil´ ım 05]?

◮ Somehow it does not have the same impact as in SAT

Hybridization (learning + dedicated reasoning) is the way to go

◮ SAT Modulo Theories? ◮ CDCL with global constraints and integer domains? ◮ Explanation algorithms for global constraints? 53 / 53