+ All Categories
Home > Documents > Scheduling and SAT - IMT Atlantique

Scheduling and SAT - IMT Atlantique

Date post: 08-Feb-2022
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
183
Scheduling and SAT Emmanuel Hebrard Toulouse
Transcript
Page 1: Scheduling and SAT - IMT Atlantique

Scheduling and SAT

Emmanuel Hebrard

Toulouse

Page 2: Scheduling and SAT - IMT Atlantique

Outline

1 Introduction

2 Scheduling and SAT Encoding

3 Scheduling and SAT Heuristics

4 Scheduling and SAT Hybrids

5 Conclusion

2 / 53

Page 3: Scheduling and SAT - IMT Atlantique

Outline

1 IntroductionPreambleScheduling BackgroundSAT Background

2 Scheduling and SAT Encoding

3 Scheduling and SAT Heuristics

4 Scheduling and SAT Hybrids

5 Conclusion

3 / 53

Page 4: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

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

”Mixed Integer Programming” ”Constraint Programming” ”Boolean Satisfiability”

OR

”Integer Linear Programming”

4 / 53

Page 5: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

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

”Mixed Integer Programming” ”Constraint Programming” ”Boolean Satisfiability”

OR

”Integer Linear Programming”

4 / 53

Page 6: Scheduling and SAT - IMT Atlantique

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

Page 7: Scheduling and SAT - IMT Atlantique

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

Page 8: Scheduling and SAT - IMT Atlantique

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

Page 9: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 10: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 11: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)

I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 12: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 13: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been good

I 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

Page 14: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 15: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 16: Scheduling and SAT - IMT Atlantique

Scheduling with Boolean Satisfiability

Important theoretical resultsI [Cook-Levin] theorem: “First” NP-complete problemI [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)I Apparent issue, the numerical aspect can often be avoided

Efficiency? SAT Solvers have not always been goodI 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

Page 17: Scheduling and SAT - IMT Atlantique

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

I Minimization of makespan for non-preemptive tasks and disjunctiveresources

6 / 53

Page 18: Scheduling and SAT - IMT Atlantique

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

I Minimization of makespan for non-preemptive tasks and disjunctiveresources

6 / 53

Page 19: Scheduling and SAT - IMT Atlantique

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

7 / 53

Page 20: Scheduling and SAT - IMT Atlantique

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)

7 / 53

Page 21: Scheduling and SAT - IMT Atlantique

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

7 / 53

Page 22: Scheduling and SAT - IMT Atlantique

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

7 / 53

Page 23: Scheduling and SAT - IMT Atlantique

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

7 / 53

Page 24: Scheduling and SAT - IMT Atlantique

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

7 / 53

Page 25: Scheduling and SAT - IMT Atlantique

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

Page 26: Scheduling and SAT - IMT Atlantique

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

Page 27: Scheduling and SAT - IMT Atlantique

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

Page 28: Scheduling and SAT - IMT Atlantique

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

Page 29: Scheduling and SAT - IMT Atlantique

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

Page 30: Scheduling and SAT - IMT Atlantique

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

Page 31: Scheduling and SAT - IMT Atlantique

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

Page 32: Scheduling and SAT - IMT Atlantique

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

Page 33: Scheduling and SAT - IMT Atlantique

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

Page 34: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 35: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 36: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clause

I a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 37: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 38: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 39: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 40: Scheduling and SAT - IMT Atlantique

Conflict Driven Clause Leaning (CDCL)

“Evolved” from DPLL

Turning point: clause learning ([GRASP] then [Chaff])I First SAT-Solver competition in 2002

Dive in the “search tree” (make decisions)I Unit propagate: if a must be true, then a cannot satisfy a clauseI a ∨ b ∨ c effectively becomes b ∨ c

Until reaching a conflicts (dead-end)I Extract a learned clauseI 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

Page 41: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 42: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 43: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h

i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 44: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i

j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 45: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 46: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 47: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 48: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 49: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ o

h ∨ o ∨ j ∨ n

i ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

10 / 53

Page 50: Scheduling and SAT - IMT Atlantique

CDCL: Example

h n o

j

(h ∨ o ∨ j ∨ n)

≡(h ∧ o ∧ n)→ j

11 / 53

Page 51: Scheduling and SAT - IMT Atlantique

CDCL: Example

h n o

j

(h ∨ o ∨ j ∨ n)

≡(h ∧ o ∧ n)→ j

11 / 53

Page 52: Scheduling and SAT - IMT Atlantique

CDCL: Example

h n o

j

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

11 / 53

Page 53: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

n o

jh

g

f , a, b, c , d , e

g , i , k, l ,m

on

h j

j

12 / 53

Page 54: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥n o

jh

g

f , a, b, c , d , e

g , i , k, l ,m

on

h j

j

12 / 53

Page 55: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥n o

jh

g

f , a, b, c , d , e

i , k , l ,m

o

n

h j

j

g

12 / 53

Page 56: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

c k l

d m

e n o j ⊥

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

13 / 53

Page 57: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ i

13 / 53

Page 58: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ ig ∨ h ∨ j ∨ n

13 / 53

Page 59: Scheduling and SAT - IMT Atlantique

CDCL: Example

f

a g

b h i j n

a ∨ f ∨ ga ∨ b ∨ ha ∨ ca ∨ i ∨ la ∨ k ∨ jb ∨ db ∨ g ∨ nb ∨ f ∨ n ∨ kc ∨ kc ∨ k ∨ i ∨ l

c ∨ h ∨ n ∨mc ∨ ld ∨ k ∨ ld ∨ g ∨ lg ∨ n ∨ oh ∨ o ∨ j ∨ ni ∨ jd ∨ l ∨me ∨m ∨ nf ∨ h ∨ ig ∨ h ∨ j ∨ n

13 / 53

Page 60: Scheduling and SAT - IMT Atlantique

Outline

1 Introduction

2 Scheduling and SAT EncodingFormulation into SATScheduling by encoding into SAT

3 Scheduling and SAT Heuristics

4 Scheduling and SAT Hybrids

5 Conclusion

14 / 53

Page 61: Scheduling and SAT - IMT Atlantique

CNF encoding

The way we encode problems into SAT has a huge impact onefficiency

I Encoding of Planning problemsI Encoding of CSP (Direct, Log, AC-encoding)I Encoding of Pseudo-Boolean (Adder, Sorter)

15 / 53

Page 62: Scheduling and SAT - IMT Atlantique

Direct Encoding

Domain

An atom iv for each pair (xi , v ∈ D(xi ))I iv ⇔ xi = v (for instance: 2↔ 0100)

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

Must take at most one value:∧

v 6=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

Page 63: Scheduling and SAT - IMT Atlantique

Direct Encoding

Domain

An atom iv for each pair (xi , v ∈ D(xi ))I iv ⇔ xi = v (for instance: 2↔ 0100)

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

Must take at most one value:∧

v 6=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

Page 64: Scheduling and SAT - IMT Atlantique

Constraints: Tuple Encoding

Example of constraint: xi < xj

xi 1 2 3 4xj1 i1 ∨ j1 i2 ∨ j1 i3 ∨ j1 i4 ∨ j12 i2 ∨ j2 i3 ∨ j2 i4 ∨ j23 i3 ∨ j3 i4 ∨ j34 i4 ∨ j3

Costly (in space) and weak (in propagation)

O(n2) binary clauses.

i4(xi 6= 4) and j1(xj 6= 1) are inconsistent, but not unit propagated.

17 / 53

Page 65: Scheduling and SAT - IMT Atlantique

Constraints: Tuple Encoding

Example of constraint: xi < xj

xi 1 2 3 4xj1 i1 ∨ j1 i2 ∨ j1 i3 ∨ j1 i4 ∨ j12 i2 ∨ j2 i3 ∨ j2 i4 ∨ j23 i3 ∨ j3 i4 ∨ j34 i4 ∨ j3

Costly (in space) and weak (in propagation)

O(n2) binary clauses.

i4(xi 6= 4) and j1(xj 6= 1) are inconsistent, but not unit propagated.

17 / 53

Page 66: Scheduling and SAT - IMT Atlantique

Constraints: AC Encoding [Kasif 90]

Example of constraint: xi < xj

assignment atom supportxi = 1 i1 ∨ j2 ∨ j3 ∨ j4xi = 2 i2 ∨ j3 ∨ j4xi = 3 i3 ∨ j4xi = 4 i4 ∨ ⊥

Same space complexity, better propagation

O(n) n-ary clauses

i4(xi 6= 4) and j1(xj 6= 1) are unit clauses.

18 / 53

Page 67: Scheduling and SAT - IMT Atlantique

Constraints: AC Encoding [Kasif 90]

Example of constraint: xi < xj

assignment atom supportxi = 1 i1 ∨ j2 ∨ j3 ∨ j4xi = 2 i2 ∨ j3 ∨ j4xi = 3 i3 ∨ j4xi = 4 i4 ∨ ⊥

Same space complexity, better propagation

O(n) n-ary clauses

i4(xi 6= 4) and j1(xj 6= 1) are unit clauses.

18 / 53

Page 68: Scheduling and SAT - IMT Atlantique

Order Encoding [Crawford & Backer 94]

Domain

An atom iv for each pair (xi , v ∈ D(xi ))I iv ⇔ xi ≤ v (for instance: 2↔ 0111)

Bound propagation:I If xi ≤ v then xi ≤ v + 1I∧

v∈D(xi )iv ∨ iv+1

Complexity

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

19 / 53

Page 69: Scheduling and SAT - IMT Atlantique

Order Encoding [Crawford & Backer 94]

Domain

An atom iv for each pair (xi , v ∈ D(xi ))I iv ⇔ xi ≤ v (for instance: 2↔ 0111)

Bound propagation:I If xi ≤ v then xi ≤ v + 1I∧

v∈D(xi )iv ∨ iv+1

Complexity

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

19 / 53

Page 70: Scheduling and SAT - IMT Atlantique

Constraints: BC Encoding

Example of constraint: xi < xj

relation clausexi > 0⇒ xj > 1 ⊥ ∨j1xi > 1⇒ xj > 2 i1 ∨ j2xi > 2⇒ xj > 3 i2 ∨ j3xi > 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

Page 71: Scheduling and SAT - IMT Atlantique

Constraints: BC Encoding

Example of constraint: xi < xj

relation clausexi > 0⇒ xj > 1 ⊥ ∨j1xi > 1⇒ xj > 2 i1 ∨ j2xi > 2⇒ xj > 3 i2 ∨ j3xi > 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

Page 72: Scheduling and SAT - IMT Atlantique

Log Encoding [Walsh 00]

Domain

An atom ik for each value in [1, . . . , blog2 ubc] (assumingD(x) = [0, . . . , ub])

I∑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

Page 73: Scheduling and SAT - IMT Atlantique

Log Encoding [Walsh 00]

Domain

An atom ik for each value in [1, . . . , blog2 ubc] (assumingD(x) = [0, . . . , ub])

I∑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

Page 74: Scheduling and SAT - IMT Atlantique

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]

I Log encoding in a base B and order encoding inside a digitI Excellent results on scheduling benchmarks! (with CDCL solvers)

22 / 53

Page 75: Scheduling and SAT - IMT Atlantique

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]I Log encoding in a base B and order encoding inside a digitI Excellent results on scheduling benchmarks! (with CDCL solvers)

22 / 53

Page 76: Scheduling and SAT - IMT Atlantique

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

Page 77: Scheduling and SAT - IMT Atlantique

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

Page 78: Scheduling and SAT - IMT Atlantique

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

Page 79: Scheduling and SAT - IMT Atlantique

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

Page 80: Scheduling and SAT - IMT Atlantique

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

Page 81: Scheduling and SAT - IMT Atlantique

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

Page 82: Scheduling and SAT - IMT Atlantique

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

Page 83: Scheduling and SAT - IMT Atlantique

Solving vs. Encoding

[Tamura et al.]’s encoding is better than order encodingI 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 simplyby formulating it as a CNF formula

25 / 53

Page 84: Scheduling and SAT - IMT Atlantique

Solving vs. Encoding

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

I However, the huge difference with respect to [Crawford & Backer 94] isdue to the solver

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

25 / 53

Page 85: Scheduling and SAT - IMT Atlantique

Solving vs. Encoding

[Tamura et al.]’s encoding is better than order encodingI 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 simplyby formulating it as a CNF formula

25 / 53

Page 86: Scheduling and SAT - IMT Atlantique

Solving vs. Encoding

[Tamura et al.]’s encoding is better than order encodingI 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 simplyby formulating it as a CNF formula

25 / 53

Page 87: Scheduling and SAT - IMT Atlantique

Outline

1 Introduction

2 Scheduling and SAT Encoding

3 Scheduling and SAT HeuristicsA SAT-like ApproachComparison with the State of the Art

4 Scheduling and SAT Hybrids

5 Conclusion

26 / 53

Page 88: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]I Open shop instances closed by [Tamura et al.] can be solved to

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 89: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

constraint

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]I Open shop instances closed by [Tamura et al.] can be solved to

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 90: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]I Open shop instances closed by [Tamura et al.] can be solved to

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 91: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]

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

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 92: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]

I Open shop instances closed by [Tamura et al.] can be solved tooptimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 93: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]I Open shop instances closed by [Tamura et al.] can be solved to

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 94: Scheduling and SAT - IMT Atlantique

A SAT-like Approach [Grimes & Hebrard 09]

CSP Solver Competition: scheduling benchmarks

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

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

Experiment with Weighted degree [Boussemart et al. 04]I Similar simple model in [Mistral], same observation [Grimes]I Open shop instances closed by [Tamura et al.] can be solved to

optimality in a few minutes

Are adaptive heuristics all that we need to solve disjunctive schedulingproblems?

27 / 53

Page 95: Scheduling and SAT - IMT Atlantique

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 ].I Precedence constraints: ti + pi ≤ ti+1.

28 / 53

Page 96: Scheduling and SAT - IMT Atlantique

Constraint Model

t2

t7

t9

b2,7

b2,9

b7,9

Model

A Variable for the start time of each task: ti ∈ [0, . . . ,Cmax ].I Precedence constraints: ti + pi ≤ ti+1.

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

I Binary Disjunctive constraints: bij =

{0⇔ ti + pi ≤ tj1⇔ tj + pj ≤ ti

29 / 53

Page 97: Scheduling and SAT - IMT Atlantique

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

Page 98: Scheduling and SAT - IMT Atlantique

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

Page 99: Scheduling and SAT - IMT Atlantique

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

Page 100: Scheduling and SAT - IMT Atlantique

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

Page 101: Scheduling and SAT - IMT Atlantique

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

Page 102: Scheduling and SAT - IMT Atlantique

CP or SAT?

Many similarities with SAT:I Search variables are BooleanI Propagation is very basicI SAT-based search strategies

Some differences

Faster propagation, but no clause learning

Restarts + weighted degree “simulates” CDCL behavior?

31 / 53

Page 103: Scheduling and SAT - IMT Atlantique

CP or SAT?

Many similarities with SAT:I Search variables are BooleanI Propagation is very basicI SAT-based search strategies

Some differences

Faster propagation, but no clause learning

Restarts + weighted degree “simulates” CDCL behavior?

31 / 53

Page 104: Scheduling and SAT - IMT Atlantique

CP or SAT?

Many similarities with SAT:I Search variables are BooleanI Propagation is very basicI SAT-based search strategies

Some differences

Faster propagation, but no clause learning

Restarts + weighted degree “simulates” CDCL behavior?

31 / 53

Page 105: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 106: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machine

I Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 107: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 108: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a job

I Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 109: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 110: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each job

I Simple decomposition to express the new objective

32 / 53

Page 111: Scheduling and SAT - IMT Atlantique

Experiment on Jobshop and Variants

Sequence-dependent setup timesI Transition between tasks on a machineI Add the transition times in the disjunct

Maximum time lagsI Maximum duration between consecutive tasks in a jobI Precedences with negative durations

Just in Time schedulingI Penalties for earliness and tardiness of each jobI Simple decomposition to express the new objective

32 / 53

Page 112: Scheduling and SAT - IMT Atlantique

Experimental Protocol

This simple model was run on several standard benchmarksI 1 hour cutoffI 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)I The cutoff may be differentI The hardware is different

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

100×∑

instance x

M objective(x)− SAT objective(x)

#instances × best objective(x)

I Negative: how much worse than M (when it is)I Positive: how much better than M (when it is)

33 / 53

Page 113: Scheduling and SAT - IMT Atlantique

Experimental Protocol

This simple model was run on several standard benchmarksI 1 hour cutoffI 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)I The cutoff may be differentI The hardware is different

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

100×∑

instance x

M objective(x)− SAT objective(x)

#instances × best objective(x)

I Negative: how much worse than M (when it is)I Positive: how much better than M (when it is)

33 / 53

Page 114: Scheduling and SAT - IMT Atlantique

Experimental Protocol

This simple model was run on several standard benchmarksI 1 hour cutoffI 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)I The cutoff may be differentI The hardware is different

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

100×∑

instance x

M objective(x)− SAT objective(x)

#instances × best objective(x)

I Negative: how much worse than M (when it is)

I Positive: how much better than M (when it is)

33 / 53

Page 115: Scheduling and SAT - IMT Atlantique

Experimental Protocol

This simple model was run on several standard benchmarksI 1 hour cutoffI 10 random runs, we take the best

Best known results on each benchmark (LS, CP, MIP)I The cutoff may be differentI The hardware is different

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

100×∑

instance x

M objective(x)− SAT objective(x)

#instances × best objective(x)

I Negative: how much worse than M (when it is)I Positive: how much better than M (when it is)

33 / 53

Page 116: Scheduling and SAT - IMT Atlantique

Jobshop - Cmax - Taillard

JSP Setup Time-lag No-wait JiT

−1.5

−1

−0.5

0

%D

evia

tio

n

LS [1]

CP [2]

MIP (no data)

JSP Setup Time-lag No-wait JiT

−1.5

−1

−0.5

0

%D

evia

tio

n [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

Page 117: Scheduling and SAT - IMT Atlantique

Jobshop with setup times - Cmax - Brucker & Thiele

JSP Setup Time-lag No-wait JiT

−2

0

2

4

%D

evia

tio

n

LS [3]

CP [2]

MIP (no data)

JSP Setup Time-lag No-wait JiT

−2

0

2

4

%D

evia

tio

n [3] GA / Tabu Search

Gonzalez, Vela, and Varela

ICAPS (2008)

[2] SGMPCS (Ilog Scheduler)

J. C. Beck

JAIR (2007)

35 / 53

Page 118: Scheduling and SAT - IMT Atlantique

Jobshop with time lags - Cmax - Lawrence (modified)

JSP Setup Time-lag No-wait JiT

0

5

10

15

20

%D

evia

tio

n

LS [4]

CP [2]

MIP (no data)

JSP Setup Time-lag No-wait JiT

0

5

10

15

20

%D

evia

tio

n [4] Memetic algorithm

Caumond, Lacomme

and Tchernev

Computers & OR (2008)

[2] SGMPCS (Ilog Scheduler)

J. C. Beck

JAIR (2007)

36 / 53

Page 119: Scheduling and SAT - IMT Atlantique

“No-wait” Jobshop - Cmax - Lawrence

JSP Setup Time-lag No-wait JiT

0

10

20

%D

evia

tio

n

LS [5]

CP [2]

MIP [6]

JSP Setup Time-lag No-wait JiT

0

10

20

%D

evia

tio

n

[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

Page 120: Scheduling and SAT - IMT Atlantique

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

JSP Setup Time-lag No-wait JiT

0

100

200

300

%D

evia

tio

n

LS [7]

CP [8]

MIP [9]

JSP Setup Time-lag No-wait JiT

0

100

200

300

%D

evia

tio

n

[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

Page 121: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the art

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

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 122: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?

I On benchmarks that received less attention?

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 123: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?I On benchmarks that received less attention?

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 124: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?I On benchmarks that received less attention?

Adaptive heuristics are extremely powerful

I Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 125: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?I On benchmarks that received less attention?

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecks

I Often better than dedicated CP approaches to prove optimalityF Even this “pseudo” learning helps!

39 / 53

Page 126: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?I On benchmarks that received less attention?

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 127: Scheduling and SAT - IMT Atlantique

SAT Strategies

Often comparable or better than the state of the artI On benchmarks that are more favorable?I On benchmarks that received less attention?

Adaptive heuristics are extremely powerfulI Effective at detecting bottlenecksI Often better than dedicated CP approaches to prove optimality

F Even this “pseudo” learning helps!

39 / 53

Page 128: Scheduling and SAT - IMT Atlantique

Outline

1 Introduction

2 Scheduling and SAT Encoding

3 Scheduling and SAT Heuristics

4 Scheduling and SAT HybridsLazy clause generationSatisfiability Modulo Theories

5 Conclusion

40 / 53

Page 129: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 130: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 131: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 132: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagation

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

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 133: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?

I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 134: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 135: Scheduling and SAT - IMT Atlantique

SAT Hybrids

Pure reformulation is surprisingly efficient

However, simply using an adaptive heuristic and restart seems at leastas good

Hybridization

SAT-based learning AND CP-based propagationI What is the best tradeoff?I Does there need to be a tradeoff?

Lazy Clause Generation

SAT Modulo Theories

41 / 53

Page 136: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy& Stuckey 09]

Architecture

Channel a CP and SAT representationsI Search and propagation in CPI Efficient domain representation and propagators

F Produce clauses to explain the pruningF Just enough to extract a conflict

I The SAT formulation is generated lazily (learned during search)

42 / 53

Page 137: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy& Stuckey 09]

Architecture

Channel a CP and SAT representationsI Search and propagation in CPI Efficient domain representation and propagators

F Produce clauses to explain the pruningF Just enough to extract a conflict

I The SAT formulation is generated lazily (learned during search)

42 / 53

Page 138: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation [Ohrimenko, Stuckey & Codish 07] - [Feydy& Stuckey 09]

Architecture

Channel a CP and SAT representationsI Search and propagation in CPI Efficient domain representation and propagators

F Produce clauses to explain the pruningF Just enough to extract a conflict

I The SAT formulation is generated lazily (learned during search)

42 / 53

Page 139: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 140: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 141: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 142: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 143: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 144: Scheduling and SAT - IMT Atlantique

Lazy Clause Generation

Architecture

Search

Domains

Propagators

Unit Literals

Clause Database

decision

filtering

explanation

(clause generation)

unit propagation

channeling

43 / 53

Page 145: Scheduling and SAT - IMT Atlantique

Lazy-FD: Example

xi < xj

Initial representation

CP view SAT view

D(xi ) {1, . . . , 4} i1 ∨ i2, i2 ∨ i3D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4

constraint xi < xjconstraint C (xi , xk , . . .)

44 / 53

Page 146: Scheduling and SAT - IMT Atlantique

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 ∨ i3D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4

constraint xi < xjconstraint C (xi , xk , . . .)

44 / 53

Page 147: Scheduling and SAT - IMT Atlantique

Lazy-FD: Example

xi < xj

An explanation clause T ∨ i1 is produced, and the unit literal i1 ispropagated

CP view SAT view

D(xi ) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3D(xj) {2, . . . , 5} j2 ∨ j3, j3 ∨ j4

constraint xi < xjconstraint C (xi , xk , . . .) T ∨ i1

44 / 53

Page 148: Scheduling and SAT - IMT Atlantique

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 ∨ i3D(xj) {3, . . . , 5} j2 ∨ j3, j3 ∨ j4

constraint xi < xjconstraint C (xi , xk , . . .) T ∨ i1

44 / 53

Page 149: Scheduling and SAT - IMT Atlantique

Lazy-FD: Example

xi < xj

An explanation clause is also produced

CP view SAT view

D(xi ) {2, . . . , 4} i1 ∨ i2, i2 ∨ i3D(xj) {3, . . . , 5} j2 ∨ j3, j3 ∨ j4

constraint xi < xj ii ∨ j2constraint C (xi , xk , . . .) T ∨ i1

44 / 53

Page 150: Scheduling and SAT - IMT Atlantique

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 approachesI MCS (implemented on top of Ilog-Scheduler [Laborie 05])I CP approach by [Liess & Michelon 08]I MIP approach by [Kone et al.]

54 open instances closed!

45 / 53

Page 151: Scheduling and SAT - IMT Atlantique

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 approachesI MCS (implemented on top of Ilog-Scheduler [Laborie 05])I CP approach by [Liess & Michelon 08]I MIP approach by [Kone et al.]

54 open instances closed!

45 / 53

Page 152: Scheduling and SAT - IMT Atlantique

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 approachesI MCS (implemented on top of Ilog-Scheduler [Laborie 05])I CP approach by [Liess & Michelon 08]I MIP approach by [Kone et al.]

54 open instances closed!

45 / 53

Page 153: Scheduling and SAT - IMT Atlantique

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 approachesI MCS (implemented on top of Ilog-Scheduler [Laborie 05])I CP approach by [Liess & Michelon 08]I MIP approach by [Kone et al.]

54 open instances closed!

45 / 53

Page 154: Scheduling and SAT - IMT Atlantique

SAT Modulo Theories (SMT)

Framework to hybrid dedicated solvers (Theories, or T-Solvers) withCDCL solvers

I T-Solver view: a set of propositions each represented by a literal in FI 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 generatesexplanation clauses

46 / 53

Page 155: Scheduling and SAT - IMT Atlantique

SMT Solver

Architecture

Search

Literals

Clauses Database

T-Solver

decision

Unit propagation

channeling

propagation

explanation

47 / 53

Page 156: Scheduling and SAT - IMT Atlantique

SMT Solver

Architecture

Search

Literals

Clauses Database

T-Solver

decision

Unit propagation

channeling

propagation

explanation

47 / 53

Page 157: Scheduling and SAT - IMT Atlantique

SMT Solver

Architecture

Search

Literals

Clauses Database

T-Solver

decision

Unit propagation

channeling

propagation

explanation

47 / 53

Page 158: Scheduling and SAT - IMT Atlantique

SMT Solver

Architecture

Search

Literals

Clauses Database

T-Solver

decision

Unit propagation

channeling

propagation

explanation

47 / 53

Page 159: Scheduling and SAT - IMT Atlantique

SMT Solver

Architecture

Search

Literals

Clauses Database

T-Solver

decision

Unit propagation

channeling

propagation

explanation

47 / 53

Page 160: Scheduling and SAT - IMT Atlantique

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

Page 161: Scheduling and SAT - IMT Atlantique

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

Page 162: Scheduling and SAT - IMT Atlantique

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

Page 163: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

problem

t1 t2

t3 t4

t5 t6

2

6

5

z

5

4

3

T-Solver view

s1 − s2 ≤ −2s3 − s4 ≤ −4s5 − s6 ≤ −5s2 − z ≤ −5s4 − z ≤ −4s6 − z ≤ −3a− s1 ≤ 0a− s3 ≤ 0a− s5 ≤ 0

z − a ≤ 15

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

CDCL-Solver view

l1≺5 ∨ l5≺1

l2≺4 ∨ l4≺2

l3≺6 ∨ l6≺3

49 / 53

Page 164: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

problem

t1 t2

t3 t4

t5 t6

2

6

5

z

5

4

3

T-Solver view

s1 − s2 ≤ −2s3 − s4 ≤ −4s5 − s6 ≤ −5s2 − z ≤ −5s4 − z ≤ −4s6 − z ≤ −3a− s1 ≤ 0a− s3 ≤ 0a− s5 ≤ 0

z − a ≤ 15

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

CDCL-Solver view

l1≺5 ∨ l5≺1

l2≺4 ∨ l4≺2

l3≺6 ∨ l6≺3

49 / 53

Page 165: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

problem

t1 t2

t3 t4

t5 t6

2

6

5

z

5

4

3

T-Solver view

s1 − s2 ≤ −2s3 − s4 ≤ −4s5 − s6 ≤ −5s2 − z ≤ −5s4 − z ≤ −4s6 − z ≤ −3a− s1 ≤ 0a− s3 ≤ 0a− s5 ≤ 0

z − a ≤ 15

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

CDCL-Solver view

l1≺5 ∨ l5≺1

l2≺4 ∨ l4≺2

l3≺6 ∨ l6≺3

49 / 53

Page 166: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−2

−6

−5

−5

−3

−40

0

0

15

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

50 / 53

Page 167: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−2

−6

−5

−5

−3

−40

0

0

15

−3

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

50 / 53

Page 168: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−2 −5

−3

0

0

0

−5

−3

−6

−4

15

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

50 / 53

Page 169: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−2

−6

−5

−5

−3

−40

0

0

15

−6

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

50 / 53

Page 170: Scheduling and SAT - IMT Atlantique

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

0

0

0

15

−6

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

50 / 53

Page 171: Scheduling and SAT - IMT Atlantique

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

−40

0

0

15

−6

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

50 / 53

Page 172: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−6

−5

−5

−3

−5

0

0

0

−2

−5 −4

15

−6

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

50 / 53

Page 173: Scheduling and SAT - IMT Atlantique

Example: Jobshop Scheduling

Reasoning: detection of negative cycles ([Bellman-Ford])

a

t1 t2

t3 t4

t5 t6

z

−6

−5

−5

−3

−5

0

0

0

−2

−5 −4

15

−6

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

Learned clause

l5≺1 ∨ l2≺4

50 / 53

Page 174: Scheduling and SAT - IMT Atlantique

Results on Resource Constrained Project Scheduling Problem(RCPSP) [Ansotegui et al. 11]

Two fomulations

Time encoding

Task encoding

Results

More robust than lazy-FD

State of the art for RCPSP!

51 / 53

Page 175: Scheduling and SAT - IMT Atlantique

Results on Resource Constrained Project Scheduling Problem(RCPSP) [Ansotegui et al. 11]

Two fomulations

Time encoding

Task encoding

Results

More robust than lazy-FD

State of the art for RCPSP!

51 / 53

Page 176: Scheduling and SAT - IMT Atlantique

Results on Resource Constrained Project Scheduling Problem(RCPSP) [Ansotegui et al. 11]

Two fomulations

Time encoding

Task encoding

Results

More robust than lazy-FD

State of the art for RCPSP!

51 / 53

Page 177: Scheduling and SAT - IMT Atlantique

Results on Resource Constrained Project Scheduling Problem(RCPSP) [Ansotegui et al. 11]

Two fomulations

Time encoding

Task encoding

Results

More robust than lazy-FD

State of the art for RCPSP!

51 / 53

Page 178: Scheduling and SAT - IMT Atlantique

Outline

1 Introduction

2 Scheduling and SAT Encoding

3 Scheduling and SAT Heuristics

4 Scheduling and SAT Hybrids

5 Conclusion

52 / 53

Page 179: Scheduling and SAT - IMT Atlantique

Conclusion

Scheduling with SAT is not as bad as it sounds

Generic algorithms can sometimes be difficult to matchI Adaptive heuristicsI Clause learning

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

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

Hybridization (learning + dedicated reasoning) is the way to goI SAT Modulo Theories?I CDCL with global constraints and integer domains?I Explanation algorithms for global constraints?

53 / 53

Page 180: Scheduling and SAT - IMT Atlantique

Conclusion

Scheduling with SAT is not as bad as it sounds

Generic algorithms can sometimes be difficult to matchI Adaptive heuristicsI Clause learning

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

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

Hybridization (learning + dedicated reasoning) is the way to goI SAT Modulo Theories?I CDCL with global constraints and integer domains?I Explanation algorithms for global constraints?

53 / 53

Page 181: Scheduling and SAT - IMT Atlantique

Conclusion

Scheduling with SAT is not as bad as it sounds

Generic algorithms can sometimes be difficult to matchI Adaptive heuristicsI Clause learning

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

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

Hybridization (learning + dedicated reasoning) is the way to goI SAT Modulo Theories?I CDCL with global constraints and integer domains?I Explanation algorithms for global constraints?

53 / 53

Page 182: Scheduling and SAT - IMT Atlantique

Conclusion

Scheduling with SAT is not as bad as it sounds

Generic algorithms can sometimes be difficult to matchI Adaptive heuristicsI Clause learning

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

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

Hybridization (learning + dedicated reasoning) is the way to goI SAT Modulo Theories?I CDCL with global constraints and integer domains?I Explanation algorithms for global constraints?

53 / 53

Page 183: Scheduling and SAT - IMT Atlantique

Conclusion

Scheduling with SAT is not as bad as it sounds

Generic algorithms can sometimes be difficult to matchI Adaptive heuristicsI Clause learning

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

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

Hybridization (learning + dedicated reasoning) is the way to goI SAT Modulo Theories?I CDCL with global constraints and integer domains?I Explanation algorithms for global constraints?

53 / 53


Recommended