Filtering for Continuous Multi-Resources cumulative Constraint with - - PowerPoint PPT Presentation

filtering for continuous multi resources cumulative
SMART_READER_LITE
LIVE PREVIEW

Filtering for Continuous Multi-Resources cumulative Constraint with - - PowerPoint PPT Presentation

Filtering for Continuous Multi-Resources cumulative Constraint with Resource Consumption - Production Emmanuel Poder 1 - Nicolas Beldiceanu 2 1 Emmanuel.Poder@laposte.net 2 LINA UMR CNRS 6241, cole des Mines de Nantes, France


slide-1
SLIDE 1

ICAPS08 1

Filtering for Continuous Multi-Resources cumulative Constraint with Resource Consumption - Production

Emmanuel Poder1 - Nicolas Beldiceanu2

1 Emmanuel.Poder@laposte.net 2 LINA UMR CNRS 6241, École des Mines de Nantes, France

Nicolas.Beldiceanu@emn.fr

slide-2
SLIDE 2

ICAPS08 2

Outline

  • Context and contributions
  • Task model and piecewise linear cumulative cumulatives_pwl
  • Filtering a task according to a minimum cumulated profile

– Minimum cumulated resource profile – Filtering of the resource assignment – Filtering of the temporal attributes – Filtering of the heights of the sub-tasks

  • Conclusion and perspectives
slide-3
SLIDE 3

ICAPS08 3

Context and contributions

Context: cumulative scheduling and producer/consumer model

  • (Beldiceanu and Carlsson, CP - 2002):

– Positive or negative rectangle task ; Multi-resources – Notions of minimum and maximum cumulated resource profiles – Implemented in SICStus

  • (Poder, PhD 2002) (Poder et al., EJOR 2004):

– Task made of a sequence of positive trapezoids ; one single resource – Compulsory part and Minimum cumulated profile – Implemented in CHIP (cumulative_trapeze constraint) –

  • > Main applications: cumulative scheduling, producer/consumer model
  • (Sourd and Rogerie, EJOR- 2004): Continuous filling and emptying storage systems

– Positive or negative triangular task – Minimum and maximum levels – Implemented in ILOG scheduler

slide-4
SLIDE 4

ICAPS08 4

Context and contributions

  • (Beldiceanu and Poder , CPAIOR - 2007):

– Task made of a sequence of positive or negative trapezoids – Multi-resources – Minimum and maximum cumulated resource profiles build using a sweep algorithm

Contribution to ICAPS - 2008:

Filtering algorithm for the task model presented in CPAIOR - 2007 i.e. given a resource and a task, how to filter

– the temporal attributes of such a task – the resource assignment of such a task

according to the minimum cumulated profile of the resource

slide-5
SLIDE 5

ICAPS08 5

Task model and piecewise linear cumulative cumulatives_pwl

A task T = (s, td, e, Seq, a) is defined by:

  • a start s, an end e, a total duration td and a set a of possible resource

assignments

  • a positive or negative piecewise linear resource function hT represented by

a sequence Seq of p consecutive trapezoid sub-tasks ST1, ST2,…, STp where STi has a start height shi , an end height ehi and a duration di. v → dom(v) = [vmin, vmax]

Definition (Cf CPAIOR07):

td

d1 d2 d3 d4 sh3 eh4

s e

ST3

time resource function

t hT(t)

slide-6
SLIDE 6

ICAPS08 6

  • All attributes of a task may be not fixed
  • Multi-resources
  • Sequence of trapezoid sub-tasks with variable durations where their

sum is equal to the duration of the task

⇒ no need to define relations of precedence between sub-tasks outside

  • Trapezoid sub-tasks with positive heights and trapezoid sub-tasks with

negatives heights in a same task

Task model and piecewise linear cumulative cumulatives_pwl

Difficulties and interest of the model:

slide-7
SLIDE 7

ICAPS08 7

Task model and piecewise linear cumulative cumulatives_pwl

Given :

  • Tasks, a collection of Tasks T1, T2, …, Tn where Ti = (si, tdi, ei, Seqi, ai)

(start, total duration, end, Sequence of sub-tasks, assignment)

  • Resources, a set of integers C1, C2, …, Cq where Ck is:
  • The capacity of the resource k if Constraint =‘≤’
  • The minimum level to reach of the resource k if Constraint =‘≥’
  • Constraint, one of the constraint ‘≤’ or ‘≥’

The constraint cumulatives_pwl(Tasks, Resources, Constraint) holds iff: 1. 2.

  • 3. Case ‘≤’ :

Case ‘≥’:

i =1..n, d j

j=1 pi

  • = tdi

i =1..n,si + tdi = ei k =1..q

( ) t R ( )

hTi (t) Ck

i / ai ={k}

  • k =1..q

( ) t R/i,t si,ei [ [

( )

hTi (t) Ck

i / ai ={k}

slide-8
SLIDE 8

ICAPS08 8

Filtering a task according to a minimum cumulated profile

B - Notion of minimum cumulated profile

Definition: The minimum cumulated profile mcrP(r) of a resource r is such that its resource function verifies for any t: where mP(Ti) is the minimum profile of the task Ti and is build from the compulsory part CP(Ti

+) of the positive sub-tasks Ti + of Ti and of the enveloppe

Env(Ti

  • ) of the negative sub-tasks Ti
  • of Ti :

hmcrP r

( ) t

( ) =

hmP Ti

( ) t

( )

Ti / rai

  • hmP Ti

( )(t) = hCP(Ti

+ )(t) + hEnv(Ti )(t)

Remarks:

  • For any t, we can’t have both

and

  • If Ti is assigned to the resource r then both CP(Ti

+) and Env(Ti

  • ) are taken into

account within mcrP(r). Else, if Ti is not yet assigned to the resource r then only Env(Ti

  • ) are taken into account within mcrP(r)

hCP(Ti

+ )(t) 0

hEnv(Ti

)(t) 0

slide-9
SLIDE 9

ICAPS08 9

Filtering a task according to a minimum cumulated profile

From now on, we consider:

  • A resource R with maximum capacity C
  • A fixed trapezoid trap1 of the minimum cumulated profile mcrP(R) of the resource R.
  • A task T that is or may be assigned to the resource R and that is or may be executed in

parallel with trap1 We are interested in: A - Filtering the resource assignment of the task T B - Filtering its temporal attributes (start, duration, end and duration of its sub-tasks) C - Filtering the heights of its sub-tasks according to the minimum resource profile of the resource R

t

1 2 4 5 6 3 7 8

  • 1
  • 2

1 C=2

  • 3

Minimum profile

mcrP(R) trap1

Resource R

  • 1

1 2 3 4 5 6 1 2

  • 2

3

Task T (shape)

slide-10
SLIDE 10

ICAPS08 10

Filtering a task according to a minimum cumulated profile

B - Filtering of the resource assignment

We distinguish two cases

  • T has a known contribution already registered within mcrP(R). If this contribution

is absolutely required to avoid a capacity overflow then:

  • We assign T to the resource R
  • We filter the latest start and the earliest end of T so as to they include trap1
  • There exits no registered contribution of T within mcrP(R). If the assignment of T

to the resource R would lead to a capacity overflow then we remove R from the resource assignment variable of T

slide-11
SLIDE 11

ICAPS08 11

Filtering a task according to a minimum cumulated profile

C - Filtering of the temporal attributes of a task

Two phases: 1. We browse all sub-tasks of T and, for each such sub-task, we compute the interval of non feasible values for its starts and duration according to trap1 2. We propagate back these non-feasible values the others temporal attributes using the following linear constraints (holes within the origin/end of sub-tasks matter) : (1) The sum of the durations of all the sub-tasks is equal to the total duration of the task, (2) The start plus the total duration of the task is equal to its end, (3) The start of a sub-task plus its duration is equal to the start of the next sub-task.

slide-12
SLIDE 12

ICAPS08 12

Filtering a task according to a minimum cumulated profile

In the following:

  • trap2 denotes the sub-task of T we want to filter according to trap1
  • assumes that the contribution of T within trap1 has been removed

before the filtering C - Filtering of the temporal attributes of a task (phase 1) To filter the attributes of trap2 , we first transform the problem of scheduling trap2 according to trap1 without exceeding C in a particular non-overlapping problem

slide-13
SLIDE 13

ICAPS08 13 Cumulative

view Non-

  • verlapping

view

Filtering a task according to a minimum cumulated profile

resource

Trapezoid sub-task to filter

time

trap2 sh2 eh2

time resource

sh1 eh1 st1 et1 trap1

Fixed trapezoid of a minimum cumulated profile C

time

C

time

feasible scheduling/placement

  • n top of the

cumulative profile between trap1 and trap2 Remaining space

trap2

trap1

eh2 sh2

time

C

time

C non-feasible scheduling/placement

Exceeding above C Overlap between trap1 and trap2

trap2 trap1

sh2 eh2

C-1. transforming a cumulative scheduling problem into a particular non-overlapping problem

slide-14
SLIDE 14

ICAPS08 14

Filtering a task according to a minimum cumulated profile

  • Case when the duration of trap2

is fixed to d2*:

Last feasible start for trap2

before trap1

i.e. the earliest possible overlapping

γ(d2*)

First feasible start for trap2

after trap1

i.e. the latest possible overlapping

δ(d2*)

We translate trap2

according to trap1 and C

C

time

trap2 trap1

d2

*

The non feasible starts of trap2 is the interval ] γ(d2*), δ( d2*) [ ]///////////////////////[ Remark : five cases for the computation of γ(d2*) and five cases for the computation of δ(d2*)

C-2. Computing the interval of non feasible starts of trap2

slide-15
SLIDE 15

ICAPS08 15

  • Case when the duration of trap2

is not fixed but d2 ∈ [d2 min, d2 max]:

The non feasible starts of trap2 is the interval ] γ(d2

min), δ( d2 max) [

γ(d2

min)

δ(d2

max)

trap2

time C

]/////////////////////////[ ]///////////////[ d2

max

d2

min

γ(d2*) δ(d2

*)

Remark : The earliest start st2

min and the latest end et2 max can also be taken into account for

the computation of this interval (more pruning).

Filtering a task according to a minimum cumulated profile

C-2. Computing the interval of non feasible starts of trap2

slide-16
SLIDE 16

ICAPS08 16

The non feasible durations of trap2 is ] max(dbefore, dafter), +∞ [

time C

st2

min

et2

max

trap1

  • 1. We fix the heights sh2 and eh2 of trap2 at their minimum respective value sh2

min and eh2 min

sh2

min

eh2

min

dbefore trap2

  • 2. We place trap2 with d2=d2

min , if possible, before trap1 at its earliest start st2 min and stretch its

duration as much as possible (i.e., without overlapping) -> we obtain a duration dbefore dafter trap2

  • 3. We place trap2 with d2=d2

min, if possible, after trap1 at its latest end et2 max and stretch its

duration as much as possible (i.e., without overlapping) -> we obtain a duration dafter

Filtering a task according to a minimum cumulated profile

C-3. Computing the interval of non feasible durations of trap2

slide-17
SLIDE 17

ICAPS08 17 time C

st2

min

eh2

min

et2

max

d2

min

  • Non feasible values for the start height sh2 of trap2:
  • 1. We fix the duration d2 and the end height eh2 of trap2 at their minimum respective value

d2

min and eh2 min

  • 2. We place trap2, if possible, before trap1 at its earliest start st2

min and stretch its start height

as much as possible (i.e., without overlapping) -> we obtain the value shbefore

  • 3. We place trap2, if possible, after trap1 at its latest end et2

max and stretch its start height as

much as possible (i.e., without overlapping) -> we obtain the value shafter

The non feasible values for sh2 is ] max(shbefore, shafter), +∞ [

  • Non feasible values for the end height eh2 of trap2: Similar

Filtering a task according to a minimum cumulated profile

  • D. Computing the interval of non feasible heights of trap2
slide-18
SLIDE 18

ICAPS08 18

Conclusion and Perspectives

Results:

  • Efficient algorithm for pruning all tasks attributes

Perspectives:

  • Generalize edge finding to this task model

QUESTION: is it possible to have a polynomial algorithm which gives the exact minimum intersection of a task (with non-fixed attributes) with a fixed interval ?

Further information: Poder PhD Thesis 2002 available at http://epoder.neuf.fr/

slide-19
SLIDE 19

ICAPS08 19

Compulsory Part, Envelope, minimum cumulated profile

Definition: the compulsory part (CP) of a positive task is the intersection of all its feasible instances (A. Lahrichi, 1979) Definition: The enveloppe (Env) of a positive task is the union of all its feasible instances.

s

s

h d

s

s

h d

Envelope

s

s

h d

Non empty Compulsory Part Empty Compulsory Part

slide-20
SLIDE 20

ICAPS08 20

Compulsory Part and Envelope of a positive task

(A) Task T Valleys Tops

  • st2

st1 st3 st4

(=s) (=e)

eh1 sh3 sh1 eh2 eh3 sh1 sh1

time

  • resource profile

+ st2 st2 st3 st3 sh3 eh1 s

s

e

e

time

st3 st3

s

s e

e

sh2 eh2 eh3

  • • •

resource profile time

st1 st1 st2 st3 st4 st2 st3 st4

s s e

e

(D) Level Top Task on [ , [

s e

(C) Level Valley Task on [ , [

s e

(B) Earliest and latest starts of each sti

  • > Give Tmin and Tmax
slide-21
SLIDE 21

ICAPS08 21

Compulsory Part and Envelope of a positive task

time

  • st2

st2 st3

s e

  • st1

st4 time

  • LVT(T)

Env(T) = Tmin ∪ Tmax ∪ LTT(T) CP(T) = Tmin ∩ Tmax ∩ LVT(T) CP(T)

time st3 st3

s s e

e

  • • •
  • st1

st2 st3 st4

Tmin

  • st1

st2 st3 st4

Tmax

  • st1

st2 st3 st4

Tmin

  • st1

st2 st3 st4

Tmax

time

  • • •
  • LTT(T)

Env(T)

slide-22
SLIDE 22

ICAPS08 22

Minimum and maximum profiles of a task

Tasks and their feasible sub-sequences: Minimum profiles mP of the four tasks on the resources r1 et r2:

s2 ∈ [1,2]; a2 ∈ {1} s4 ∈ [1,6]; a4 ∈ {1,2} s3 ∈ [0,3]; a3 ∈ {1} s1∈[1,2]; a1∈{1,2}

mP(T2) on r1

2 4 5 6 3 7

  • 1
  • 2

1 2

mP(T1) on r1 and r2

3 4 5 6

  • 1

mP(T3) on r1

4 5 6 3 1

mP(T4) on r1 and r2 time

1 2 4 5 6 3 7 8

  • 1
  • 1

1 2 3 4 5 6 1 2

  • 2

3 1 2 1 2 4 5 6 3 1 2

  • 1

1 2 1 2 3 4 5

  • 1

1 2

  • 1

1 2 3 4 1 2 1 2 3 4 5

  • 1

1 2

  • 1

1 2 3 4

slide-23
SLIDE 23

ICAPS08 23

Minimum and maximum cumulated resource profiles

Minimum Profiles of tasks T1,T2, T3 and T4 on resources 1 and 2: Minimum cumulated profiles

  • f resources 1 and 2:

mP(T1) a1 = {1,2} t

1 2 4 5 6 3 7 8

  • 1

t

1 2 4 5 6 3 7 8 1

t

1 2 4 5 6 3 7 8

  • 1
  • 2

1 2 3

t

1 2 4 5 6 3 7 8

  • 1

mP(T2) a2 = {1} mP(T3) a3 = {1} mP(T4) a4 = {1,2}

  • 1
  • 1
  • 1 -1

1 0 0 hmP T4

( ) t

( )

hmP T3

( ) t

( )

hmP T2

( ) t

( )

hmP T1

( ) t

( )

t

1 2 4 5 6 3 7 8

  • 1
  • 2

1 2

  • 3

hmcrP r

1

( ) t

( ) = hmP T1

( ) t

( ) + hmP T2

( ) t

( ) + hmP T3

( ) t

( ) + hmP T4

( ) t

( )

  • 3

t

1 2 4 5 6 3 7 8

  • 1
  • 2

hmcrP r2

( ) t

( ) = hmP T1

( ) t

( ) + hmP T4

( ) t

( )

  • 2 -1

mcrP(r1) mcrP(r2)