Title: A New Multi-Resource cumulatives Constraint with Negative Heights
1A New Multi-Resource cumulatives Constraintwith
Negative Heights Nicolas Beldiceanu and
Mats Carlsson
SICSLägerhyddsvägen 1875237 Uppsala Sweden
2Outline of the Presentation
- Definition of cumulatives
- Modelling problems with cumulatives
- Propagation algorithms for cumulatives
- Sweep
- Generalization from different sweeps
- Task intervals
3- Definition of cumulatives
- Modelling problems with cumulatives
- Propagation algorithms for cumulatives
- Sweep
- Generalization from different sweeps
- Task intervals
4The cumulative Constraint
The original cumulative constraint Aggoun
Beldiceanu 92
Restrict the resource consumption at each point
in time.
The generalized cumulatives constraint
A pool of cumulative resources , Height of a task
can be negative , Maximum or minimum resource
consumption , Holds for time-points crossed by at
least one task.
5Parameters
- Origin
- Duration
- End
- Height
- Machine
OriginDurationEnd
1
3
2
Identifier
Capacity
1
0
1
1
3
3
2
2
1
1
0
0
6t
t
i
D E F I N I T I O N
t
m
s
i
m
s
m
resource consumption
7
? 0
6
Machine 2
E X A M P L E
4
5
2
? 0
3
1
Machine 1
time
7- Definition of cumulatives
- Modelling problems with cumulatives
- Propagation algorithms for cumulatives
- Sweep
- Generalization from different sweeps
- Task intervals
8Original cumulative Constraint
Maximum capacity
resource consumption
4
3
4
3
2
1
1
2
0
time
(machine-1 origin-2 duration-2 height-2
machine-1 origin-4 duration-2 height-1
machine-1 origin-3 duration-1 height-1
machine-1 origin-5 duration-1 height-3, id-1
capacity-4, ?)
cumulatives
9cumulative Constraint WithMachine Choice
Machine 2 with capacity 1
Machine 1 with capacity 3
resource consumption
(machine-1 origin-2 duration-3 height-1,
machine-1 origin-3 duration-2 height-2,
machine-2 origin-2 duration-4 height-1,
machine-1 origin-6 duration-1 height-2, id-1
capacity-3, id-2 capacity-1, ?)
cumulatives
10Uninterrupted Minimum Levelof Resource
Consumption
Minimum consumption is 2
resource consumption
4
5
3
4
2
3
1
2
0
1
time
(machine-1 origin-2 duration-4 height-0,
machine-1 origin-2 duration-4 height-1,
machine-1 origin-2 duration-2 height-1,
machine-1 origin-4 duration-2 height-2,
machine-1 origin-4 duration-1 height-1, id-1
capacity-2, ?)
cumulatives
11Minimum Level ofResource Consumption
Minimum consumption is 2
resource consumption
4
3
2
2
3
1
4
1
0
time
No constraint at this point
(machine-1 origin-2 duration-2 height-1,
machine-1 origin-2 duration-1 height-2,
machine-1 origin-3 duration-1 height-1,
machine-1 origin-5 duration-2 height-2, id-1
capacity-2, ?)
cumulatives
12Producer-Consumer
No negative stock
resource consumption
2
1
4
3
time
(
cumulatives
machine-1 origin-1 duration-3 height-2, machine-1
origin-1 duration-4 height-3,
machine-1 origin-1 duration-6 height-1, machine-1
origin-5 duration-2 height-4,
id-1 capacity-7, ?)
13Producer-Consumer withMultiple Resources
No negative stock on resource 2
resource consumption
No negative stock on resource 1
4
5
2
Stocks at this points in time
1
3
time
cumulatives
machine-1 origin-1 duration-1 height-1, machine-1
origin-1 duration-3 height-2,
(
machine-1 origin-3 duration-4 height-1,
machine-2 origin-1 duration-3 height-1,
machine-2 origin-3 duration-4 height-2
,
id-1 capacity-4, id-2 capacity-3, ? )
14Workload Covering
Green tasks cover yellow tasks
resource consumption
6
5
3
4
Cumulated profile
1
2
time
cumulatives
machine-1 origin-2 duration-2 height-(-2), machine
-1 origin-4 duration-2 height-(-3),
(
machine-1 origin-1 duration-4 height-1, machine-1
origin-5 duration-2 height-1, machine-1 origin-2
duration-4 height-1, machine-1 origin-3
duration-3 height-1
,
id-1 capacity-0, ?)
15Workload Covering
Green tasks cover yellow tasks on both resources
cumulatives
(
,
id-1 capacity-0, id-2 capacity-0 ? )
16- Definition of cumulatives
- Modelling problems with cumulatives
- Propagation algorithms for cumulatives
- Sweep
- Generalization from different sweeps
- Task intervals
17The Sweep Algorithm Fixed Tasks
? nb_task2 ? sum_height3
? nb_task1 ? sum_height2
? nb_task0 ? sum_height0
? nb_task1 ? sum_height4
? nb_task0 ? sum_height0
Sweep-line status
resource
Task 3
Task 2
Task 1
time
Event points
Minimum level to reach for those instants
where there is at least one task
1
2
4
Current position of the sweep line 3
18The Sweep Algorithm Not Yet Fixed Tasks
QUESTION ANSWER ACTION
which instants to check ? those instants for
which there is a task that can cause a problem
count the number of such tasks that overlap the
sweep line
Preconditions for a Check Event
max(origint)ltmin(endt) min(machinet)max(mac
hinet)r max(heightt)ltmax(0,Limitm)
machinet
nb_tasknb_task1 nb_tasknb_task?1
Start End
19The Sweep Algorithm Not Yet Fixed Tasks
QUESTION ANSWER ACTION
how to build an optimistic resource
consumption profile ? consider the bad and
good tasks sum up the height of such tasks
which overlap the sweep line
Preconditions for a Bad Profile Event
max(origint) lt min(endt) min(machinet)
max(machinet) r max(heightt) lt 0
r
sum_heightsum_heightmax(heightt)
sum_heightsum_height ?max(heightt)
Start End
Preconditions for a Good Profile Event
r
r ? dom(machinet) max(heightt) gt 0
sum_heightsum_heightmax(heightt)
sum_heightsum_height ?max(heightt)
Start End
20The Sweep Algorithm Main Loop(simplified
version one resource, no pruning)
21Principle of the Generalization Algorithm
?
3
1
Machine 2
3
2
?
2
1
1
Machine 1
0
time
Removes 3,4 from origin of task 4
22Task Interval
resource consumption
6
5
? 1
? 1
3
4
1
2
time
time
interval
(3-1)(111-2)(111-2) ? (111)X1
DEFINITION At each instant ? heigths ? Capacity
IDEA sum up over each instant where we have at
least one task
NECESSARY CONDITION ? surfaces ? utilisation of
interval x Capacity
23Task Interval (atleast case)
CHECKING THE NECESSARY CONDITION
- For tasks with negative height
- For tasks with positive height
- If non-negative capacity
- If negative capacity
minimum intersection with interval maximum
intersection with interval minimum utilization
in time of interval maximum utilization in
time of interval
PRUNING ACCORDING TO THE NECESSARY CONDITION
- Forbid to cover more than a given surface in an
interval - Force to cover at least a given surface in an
interval
24Minimum Intersection of a Task with an Interval
T at its earliest start and minimum duration
T at its latest end and minimum duration
2
1
Result is 1
interval
Compute the size of the intersection
with the interval of these two
instances, and take the minimum
25Conclusion
- A much more expressive cumulative constraint
- Three different kinds of filtering algorithms
26Perspectives
- Enhance the pruning
- Handle large but easy instances
- Extensions
- time axis
- functions for computing resource utilization
- cyclic scheduling
- comparison operator