resource constraint propagation (preemptive case)

36
1 Resource Constraint Propagation (Preemptive Case)

Upload: sivan

Post on 25-Feb-2016

58 views

Category:

Documents


0 download

DESCRIPTION

Resource Constraint Propagation (Preemptive Case). Outline. Constraint propagation models Explicit time-tables Disjunctive constraints Energetic reasoning Edge finding (task intervals) Network flows Comparison. Constraint propagation models. Explicit time-tables Disjunctive constraints - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Resource Constraint Propagation (Preemptive Case)

1

Resource Constraint Propagation(Preemptive Case)

Page 2: Resource Constraint Propagation (Preemptive Case)

2

Outline

• Constraint propagation models– Explicit time-tables– Disjunctive constraints– Energetic reasoning– Edge finding (task intervals)– Network flows

• Comparison

Page 3: Resource Constraint Propagation (Preemptive Case)

3

Constraint propagation models

• Explicit time-tables• Disjunctive constraints• Energetic reasoning• Edge finding (task intervals)• Network flows

Page 4: Resource Constraint Propagation (Preemptive Case)

4

Explicit time-tables (UD)

• WA(t) [tset(A)]

• t, AWA(t) * capacity(A)] capacity(t)

C

A B

time

AB

BA

Page 5: Resource Constraint Propagation (Preemptive Case)

5

Explicit time-tables (S)

• WA(t) [tset(A)]

• t, WA(t) implies [state(A) state(t)]

time

A

B

CA A

A

CB

Page 6: Resource Constraint Propagation (Preemptive Case)

6

Explicit time-tables (E)

• pos(A) = {t such that WA(t) can be 1}

• slack(A) = |pos(A)| durationmin(A)

• necA(I) = {tI such that WA(t) is 1}

• posA(I) = {tI such that WA(t) can be 1}

• WA(I) max(|necA(I)|, |posA(I)| slack(A))

• AWA(I) * capacity(A)] capacity(I)

Page 7: Resource Constraint Propagation (Preemptive Case)

Explicit time-tables: extensions

• Minimal capacity constraints (UDE)• Default state (S)

• Constraints between time-tables or between time-tables and other variables (UDES)

Page 8: Resource Constraint Propagation (Preemptive Case)

8

Disjunctive constraints (U)

• t, [tset(A)] OR [tset(B)]• Redundant constraint

[start(A) duration(A) duration(B) end(B)]OR [start(B) duration(B) duration(A) end(A)]OR [start(A) duration(A) duration(B) end(A)]OR [start(B) duration(B) duration(A) end(B)]

• Remove third disjunct if B cannot interrupt A• Remove fourth disjunct if A cannot interrupt B

Page 9: Resource Constraint Propagation (Preemptive Case)

9

Disjunctive constraints (U)

• Optional activities– Resource alternatives– Sub-contracts

• Transition times– Tool setups– Color changes– Cleaning

Page 10: Resource Constraint Propagation (Preemptive Case)

10

Disjunctive constraints (U)

tA tB) such that [tB tA ttime(A, B)]

and [tA tB ttime(B, A)]

[tAset(A)]

OR [tBset(B)]

OR [capacity(A) 0]OR [capacity(B) 0]

Page 11: Resource Constraint Propagation (Preemptive Case)

11

Disjunctive constraints (U)

Redundant constraint• duration(AB) duration(A) ttime(A, B) duration(B)• duration(ABA) duration(AB) ttime(B, A)• [start(A) duration(AB) end(B)]

OR [start(B) duration(BA) end(A)]OR [start(A) duration(ABA) end(A)]OR [start(B) duration(BAB) end(B)]OR [capacity(A) 0]OR [capacity(B) 0]

Page 12: Resource Constraint Propagation (Preemptive Case)

12

Disjunctive constraints (D)

Redundant (but insufficient!) constraints• t, [tset(A)]

OR [tset(B)] OR [capacity(A) capacity(B) capacity]

• [start(A) duration(A) duration(B) end(B)] OR [start(B) duration(B) duration(A) end(A)] OR [start(A) duration(A) duration(B) end(A)] OR [start(B) duration(B) duration(A) end(B)] OR [capacity(A) capacity(B) capacity]

Page 13: Resource Constraint Propagation (Preemptive Case)

13

Disjunctive constraints (S)

tA tB) such that [tB tA ttime(A, B)]

and [tA tB ttime(B, A)]

[tAset(A)]

OR [tBset(B)]

OR [state(A) state(B)]

Page 14: Resource Constraint Propagation (Preemptive Case)

14

Disjunctive constraints (S)

Redundant constraint• duration(AB) duration(A) ttime(A, B)

duration(B)• duration(ABA) duration(AB) ttime(B, A)• [start(A) duration(AB) end(B)]

OR [start(B) duration(BA) end(A)]OR [start(A) duration(ABA) end(A)]OR [start(B) duration(BAB) end(B)]OR [state(A) state(B)]

Page 15: Resource Constraint Propagation (Preemptive Case)

15

Energetic reasoning (UD)

• pos(A) = {t such that WA(t) can be 1}

• slack(A) = |pos(A)| durationmin(A)

• necA(I) = {tI such that WA(t) is 1}

• posA(I) = {tI such that WA(t) can be 1}

• WA(I) max(|necA(I)|, |posA(I)| slack(A))

• AWA(I) * capacity(A)] capacity(I)

Page 16: Resource Constraint Propagation (Preemptive Case)

16

Energetic reasoning (UD)

• Habographs– Intervals: [i .. j) or [i .. j)

• Energetic resources– Intervals: [i .. (i1)) or [i .. (i1))

• Energetic reasoning rules– Intervals: [startmin(A) .. x) or [x .. endmax(A))

Page 17: Resource Constraint Propagation (Preemptive Case)

1

Energetic reasoning (U)

• start(I) startmin(A)• (I) end(I) start(I)• (A) durationmin(A)

• (I) CAWC(I) min(A), (I)) implies [start(I) CAWC(I) (A) end(A)]

Page 18: Resource Constraint Propagation (Preemptive Case)

18

Energetic reasoning (U)

A[0..11 6 6..17]B[1..7 4 5..11]C[1..8 3 4..11]

I [0 .. 11)[11 4 3 6] implies [13 end(A)]

Page 19: Resource Constraint Propagation (Preemptive Case)

19

Edge finding (U)

• Basic ideaProve that an activity A starts before (or ends after) a set of other activities

• Notationssmin() minB startmin(B)

emax() maxB endmax(B)

dmin() B durationmin(B)

Page 20: Resource Constraint Propagation (Preemptive Case)

20

Edge finding (U)

emax() smin({A}) dmin({A})

implies

[smin(' {A}) dmin(' {A}) end(A)] for every ' included in

Page 21: Resource Constraint Propagation (Preemptive Case)

21

Edge finding (U)

A[0..11 6 6..17]B[1..7 4 5..11]C[1..8 3 4..11]

{B C}[11 0 13] implies [0 13 end(A)]

Page 22: Resource Constraint Propagation (Preemptive Case)

22

Edge finding (U)

• Jackson's Preemptive Schedule [Baptiste 95]– Generalization of [Pinson 88] [Carlier & Pinson 90]

to the mixed case

• Iterative algorithm [Le Pape & Baptiste 96]– Generalization of [Nuijten 93/94] to the mixed case– No specific data structure– More deductions: emax() smin({A}) dmin()

implies [emax() start(A)]

Page 23: Resource Constraint Propagation (Preemptive Case)

23

Edge finding characterization (U)

• When A is not preemptable, computes:– the earliest time at which A could start– the latest time at which A could end

if all the other activities were preemptable• When A is preemptable, computes:

– the earliest time at which A could end– the latest time at which A could start

if all the other activities were preemptable

Page 24: Resource Constraint Propagation (Preemptive Case)

24

Network flows (U)

Bipartite graph G(X, Y, E) for each resource R• X set of activities which require R• Y partition of the time horizon into n intervals

[si ei), with ei si1, such that the set {s1 ... sn en} includes all the time points at which information about Wx(t), xX, changes

• E set of pairs (x, y), xX, yY, such that x can execute during y

Page 25: Resource Constraint Propagation (Preemptive Case)

25

Network flows (U)

A[0..5 5 5..10]B[0..8 4 7..12] [0 3)

forbidden interval [3 6) A [3 5)C[5..12 3 14..15] B [5 6)

forbidden interval [6 12) C [6 10)D[0..13 2 2..15] D [10 12)

forbidden interval [3 6) [12 15)

Page 26: Resource Constraint Propagation (Preemptive Case)

26

Network flows (U)

• Minimal and maximal edge valuations

(x,y)E, cmin(x, y) |y| if x is constrained to execute over y, cmin(x, y) 0 otherwise

(x,y)E, cmax(x, y) |y|

Page 27: Resource Constraint Propagation (Preemptive Case)

2

Network flows (U)

• The resource constraint is satisfiable if and only if there exists a compatible flow f such that:xX, y such that (x, y)E f(x, y) duration(x)

yY, x such that (x, y)E f(x, y) |y|

x,y)E, cmin(x, y) f(x, y) cmax(x, y)

Page 28: Resource Constraint Propagation (Preemptive Case)

28

Network flows (U)

A[0..5 5 5..10]B[0..8 4 7..12] [0 3)

forbidden interval [3 6) A [3 5)C[5..12 3 14..15] B [5 6)

forbidden interval [6 12) C [6 10)D[0..13 2 2..15] D [10 12)

forbidden interval [3 6) [12 15)

32

4

32

Page 29: Resource Constraint Propagation (Preemptive Case)

29

Network flows (U)

• Adjustment of edge capacities (AEC)For each edge (x, y), determine the minimal flow fmin(x, y) and the maximal flow fmax(x, y) that can pass through (x, y)fmax(x, y) 0 implies ty, Wx(t) 0

fmin(x, y) |y| implies ty, Wx(t) 1

fmin(x, [si ei)) d 0 implies [start(x) ei d]

fmin(x, [si ei)) d 0 implies [si d end(x)]

Page 30: Resource Constraint Propagation (Preemptive Case)

30

Network flows (U)

• Global update of time bounds (GUTB)– Given activity x, find the minimal integer k such that

there exists a compatible flow with f(x, yi) = 0 for k i

– Find the minimal flow fmin(x, yk) under the constraint f(x, yi) = 0 for k i

– Under these conditions, sk fmin(x, yk) is the best possible earliest end time for x

Page 31: Resource Constraint Propagation (Preemptive Case)

31

Comparison

• Theoretical results– Unique fixpoint semantics– Modelling power– Time and space complexity– Pruning power

• Experimental results

Page 32: Resource Constraint Propagation (Preemptive Case)

32

Unique fixpoint semanticsTime-tables YES arc-consistency (bounds)

Disjunctive constraints YES arc-consistency (bounds)

Edge finding [B95] YES proof in [Baptiste 95]

Network flows (AEC) YES arc-consistency (bounds)Network flows (GUTB) YES arc-consistency (bounds)

Page 33: Resource Constraint Propagation (Preemptive Case)

33

Modelling power (as of today)

Disjunctiveconstraints

Explicittime-tables

Energeticresources

Habographs

Energeticrules

Edgefinding

Network

flows

Page 34: Resource Constraint Propagation (Preemptive Case)

34

Time and space complexity

Time-tables O(ni*h) O(ni2) Incr. O(h) O(ni)

Disjunctive constraints O(ni2) Incr. O(ni)

Habographs O(ni*(h)2) Incr. O((h)2)

Energetic resources O(ni*h) O(ni2) Incr. O(h) O(ni)

Energetic rules O(ni3) O(ni)

Edge finding [B95] O(ni2) O(ni)

Edge finding [LB96] O(ni2) O(ni)

Network flows (AEC) O(ni3*h) Incr. O(ni

2)

Network flows (GUTB) O(ni3*h) Incr. O(ni

2)

Page 35: Resource Constraint Propagation (Preemptive Case)

35

Pruning power (U)

Explicit time-tablesDisjunctive constraints (standard)

Edge-finding ( startmin / endmax)Network flows (GUTB on all bounds)

Energetic resources

Habographs

Disjunctive constraints(with redundant)

Edge finding (basic)

Page 36: Resource Constraint Propagation (Preemptive Case)

36

MT06 CAR1 CAR2 CAR3 CAR4 CAR5 CAR6 CAR7 CAR8 MT10

Disjunctive constraint [Baptiste 95] Number of fails CPU time (RS6000)Network flow (GUTB) [Baptiste 95] Number of fails CPU time (RS6000)Edge finding [Le Pape & Baptiste 96] Number of fails CPU time (PC)

25

210

215

Experiments (10/43)