360 likes | 517 Views
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
E N D
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 • Energetic reasoning • Edge finding (task intervals) • Network flows
A B A B time A B C Explicit time-tables (UD) • WA(t) = [tÎset(A)] • "t, SA [WA(t) * capacity(A)] £ capacity(t)
B A A C A time A B C Explicit time-tables (S) • WA(t) = [tÎset(A)] • "t, WA(t) implies [state(A) = state(t)]
Explicit time-tables (E) • pos(A) = {t such that WA(t) can be 1} • slack(A) = |pos(A)| - durationmin(A) • necA(I) = {tÎI such that WA(t) is 1} • posA(I) = {tÎI such that WA(t) can be 1} • WA(I) = max(|necA(I)|, |posA(I)| - slack(A)) • SA [WA(I) * capacity(A)] £ capacity(I)
Explicit time-tables: extensions • Minimal capacity constraints (UDE) • Default state (S) • Constraints between time-tables or between time-tables and other variables (UDES)
Disjunctive constraints (U) • "t, [tÏset(A)] OR [tÏset(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
Disjunctive constraints (U) • Optional activities • Resource alternatives • Sub-contracts • Transition times • Tool setups • Color changes • Cleaning
Disjunctive constraints (U) "(tA tB) such that [tB£ tA + ttime(A, B)] and [tA£ tB+ ttime(B, A)] [tAÏset(A)] OR [tBÏset(B)] OR [capacity(A) = 0] OR [capacity(B) = 0]
Disjunctive constraints (U) Redundant constraint • duration(AèB) = duration(A) + ttime(A, B) + duration(B) • duration(AèBèA) = duration(AB) + ttime(B, A) • [start(A) + duration(AèB) £ end(B)] OR [start(B) + duration(BèA) £ end(A)] OR [start(A) + duration(AèBèA) £ end(A)] OR [start(B) + duration(BèAèB) £ end(B)] OR [capacity(A) = 0] OR [capacity(B) = 0]
Disjunctive constraints (D) Redundant (but insufficient!) constraints • "t, [tÏset(A)] OR [tÏset(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]
Disjunctive constraints (S) "(tA tB) such that [tB£ tA + ttime(A, B)] and [tA£ tB+ ttime(B, A)] [tAÏset(A)] OR [tBÏset(B)] OR [state(A) = state(B)]
Disjunctive constraints (S) Redundant constraint • duration(AèB) = duration(A) + ttime(A, B) + duration(B) • duration(AèBèA) = duration(AB) + ttime(B, A) • [start(A) + duration(AèB) £ end(B)] OR [start(B) + duration(BèA) £ end(A)] OR [start(A) + duration(AèBèA) £ end(A)] OR [start(B) + duration(BèAèB) £ end(B)] OR [state(A) = state(B)]
Energetic reasoning (UD) • pos(A) = {t such that WA(t) can be 1} • slack(A) = |pos(A)| - durationmin(A) • necA(I) = {tÎI such that WA(t) is 1} • posA(I) = {tÎI such that WA(t) can be 1} • WA(I) = max(|necA(I)|, |posA(I)| - slack(A)) • SA [WA(I) * capacity(A)] £ capacity(I)
Energetic reasoning (UD) • Habographs • Intervals: [id .. jd) or [b + id .. b + jd) • Energetic resources • Intervals: [id .. (i+1)d) or [b + id .. b + (i+1)d) • Energetic reasoning rules • Intervals: [startmin(A) .. x) or [x .. endmax(A))
Energetic reasoning (U) • start(I) = startmin(A) • d(I) = end(I) - start(I) • d(A) = durationmin(A) • d(I) <SC<>AWC(I) + min(d(A), d(I)) • implies • [start(I) +SC<>AWC(I) +d(A) £ end(A)]
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)]
Edge finding (U) • Basic idea Prove that an activity A starts before (or ends after) a set of other activities W • Notations smin(W) = minBÎW startmin(B) emax(W) = maxBÎW endmax(B) dmin(W) =SBÎW durationmin(B)
Edge finding (U) emax(W) < smin(W + {A}) + dmin(W + {A}) • implies • [smin(W' + {A}) + dmin(W' + {A}) £ end(A)] • for every W' included in W
Edge finding (U) A[0..11 - 6 - 6..17] B[1..7 - 4 - 5..11] C[1..8 - 3 - 4..11] W= {B C} [11 < 0 + 13] implies [0 + 13 £ end(A)]
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(W) = smin(W + {A}) + dmin(W) implies [emax(W) £ start(A)]
Edge finding characterization (U) • When A is notpreemptable, 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
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= si+1, such that the set {s1 ... sn en} includes all the time points at which information about Wx(t), xÎX, changes • E = set of pairs (x, y), xÎX, yÎY, such that x can execute during y
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)
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|
Network flows (U) • The resource constraint is satisfiable if and only if there exists a compatible flow f such that: "xÎX, Sy such that (x, y)ÎE f(x, y) = duration(x) "yÎY, Sx such that (x, y)ÎE f(x, y) £ |y| "(x,y)ÎE, cmin(x, y) £ f(x, y) £ cmax(x, y)
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) 3 2 4 2 3
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 "tÎy, Wx(t) = 0 fmin(x, y) = |y| implies "tÎy, 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)]
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
Comparison • Theoretical results • Unique fixpoint semantics • Modelling power • Time and space complexity • Pruning power • Experimental results
Unique fixpoint semantics Time-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)
Habographs Energetic resources Explicit time-tables Energetic rules Edge finding Modelling power (as of today) Disjunctive constraints Network flows
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/d)2) Incr. O((h/d)2) Energetic resources O(ni*h/d) O(ni2) Incr. O(h/d) 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(ni2) Network flows (GUTB) O(ni3*h) Incr. O(ni2)
Edge-finding (+ startmin / endmax) Network flows (GUTB on all bounds) Habographs Edge finding (basic) Disjunctive constraints (with redundant) Energetic resources Explicit time-tables Disjunctive constraints (standard) Pruning power (U)
215 210 25 Experiments (10/43) 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)