CONSTRAINT-BASED PLANNING AND SCHEDULING k Ro om ma an n B Ba - - PDF document

constraint based planning and scheduling
SMART_READER_LITE
LIVE PREVIEW

CONSTRAINT-BASED PLANNING AND SCHEDULING k Ro om ma an n B Ba - - PDF document

CONSTRAINT-BASED PLANNING AND SCHEDULING k Ro om ma an n B Ba ar rt t k Ch ha ar rl le es s U Un ni iv ve ers sit ty y, , P Pr ra ag gue e ( (C CZ Z) ) roman.bartak@mff.cuni.cz


slide-1
SLIDE 1

CONSTRAINT-BASED PLANNING AND SCHEDULING

Ro

  • m

ma an n B Ba ar rt tá ák k

Ch ha ar rl le es s U Un ni iv ve ers sit ty y, , P Pr ra ag gue e ( (C CZ Z) )

roman.bartak@mff.cuni.cz http://ktiml.mff.cuni.cz/~bartak

WHAT AND WHY?

! Wh

ha at t i is s t th he e t to

  • p

pi ic c

  • f

f t th he e t tu ut to

  • r

ri ia al l? ?

" constraint satisfaction techniques useful for P&S

! Wh

ha at t i is s c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n? ?

" technology for modeling and solving combinatorial optimization

problems

! Wh

hy y s sh ho

  • u

ul ld d

  • n

ne e l lo

  • k

k a at t c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n? ?

" powerful solving technology " planning and scheduling are coming together and constraint

satisfaction may serve as a bridge between them

! Wh

hy y s sh ho

  • u

ul ld d

  • n

ne e u un nd de er rs st ta an nd d i in ns si id de es s

  • f

f c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n a al lg go

  • r

ri it th hm ms s? ?

" better exploitation of the technology " design of better (solvable) constraint models

Constraint-based Planning and Scheduling 2

slide-2
SLIDE 2

TUTORIAL OUTLINE

! Co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n i in n a a n nu ut ts sh he el ll l

" domain filtering and local consistencies " search techniques

! Co

  • n

ns st tr ra ai in nt ts s f fo

  • r

r p pl la an nn ni in ng g

" constraint models " temporal reasoning

! Co

  • n

ns st tr ra ai in nt ts s f fo

  • r

r s sc che ed du ul li in ng g

" a base constraint model " resource constraints " branching schemes

3 Constraint-based Planning and Scheduling

CONSTRAINT SATISFACTION

IN A NUTSHELL

slide-3
SLIDE 3

STARTING SIMPLE

CONSTRAINT SATISFACTION

Mo

  • d

de el li in ng g ( (p pr ro

  • b

bl le em m f fo

  • r

rm mu ul la at ti io

  • n

n) )

" N queens problem " de

ec ci is si io

  • n

n v va ar ri ia ab bl le es s for positions of queens in rows r(i) in {1,…,N}

" co

  • n

ns st tr ra ai in nt ts s describing (non-)conflicts ∀i≠j r(i) ≠ r(j) & |i-j| ≠ |r(i)-r(j)|

Se ea ar rc ch h a an nd d i in nf fe er re en nc ce e ( (p pr ro

  • p

pa ag ga at ti io

  • n

n) )

" ba

ac ck kt tr ra ac ck ki in ng g (assign values and return upon failure)

" infer consequences of decisions

via maintaining c co

  • n

ns si is st te en nc cy y

  • f constraints

5 failure

× × × × × × × × × × × × × × × × × × × ×

Constraint-based Planning and Scheduling

CONSTRAINT SATISFACTION

based on d de ec cl la ar ra at ti iv ve e p pr ro

  • b

bl le em m d de es sc cr ri ip pt ti io

  • n

n via:

" va

ar ri ia ab bl le es s w wi it th h d do

  • m

ma ai in ns s (sets of possible values) describe d de ec ci is si io

  • n

n p po

  • i

in nt ts s of the problem with possible

  • p

pt ti io

  • n

ns s for the decisions e.g. the start time of activity with time windows

" co

  • n

ns st tr ra ai in nt ts s restricting combinations of values, describe arbitrary r re el la at ti io

  • n

ns s over the set of variables e.g. end(A) < start(B)

A f fe ea as si ib bl le e so

  • l

lu ut ti io

  • n

n to a constraint satisfaction problem is a complete assignment of variables satisfying all the constraints. An o

  • p

pt ti im ma al l s so

  • l

lu ut ti io

  • n

n to a CSP is a feasible solution minimizing/maximizing a given objective function.

6 Constraint-based Planning and Scheduling

slide-4
SLIDE 4

CONSTRAINT SATISFACTION

CONSISTENCY TECHNIQUES

DOMAIN FILTERING

! Ex

xa am mp pl le e: :

" Da = {1,2}, Db = {1,2,3} " a < b

! Value 1 can be safely removed from Db.

! Constraints are used a

ac cti iv ve el ly y t to

  • r

re em mo

  • v

ve e i in nc con ns si is st te en nc cie es s from the problem.

" in

nc co

  • n

ns si is st te en nc cy y = a value that cannot be in any solution

! This is realized via a procedure FILTER that is

attached to each constraint.

8 Constraint-based Planning and Scheduling

slide-5
SLIDE 5

FILTER

! Re

em mo

  • v

ve es s a al ll l v va al lu ue es s v vi io

  • l

la at ti in ng g a a g gi iv ve en n c co

  • n

ns st tr ra ai in nt t.

" for each value we need to find values (s

su up pp po

  • r

rt t) in domains of

  • ther variables such that the tuple satisfies the constraint

" filter for constraints specified using a table of compatible tuples

9

procedure c.FILTER(OrigD) NewD ← OrigD for each X in scope(c) do for each v in NewDX do if there is no support for v in c then NewDX ← NewDX - {v} end for end for return NewD end FILTER

Constraint scope is a set of constrained variables Support is a tuple of values from variables’ domains that satisfies the constraint

Constraint-based Planning and Scheduling

ARC-CONSISTENCY

! We say that a c

co

  • n

ns st tr ra ai in nt t is a ar rc c c co

  • n

ns si is st te en nt t (AC) if for any value of the variable in the constraint there exists a value (a s su up pp po

  • r

rt t) for the other variable(s) in such a way that the constraint is satisfied (we say that the value is supported). Unsupported values are filtered out of the domain.

! A C

CS SP P is a ar rc c c co

  • n

ns si is st te en nt t if all the constraints are arc consistent.

10 Constraint-based Planning and Scheduling

slide-6
SLIDE 6

MAKING PROBLEMS AC

! How to e

es st ta ab bl li is sh h a ar rc c c con ns si is st te en nc cy y in a CSP?

! Every constraint must be made AC!

Ex xa am mp pl le e: : X in [1,..,6], Y in [1,..,6], Z in [1,..,6], X<Y, Z<X-2

! Filtering through every constraint just once is not enough!

! Filtering must be repeated until any domain is

changed (AC-1).

11

X in [1,..,6] Y in [1,..,6] Z in [1,..,6] X in [1,..,5] Y in [2,..,6] Z in [1,..,6] X<Y X in [4,5] Y in [2,..,6] Z in [1,2] Z<X-2 X in [4,5] Y in [5,6] Z in [1,2] X<Y

Constraint-based Planning and Scheduling

ALGORITHM AC-3

! Uses a q

qu ue eu ue e

  • f

f c co

  • n

ns st tr ra ai in nt ts s that should be checked for AC.

! When a domain of variable is changed, only the constraints

  • ver this variable are added back to the queue for filtering.

12

procedure AC-3(V,D,C) Q ← C while non-empty Q do select c from Q D’ ← c.FILTER(D) if any domain in D’ is empty then return (fail,D’) Q ← Q ∪ {c’∈C | ∃x∈var(c’) D’x≠Dx} – {c} D ← D’ end while return (true,D) end AC-3

Mackworth (1977)

Constraint-based Planning and Scheduling

slide-7
SLIDE 7

AC IN PRACTICE

! Uses a qu

ue eu ue e

  • f

f v va ar ri ia ab ble es s with changed domains.

" Users may specify for each constraint when the filtering should be done

depending on the domain change.

! The algorithm is sometimes called A

AC C-

  • 8

8.

13

procedure AC-8(V,D,C) Q ← V while non-empty Q do select v from Q for c∈C such that v is constrained by c do D’ ← c.FILTER(D) if any domain in D’ is empty then return (fail,D’) Q ← Q ∪ {u∈V | D’u≠Du} D ← D’ end for end while return (true,D) end AC-8

Constraint-based Planning and Scheduling

ARC-B-CONSISTENCY

! Sometimes, making the problem arc-consistent is costly (for

example, when domains of variables are large).

! In such a case, a weaker form of arc-consistency might be

useful.

! We say that a constraint is a

ar rc c-

  • b

b-

  • c

co

  • n

ns si is st te en nt t (bound consistent) if for any bound values of the variable in the constraint there exists a value for the other variable(s) in such a way that the constraint is satisfied.

" a bound value is either a minimum or a maximum value in domain " domain of the variable can be represented as an interval " for some constraints (like x<y) it is equivalent to AC

14

Lhomme (1993)

procedure (x<y).FILTER(OrigD) NewDX ← OrigDX ∩ (inf .. max(OrigDY)-1) NewDY ← OrigDY ∩ (min(OrigDX)+1 .. sup) ∀Z≠X,Y NewDZ ← OrigDZ return NewD end FILTER

Constraint-based Planning and Scheduling

slide-8
SLIDE 8

PITFALLS OF AC

15

! Di

is sj ju un nc ct ti iv ve e c co

  • n

ns st tr ra ai in nt ts s

" A, B in {1,...,10}, A = 1 ∨ A = 2 " no filtering (whenever A ≠ 1 then deduce A = 2 and vice

versa) ! constructive disjunction

! De

et te ec ct ti io

  • n

n

  • f

f i in nc co

  • n

ns si is st te en nc cy y

" A, B, C in {1,…,10000000}, A < B, B < C, C < A " long filtering (4 seconds)

! a different model

! We

ea ak k f fi il lt te er ri in ng g

" A, B in {1,2}, C in {1,2,3}, A ≠ B, A ≠ C, B ≠ C " weak filtering (it is arc-consistent)

! global constraints

Constraint-based Planning and Scheduling

GLOBAL CONSTRAINTS (INSIDE ALL-DIFFERENT)

!

a set of binary inequality constraints among all variables X1 ≠ X2, X1 ≠ X3, …, Xk-1 ≠ Xk

!

all_different({X1,…,Xk}) = {( d1,…,dk) | ∀i di∈Di & ∀i≠j di ≠ dj}

!

better pruning based on m ma at tc ch hi in ng g t th he eo

  • r

ry y

  • v

ve er r b bi ip pa ar rt ti it te e g gr ra ap ph hs s

In ni it ti ia al li iz za at ti io

  • n

n: :

1.

compute maximum matching

2.

remove all edges that do not belong to any maximum matching

Pr ro

  • p

pa ag ga at ti io

  • n

n

  • f

f d de el le et ti io

  • n

ns s ( (X X1≠a) ): :

1.

remove discharged edges

2.

compute new maximum matching

3.

remove all edges that do not belong to any maximum matching

16

a b c X1 X2 X3

× ×

X1 X2 X3 a b c

× ×

Régin (1994)

Constraint-based Planning and Scheduling

slide-9
SLIDE 9

META CONSISTENCY

17

Can we s st tr re en ng gt th he en n a an ny y f fi il lt te er ri in ng g t te ec ch hn ni iq qu ue e? YES! Let us assign a value and make the rest of the problem consistent.

! si

in ng gl le et to

  • n

n c co

  • n

ns si is st te en nc cy y (P

Pr ro

  • s

sse er r e et t a al l. ., , 2 20 00 00 0) )

" try each value in the domain

! sh

ha av vi in ng g

" try only the bound values

! co

  • n

ns st tr ru uc ct ti iv ve e d di is sj ju un nc ct ti io

  • n

n

" propagate each constraint in disjunction separately " make a union of obtained restricted domains

Constraint-based Planning and Scheduling

PATH CONSISTENCY

Arc c c co

  • n

ns si is st te en nc cy y d do

  • e

es s n no

  • t

t d de et te ec ct t a al ll l i in nc co

  • n

ns si is st te en nc ci ie es s! ! Let us look at several constraints together!

! The p

pa at th h (V0,V1,…, Vm) is p pa at th h c co

  • n

ns si is st te en nt t iff for every pair of values x ∈ D0 a y ∈ Dm satisfying all the binary constraints on V0,Vm there exists an assignment of variables V1,…,Vm-1 such that all the binary constraints between the neighboring variables Vi,Vi+1 are satisfied.

! CS

SP P i is s p pa at th h c co

  • n

ns si is st te en nt t iff every path is consistent. S So

  • m

me e n no

  • t

te es s: :

" only the c

co

  • n

ns st tr ra ai in nt ts s b be et tw we ee en n t th he e n ne ei ig gh hb bo

  • r

ri in ng g v va ar ri ia ab bl le es s must be satisfied

" it is enough to explore p

pa at th hs s

  • f

f l le en ng gt th h 2 2 (Montanary, 1974)

18

X Y Z

X≠Z X≠Y Y≠Z

{1,2} {1,2} {1,2} Mackworth (1977)

Constraint-based Planning and Scheduling

slide-10
SLIDE 10

PATH REVISION

Constraints r re ep pr re es se en nt te ed d e ex xt ten ns si io

  • n

na al ll ly y via matrixes. Path consistency is realized via m ma at tr ri ix x

  • p

pe er ra at ti io

  • n

ns s E Ex xa am mp pl le e: :

" A,B,C in {1,2,3}, B>1 " A<C, A=B, B>C-2

19

B>C-2 A=B B>1 A<C C A & * * 011 001 000 100 010 001 000 010 001 110 111 111 = 000 001 000 1 2 3 123

Constraint-based Planning and Scheduling

CONSTRAINT SATISFACTION

SEARCH TECHNIQUES

slide-11
SLIDE 11

SEARCH / LABELING

In nf fe er re en nc ce e t te ec ch hn ni iq qu ue es s a ar re e ( (u us su ua al ll ly y) ) i in nc co

  • m

mp pl le et te e. . ! ! We need a s se ea ar rc ch h a al lg go

  • r

ri it th hm m to resolve the rest! L La ab be el li in ng g

" depth-first search

# assign a value to the variable # propagate = make the problem

locally consistent

# backtrack upon failure

" X in 1..5 ≈ X=1 ∨ X=2 ∨ X=3 ∨ X=4 ∨ X=5 (e

en nu um me er ra at ti io

  • n

n)

In n g ge en ne er ra al l, , s se ea ar rc ch a al lg go

  • r

ri it th hm m r re es so

  • l

lv ve es s r re em ma ai in ni in ng g d di is sj ju un nc cti io

  • n

ns s! !

" X=1 ∨ X≠1

(s ste ep p l la ab be el li in ng g)

" X<3 ∨ X≥3

(d do

  • m

ma ai in n s spl li it tt ti in ng g)

" X<Y ∨ X≥Y

(variable ordering)

21 Constraint-based Planning and Scheduling

LABELING SKELETON

! Search is combined with filtering techniques

that prune the search space.

! Lo

  • k

k-ah he ea ad d t te ec ch hn ni iq qu ue e ( (M MA AC C) )

22

procedure labeling(V,D,C) if all variables from V are assigned then return V select not-yet assigned variable x from V for each value v from Dx do (TestOK,D’) ← consistent(V,D,C∪{x=v}) if TestOK=true then R ← labeling(V,D’,C) if R ≠ fail then return R end for return fail end labeling procedure labeling(V,D,C) if all variables from V are assigned then return V select not-yet assigned variable x from V for each value v from Dx do (TestOK,D’) ← consistent(V,D,C∪{x=v}) if TestOK=true then R ← labeling(V,D’,C) if R ≠ fail then return R end for return fail end labeling

Constraint-based Planning and Scheduling

slide-12
SLIDE 12

BRANCHING SCHEMES

! Wh

hi ic ch h v va ar ri ia ab bl le e s sh ho

  • u

ul ld d b be e a as ss si ig gn ne ed d f fi ir rs st t? ?

" fa

ai il l-

  • f

fi ir rs st t p pr ri in nc ci ip pl le e

# prefer the variable whose instantiation will lead to a failure with

the highest probability

# variables with the smallest domain first (d

do

  • m

m)

# the most constrained variables first (d

de eg g)

" defines the s

sh ha ap pe e

  • f

f t th he e s se ea ar rc ch h t tr re ee e

! Wh

hi ic ch h v va al lu ue e s sh ho

  • u

ul ld d b be e t tr ri ie ed d f fi ir rs st t? ?

" su

uc cc ce ee ed d-

  • f

fi ir rs st t p pr ri in nc ci ip pl le e

# prefer the values that might belong to the solution with the

highest probability

# values with more supports in other variables # usually problem dependent

" defines the o

  • r

rd de er r

  • f

f b br ra an nc ch he es s to be explored

23 Constraint-based Planning and Scheduling

HEURISTICS IN SEARCH

Ob bs se er rv va at ti io

  • n

n 1 1: :

The s se ea ar rc ch h s sp pa ac ce e for real-life problems is so h hu ug ge that it cannot be fully explored.

! He

eu ur ri is st ti ic cs s - a guide of search

" va

al lu ue e

  • r

rd de er ri in ng g h he eu ur ri is st ti ic cs s recommend a value for assignment

" quite often lead to a solution

! What to do upon a f

fa ai il lu ur re e

  • f

f t th he e h he eu ur ri is st ti ic c?

" BT cares about the end of search (a bottom part of the search tree)

so it rather repairs later assignments than the earliest ones thus BT assumes that the heuristic guides it well in the top part

Ob bs se er rv va at ti io

  • n

n 2 2: :

The h he eu ur ri is st ti ic cs s are l le es ss s r re el li ia ab bl le e i in n t th he e e ea ar rl li ie er r p pa ar rt ts s of the search tree (as search proceeds, more information is available).

Ob bs se er rv va at ti io

  • n

n 3 3: :

The number of h he eu ur ri is st ti ic c v vi io

  • l

la at ti io

  • n

ns s is usually s sm ma al ll l.

24 Constraint-based Planning and Scheduling

slide-13
SLIDE 13

DISCREPANCIES

Di is sc cr re ep pa an nc cy y = the heuristic is not followed B Ba as si ic c p pr ri in nc ci ip pl le es s

  • f

f d di is sc cr re ep pa an nc cy y s se ea ar rc ch h:

change the order of branches to be explored

" prefer branches with l

le es ss s d di is sc cr re ep pa an nc ci ie es s

" prefer branches with e

ea ar rl li ie er r d di is sc cr re ep pa an nc ci ie es s

25

heuristic = go left heuristic = go left is before is before

Constraint-based Planning and Scheduling

DISCREPANCY SEARCH

! Li

im mi it te ed d D Di is sc cr re ep pa an nc cy S Se ea ar rc ch h (H

Ha ar rv ve ey y & & G Gi in ns sb be er rg g, , 1 19 99 95 5) )

" restricts a maximal number of discrepancies in the iteration

! Im

mp pr ro

  • v

ve ed d L LD DS S (K

Ko

  • r

rf f, , 1 19 99 96 6) )

" restricts a given number of discrepancies in the iteration

! De

ep pt th h-

  • b

bou un nd de ed d D Di is sc cre ep pa an nc cy y S Se ea ar rc ch (W

Wa al ls sh h, , 1 19 99 97 7) )

" restricts discrepancies till a given depth in the iteration

! …

26

1 2 3 4 5 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 6 7 8 9 10

* heuristic = go left

Constraint-based Planning and Scheduling

slide-14
SLIDE 14

27

4-QUEENS PROBLEM

CP IS NOT (ONLY) SEARCH!

Ba ac ck kt tr ra ac ck ki in ng g i is s n no

  • t

t v ve er ry y g goo

  • d

d 1 19 9 a at tt te em mp pt ts s Fo

  • r

rw wa ar rd d c ch he eck ki in ng g is s b be et tt te er r 3 3 a at tt te em mp pt ts s A An nd d t th he e w wi in nn ne er r i is s Lo

  • k

k A Ah he ead d 2 a at tt te em mp pt ts s

Constraint-based Planning and Scheduling

CONSTRAINT SATISFACTION

EXTENSIONS

slide-15
SLIDE 15

OPTIMIZATION PROBLEMS

! Co

  • n

ns st tr ra ai in nt t

  • p

pt ti im mi iz za at ti io

  • n

n p pr ro

  • b

bl le em m (COP) = CSP + objective function

! Ob

bj je ec ct ti iv ve e f fu un nc ct ti io

  • n

n is encoded in a constraint.

" V = objective(Xs) " heuristics for bound-estimate encoded in the filter

29

Branch and bound technique find a complete assignment (defines a new bound) store the assignment update bound (post the constraint that restricts the objective function to be better than a given bound which causes failure) continue in search (until total failure) restore the best assignment

Constraint-based Planning and Scheduling

SOFT PROBLEMS

! Ha

ar rd d c co

  • n

ns st tr ra ai in nt ts s express restrictions.

! So

  • f

ft t c co

  • n

ns st tr ra ai in nt ts s express preferences.

! Maximizing the number of satisfied soft constraints ! Can be solved via c

co

  • n

ns st tr ra ai in nt t

  • p

pt ti im mi iz za at ti io

  • n

n

" Soft constraints are encoded into an objective function

! Special frameworks for soft constraints

" Co

  • n

ns st tr ra ai in nt t h hi ie er ra ar rc ch hi ie es s (Borning et al., 1987)

# symbolic preferences assigned to constraints

" Se

em mi ir ri in ng g-

  • b

ba as se ed d C CS SP P (Bistarelli, Montanary, and Rossi, 1997)

# semiring values assigned to tuples (how well/badly a tuple satisfies

the constraint)

# soft constraint propagation

30 Constraint-based Planning and Scheduling

slide-16
SLIDE 16

DYNAMIC PROBLEMS

! In

nt te er rn na al l d dy yn na am mi ic cs s (M

Mi it tt ta al l & & F Fa al lk ke en nh ha ai in ne er r, , 1 19 99 90 0) )

" planning, configuration " variables can be active or inactive, only active variables are instantiated " ac

ct ti iv va at ti io

  • n

n ( (c co

  • n

nd di it ti io

  • n

na al l) ) c co

  • n

ns str ra ai in nt ts s

# cond(x1,…, xn) → activate(xj)

" solved like a standard CSP (a special value in the domain to denote

inactive variables)

! Ex

xt te er rn na al l d dy yn na am mi ic cs s (D

De ec ch ht te er r & & D De ec ch ht te er r, , 1 19 98 88 8) )

" on-line systems " se

eq qu ue en nc ce e

  • f

f s sta at ti ic c C CS SP Ps s, where each CSP is a result of the addition or retraction of a constraint in the preceding problem

" Solving techniques:

# reusing solutions # ma

ai in nt ta ai in ni in ng g d dy yn na am mi ic c c co

  • n

ns si is st te en nc cy y (DnAC-4, DnAC-6, AC|DC).

31 Constraint-based Planning and Scheduling

CONSTRAINTS FOR PLANNING AND SCHEDULING

slide-17
SLIDE 17

TERMINOLOGY

33

“The planning task is to construct a sequence

  • f actions that will transfer the initial state of the

world into a state where the desired goal is satisfied“ “The scheduling task is to allocate known activities to available resources and time respecting capacity, precedence (and other) constraints“

Constraint-based Planning and Scheduling

CONSTRAINTS AND P&S

! Pl

la an nn ni in ng g p pr ro

  • b

bl le em m i is s i in nt te er rn na al ll ly y d dy yn na am mi ic c. .

actions in the plan are unknown in advance ! a CSP is dynamic Solution (Kautz & Selman, 1992):

# fi

in nd di in ng g a a p pl la an n

  • f

f a a g gi iv ve en n l le en ng gth h i is s a a s sta at ti ic c p pr ro

  • b

bl le em m ! standard CSP is applicable there!

Constraint technology is frequently used to solve well-defined sub-problems such as temporal consistencies.

! Sc

ch he ed du ul li in ng g p pr ro

  • b

bl le em m i is s s st ta at ti ic c. .

all activities are known !variables and constraints are known ! standard CSP is applicable

34 Constraint-based Planning and Scheduling

slide-18
SLIDE 18

P&S VIA CSP?

! Ex

xp pl lo

  • i

it ti in ng g s st ta at te e

  • f

f t th he e a ar rt t c co

  • n

ns st tr ra ai in nt t s so

  • l

lv ve er rs s! !

" faster solver ⇒ faster planner

! Co

  • n

ns st tr ra ai in nt t m mo

  • d

de el l i is s e ex xt te en nd da ab bl le e! !

" it is possible immediately to add other variables and

constraints

" modeling numerical variables, resource and precedence

constraints for planning

" adding side constraints to base scheduling models

! De

ed di ic ca at te ed d s so

  • l

lv vi in ng g a al lg go

  • r

ri it th hm ms s e en nc co

  • d

de ed d i in n t th he e f fi il lt te er ri in ng g a al lg go

  • r

ri it th hm ms s f fo

  • r

r c co

  • n

ns st tr ra ai in nt ts s! !

" fast algorithms accessible to constraint models

35 Constraint-based Planning and Scheduling

CONSTRAINTS FOR PLANNING

CONSTRAINT MODELS

slide-19
SLIDE 19

PLANNING PROBLEM

! We deal with c

cl la as ss si ic ca al l A AI I p pl la an nn ni in ng g

" looking for the shortest sequence of actions (a

p pl la an n) transferring the initial state of world to the state satisfying some goal condition

" st

ta at te e is described using a set of m mu ul lt ti i-

  • v

va al lu ue ed d v va ar ri ia ab bl le es s

" (grounded) a

ac ct ti io

  • n

n is specified by:

# pr

re ec co

  • n

nd di it ti io

  • n

n (required values of some state variables before action execution)

# ef

ff fe ec ct t (values of some state variables after action execution)

37 Constraint-based Planning and Scheduling

EXAMPLE PROBLEM

State Variables rloc ∈ {loc1,loc2} ;; robot’s location cpos ∈ {loc1,loc2,r} ;; container’s position Actions move(r, loc1, loc2) ;; robot r at location loc1 moves to location loc2 Precond: rloc = loc1 Effects: rloc ← loc2 move(r, loc2, loc1) ;; robot r at location loc2 moves to location loc1 Precond: rloc = loc2 Effects: rloc ← loc1 load(r, c, loc1) ;; robot r loads container c at location loc1 Precond: rloc = loc1, cpos = loc1 Effects: cpos ← r load(r, c, loc2) ;; robot r loads container c at location loc2 Precond: rloc = loc2, cpos = loc2 Effects: cpos ← r unload(r, c, loc1) ;; robot r unloads container c at location loc1 Precond: rloc = loc1, cpos = r Effects: cpos ← loc1 unload(r, c, loc2) ;; robot r unloads container c at location loc2 Precond: rloc = loc2, cpos = r Effects: cpos ← loc2

38 Constraint-based Planning and Scheduling

slide-20
SLIDE 20

SOLVING APPROACH

! Formulating the problem as a CSP ! Iterative extension of the plan length ! Backward search

" instantiation of action variables " only actions relevant to the (sub)goal are tried

39

A0 V0

1

An-1 V0

n-1 … …

state transition constraints

V0

initial state goal state precondition effect frame

Constraint-based Planning and Scheduling

STRAIGHTFORWARD MODEL

  • r

ri ig gi in na al l f fo

  • r

rm mu ul la at ti io

  • n

n

" action constraints

As = act → Pre(act)s , ∀act ∈ Dom(As) As = act → Eff(act)s+1, ∀act ∈ Dom(As)

" frame constraint

As ∈ NonAffAct(Vi) → Vi

s = Vi s+1, ∀i ∈ 〈0, v-1〉

! pr

ro

  • b

bl le em ms s

" disjunctive constraints do no propagate well

! do

  • n

no

  • t

t p pr ru un ne e w we el ll l t th he e s se ea ar rc ch h s sp pa ac ce e

" a huge number of constraints (depend on the

number of actions)

! t th he e p pr ro

  • p

pa ag ga at ti io

  • n

n l lo

  • p

p t ta ak ke es s a a l lo

  • t

t

  • f

f t ti im me e

40

Ghallab et al. (2004) As = move21 → → rlocs = loc2 As = move21 → → rlocs+1 = loc1 As = move21→ → cposs = cposs+1

Constraint-based Planning and Scheduling

slide-21
SLIDE 21

MODEL REFORMULATION

41

! id

de ea a

" encapsulate the logical constraints into a table

constraint describing allowed tuples of values

" be careful about the size of the table!

re ef fo

  • r

rm mu ul la at te ed d s st tr ra ai ig gh ht tf fo

  • r

rw wa ar rd d m mo

  • d

de el l

" action constraint = a single table " frame constraint

As ∈ NonAffAct(Vi) → Vi

s = Vi s+1, ∀i ∈ 〈0, v-1〉 Barták & Toropila (2008)

Constraint-based Planning and Scheduling

As rlocs cposs rlocs+1 cposs+1 move21 loc2 loc1 move12 loc1 loc2 load1 loc1 loc1 loc1 r …

GP-CSP

! for each state variable Vi

s there is a supporting action variable

Si

s describing the action which sets the state variable (no-op

action if the variable is not changed)

  • r

ri ig gi in na al l m mo

  • d

de el l

" action constraints

As = act → Pre(act)s , ∀act ∈ Dom(As) Si

s = act → Vi s = val, ∀act ∈ Dom(Si s)

" frame constraint

Si

s+1 = no-op → Vi s = Vi s+1.

" channeling constraint

As ∈ AffAct(Vi) ↔ Si

s+1 = As, and

As ∈ NonAffAct(Vi) ↔ Si

s+1 = no-op

re ef fo

  • r

rm mu ul la at te ed d m mo

  • d

de el l

" using a single table constraint instead of action constraints " using a table constraint for a pair of channeling constraint " frame constraints are kept in the logical form

42

Do & Kambhampati (2000)

V0

s

As V0

s+1

S0

s+1 Constraint-based Planning and Scheduling

slide-22
SLIDE 22

CSP-PLAN

! id

de ea a

" focus on modeling the reason for a value of the state

variable (effect and frame constraints are merged)

  • r

ri ig gi in na al l m mo

  • d

de el l

" precondition constraint

# As = act → Pre(act)s , ∀act ∈ Dom(As)

" successor state constraint

# Vi s = val ↔ As-1 ∈ C(i,val) ∨ (Vi s-1 = val ∧ As-1 ∈ N(i))

$ C(i,val) = the set of actions containing Vi ← val among their effects $ N(i) = NonAffAct(Vi)

re ef fo

  • r

rm mu ul la at te ed d m mo

  • d

de el l

" use a single table constraint to describe preconditions " use ternary table constraints to describe successor state

constraints (one table per state variable)

43

Lopez & Bacchus (2003)

Constraint-based Planning and Scheduling

MODEL COMPARISON

  • riginal

reformulated straightforward n(ap+ae+v) n(1+v) GP-CSP n(ap+ae+3v) n(1+3v) CSP-Plan n(ap+vd) n(1+v)

44

The total n nu um mb be er r

  • f

f c co

  • n

ns st tr ra ai in nt ts s

n - number of actions in the plan a - number of grounded actions in the problem v - number of multi-valued variables p - average number of preconditions per action e - average number of effects per action

Constraint-based Planning and Scheduling

slide-23
SLIDE 23

MODEL COMPARISON

The r ru un nt ti im me e to solve selected problems from IPC 1-5 (logarithmic scale)

45

driverlog-p1 mystery-p1 pipesworld-p01 elevator-p-2-1 mystery-p3 logistics-old-p4 schedule-p-2-1 zenotravel-p2 blocks-p-4-1 schedule-p-2-4 psr-p14 tpp-p03 psr-p10 schedule-p-3-9 schedule-p-3-7 rovers-p02 psr-p12 elevator-p-3-0 rovers-p04 zenotravel-p3 elevator-p-3-2 depots-p1 elevator-p-3-1 blocks-p-5-1 rovers-p01 psr-p13 psr-p11 tpp-p04 gripper-p1 airport-p03 blocks-p-5-0 schedule-p-4-0 rovers-p03 zenotravel-p4 blocks-p-6-1 blocks-p-5-2 logistics-old-p5

1E-3 0,01 0,1 1 10 100 1000 10000

Time (s)

Straightforward Model Straightforward Model: Refor.

  • M. a la GP-CSP
  • M. a la GP-CSP: Refor.
  • M. a la CSP-PLAN
  • M. a la CSP-PLAN: Refor.

Constraint-based Planning and Scheduling

TIMELINES

! Planning can also be seen as s

syn nc ch hr ro

  • ni

iz ze ed d c ch ha an ng ges s o

  • f

f s st ta at te e v va ar ri ia ab bl le es s.

! Evolution of each variable is described using finite state automaton. ! Planning is about finding synchronized paths in all automata.

m

  • v

e ( r , l

  • c

1 , l

  • c

2 )

loc1 loc2

rloc

r loc1 loc2

cpos

loc1 loc2 loc1 loc2 r

rloc cpos

move(r,loc1,loc2) no-op(loc2) no-op(loc2) load(r,c,loc2) move(r,loc2,loc1) unload(r,c,loc1) no-op(r) no-op(loc1) 46 Constraint-based Planning and Scheduling

Barták (2011) no

  • p

p a ac ct ti io

  • n

n = = v va al lu ue e

  • f

f s st tat te e v va ar ri ia ab bl le e i is s n no

  • t

c ch han ng ge ed d in ni it ti ia al v va al lu ue e go

  • a

al l v va al lu ue e

slide-24
SLIDE 24

CONSTRAINT MODEL (OVERVIEW)

! ti

im me el li in ne e m mo

  • d

de el l

! state and action variables organized to „layers“

state variables action variables action sequencing sequencing synchronisation constraint

47 Constraint-based Planning and Scheduling

Barták (2011)

SEARCH STRATEGY

! a more or less standard CP labeling procedure ! instantiating (by the search algorithm) only the

a ac ct ti io

  • n

n v va ar ri ia ab bl le es s

" the state variables are instantiated by inference

! va

ar ri ia ab bl le e s se el le ec ct ti io

  • n

n

" dom heuristic (only variables with real action in their

domain are assumed)

! va

al lu ue e s se el le ec ct ti io

  • n

n (in two steps)

" split the domain into no-op actions (explored first) and

real actions

" domains with real actions only are enumerated then

48 Constraint-based Planning and Scheduling

Barták (2011)

slide-25
SLIDE 25

SUMMARY RESULTS (SOLVED PROBLEMS)

pl la an nn ni in ng g do

  • m

ma ai in n Se eP P P Pa aP P airport (15) 4 6 blocks (16) 7 7 depots (10) 2 2 driverlog (15) 4 12 2 elevator (30) 30 27 freecell (10) 1 3

  • penstacks (7)

5 rovers (10) 4 6 tpp (15) 4 8 zenotravel (15) 6 11 1

49 Constraint-based Planning and Scheduling

problems from International Planning Competition, runtime limit 30 minutes Barták (2011)

DETAILED RESULTS (RUNTIMES)

problem plan length runtime (ms) SeP PaP SeP PaP par seq zenotravel-p01 1 1 1 10 20 zenotravel-p02 6 5 6 60 50 zenotravel-p03 6 5 9 300 13 30 zenotravel-p04 8 5 11 970 13 30 zenotravel-p05 11 5 14 153 990 24 40 zenotravel-p06 11 5 12 530 390 510 zenotravel-p07 ≥12 6 16

  • 56

60 zenotravel-p08 ≥10 5 15

  • 1

6 69 90 zenotravel-p09 ≥11 6 24

  • 14

45 5 7 76 60 zenotravel-p10 ≥12 6 24

  • 25

52 2 04 40 zenotravel-p11 ≥9 6 16

  • 41

1 7 78 80

50 Constraint-based Planning and Scheduling

Barták (2011)

slide-26
SLIDE 26

CONSTRAINTS FOR PLANNING

TEMPORAL REASONING

FOUNDATIONS

Wh ha at t i is s t ti im me e? ? The mathematical structure of time is generally a s se et t w wi it th h t tr ra an ns si it ti iv ve e a an nd d a as sy ym mm me et tr ri ic c

  • r

rd de er ri in ng g

  • p

pe er ra at ti io

  • n

n. The set can be continuous (reals) or discrete (integers). The planning/scheduling systems need to m ma ai in nt ta ai in n c co

  • n

ns si is st te en nt t i in nf fo

  • r

rm ma at ti io

  • n

n a ab bo

  • u

ut t t ti im me e r re el la at ti io

  • n

ns s. . We can see time relations:

! qu

ua al li it ta at ti iv ve el ly y

relative ordering (A finished before B) typical for modeling causal relations in planning

! qu

ua an nt ti it ta at ti iv ve el ly y

absolute position in time (A started at time 0) typical for modeling exact timing in scheduling

52 Constraint-based Planning and Scheduling

slide-27
SLIDE 27

QUALITATIVE APPROACH (EXAMPLE)

! Robot starts entering a loading zone at time t1 and stops there at time t2. ! Crane starts picking up a container at t3 and finishes putting it down at t4. ! At t5 the container is loaded onto the robot and stays there until time t6.

N Ne et tw wo

  • r

rk ks s

  • f

f t te em mp po

  • ra

al l c co

  • n

ns str ra ai in nt ts s:

53

entering t1 t2 i1 picking up and loading t3 t4 i2 loaded t5 t6 i3 i1 i2 i3 before starts before meets t1 t2 t3 t4 t5 t6 ≤ < < < < = Ghallab et al. (2004)

Constraint-based Planning and Scheduling

QUALITATIVE APPROACH (FORMALLY)

When m mo

  • d

de el li in ng g t ti im me e we are interested in:

" te

em mp po

  • r

ra al l r re ef fe er re en nc ce es s (when something happened or hold)

# ti

im me e p po

  • i

in nt ts s (instants) when a state is changed i in ns st ta an nt t is a variable over the real numbers

# ti

im me e p pe er ri io

  • d

ds s (intervals) when some proposition is true i in nt te er rv va al l is a pair of variables (x,y) over the real numbers, such that x<y

" te

em mp po

  • r

ra al l r re el la at ti io

  • n

ns s between the temporal references

# or

rd de er ri in ng g of temporal references

54 Constraint-based Planning and Scheduling

slide-28
SLIDE 28

POINT ALGEBRA

sy ym mb bo

  • l

li ic c c ca al lc cu ul lu us s m mo

  • d

de el li in ng g r re el la at ti io

  • n

ns s b be et tw we ee en n i in ns sta an nt ts s without necessarily ordering them or allocating to exact times There are three possible p pr ri im mi it ti iv ve e r re el la at ti io

  • n

ns s between instants t1 and t2:

" [t1 < t2], [t1 > t2], [t1 = t2]

! A set of primitives, meaning a disjunction of primitives, can describe any (even

incomplete) relation between instants:

" R = { {}, {<}, {=}, {>}, {<,=}, {>,=}, {<,>}, {<,=,>} }

# {} means failure # {<,=,>} means that no ordering information is available

" useful operations on R:

# se

et t

  • p

pe er ra at ti io

  • n

ns s ∩ (conjunction), ∪ (disjunction)

# co

  • m

mp po

  • s

si it ti io

  • n

n

  • p

pe er ra at ti io

  • n

n ( ([t1 < t2] and [t2 =< t3] gives [t1 < t3] ) )

Co

  • n

ns si is st te en nc cy y: :

" The P

PA A n ne et tw wo

  • r

rk k consisting of instants and relations between them is c co

  • n

ns si is st te en nt t when it is possible to assign a real number to each instant in such a way that all the relations between instants are satisfied.

" To make the PA network consistent it is enough to make its transitive closure, for

example using techniques of p pa at th h c co

  • n

ns si is st te en nc cy y.

# [t1 r t2] and [t1 q t3] and [t3 s t2] gives [t1 r ∩ (qs) t2]

55

Vilain & Kautz (1986)

Constraint-based Planning and Scheduling

INTERVAL ALGEBRA

sy ym mb bo

  • l

li ic c c ca al lc cu ul lu us s m mo

  • d

de el li in ng g r re el la at ti io

  • n

ns s b be et tw we een n i in nt te er rv va al ls s (interval is defined by a pair of instants i- and i+, [i-<i+]) There are thirteen primitives: C Co

  • n

ns si is st te en nc cy y: :

" The I

IA A n ne et tw wo

  • r

rk k is c co

  • n

ns si is st te en nt t when it is possible to assign real numbers to xi

  • ,xi

+

  • f each interval xi in such a way that all the relations between intervals are

satisfied.

" Consistency-checking problem for IA networks is an NP-complete problem. 56

x before y x+<y- x meets y x+=y- x overlaps y x-<y-<x+ & x+<y+ x starts y x-=y- & x+<y+ x during y y-<x- & x+<y+ x finishes y y-<x- & x+=y+ x equals y x-=y- & x+=y+ b’, m’, o’, s’, d’, f’ symmetrical relations

x y x y x y x y x y x y x y

Allen (1983)

Constraint-based Planning and Scheduling

slide-29
SLIDE 29

QUALITATIVE APPROACH (EXAMPLE)

! Two ships, Uranus and Rigel, are directing towards a dock. ! The Uranus arrival is expected within one or two days. ! Uranus will leave either with a light cargo (then it must stay in the dock

for three to four days) or with a full load (then it must stay in the dock at least six days).

! Rigel can be serviced either on an express dock (then it will stay there

for two to three days) or on a normal dock (then it must stay in the dock for four to five days).

! Uranus has to depart one to two days after the arrival of Rigel. ! Rigel has to depart six to seven days from now.

57

now ArriveUranus DepartUranus ArriveRigel DepartRigel [1,2] [6,7] [1,2] [3,4] or [6,∞ ∞] [2,3] or [4,5] Ghallab et al. (2004)

Constraint-based Planning and Scheduling

QUALITATIVE APPROACH (FORMALLY)

! The basic temporal primitives are again t

ti im me e p po

  • i

in nt ts s, but now the relations are numerical.

! Si

im mp pl le e t te em mp po

  • r

ra al l c co

  • n

ns st tr ra ai in nt ts s for instants ti and tj:

" unary: ai ≤ ti ≤ bi " binary: aij ≤ ti–tj ≤ bij,

where ai, bi, aij, bij are (real) constants

No

  • t

te es s: :

" Unary relation can be converted to a binary one, if we use

some fix origin reference point t0.

" [aij,bij] denotes the constraint between instants ti a tj. " It is possible to use disjunction of simple temporal

constraints.

58 Constraint-based Planning and Scheduling

slide-30
SLIDE 30

STN

Si im mp pl le e T Te em mp po

  • r

ra al l N Ne et tw wo

  • r

rk k ( (S ST TN N) )

" only simple temporal constraints rij= [aij,bij] are used " op

pe er ra at ti io

  • n

ns s:

# composition: rij rjk = [aij+ajk, bij+bjk] # intersection: rij ∩ r’ij = [max{aij,a’ij}, min{bij,b’ij}]

" ST

TN is c co

  • n

ns si is st te en nt t if there is an assignment of values to instants satisfying all the temporal constraints.

" Pa

at th h c co

  • n

ns si is st te en nc cy y is a complete technique making STN consistent (all inconsistent values are filtered out, one iteration is enough). Another option is using all-pairs minimal distance F Fl lo

  • y

yd d-

  • W

Wa ar rs sh ha al ll l a al lg go

  • r

ri it th hm m.

59

Dechter et al. (1991)

Constraint-based Planning and Scheduling

ALGORITHMS

Pa at th h c co

  • n

ns si is st ten nc cy

" finds a transitive closure of

binary relations r

" one iteration is enough for STN

(in general, it is iterated until any domain changes)

" works incrementally

Fl lo

  • y

yd d-

  • W

Wa ar rs sh ha al ll l a al lg go

  • r

ri it th hm m

" finds minimal distances between

all pairs of nodes

" First, the temporal network is

converted into a directed graph

# there is an arc from i to j with

distance bij

# there is an arc from j to i with

distance -aij.

" STN is consistent iff there are no

negative cycles in the graph, that is, d(i,i)≥0

60

  • ne iteration for STN

general

Constraint-based Planning and Scheduling

slide-31
SLIDE 31

TCSP

Te em mp po

  • r

ra al l C Co

  • n

ns st tr ra ai in nt t N Ne et tw wo

  • r

rk k ( (T TC CS SP P) )

" It is possible to use d

di is sj ju un nc ct ti io

  • n

ns s

  • f

f s si im mp pl le e t te em mp po

  • r

ra al l c co

  • n

ns st tr ra ai in nt ts s.

" Operations and ∩ are being done over the sets of

intervals.

" TC

CS SP P is c co

  • n

ns si is st te en nt t if there is an assignment of values to instants satisfying all the temporal constraints.

" Path consistency does not guarantee in general the

consistency of the TCSP network!

" A straightforward a

ap pp pr ro

  • a

ac ch h (constructive disjunction):

# decompose the temporal network into several STNs by choosing one

disjunct for each constraint

# solve obtained STN separately (find the minimal network) # combine the result with the union of the minimal intervals

61

Dechter et al. (1991)

Constraint-based Planning and Scheduling

CONSTRAINTS FOR SCHEDULING

BASE CONSTRAINT MODEL

slide-32
SLIDE 32

SCHEDULING PROBLEM

Sc ch he ed du ul li in ng g deals with o

  • p

pt ti im mal l r re es so

  • u

ur rc ce e a al ll lo

  • c

ca at ti io

  • n

n of a given set of activities i in n t ti im me e. Ex xa am mp pl le e (two workers building a bicycle):

" activities have a fixed duration, cannot be interrupted and the

precedence constraints must be satisfied

63

1 2 3 4 5 6 7 8 9 10 7 7 7 3 2 2 2 8 8 18 4 5 6 1 2 3 8 9 10 7 32 An optimal schedule minimizing the overall time ac ct ti iv vi it ty y d du ur ra at ti io

  • n

n

Constraint-based Planning and Scheduling

SCHEDULING MODEL

! Sc

ch he ed du ul li in ng g p pr ro

  • b

bl le em m is static so it can be directly e en nc co

  • d

de ed d a as s a a C CS SP P.

! Constraint technology is used for f

fu ul ll l s sc ch he ed du ul li in ng g. C Co

  • n

ns st tr ra ai in nt t m mo

  • d

de el l: :

" Va

ar ri ia ab bl le es s

# position of activity A in time and space # time allocation:

st ta ar rt t( (A A) ), [p p( (A A) ), , e en nd d( (A A) )] ]

# resource allocation: re

es so

  • u

ur rc ce( (A A) )

" Do

  • m

ma ai in n

# re

el le ea as se e t ti im me es s and d de ea ad dl li in ne es s for the time variables

# al

lt ter rn na at ti iv ve e r re es so

  • u

ur rc ces s for the resource variables

" Co

  • n

ns st tr ra ai in nt ts s

# sequencing and resource capacities

64 Constraint-based Planning and Scheduling

slide-33
SLIDE 33

SCHEDULING MODEL (CONSTRAINTS)

! Ti

im me e r re el la at ti io

  • n

ns s

" st

ta ar rt t( (A A) ) + + p p( (A A) ) = = e en nd d( (A A) )

" sequencing

# B «

« A ! e en nd d( (B B) ) ≤ s st ta ar rt t( (A A) )

! Re

es so

  • u

ur rc ce e c ca ap pa ac ci it ty y c con ns st tr ra ai in nt ts s

" unary resource (activities cannot overlap)

# A «

« B ∨ B « « A (∨ resource(A) ≠ resource(B)) ! e en nd d( (A A) ) ≤ s st ta ar rt t( (B B) ) ∨ e en nd d( (B B) ) ≤ s st ta ar rt t( (A A) )

65

B A

Constraint-based Planning and Scheduling

CONSTRAINTS FOR SCHEDULING

RESOURCE CONSTRAINTS

slide-34
SLIDE 34

RESOURCES

! Re

es so

  • u

ur rc ce es s a ar re e u us se ed d i in n s sl li ig gh ht tl ly y d di if ff fe er re en nt t m me ea an ni in ng gs s i in n p pl la an nn ni in ng g a an nd d s sc ch he ed du ul li in ng g! ! r re es so

  • u

ur rc ces s i in n s sc ch he ed du ul li in ng g

= m ma ac ch hi in ne es s (space) for processing the activities

re es so

  • u

ur rc ces s i in n p pl la an nn ni in ng g

= consumed/produced m ma at te er ri ia al l by the activities

" resource in the scheduling sense is often handled

via the logical precondition (e.g. hand is free)

67 Constraint-based Planning and Scheduling

RESOURCE TYPES

68

! un

na ar ry y ( (d di is sj ju un nc cti iv ve e) ) r re es so

  • u

ur rc ce e

" a single activity can be processed at any time

! cum

mu ul la at ti iv ve e ( (d di is sc cre et te e) ) r re es so

  • u

ur rc ce

" several activities can be processed in parallel

if capacity is not exceeded.

! pr

ro

  • d

du uc ci ib bl le e/ /c co

  • n

ns su um ma ab bl le e r re es so

  • u

ur rc ce e

" activity consumes/produces some quantity of the

resource

" minimal capacity is requested (consumption) and

maximal capacity cannot be exceeded (production)

Constraint-based Planning and Scheduling

slide-35
SLIDE 35

UNARY RESOURCES

! Activities c

ca an nn no

  • t

t

  • v

ve er rl la ap p.

! We assume that activities are u

un ni in nt te er rr ru up pt ti ib bl le e.

" un

ni in nt te er rr ru up pt ti ib bl le e activity occupies the resource from its start till its completion

" in

nt te er rr ru up pt ti ib bl le e (preemptible) activity can be interrupted by another activity No

  • t

te e: : There exists variants of the presented filtering algorithms for interruptible activities.

! A simple model with d

di is sj ju un nc ct ti iv ve e c co

  • n

ns st tr ra ai in nt ts s

" A

« « B B ∨ B B « « A A

! e en nd d( (A A) ) ≤ s sta ar rt t( (B B) ) ∨ e en nd d( (B B) ) ≤ s sta ar rt t( (A A) )

69

time time

start(A) end(A) Constraint-based Planning and Scheduling

EDGE FINDING

Wh ha at t h ha ap pp pe en ns s i if f a ac ct ti iv vi it ty y A A i is s n no

  • t

t p pr ro

  • c

ce es ss sed d f fi ir rs st t? ? N No

  • t

e eno

  • u

ug gh h t ti im me e f fo

  • r

r A A, , B B, , a an nd d C C a an nd d t th hu us s A A m mu us st t b be e f fi ir rs st! !

70

4 16 7 15 6 16 A (2) C (5)

Baptiste & Le Pape (1996)

B (4) A (2) 4 7 7 15 6 16 B (4) C (5)

Constraint-based Planning and Scheduling

slide-36
SLIDE 36

EDGE FINDING (INFERENCE RULES)

Th he e i in nf fe er re en nc ce e r ru ul le es s:

p( (Ω Ω ∪ ∪ { {A A} }) ) > > l lc ct t( (Ω Ω ∪ ∪ { {A A} }) )

  • e

es st t( (Ω Ω) ) ⇒ ⇒ A A« «Ω Ω p p( (Ω Ω ∪ ∪ { {A A} }) ) > > l lc ct t( (Ω Ω) )

  • e

es st t( (Ω Ω ∪ ∪ { {A A} }) ) ⇒ ⇒ Ω Ω« «A A A A« «Ω Ω ⇒ ⇒ e en nd d( (A A) ) ≤ ≤ m mi in n{ { l lc ct t( (Ω Ω' ') )

  • p

p( (Ω Ω' ') ) | | Ω Ω' '⊆ ⊆Ω Ω } } Ω Ω« «A A ⇒ ⇒ s st ta ar rt t( (A A) ) ≥ ≥ m ma ax x{ { e es st t( (Ω Ω' ') ) + + p p( (Ω Ω' ') ) | | Ω Ω' '⊆ ⊆Ω Ω } }

In n p pr ra ac ct ti ic ce e:

" there are n.2n pairs (A,Ω

Ω) to consider (too many!)

" instead of Ω use so called t

ta as sk k i in nt te er rv va al ls s [X,Y] {C | est(X) ≤ est(C) ∧ lct(C) ≤ lct(Y)}

! time complexity O(n3), frequently used incremental algorithm

" there are also O(n2) and O(n.log n) algorithms

71

Baptiste & Le Pape (1996)

Constraint-based Planning and Scheduling

NOT-FIRST/NOT-LAST

Wh ha at t h ha ap pp pe en ns s i if f a ac ct ti iv vi it ty y A A i is s p pr ro

  • c

ce es sse ed d f fi ir rs st t? ? N No

  • t

t e en no

  • u

ug gh h t ti im me e f fo

  • r

r B B a an nd d C C a an nd d t th hu us s A A c ca an nn no

  • t

t b be e f fi ir rs st t! !

72

4 16 7 15 6 16 A (2) C (4) B (5)

Torres & Lopez (2000)

4 16 7 15 8 16 A (2) C (4) B (5)

Constraint-based Planning and Scheduling

slide-37
SLIDE 37

NOT-FIRST/NOT-LAST (INFERENCE RULES)

No

  • t

t-

  • f

fi ir rs st t i in nf fe er re en nc ce e r ru ul le es s: :

p( (Ω Ω∪ ∪{ {A A} }) ) > > l lc ct t( (Ω Ω) )

  • e

es st t( (A A) ) ⇒ ⇒ ¬ ¬ A A«Ω Ω ¬ ¬ A A« «Ω Ω ⇒ ⇒ s st ta ar rt t( (A A) ) ≥ ≥ m mi in n{ { e ec ct t( (B B) ) | | B B∈ ∈Ω Ω } }

No

  • t

t-

  • l

la as st t ( (s sy ym mm me et tr ri ic cal l) ) i in nf fe er re en nc ce r ru ul le es s: :

p( (Ω Ω∪ ∪{ {A A} }) ) > > l lc ct t( (A A) )

  • e

es st t( (Ω Ω) ) ⇒ ⇒ ¬ ¬ Ω Ω« «A A ¬ ¬ Ω Ω« «A A ⇒ ⇒ e en nd d( (A A) ) ≤ m ma ax x{ { l ls st t( (B B) ) | | B B∈ ∈Ω Ω } }

In n p pr ra ac ct ti ic ce: :

" can be implemented with time complexity O(n2)

and space complexity O(n)

73

Torres & Lopez (2000)

Constraint-based Planning and Scheduling

CUMULATIVE RESOURCES

! Each a

ac ct ti iv vi it ty y u us se es s s so

  • m

me e c ca ap pa ac ci it ty y of the resource – c ca ap p( (A A) ).

! Activities can be p

pr ro

  • c

ce es ss se ed d i in n p pa ar ra al ll le el l if a resource capacity is not exceeded.

! Resource capacity m

ma ay y v va ar ry y i in n t ti im me e

" modeled via fix capacity over time and fixed activities

consuming the resource until the requested capacity level is reached

74

fix capacity time

used capacity

fixed activities for making the capacity profile

Constraint-based Planning and Scheduling

slide-38
SLIDE 38

AGGREGATED DEMANDS

Wh he er re e i is s e eno

  • u

ug gh h c ca ap pa ac ci it ty y f fo

  • r

r p pr ro

  • c

ce es ssi in ng g t th he e a ac ct ti iv vi it ty y? ? H Ho

  • w

w t th he e a ag gg gr re ega at te ed d d de em ma an nd d i is s c co

  • n

ns str ru uc ct te ed d? ?

75

time

used capacity

resource capacity aggregated demand

Baptiste et al. (2001)

time

used capacity

resource capacity aggregated demand

activity must be processed here

Constraint-based Planning and Scheduling

TIMETABLE CONSTRAINT

! How to ensure that capacity is not exceeded at

any time point?*

! Ti

im me et ta ab bl le e for the activity A is a set of Boolean variables X X( (A A, ,t t) ) indicating whether A is processed in time t.

76

cap A cap t

i i

A end t A start i ≤

< ≤ ) ( ) (

) (

) , ( ) ( ) ( , ) ( ) , ( t A X A end t A start i t cap A cap t A X t

i i i A i i

i

⇔ < ≤ ∀ ≤ ⋅ ∀ ∑

* discrete time is expected

Baptiste et al. (2001) cap=1 in unary resource

Constraint-based Planning and Scheduling

slide-39
SLIDE 39

TIMETABLE CONSTRAINT (FILTERING EXAMPLE)

! in

ni it ti ia al l s si it tu ua at ti io

  • n

n

! so

  • m

me e p po

  • s

si it ti io

  • n

ns s f fo

  • r

rb bi id dd de en n d du ue e t to

  • c

ca ap pa ac ci it ty y

! ne

ew w s si it tu ua at ti io

  • n

n

77

{0,1}

X(A,t)

est(A) ect(A) lst(A) lct(A)

{0,1}

X(A,t)

{0,1}

X(A,t)

est(A) lst(A) ect(A) lct(A)

{0,1}

est(A) ect(A) lst(A) lct(A)

{0,1} {0,1} 1

Constraint-based Planning and Scheduling

RESERVOIRS

Pr ro

  • d

du uc ci ib bl le e/ /c co

  • n

ns su um ma ab bl le e r re es so

  • u

ur rc ce

! Each event describes how much it increases or

decreases the level of the resource.

! Cumulative resource can be seen as a special case

  • f producible/consumable resource (reservoirs).

" Each activity consists of consumption event at the start

and production event at the end.

78

A

  • 1

B

  • 1

D +1

Constraint-based Planning and Scheduling

slide-40
SLIDE 40

RELATIVE ORDERING

When time is relative (ordering of activities) then edge-finding and aggregated demand deduce nothing We can still use information about ordering of events and resource production/consumption! Ex xa am mp pl le e: : Reservoir: events consume and supply items

79

A

  • 1

B

  • 1

C

  • 1

D +1

Constraint-based Planning and Scheduling

RESOURCE PROFILES

! Event A „produces“ p

pr ro

  • d

d( (A A) ) quantity:

" positive number means p

pr ro

  • d

du uc ct ti io

  • n

n

" negative number means c

co

  • n

ns su um mp pt ti io

  • n

n

! op

pt ti im mi is st ti ic c r re es so

  • u

ur rce e p pr ro

  • f

fi il le e ( (o

  • r

rp p) )

" maximal possible level of the resource when A happens " events known to be before A are assumed together with the production

events that can be before A

  • r

rp p( (A A) ) = = I In ni it tL Le ev ve el l + + p pr ro

  • d

d( (A A) ) + + ∑B

B« «A A p

pro

  • d

d( (B B) ) + + ∑B

B? ?A A ∧ p pr ro

  • d

d( (B B) )> >0 0 p

pr ro

  • d

d( (B B) )

! pe

es ss si im mi is st ti ic c r re es so

  • u

ur rc ce e p pr ro

  • f

fi il le e ( (p pr rp p) )

" minimal possible level of the resource when A happens " events known to be before A are assumed together with the consumption

events that can be before A

pr rp p( (A A) ) = = I In ni it tL Le ev ve el l + + p pr ro

  • d

d( (A A) ) + + ∑B

B« «A A p

pr ro

  • d

d( (B B) ) + + ∑B

B? ?A A ∧ p pr ro

  • d

d( (B B) )< <0 0 p

pr ro

  • d

d( (B B) )

80

*B?A means that order of A and B is unknown yet Cesta & Stella (1997)

Constraint-based Planning and Scheduling

slide-41
SLIDE 41

ORP FILTERING (INFERENCE RULES)

  • r

rp p( (A A) ) < < M Mi in nL Le ev ve el l ⇒ ⇒ f fa ai il l

" “despite the fact that all production is planned

before A, the minimal required level in the resource is not reached”

  • r

rp p( (A A) ) – – p pr ro

  • d

d( (B B) ) – – ∑B«

«C C ∧ ∧ C C? ?A A ∧ ∧ p pr ro

  • d

d( (C C) )> >0 0 p

pr ro

  • d

d( (C C) ) < < M Mi in nL Le ev ve el l ⇒ B B« «A A for any B such that B?A and prod(B)>0

" “if production in B is planned after A and the

minimal required level in the resource is not reached then B must be before A”

81

Cesta & Stella (1997)

Constraint-based Planning and Scheduling

PRP FILTERING (INFERENCE RULES)

pr rp( (A A) ) > > M Ma ax xL Le ev ve el l ⇒ f fa ai il l

" “despite the fact that all consumption is planned

before A, the maximal required level (resource capacity) in the resource is exceeded”

pr rp p( (A A) ) – – p pr ro

  • d

d( (B B) ) – – ∑B«

«C C ∧ ∧ C C? ?A A ∧ ∧ p pr ro

  • d

d( (C C) )< <0 0 p

pr ro

  • d

d( (C C) ) > > M Ma ax xL Le ev ve el l ⇒ B B« «A A for any B such that B?A and prod(B)<0

" “if consumption in B is planned after A and the

maximal required level in the resource is exceeded then B must be before A”

82

Cesta & Stella (1997)

Constraint-based Planning and Scheduling

slide-42
SLIDE 42

FROM TIME WINDOWS TO ORDERING

DETECTABLE PRECEDENCE

Wh ha at t h ha ap pp pe en ns s i if f a ac ct ti iv vi it ty y A A i is s p pr ro

  • c

ce es ss se ed d b be ef fo

  • r

re e B B? ?

" Restricted time windows can be used to deduce new

precedence relations. e es st t( (A A) )+ +p p( (A A) )+ +p p( (B B) ) > > l lc ct t( (B B) ) ⇒ ⇒ B B « « A A

83

7 15 6 16 B (4) A (5)

Vilím (2002)

Constraint-based Planning and Scheduling

ALTERNATIVE RESOURCES

! Ho

  • w

w t to

  • m

mo

  • d

de el l a al lt te er rn na at ti iv ve e r re es so

  • u

ur rc ce es s f fo

  • r

r a a g gi iv ve en n a ac ct ti iv vi it ty y? ?

! Use a d

du up pl li ic ca at te e a ac ct ti iv vi it ty y for each resource.

" duplicate activity participates in the respective resource

constraint but does not restrict other activities there

# „failure“ means removing the resource from the domain of

variable resource(A)

# deleting the resource from the domain of variable resource(A)

means „deleting“ the respective duplicate activity

" original activity participates in the precedence constraints

(e.g. within a job)

" restricted times of duplicate activities are propagated to

the original activity and vice versa.

84 Constraint-based Planning and Scheduling

slide-43
SLIDE 43

ALTERNATIVE RESOURCES (FILTERING RULES)

! Let Au be the duplicate activity of A allocated to

resource u ∈ res(A).

u ∈ r re es so

  • u

ur rc ce e( (A A) ) ⇒ s st ta ar rt t( (A A) ) ≤ s st ta ar rt t( (A Au) u u ∈ r re es so

  • u

ur rce e( (A A) ) ⇒ e en nd d( (A Au) ≤ e en nd d( (A A) ) s st ta ar rt t( (A A) ) ≥ m mi in n{ {s st ta ar rt t( (A Au) : : u u ∈ r re es so

  • u

ur rce e( (A A) )} } e en nd d( (A A) ) ≤ m ma ax x{ {e en nd d( (A Au) : : u u ∈ r re es so

  • u

ur rc ce e( (A A) )} } f fa ai il lu ur re e r re el la at te ed d t to

  • A

Au ⇒ r re es so

  • u

ur rce e( (A A) )\ \{ {u u} } Actually, it is maintaining c co

  • n

ns st tr ru uc ct ti iv ve e d di is sj ju un nc ct ti io

  • n

n between the alternative activities.

85 Constraint-based Planning and Scheduling

CONSTRAINTS FOR SCHEDULING

SEARCH STRATEGIES

slide-44
SLIDE 44

BRANCHING SCHEMES

Br ra an nc ch hi in ng g = = r re es so

  • l

lv vi in ng g d di is sj ju un nc ct ti io

  • n

ns s T Tr ra ad di it ti io

  • n

na al l s sc ch he ed du ul li in ng g a ap pp pr ro

  • a

ac ch he es s:

! take the c

cr ri it ti ic ca al l d de ec ci is si io

  • n

ns s f fi ir rs st t

" resolve bottlenecks … " defines the shape of the search tree " recall the fa

ai il l-

  • f

fi ir rs st t principle

! prefer an al

lt te er rn na at ti iv ve e t th ha at t l le ea av ve es s m mo

  • r

re e f fl le ex xi ib bi il li it ty y

" defines order of branches to be explored " recall the su

uc cc ce ee ed d-

  • f

fi ir rs st t principle

How to describe criticality and flexibility formally?

87 Constraint-based Planning and Scheduling

SLACK

Sl la ac ck k is a formal description of flexibility

! Slack for

a a g gi iv ve en n

  • r

rd de er r

  • f

f t tw wo

  • a

ac ct ti iv vi it ti ie es s

„free time for shifting the activities“ slack(A « « B) = max(end(B)) - min(start(A)) - p({A,B})

! Slack for

t tw wo

  • a

ac ct ti iv vi it ti ie es s

slack({A,B}) = max{ slack(A « « B), slack(B « « A) }

! Slack for

a a g gr ro

  • u

up p

  • f

f a ac ct ti iv vi it ti ie es s

slack(Ω) = max(end(Ω)) - min(start(Ω)) - p(Ω)

88

A B slack for A«B

Smith and Cheng (1993)

Constraint-based Planning and Scheduling

slide-45
SLIDE 45

ORDER BRANCHING

A « « B B ∨ ∨ ¬ A A « « B B

! Wh

hi ic ch a ac cti iv vi it ti ie es s s sh ho

  • u

ul ld d b be e

  • r

rd de er re ed d f fi ir rs st t? ?

" the most critical pair (first-fail) " the pair with

t th he e m mi in ni im ma al l s sl la ac ck k( ({ {A A, ,B B} }) )

! Wh

hi ic ch

  • r

rd de er r s sh ho

  • u

ul ld d b be e s se el le ec cted d? ?

" the most flexible order (succeed-first) " the order with t

th he e m ma ax xi im ma al l s sl la ac ck k( (A A? ?? ?B B) )

! O(n2) choice points

89

Smith and Cheng (1993)

C«B B«C A«C C«A A«C C«A A«B B«A ACB ABC CAB x x BAC CBA BCA C«B B«C C«B B«C C«B B«C

Constraint-based Planning and Scheduling

FIRST/LAST BRANCHING

(A A « « Ω ∨ ¬A A « « Ω)

  • r

r ( (Ω Ω « « A A ∨ ¬ ¬ Ω « « A A) )

! Sh

ho

  • u

ul ld d w we e l lo

  • k

k f fo

  • r

r t th he e f fi ir rs st t

  • r

r f fo

  • r

r t th he e l la as st t a ac ct ti iv vi it ty y? ?

" select a s

sm ma al ll le er r s se et t among possible first or possible last activities (first-fail)

! Wh

hi ic ch h a ac ct ti iv vi it ty y s sh ho

  • u

ul ld d b be e s se el le ec ct te ed d? ?

" If first activity is being selected then the activity with the

s sm ma al ll le es st t m mi in n( (s st ta ar rt t( (A A) )) ) is preferred.

" If last activity is being selected then the activity with the

l la ar rg ge es st t m ma ax x( (e en nd d( (A A) )) ) is preferred.

! O(n) choice points

90

Baptiste et al. (1995)

C«B B«C A«C A«B A«C C«A C«B B«A B«C ABC ACB BAC BCA CAB CBA C«A A«B B«A

Constraint-based Planning and Scheduling

slide-46
SLIDE 46

RESOURCE SLACK

! Re

es so

  • u

ur rc ce e s sl la ac ck is defined as a slack of the set

  • f activities processed by the resource.

! Ho

  • w

w t to

  • u

us se e a a r re es so

  • u

ur rc ce s sl la ac ck k? ?

" choosing a resource on which t

th he e a ac ct ti iv vi it ti ie es s w wi il ll l b be e

  • r

rd de er re ed d first

# resource with the minimal slack (b

bo

  • t

tt tl le en ne ec ck k) preferred

" choosing a resource on which the a

ac ct ti iv vi it ty y w wi il ll l b be e a al ll lo

  • c

ca at te ed d

# resource with the maximal slack (f

fl le ex xi ib bi il li it ty y) preferred

91 Constraint-based Planning and Scheduling

CONCLUSIONS

slide-47
SLIDE 47

SUMMARY (CONSTRAINT SATISFACTION)

Ba as si ic c c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n f fr ra am me ew wo

  • r

rk k: :

! lo

  • c

ca al l c co

  • n

ns si is st te en nc cy y connecting filtering algorithms for individual constraints

! se

ea ar rc ch h resolves remaining disjunctions

Pr ro

  • b

bl le em m s so

  • l

lv vi in ng g: :

! de

ec cl la ar ra at ti iv ve e m mo

  • d

de el li in ng g of problems as a CSP

! de

ed di ic ca at te ed d a al lg go

  • r

ri it th hm ms s encoded in constraints

! special s

se ea ar rc ch h s st tr ra at te eg gi ie es s

93 Constraint-based Planning and Scheduling

SUMMARY (CONSTRAINTS IN PLANNING AND SCHEDULING)

Co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n t te ec ch hn ni iq qu ue es s a ar re e u us se ed d

! for s

so

  • l

lv vi in ng g p pa ar rt ti ic cu ul la ar r s su ub b-

  • p

pr ro

  • b

bl le em ms s (temporal and resource consistency)

! for m

mo

  • d

de el li in ng g a an nd d s so

  • l

lv vi in ng g a a c co

  • m

mp pl le et te e p pr ro

  • b

bl le em m

It t i is s p po

  • s

ss si ib bl le e

! to e

ex xp pl lo

  • i

it t c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n p pr ri in nc ci ip pl le es s in own algorithms

! to u

us se e a an n e ex xi is st ti in ng g c co

  • n

ns st tr ra ai in nt t s so

  • l

lv ve er r (modeling, adding specific inference techniques, and customizing search strategies)

94 Constraint-based Planning and Scheduling

slide-48
SLIDE 48

CONSTRAINT SOLVERS

! It is not necessary to program all the presented techniques

from scratch!

! Us

se e e ex xi is st ti in ng g c co

  • n

ns st tr ra ai in nt t s so

  • l

lv ve er rs s (packages)!

" provide i

im mp pl le em me en nt ta at ti io

  • n

n

  • f

f d da at ta a s st tr ru uc ct tu ur re es s for modeling variables’ domains and constraints

" provide a basic c

co

  • n

ns si is ste en nc cy y f fr ra am me ew wo

  • r

rk k

" provide f

fi il lt te er ri in ng g a al lg go

  • r

ri it th hm ms s for many constraints (including global constraints)

" provide basic s

se ea ar rc ch h s str ra at te eg gie es s

" usually e

ex xt te en nd di ib bl le e (new filtering algorithms, new search strategies)

S So

  • m

me e s sy ys st te em ms s with c co

  • n

ns st tr ra ai in nt t s sa at ti is sf fa ac ct ti io

  • n

n p pa ac ck ka ag ge es s:

" Pr

ro

  • l

lo

  • g

g: SICStus Prolog, ECLiPSe, CHIP, Prolog IV, GNU Prolog, IF/ Prolog

" C/

/C C+ ++ +: ILOG CP Optimizer, Gecode, CHIP++

" Ja

av va a: Choco, JCK, JCL, Koalog

" Oz

z: Mozart

95

Constraint-based Planning and Scheduling

CONSTRAINT-BASED PLANNING AND SCHEDULING

Ro

  • m

ma an n B Ba ar rt tá ák k

Ch ha ar rl le es s U Un ni iv ve ers sit ty y, , P Pr ra ag gue e ( (C CZ Z) )

roman.bartak@mff.cuni.cz http://ktiml.mff.cuni.cz/~bartak

slide-49
SLIDE 49

COMMENTED BIBLIOGRAPHY

Allen, J.F. (1983). Maintaining knowledge about temporal intervals. Communications of the ACM, 21(11): 832-843.

Introduction of interval algebra and description of path-consistency filtering algorithm for handling it.

Baptiste, P. and Le Pape, C. (1996). Edge-finding constraint propagation algorithms for disjunctive and cumulative scheduling. Proceedings of the Fifteenth Workshop of the U.K. Planning Special Interest Group (PLANSIG).

Description of edge-finding rules for non-preemptive disjunctive scheduling, preemptive and mixed disjunctive scheduling, and non-preemptive cumulative scheduling, and a quadratic algorithm for not- first/not-last rules.

Baptiste, P.; Le Pape, C.; Nuijten, W. (2001). Constraint-based Scheduling: Applying Constraints to Scheduling Problems. Kluwer Academic Publishers, Dordrecht.

A comprehensive text on using constraint satisfaction techniques in scheduling with detailed description of many filtering algorithms for resource constraints.

Barták, R. (2005). Constraint Satisfaction for Planning and Scheduling. In Ionannis Vlahavas, Dimitris Vrakas (eds.): Intelligent Techniques for Planning, Idea Group, 2005, pp. 320-353

An introductory and survey text about constraint satisfaction techniques for planning and scheduling.

Barták, R. (2011). On Constraint Models for Parallel Planning: The Novel Transition Scheme. In Anders Kofod-Petersen, Fredrik Heintz, Helge Lagseth (eds.) Proceedings of the Eleventh Scandinavian Conference on Artificial Intelligence (SCAI 2011), pp. 50-59, Frontiers of Artificial Intelligence, Volume 227, IOS Press, 2011.

A constraint model for parallel planning based on finite-state automata representing state transitions of multi-valued state variables.

Barták, R. and Čepek, O. (2005). Incremental Propagation Rules for a Precedence Graph with Optional Activities and Time Windows. In Proceedings of The 2nd Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA), Volume II, Stern School of Business, New York, 552-560.

Description of incremental algorithms for maintaining a transitive closure of the precedence graph with

  • ptional activities and realising the energy precedence constraint on unary resources.

Barták, R. and Čepek, O. (2007). Temporal Networks with Alternatives: Complexity and Model. In Proceedings of the Twentieth International Florida AI Research Society Conference (FLAIRS 2007). AAAI Press, 641-646.

Temporal networks with optional nodes are introduced, their complexity is studied and a constraint model is proposed.

Barták, R. and Toropila, D. (2008). Reformulating Constraint Models for Classical Planning. In Proceedings of the Twenty-first International Florida AI Research Society Conference (FLAIRS 2008). AAAI Press, 525-530.

Reformulation of GP-CSP and CSP-PLAN constraint models is proposed.

Brucker, P. (2001). Scheduling Algorithms. Springer Verlag.

A comprehensive book on traditional scheduling algorithms including detailed classification of many scheduling problems.

Carlier, J. and Pinson, E. (1994). Adjustment of heads and tails for the job-shop problem. European Journal of Operational Research 78(2), 146-161.

Description of first O(n.log n) algorithm for edge-finding, but this algorithm requires complex data structures.

Caseau, Y. and Laburthe, F. (1995). Disjunctive scheduling with task intervals. LIENS Technical Report 95-25, Laboratoire d'Informatique de l'Ecole Normale Superieure.

Description of incremental O(n3) algorithm for edge-finding using task intervals.

slide-50
SLIDE 50

Cesta, A. and Stella, C. (1997). A Time and Resource Problem for Planning Architectures. Recent Advances in AI Planning (ECP’97), LNAI 1348, Springer Verlag, 117-129.

Description of resource profiles and orp/prp filtering rules.

Dechter, R.; Meiri, I.; Pearl, J. (1991). Temporal Constraint Networks. Artificial Intelligence 49: 61-95.

Introduction of Temporal Constraint Networks and Simple Temporal Problems.

Dechter, R. (2003). Constraint Processing. Morgan Kaufmann.

A comprehensive book on constraint satisfaction techniques, including a detailed description of temporal constraint networks.

Do, M.B. and Kambhampati, S. (2000). Solving planning-graph by compiling it into CSP. In Proceedings of the Fifth International Conference on Artificial Planning and Scheduling (AIPS-2000), AAAI Press, 82-91.

A constraint model based on the planning graph is proposed.

Focacci, F.; Laborie, P.; Nuijten, W. (2000). Solving scheduling problems with setup times and alternative resources. In Proceedings of the Fifth International Conference on Artificial Intelligence Planning and Scheduling (AIPS). AAAI Press, 92-101.

Description of path optimization constraint for minimizing setup times/costs in problems with alternative resources.

Ghallab, M.; Nau, D.; Traverso, P. (2004). Automated Planning: Theory and Practice. Morgan Kaufmann.

A comprehensive book on planning, including a description of constraint satisfaction techniques for planning.

Kautz, H. and Selman, B. (1992). Planning as satisfiability. In Proceedings of ECAI, 359-363.

SAT encoding of the planning graph is proposed.

Laborie, P. (2003). Algorithms for propagating resource constraints in AI planning and scheduling: Existing approaches and new results. Artificial Intelligence 143, 151-188.

Introduction of filtering rules for energy precedence and balance constraints (algorithms are not described).

Lhomme, O. (1993). Consistency techniques for numeric CSPs. In Proc. 13th International Joint Conference on Artificial Intelligence.

Description of arc-B-consistency algorithm.

Lopez, A. and Bacchus, F. (2003). Generalizing GraphPlan by Formulating Planning as a CSP. In Proceedings of IJCAI, 954-960.

Another constraint model of the planning graph (more efficient than Do&Kambhampati, 2000).

Mackworth, A.K. (1977). Consistency in Networks of Relations. Artificial Intelligence 8, 99- 118.

Description of the basic arc and path consistency algorithms – AC-1, AC-2, AC-3, PC-1, PC-2.

Marriott, K. and Stuckey, P.J. (1998). Programming with Constraints: An Introduction. MIT Press.

A practically oriented book on using constraint satisfaction technology for problem solving.

Martin, P. and Shmoys, D.B. (1996). A new approach to computing optimal schedules for the job-shop scheduling problem. Proceedings of the 5th International Conference on Integer Programming and Combinatorial Optimization. LNCS 1084, Springer Verlag, 389-403.

Description of alternative formulation of edge-finding rules.

Montanari, U. (1974). Networks of constraints: fundamental properties and applications to picture processing. Information Sciences 7, 95-132.

Introduction and formalization of constraint networks, defining path-consistency and algorithm for PC.

Nuijten, W.P.M. (1994). Time and Resource Constrained Scheduling: A Constraint Satisfaction

  • Approach. PhD thesis, Eindhoven University of Technology.

Description of several filtering algorithms for scheduling problems including the cumulative version of edge- finding and not-first/not-last rules.

slide-51
SLIDE 51

Prosser, P.; Stergiou, K.; Walsh, T. (2000). Singleton Consistencies. Proceedings Principles and Practice of Constraint Programming (CP2000), 353-368.

Description and a theoretical study of singleton consistency techniques.

Phan-Huy, T. (2000). Constraint Propagation in Flexible Manufacturing. LNEMS 492, Springer Verlag.

PhD thesis with the description of constraint propagation algorithms for disjunctive scheduling problems.

Régin, J.-Ch. (1994). A filtering algorithm for constraints of difference in CSPs. Proceedings of 12th National Conference on Artificial Intelligence, AAAI Press, 362-367.

Description of the filtering algorithm behind the all-different constraint – based on matching over bipartite graphs.

Schulte, Ch. (2002). Programming Constraint Services. LNAI 2302, Springer Verlag.

A book describing insides of constraint solvers.

Torres, P. and Lopez, P. (2000). On Not-First/Not-Last conditions in disjunctive scheduling. European Journal of Operational Research 127, 332-343.

Description of O(n2) filtering algorithms for not-first/not-last rules.

Tsang, E. (1995). Foundations of Constraint Satisfaction. Academic Press, London.

A comprehensive book on foundational constraint satisfaction techniques with description of many consistency algorithms and their theoretical study.

van Beek, P. and Chen, X. (1999). CPlan: A Constraint Programming Approach to Planning. In Proceedings of AAAI-99, 585-590.

Manual encoding of planning problems as CSPs is proposed.

Vidal, V. and Geffner, H. (2004). Branching and Pruning: An Optimal Temporal POCL Planner based on Constraint Programming. In Proceedings of AAAI-04, 570-577.

Successful application of constraint satisfaction techniques to partial-order planning..

Vilain, M. and Kautz, H. (1986). Constraint propagation algorithms for temporal reasoning. In Proceedings of the National Conference on Artificial Intelligence (AAAI), 377-382.

Introduction of point algebra and proof that consistency-checking problem of the IA problem is an NP- complete problem, while PA is a tractable problem.

Vilím, P. and Barták, R. (2002). Filtering Algorithms for Batch Processing with Sequence Dependent Setup Times. Proceedings of the 6th International Conference on Artificial Intelligence Planning and Scheduling (AIPS). AAAI Press, 312-320.

Description of edge-finding and not-first/not-last algorithms for batch processing with sequence dependent setup times.

Vilím, P. (2002). Batch processing with sequence dependent setup times: New results. In Proceedings of the 4th Workshop on Constraint Programming for Decision and Control (CPDC), Gliwice, 53-58.

Description of edge-finding and not-first/not-last algorithms for problems with sequence dependent setup times, introduction of detectable precedences.

Vilím, P. (2004). O(n log n) Filtering Algorithms for Unary Resource Constraint. Proceedings of CPAIOR 2004. LNCS 3011, Springer Verlag, 335-347.

Description of O(n.log n) algorithms for not-first/not-last rules and detectable precedences.

Vilím, P.; Barták, R.; Čepek, P. (2005). Extension of O(n log n) filtering algorithms for the unary resource constraint to optional activities. Constraints, 10(4): 403-425.

Description of O(n.log n) versions of filtering algorithms for edge finding, not-first/not-last, and detectable precedences and their extension to optional activities.

Wallace, M. (1994). Applying Constraints for Scheduling. In Mayoh B. and Penjaak J. (eds.), Constraint Programming. NATO ASI Series, Springer Verlag.

A survey text on using constraint satisfaction technology in scheduling.