• No results found

Generating Robust Schedules through Temporal Flexibility

N/A
N/A
Protected

Academic year: 2021

Share "Generating Robust Schedules through Temporal Flexibility"

Copied!
10
0
0

Loading.... (view fulltext now)

Full text

(1)

Generating Robust Schedules through Temporal Flexibility

Nicola Policella

Planning & Scheduling Team ISTC-CNR

Rome, Italy

[email protected]

Stephen F. Smith

The Robotics Institute Carnegie Mellon University

Pittsburgh, USA [email protected]

Amedeo Cesta

Planning & Scheduling Team

ISTC-CNR Rome, Italy [email protected]

Angelo Oddi

Planning & Scheduling Team

ISTC-CNR Rome, Italy [email protected]

Abstract

This paper considers the problem of generating partial

or-der schedules (POS), that is, schedules which retain tempo-ral flexibility and thus provide some degree of robustness in the face of unpredictable execution circumstances. We begin by proposing a set of measures for assessing and comparing the robustness properties of alternativePOSs. Then, using a common solving framework, we develop two orthogonal pro-cedures for constructing aPOS. The first, which we call the resource envelope based approach, uses computed bounds on cumulative resource usage (i.e., a resource envelope) to iden-tify potential resource conflicts, and progressively winnows the total set of temporally feasible solutions into a smaller set of resource feasible solutions by resolving detected conflicts. The second, referred to as the earliest start time approach, instead uses conflict analysis of a specific (i.e., earliest start time) solution to generate an initial fixed-time schedule, and then expands this solution to a set of resource feasible solu-tions in a post-processing step. We evaluate the relative effec-tiveness of these two procedures on a set of project schedul-ing benchmark problems. As might be expected, the second approach, by virtue of its more focused analysis, is found to be a more efficientPOS generator. Somewhat counterintu-itively, however, it is also found to producePOSs that are more robust.

Introduction

In most practical scheduling environments, off-line sched-ules can have a very limited lifetime and scheduling is really an ongoing process of responding to unexpected and evolv-ing circumstances. In such environments, insurance of ro-bust response is generally the first concern. Unfortunately, the lack of guidance that might be provided by a schedule often leads to myopic, sub-optimal decision-making.

One way to address this problem is reactively, through schedule repair. To keep pace with execution, the repair pro-cess must be both fast and complete. The response to a dis-ruption must be fast because of the need to re-start execution of the schedule as soon as possible. A repair must also be complete in the sense of accounting for all changes that have

Copyright c° 2004, American Association for Artificial Intelli-gence (www.aaai.org). All rights reserved.

occurred, while attempting to avoid the introduction of new changes. As these two goals can be conflicting, a compro-mise solution is often required. Different approaches exist and they tend to favor either timeliness (Smith 1994) or com-pleteness (El Sakkout & Wallace ) of the reactive response.

An alternative, proactive approach to managing execution in dynamic environments is to focus on building schedules that retain flexibility and are able to absorb some amount of unexpected events without rescheduling. One technique consists of factoring time and/or resource redundancy into the schedule, taking into account the types and nature of un-certainty present in the target domain (Davenport, Gefflot, & Beck 2001). An alternative technique is to construct an explicit set of contingencies (i.e., a set of complementary solutions) and use the most suitable with respect to the ac-tual evolution of the environment (Drummond, Bresina, & Swanson 1994).

Both of these proactive techniques presume an awareness of the possible events that can occur in the operating envi-ronment, and in some cases, these knowledge requirements can present a barrier to their use. For this reason, in the perspective of robust approaches, we consider a less knowl-edge intensive approach: to simply build solutions that retain temporal flexibility where problem constraints allow. We take two solution properties –the flexibility to absorb unex-pected events and a solution structure that promotes local-ized change– as our primary solution robustness objectives, to promote both high reactivity and solution stability as ex-ecution proceeds.

We develop and analyze two methods for producing tem-porally flexible schedules. Both methods follow a general precedence constraint posting (PCP) strategy, which aims at the construction of a partially ordered solution, and pro-ceeds by iteratively introducing sequencing constraints be-tween pairs of activities that are competing for the same resources. The methods differ in the way that they de-tect and analyze potential resource conflicts (also referred to as resource contention peaks). The first method uses a pure least commitment approach. It computes upper and lower bounds on resource usage across all possible execu-tions according to the exact computaexecu-tions recently proposed

(2)

in (Muscettola 2002) (referred to as the resource envelope), and successively winnows the total set of time feasible so-lutions into a smaller resource-feasible set. The second method, alternatively, takes the opposite extreme approach. It utilizes a focused analysis of one possible execution (the early start time profile) as in (Cesta, Oddi, & Smith 1998; 2002), and establishes resource feasibility for a specific single-point solution (the early start time solution). This sec-ond approach is coupled with a post-processing phase which transforms this initially generated point solution into a tem-porally flexible schedule. These two algorithms are evalu-ated on a challenging benchmark from the OR literature and solution sets produced in each case compared with respect to solution robustness properties. Before describing these methods, we first define the scheduling problem of inter-est and propose some candidate measures for characterizing schedule robustness.

The Scheduling Problem

Given a set of activities, a set of temporal constraints and a set of resources with limited capacity, a scheduling prob-lem consists of finding a temporal allocation of each activity such that all the resources are used consistently. In this work, we use the Resource-Constrained Project Scheduling Prob-lem with Minimum and Maximum time lags (RPCSP/max) as a reference (Bartusch, Mohring, & Radermacher 1988). This problem involves synchronizing the use of a set of re-newable resourcesR= {r1. . . rm}to perform a set of ac-tivitiesV = {a1. . . an} over time. The execution of each activity is subject to the following constraints:

- each activityajhas a durationduraj, a start timesaj and

an end timeeaj such thateaj =saj +duraj;

- each activityairequires the use ofreqik units of the re-sourcerk for all ofduraj

- a set of temporal constraintscijeach defined for a pair of activities(ai, aj)and of the form ofcijmin ≤saj −sai

cmax ij ;

- each resourcerkhas an integer capacitymaxk≥1; A solutionS= (s1, s2, . . . , sn)to a RCPSP/max is any tem-porally consistent assignment of start times of all activities inV which does not violate resource capacity constraints. CSP representation. Our work is centered on a fairly standard CSP representation of the scheduling problem. The CSP (Constraint Satisfaction Problem) representation allows us to separate the temporal constraints (a temporal con-straints network) from the resource concon-straints.

The base of our representation is the temporal constraints network which corresponds to a Simple Temporal Problem, STP (Dechter, Meiri, & Pearl 1991). Each activity ai to be scheduled has associated with it two relevant events: the start time,sai, and the end time,eai. All these events create

a setT of temporal variablestinamed time points. We will identify the time points associated with start and end time of

each activityai assai =t2i−1andeai = t2i respectively.

Additionally, two dummy time pointst0andt2n+1are used

for representing the origin and the horizon of the problem, that ist06tj6t2n+1 ∀j∈1, . . . ,2n.

Both the duration of the activity and the constraints be-tween any pair of activities are represented as time con-straints between time points:t2i−t2i−1=eai−sai=durai

andcminij 6ti−tj6cmaxij .

A directed edge-weighted graphGd(Vd, Ed)named

dis-tance graph is associated with the STP. In the disdis-tance graph

the set of nodesVd represents the set of time points and the set of edgesEdrepresents the set of constraints. In particu-lar, for each constraint of the forma≤tj−tk ≤b, the edge

(tk, tj) Ed with the labelband the edge (tj, tk) Ed with the label−a.

According to well known properties (Dechter, Meiri, & Pearl 1991), the STP is consistent iff its distance graphGd has no negative cycles. Let d(ti, tj) be the length of the shortest path inGd from the nodeti totj then−d(tj, ti) andd(ti, tj)are, respectively, the maximum and the min-imum distance between the two nodes ti and tj, that is

−d(tj, ti) tj ti d(ti, tj). In particular, when tj =t0, the interval of possible values of the time pointti is ti [−d(ti, t0), d(t0, ti)]. Finally, two consistent tem-poral scenarios (in our case a temtem-poral feasible solution) are given by allocating each time point ti to its earliest

time value,est(ti) =−d(ti, t0), or to its latest time value, lst(ti) =d(t0, ti).

Superimposed on top of the temporal representation, functionsQj(t)for each resourcerj ∈Rare used to repre-sent resource availability over time. To model the resource usage of single activities, a valueruijis associated with any time pointti to represent the change of resource availabil-ity. In particular, for RCPSP/max, a resource “allocation”,

ruij = reqij, is associated with each activity start time and a resource “deallocation”, ruij = −reqij, is associ-ated with the end time. Assuming ST is the set of solu-tions to the STP and given a consistent assignmentτ ∈ST, τ = (τ1, τ2, . . . , τn), we can define the resource profile for any resourcerj at any timetas the sum of the values asso-ciated with the set of time points,ti =τi, allocated before or at the instantt,τi≤t:

Qτj(t) = X ti∈T ∧τi6t

ruij (1)

This function allows us to express the resource constraint as an n-ary constraint on the set of time pointsT. An assign-mentτ ST is said to be resource consistent (or resource

feasible) if and only if for each resource rj the following property holds:

06 X

i|ti∈T ∧τi6t

ruij 6maxj (2) for each solution as long as the preceding formula is verified the availability of the resourcerjwill be sufficient to satisfy all the requests.

(3)

Schedule Robustness

In the realm of scheduling problems different sources of un-certainty can arise: durations may not be exactly known, re-sources may have lower capacity than expected (e.g., due to machine breakdowns), new tasks may need to be taken into account. We consider a solution to a scheduling problem to be robust if it provides an ability to absorb external events and it is structured in a way that promotes solution stability. In fact, the solution has to avoid amplification of the effects of a change over all its components. Keeping a solution as stable as possible has notable advantages. For instance a schedule might involve many people, each with different as-signed tasks. Changing everyone’s task may lead to much confusion. Our general goal is to generate schedules that achieve these solution robustness properties.

In this paper we consider the generation of temporally flexible schedules from this perspective. Within a tempo-rally flexible schedule, each activity preserves a set of pos-sible allocations, and these options provide a basis for re-sponding to unexpected disruptions. More precisely, we will focus on the construction of partially ordered solutions (temporally consistent) that are also solutions of the overall problem (resource consistent). The aim is not to arrive to a single schedule but to instead identify a set of schedules that in the following is called Partial Order Schedule:

Definition 1 (Partial Order Schedule) A Partial Order SchedulePOSfor a problemPis a graph, where the nodes are the activities of P and the edges represent temporal constraints between pairs of activities, such that any possible temporal solution is also a consistent assignment.

Notice that the temporal constraints referred to in Defini-tion 1 are both those defined in the problem and those added to solve it.

APOSprovides the opportunity to reactively respond to external changes by simply propagating the effects of these changes over the Simple Temporal Problem (a polynomial time calculation), and hence can minimize the need to re-compute new solutions from scratch. The challenge here is to create scheduling algorithms that create “good”POSs, where the “goodness” of aPOSis reflected by its size, the number of schedules that it “contains”. In general, the larger the size of thePOSthe more flexible it is, sincePOS size is directly proportional to the ability to pick a tailored sched-ule for the actual evolution of the world.

The concepts introduced above are still quite vague al-though they give high-level intuition. We need a set of met-rics for evaluating the quality of aPOS in terms of these described features.

Evaluation Criteria. We will introduce three different metrics, the first two aim at evaluating the robustness of the solution by estimating its flexibility (size); the third esti-mates schedule stability.

The first measure is taken from (Aloulou & Portmann 2003) and calledf lexseq. It consists of counting the

num-ber of pairs of activities in the solution which are not recip-rocally related (i.e., not ordered with respect to one another by, explicit or implicit, precedence constraints in thePOS).

This metric provides an analysis of the configuration of the solution. The rationale for this measure is that when two activities are not related it is possible to move one without moving the other one. So the higher the value off lexseqthe lower the degree of interaction among the activities.

A second metric is taken from (Cesta, Oddi, & Smith 1998) and is based on the temporal slack associated with each activity:

f ldt=X

h6=l

|d(eah, sal) +d(sal, eah)|

H×n×(n−1) ×100 (3) where H is the horizon of the problem, n is the number of activities andd(tp1, tp2)is the distance between the two

time points. An estimation of the upper bound for the hori-zonH is computed adding the duration of all the activities and the value of minimal distance constraints between any pair of activities. This metric characterizes the fluidity of a solution, i.e., the ability to use flexibility to absorb temporal variation in the execution of activities. The higher the value off ldt, the less the risk of a “domino effect”, i.e. the higher the probability of localized changes.

Whereas the previous parameters summarize the flexibil-ity of a solution, we introduce a third measure, called

dis-ruptibility, to take into account the impact of disruptions on

the schedule (stability):

dsrp= 1 n n X i=1 slackai numchanges(ai,ai) (4)

The valueslackai = d(t0, t2i)(−d(t2i, t0))represents

the temporal flexibility of each activityai , i.e., the ability to absorb a change in the execution phase (t2i is the end time ofaiandd(t0, t2i),d(t2i, t0)are respectively its

max-imum and minmax-imum possible value). Through the function

numchanges(ai,ai)the number of entailed changes given

a right shift∆ai of the activityai is computed. This

func-tion calculates the effect of propagating the value∆ai

for-ward, counting the number of activities which are shifted (changed) in the process. In the empirical evaluation pre-sented later in the paper, we will assume the biggest pos-sible shift ∆ai = slackai when computing the number

of changes. Such a metric gives an estimate of stabil-ity that incorporates the trade-off between the flexibilstabil-ity of each activity,slackai, and the number of changes implied,

numchanges(ai,ai). The latter can be seen as the price to

pay for the flexibility of each activity.

We now turn the attention to algorithms for generating

POSs and an analysis of how they perform with respect to these metrics.

A baseline PCP solver

To provide a basic framework for generatingPOSs, we re-consider the work of some of the authors on Precedence

(4)

Constraint Posting (PCP) algorithms for solving schedul-ing problems (Smith & Cheng 1993; Cesta, Oddi, & Smith 1998; 2002). A PCP algorithm aims at synthesizing addi-tional precedence constraints between pairs of activities for purposes of pruning all inconsistent allocations of resources to activities. The algorithm uses a Resource Profile (equa-tion 1) to analyze resource usage over time and detect peri-ods of resource conflict (contention peaks). We will see how different ways of computing and using the resource profile lead to different PCP-like algorithms.

Figure 1 shows a basic greedy algorithm for precedence constraint posting. Within this framework, a solution is produced by progressively detecting time periods where re-source demand is higher than rere-source capacity and post-ing sequencpost-ing constraints between competpost-ing activities to reduce demand and eliminate capacity conflicts. Given a problem, expressed as a partial ordered plan, the first step of the algorithm is to build an estimate of the required resource profile according to current temporal precedences in the net-work. This analysis can highlight contention peaks, where resource needs are greater then resource availability. Conflict collection. To be more specific, we call a set of activities whose simultaneous execution exceeds the re-source capacity a contention peak. The function Select-Conflict-Set(S0) of Figure 1 collects all the peaks in the

cur-rent schedule, ranks them, picks the more critical and select a conflict from this last peak.

The simplest way to extract a conflict from a peak is through pairwise selection. It consists of collecting any competing activity pairshai, ajiassociated with a peak and ordering such activities with a new precedence constraint,

ai≺aj. The myopic consideration on any pair of activities in a peak can, however, lead to an over commitment. For ex-ample, consider a resourcerjwith capacitymaxj = 4and three activitiesa1,a2 anda3 competing for this resource.

Assume that each activity requires respectively1, 2and3 units of the resource. Consideration of all possible pairs of activities will lead to consideration of the pairha1, a2i. But

the sequencing of this pair will not resolve the conflict be-cause the combined capacity requirement does not exceed the capacity.

An enhanced conflict selection procedure which avoids this problem is based on identification of Minimal Critical

Sets (Laborie & Ghallab 1995) inside each contention peak.

A contention peak designates a conflict of a certain size (cor-responding to the number of activities in the peak). A

Mini-mal Critical Set,MCS, is a conflict such that no proper

sub-set of activities contained inMCSis itself a conflict. The idea

is to represent conflicts asMCSs and eliminating them by or-dering any two activities included in theMCS. In the case of the example above the onlyMCSis{a2, a3}and both the

precedence constraintsa2≺a3anda3≺a2solve the peak.

As in previous research, we integrate MCS analysis to characterize conflicts within contention peaks. To avoid the exponential computational expense of fullMCSanalysis,

greedyPCP(P) Input: A problemP

Output: A solutionS

S0←P

if Exists an unresolvable conflict inS0then

return FAILURE else Cs←Select-Conflict-Set(S0) ifCs=then S ←S0 else (ai≺aj)Select-Leveling-Constraint(S0) S0←S0∪ {ai ≺aj} S greedyPCP(S0) returnS

Figure 1: Template of a greedy precedence constraint post-ing algorithm.

we also import twoMCSsampling procedures from (Cesta,

Oddi, & Smith 2002):

Linear sampling: instead of collecting allMCSs, we use a linear function of complexityO(p), wherepis the size of the peak, to sample a subset ofMCSs;

Quadratic sampling: under this scheme, a larger subset of MCSs are selected using a procedure of complexityO(p2), wherepis the size of the peak.

In what follow we will utilize three different operators for gathering conflicts: the simple pairwise selection, and the increasingly accurate linear and quadraticMCSsampling. Conflict selection and resolution. Independent of whether conflict selection is performed directly from activ-ity pairs or from sampled MCSs, a single conflict will be selected for resolution according to the “most constrained first” principle. Given a selected pair of conflicting activi-ties, the order between them will be chosen according to a “least constraining” principle. The basic idea is to resolve the conflict that is the most “dangerous” and solve it with a commitment as small as possible.

More specifically, the following heuristics are assumed: Ranking conflicts: for evaluating the contention peaks we

have used the heuristic estimator K described in (Laborie & Ghallab 1995). A conflict is unsolvable if no pair of activities in the conflict can be ordered. Basically, K mea-sures how close a given conflict is to being unsolvable. Slack-based conflict resolution: to choose an order

be-tween the selected pair of activities we apply dominance

conditions that analyze the reciprocal flexibility between

activities (Smith & Cheng 1993). In the case where both orderings are feasible, the choice which retains the most temporal slack is taken.

It is worth underscoring that the above PCP framework es-tablishes resource feasibility strictly by sequencing

(5)

conflict-ing activities. It remains non-committal on activity start times. As such, PCP preserves temporal flexibility that fol-lows from problem constraints. Further, the two heuristic choices adopt a minimal commitment strategy with respect to preserving temporal slack, and this again favors temporal flexibility.

Two Profile-Based Solution Methods

As suggested previously, we can specify dramatically dif-ferent solution methods by varying the approach taken to generation and use of resource profiles. In this paper, we consider two extreme approaches: (1) a pure least commit-ment approach, which uses the resource envelope computa-tion introduced in (Muscettola 2002) to anticipate all possi-ble resource conflicts and establish ordering constraints on this basis, and (2) an “inside-out” approach which uses the focused analysis of early start time profiles that we intro-duced in (Cesta, Oddi, & Smith 1998) to first establish a resource-feasible early start time solution and then applies a chaining procedure to expand this early start time solution into aPOS. The subsections below consider these compet-ing approaches in more detail.

Least-Commitment Generation Using Envelopes

The perspective of a “pure” least commitment approach to scheduling consists of carrying out a refinement search that incrementally restricts a partial solution (the possible tem-poral solutionsτ∈ST) with resource conflicts until a set of solutions (aPOS in our case) is identified that is resource consistent. A useful technical result has been produced re-cently (Muscettola 2002) that potentially can contribute to the effectiveness of this type of approach with an exact com-putation of the so-called Resource Envelope. According to the terminology introduced previously we can define the Re-source Envelope as follows:

Definition 2 (Resource Envelope) LetSTthe set of

tempo-ral solutionsτ. For each resourcerjwe define the Resource

Envelope in terms of two functions:

Lmaxj (t) = maxτS T {Qτj(t)} Lminj (t) = minτS T {Qτj(t)}

By definition the Resource Envelope represents the tightest

possible resource-level bound for a flexible plan.

Integration of the envelope computation into a PCP algo-rithm is quite natural. It is used to restrict resource profile bounds, in accordance with the current temporal constraints in the underlying STP. In (Muscettola 2002) it is proved that it is possible to find the Resource Envelope through a poly-nomial algorithm. The advantage of using the resource en-velope is that all possible temporal allocations are taken into account during the solving process. In the remainder of this section we briefly review the ideas behind computation of the resource envelope. Then we introduce some new prop-erties we have synthesized to make the computation more

efficient. Finally, we give details of how peak detection is performed starting from an envelope.

Basic envelope properties. To find the maximum (mini-mum) value of the resource level at any instanttmost me-thods consider the following set partition of the time points (events)T:

- Bt: the set of eventstis.t.lst(ti)≤t;

- Et: the set of eventstis.t.est(ti)≤t < lst(ti); - At: the set of eventstis.t.est(ti)> t.

Since the events inBtare those which happen before or at timet, they contribute to the value of the resource profile of

rj in the instantt. By the same argument we can exclude from such a computation the events in At. Then the cru-cial point is to determine which of those in Ethave to be take into account. In (Muscettola 2002), instead, the author proves that to find the subset ofEt for computing the up-per (lower) bound, it is possible to avoid enumerating all the possible combinations of events in Et. Muscettola shows that a polynomial algorithm can be found through a reduc-tion to Max-Flow, a well-known tractable problem. The ef-fectiveness of the reduction is due to the fact that it is pos-sible to exploit the relations among the set of events and to consider only a subset of feasible combinations. The details of the algorithm can be found in the original paper; we sim-ply recall here that the method broadly consists of building a Max-Flow problem from the set of events belonging toEt and, after the max flow is found, the subset Pmax Et (Pmin⊆Et), of events that gives the maximum (minimum) value of the resource level at the instantt, is computed per-forming a linear analysis of the residual graph. An important point is that it is not necessary to compute the resource-level envelope in all possible instantst. Indeed, you only need to computeLmax

j at times when eitherBtorEtchanges. For any time pointti this can only happen either at its earliest time value est(ti) = −d(ti, t0)or at its latest time value lst(ti) =d(t0, ti).

Incremental computation of resource envelopes. A po-tential drawback in using an envelope computation within a scheduling algorithm such as the base PCP solver is the com-putational burden of the Max-Flow computation. Despite being polynomial, the computational cost is significant and can become a limiting factor in the case of larger scheduling problems. In this section, we establish some properties for computing the envelope incrementally across points of dis-continuity. In (Satish Kumar 2003) a method is proposed for incrementally computing the resource envelope when a new constraint is added. That method is complementary to the properties that we are proposing here. Moreover since the incremental methods to computePminandPmaxcan be ob-tained from each other with obvious term substitutions, we only develop the method forPmax.

First, we need to define the overall contribution of a time pointtito the resource envelope value. Given a time point

(6)

ti and a resourcerj we define its overall contribution to be the value: Σruij =ruij+ X ∀tk|d(ti,tk)<0 rukj

It is trivial to observe that a time point ti Et will not belong toPmaxif its overall contribution is negative. Indeed addingti at Pmax implies a reduction of the value of the resource level at the instantt.

A first theorem allows us to restrict the set of time points for whichPmaxmust be computed:

Theorem 1 If there exists a time pointti ∈Et∩Et+1and ti ∈Pmax(Et), thenti∈Pmax(Et+1).

Proof: Reductio ad absurdum. Ifti Pmax(Et)andti ∈/ Pmax(Et+1)holds, then int+ 1the contribution of the time

pointtiis negative. In turn, this entails that there must exist a time pointtk, withrukj<−Σruij, such thattk ∈Et+1 Atandd(ti, tk)<0. But the last two formulas are mutually inconsistent, thus ifd(ti, tk)<0thentk ∈Bt∪Et. This

contrasts withtk∈At. ¤

From this theorem it follows that at each instanttwe need to consider only the events inEt\Pmaxto figure out which events to insert intoPmax. Moreover, from the previous the-orem, we can prove the following corollary:

Corollary 1 If Et+1\Pmax(Et) = Et\Pmax(Et) then Pmax(Et+1) =Pmax(Et).

Unfortunately, for those events that belong toEtandEt+1

but not toPmax(Et)intwe can claim nothing. Anyway we can prove the following necessary condition:

Theorem 2 An element t ∈/ Pmax(Et) belongs to Pmax(Et+1) only if one of the following two conditions

hold:

1. ∃t+i , withruij >0, s.t.ti+∈At∩(Et+1∪Bt+1)

2. ∃t−i , withruij <0, s.t.t−i (Et\Pmax(Et))∩Bt+1.

Proof: We prove the two cases separately:

Case 1: ifti ∈At∩(Et+1∪Bt+1)then a further element

is added toPmaxonly ifruij >0. Indeed ifruij 60then there exists at least one productiont+k that is implied byt−i . Thus it is possible to put onlyt+k in the setPmaxhaving a bigger value ofLmax. Thenruij >0.

Case 2: if it existsti∈(Et\Pmax(Et))∩Bt+1then a further

element is added toPmaxonly ifruij <0. Indeed ifruij >

0then it exists a time pointtks.t. its contributeΣrukj >0 and the combined contribute ofti andtk is negative. But this is possible only ifΣruij<0that is at least a time point tz∈(Et\Pmax(Et))∩Bt+1s.t.ruzj<0. ¤ The above theorems allow a reduction in the computa-tional cost of solving a given problem instance with a vari-ant of a PCP-like solver that incorporates resource envelopes for guidance, reducing the number of times that it is neces-sary to recompute the setPmax(Theorem 1), and the size of set from which to extract it, fromEt+1toEt+1\Pmax(Et) (Theorem 2).

Detecting peaks on resource envelopes. Once the Re-source Envelope is computed it can be used to identify the current contention peaks and the sets of activities related to them. A first method (Policella et al. 2003) for col-lecting peaks consists of the following steps: (1) compute the resource envelope profile, (2) detect intervals of over-allocation, and (3) collect the set of activities which can be potentially executed in such an interval. Unfortunately this approach can pick activities which are already ordered. For example, consider a problem with a binary resource and three activitiesa1, a2anda3 with the same interval of

al-location and the precedence a1 a2. In such a case the

above method would collect the peak {a1, a2, a3};

mean-while, only two peaks,{a1, a3}and{a2, a3}, should be

col-lected in this case.

A more careful method should avoid such an aliasing ef-fect. In particular a better method derives from considering the setPmax. This method is based on the particular as-sumption that each activity simply uses resources; without production and/or consumption. Whether the value of the resource envelope intis greater than the resource capacity,

Lj

max(t)>maxj, the contention peak will be composed of every activityaisuch that the time point associated with its start time is inPmax but the time point associated with its end time is not, that is:

contention peak={ai|t2i−1∈Pmax∧t2i∈/ Pmax}. To avoid collection of redundant contention peaks, the ex-traction of the contention peak will be performed only if there exists at least one end time of an activityai,t2i, such that it moves fromAt−1 toBt∪Etand at least one start time of an activityaj,t2j−1, that moved inPmaxsince the last time a conflict peak has been collected.

Inside-Out Generation Using Early Start Profiles

A quite different analysis of resource profiles has been pro-posed in (Cesta, Oddi, & Smith 1998). In that paper an al-gorithm calledESTA(for Earliest Start Time Algorithm) was first proposed which reasons with the earliest start time pro-file:

Definition 3 (Earliest Start Time Profile) Let est(ti) the

earliest time value for the time pointti. For each resource rjwe define the Earliest Start Time Profile as the function:

Qest j (t) =

X ti∈T ∧est(ti)6t

ruij

This method computes the resource profile according to one precise temporal solution: the Earliest Start Time Solution. The method exploits the fact that unlike the Resource Enve-lope, it analyzes a well-defined scenario instead of the range of all possible temporal behaviors.

It is worth noting that the key difference between the earli-est start time approach with respect to the resource envelope approach is that while the latter gives a measure of the worst-case hypothesis, the former identifies “actual” conflicts in

(7)

Chaining(P, S)

Input: A problemPand one of its fixed-times scheduleS

Output: A partial order solutionP OS

P OS←P

Initialize all queues empty

for all activityaiin increasing order w.r.t.Sdo for all resourcerjdo

k←1 for1toruijdo a←LastElement(queuejk) whilesai ≥eado k←k+ 1 a←LastElement(queuejk) P OS=P OS∪ {a≺ai} Enqueue(queuejk, ai) k←k+ 1 returnP OS

Figure 2: Chaining algorithm.

a particular situation (earliest start time solution). In other words, the first approach says what may happen in such a situation relative to the entire set of possible solutions, the second one, instead, what will happen in such a particular case.

The limitation of this approach with respect to our current purpose is that it ensures resource-consistency of only one solution of the problem, the earliest start time solution. Us-ing a PCP computation for solvUs-ing, we always have a set of temporally consistent solutionsST. However,ESTAwill not synthesize a set of solutions for the problem (i.e.,ST *S), but the single solution in the earliest start time of the result-ing STP. Below, we describe a method for overcomresult-ing this limitation and generalizing an early start time solution into a partial ordered schedule (POS). This will enable direct comparison with thePOSproduced by the envelope-based approach.

Producing a POS with Chaining. A first method for pro-ducing flexible solutions from an early start time solution has been introduced in (Cesta, Oddi, & Smith 1998). It con-sists of a flexible solution where a chain of activities is asso-ciated with each unit of each resource.

In this section we generalize that method for the more general RCPSP/max scheduling problem considered in this paper (see Figure 2). Given a earliest start solution, a trans-formation method, named chaining, is defined that proceeds to create sets of chains of activities. This operation is accom-plished by deleting all previously posted leveling constraints and using the resource profiles of the earliest start solution to post a new set of constraints.

The first step is to consider a resource rj with capacity maxj as a setRj of maxj single capacity sub-resources. In this light the second step is to ensure that each activity is allocated to the same subset ofRj. This step can be viewed

Figure 3: Chaining method: intuition.

in Figure 3: on the left there is the resource profile of a re-sourcerj, each activity is represented with a different color. The second step consists of maintaining the same subset of sub-resources for each activity over time. For instance, in the center of Figure 3 the light gray activities are re-drawn in the way such that they are always allocated on the fourth sub-resource. The last step is to build a chain for each sub resource in Rj. On the right of Figure 3 this step is rep-resented by the added constraints. This explains why the second step is needed. Indeed if the chain is built taking into account only the resource profile, there can be a prob-lem with the relation between the light gray activity and the white one. In fact, using the chain building procedure just described, one should add a constraint between them, but that will not be sound. The second step allows this problem to be avoided, taking into account the different allocation on the set of sub-resourcesRj.

The algorithm in Figure 2 uses a set of queues,queuejk, to represent each capacity unit of the resource rj. The al-gorithm starts by sorting the set of activities according to their start time in the solution S. Then it proceeds to al-locate the capacity units needed for each activity. It se-lects only the capacity units available at the start time of the activity. Then when an activity is allocated to a queue, a new constraint between this activity and the previous one in the queue is posted. Let m and maxcap respectively the number of resources and the maximum capacity among the resources, the complexity of the chaining algorithm is

O(nlogn+n·m·maxcap).

Summary of PCP Algorithm Variants

In closing the section we remark again that by working with different resource profiles we have created two orthog-onal approaches to generating a POS: EBA (from Enve-lope Based Algorithm) andESTA. One of them has required a post processing phase to be adapted to the current pur-pose (from the adaptation, the name ESTAC). Given these two basic PCP configurations, recall that conflicts can be extracted from peaks according to three different strategies: pairwise selection,MCSlinear sampling andMCSquadratic sampling. The combination of these three methods with the two different approaches to maintaining resource informa-tion thus leads to six different configurainforma-tions: three based on the resource envelope,EBA,EBA+MCSlinear,EBA+MCS quadratic, and three based on the earliest start time profile, ESTAC, ESTAC+MCS linear, ESTAC+MCS quadratic. The next section presents a discussion of the results obtained

(8)

f lexseqf ldt ∆dsrp J10 J20 J30 J10 J20 J30 J10 J20 J30 EBA 86.27 83.77 76.80 37.21 35.94 30.77 46.89 42.09 41.63 EBA+MCSlinear 83.36 84.94 81.57 35.11 39.57 41.41 44.37 41.49 42.78 EBA+MCSquadratic 83.99 86.54 83.58 35.20 41.81 44.33 44.90 43.23 43.56 ESTAC 80.56 79.96 74.98 32.79 35.27 40.79 35.96 25.99 27.17 ESTAC+MCSlinear 79.79 80.41 74.97 32.42 34.87 40.94 34.75 26.74 28.39 ESTAC+MCSquadratic 79.94 80.79 75.26 32.46 35.56 39.61 35.16 28.37 27.55

Table 1:∆µ(P,S)for the three metricsf lexseq,f ldtanddsrp.

%solved makespan CPU-time (secs) posted constraints

J10 J20 J30 J10 J20 J30 J10 J20 J30 J10 J20 J30 EBA 77.04 50.74 43.33 58.31 96.48 118.17 0.32 3.88 24.77 11.54 33.40 63.29 EBA+MCSlinear 85.19 71.11 68.89 55.29 92.65 112.14 0.77 11.35 48.89 11.12 32.87 56.84 EBA+MCSquadratic 97.78 89.63 82.22 55.47 94.03 116.10 0.91 13.21 68.22 12.38 34.98 59.64 ESTAC 96.30 95.56 96.30 47.35 72.90 79.21 0.32 1.75 5.40 6.40 18.69 35.10 ESTAC+MCSlinear 98.15 96.67 96.67 46.63 72.45 78.45 0.34 2.14 8.08 6.23 17.49 34.07 ESTAC+MCSquadratic 98.15 96.67 97.04 46.70 72.75 78.55 0.34 2.27 9.51 6.26 17.40 34.00

Table 2: Comparison of both theEBAand theESTAapproaches.

testing the six approaches on a significant scheduling prob-lem benchmark: RPCSP/max.

Experimental Evaluation

This section compares the proposed set of algorithms with respect to our definition of robustness and analyzes to what extent temporally flexible solutions are also robust solutions able to absorb unexpected modifications. We compare the performance of each algorithm1 on the benchmark

prob-lems defined in (Kolisch, Schwindt, & Sprecher 1998). This benchmark consists of three setsJ10,J20andJ30of 270 of problem instances of different size 10×5,20×5 and 30×5(number of activities×number of resources).

In a previous section we have introduced two metrics for robustness: f ldtandf lexseq. Both these parameters are correlated with the number of feasible solutions contained in aPOS. In particular,f lexseqis directly correlated to the number of unrelated pairs of activities (no precedence con-straint) in a partial order schedule. On the contrary, the dis-ruptibilitydsrpis correlated with the stability of a solution, such that we consider executions where only one unexpected event at a time can occur (e.g., activity duration lasts longer than expected or the start time of an activity is shifted for-ward). We report as a result a value correlated to the average number of activities affected (number of start time changes) by the set of unexpected events.

In order to produce an evaluation of the three parameters

f ldt,f lexseqanddsrpthat is independent from the problem dimension, we evaluate the following incremental parameter

1

All the algorithms presented in the paper are implemented in C++ and the CPU times presented in the following tables are ob-tained on a Pentium 4-1500 MHz processor under Windows XP.

for each generic metricµ(i.e.,f lexseq,f ldtordsrp):

µ(P,S) = µ(P)−µ(S)

µ(P) ×100

whereµ(P)andµ(S)are respectively the values of the pa-rameterµfor the problemP (the initial partial order) and its solutionS (the final partial order). We observe that the value∆µis always positive or zero. In fact, for each met-ric the addition of precedence constraints between activities that are necessary to establish a resource-consistent solution can only reduce the initial valueµ(P).

The results obtained, subdivided according to benchmark set, are given in Tables 1 and 2. First, we observe that all six tested strategies are not able to solve all the problems in the benchmark setsJ10,J20andJ30. The first column of Table 2 shows the percentage of solved problems by each strategy. This observation is particularly important, because the rest of the experimental results in this section are com-puted with respect to the subset of problem instances solved by all the six approaches.

Table 1 presents the main results of the paper for the six different approaches, according to the three incremental pa-rameters∆µintroduced above. In each case, the lower the values, the better the quality of the corresponding solutions. In addition, Table 2 complements our experimental analysis with four more results: (1) percentage of problems solved for each benchmark set, (2) average CPU-time in seconds spent to solve instances of the problem, (3) average mini-mum makespan and (4) the number of leveling constraints posted to solve a problem.

From Table 1 we first observe that theESTACapproaches dominate theEBAapproaches across all problem sets for the two metrics directly correlated to solution robustness. And this observation is confirmed in the third column (∆dsrp)

(9)

J10 J20 J30

scratch incremental ∆% scratch incremental ∆% scratch incremental ∆%

EBA 0.616 0.32 48.1 10.36 3.88 62.5 50.58 24.77 51.0

EBA+MCSlinear 1.742 0.77 55.8 28.83 11.35 60.6 128.9 48.89 62.1 EBA+MCSquadratic 1.947 0.91 53.2 34.05 13.21 61.2 190.1 68.22 64.1

Table 3: Comparison between the CPU-time (secs) required by the EBA approaches using both the incremental and no-incremental method for computing the resource envelope.

where better values of flexibility correspond to better values of disruptibility (stability). Hence, the solutions created with ESTACare more appropriate to absorb unexpected events.

This fact induces further observations about the basic strategies behind the two algorithms. EBAremoves all pos-sible resource conflicts from a problemP by posting prece-dence constraints and relying on an envelope computation that produces the tightest possible resource-level bounds for a flexible schedule. When these bounds are less than or equal to the resource capacities, we have a resource-feasible partial order ready to face with uncertainty. However, in order to remove all possible conflicts EBA has to impose more precedence constraints than doesESTAC(see column labeled with posted constraints in Table 2), with the risk of overcommitment in the final solution. In fact, in com-paring EBA with ESTAC, it can be seen that the EBA ap-proach is actually less effective. It solves significantly fewer problems thanESTACin each problem set, obtains solutions with higher makespans, incurs higher CPU times and posts more precedence constraints. By addingMCSanalysis to the EBAsearch configuration, we obtain a noticeable improve-ment of the results. In fact, in the case of quadratic sam-pling the number of problem solved is closer to that achieved with theESTACapproach. However, we pay an higher CPU time price and there are no significant improvements in the makespan and in the number of constraints posted (Table 2). On the other hand, as previously explained, ESTAC is a two step procedure: theESTAstep creates a particular par-tial order that guarantees only the existence of the early start time solution; the chaining step converts this partial order into aPOS. It is worth reminding that the number of prece-dence constraints is alwaysO(n)and for each resource, the

form of the partial order graph is a set of parallel chains.

These last observations probably identify the main factors which enable a more robust solution behavior, i.e.,ESTAC solutions can be seen as a set of layers, one for each unit of resource capacity, which can slide independently to hedge against unexpected temporal shifts.

A note on envelope efficiency. We end the section with a final remark about our research goals. The main aim of this work has not been to find a way to beat an envelope-based algorithm, but rather to try to understand ways to use it for finding robust solutions. In this respect, EBA is the first scheduling algorithm to integrate the recent research re-sults on exact bound computation into a scheduling

frame-work, and, in addition, we have improved the efficiency of the envelope computation considerably with respect to our preliminary experiments (Policella et al. 2003). One spe-cific result of this paper is a set of properties to reduce its high associated computational cost.

Indeed, the computation of the envelope implies that it is necessary to solve a Max-Flow problem for each time-point. As indicated in (Muscettola 2002), this leads to an over-all complexity of O(n4)which can be reduced toO(n2.5)

in practical cases. These computational requirements at present limit the effective application of the resource en-velope. In the current implementation we use a Max-Flow method based on the pre-flow concept (Goldberg & Tarjan 1988). The use of the incremental properties described in a previous section speeds up the solving process by avoiding re-computation of the envelope at each step of the search. Moreover Theorem 2 allows us to apply the Max-Flow al-gorithm to a subset ofEt+1:Et+1\Pmax(Et).

Table 3 reports the overall speedup obtained in solving in-stances of the three benchmark sets with respect to the prop-erties expressed by Theorems 1 and 2. In particular, for each configuration of theEBAalgorithm and each benchmark set (J10, J20 and J30) there are three different results: the average CPU-time in seconds for solving a benchmark set without incremental computation (column scratch), as the previous one but with the use of the incremental proper-ties (column incremental) and the obtained percentage im-provement over the no-incremental version ofEBA(column ∆%). The results confirm the effectiveness of the incre-mental computation which is able to improve the CPU-time from a minimun of48.1%to a maximum of64.1%over the scratch computation.

Conclusion

In this work we have investigated two orthogonal ap-proaches (EBAandESTAC) to building scheduling solutions that hedge against unexpected events. The two approaches are based on two different methods for maintaining profile information: one that considers all temporal solutions (the resource envelope) and one that analyzes the profile for a precise temporal solution (the earliest start time solution).

To evaluate the quality of respective solutions we intduced three measures that capture desirable properties of

ro-bust solutions. The first two metrics (f ldtandf lexseq) are correlated to the degree of schedule robustness that is re-tained in generated solutions. The third, disruptibilitydsrp,

(10)

can alternatively be seen as the result of a simulation of solu-tion execusolu-tion, where we consider execusolu-tions in which only one unexpected event can occur at a time. In addition, we focus our attention only to temporal disruptions: situations where an activity duration lasts longer than expected, or the start time of an activity is shifted forward.

Considering comparative performance on a set of bench-mark project scheduling problems, we have shown that the two step ESTAC procedure, which first computes a single-point solution and then translates it into a temporally flexi-ble partial order schedule, is a more effective approach than the pure, least-commitmentEBAapproach. In fact, the first step preserves the effectiveness of theESTAapproach (i.e., makespan and CPU time minimization), while the second step has been shown to be capable of re-instating temporal flexibility in a way that produces a final schedule with better robustness properties.

Acknowledgments

Stephen F. Smith’s work is supported in part by the Depart-ment of Defense Advanced Research Projects Agency and the U.S. Air Force Research Laboratory - Rome, under con-tracts F30602-97-2-0666 and F30602-00-2-0503, by the Na-tional Science Foundation under contract # 9900298 and by the CMU Robotics Institute. Amedeo Cesta, Angelo Oddi and Nicola Policella’s work is partially supported by ASI (Italian Space Agency) under project ARISCOM (Contract I/R/215/02). Nicola Policella is also supported by a scholar-ship from CNR.

Part of this work has been developed during Policella’s visit at the CMU Robotics Institute as a visiting student scholar. He would like to thank the members of the Intelli-gent Coordination and Logistics Laboratory for support and hospitality.

References

Aloulou, M., and Portmann, M. 2003. An Efficient Proac-tive ReacProac-tive Scheduling Approach to Hedge against Shop Floor Disturbances. In Proceedings of the 1st Multidisci-plinary International Conference on Scheduling: Theory and Applications, MISTA 2003, 337–362.

Bartusch, M.; Mohring, R. H.; and Radermacher, F. J. 1988. Scheduling project networks with resource con-straints and time windows. Annals of Operations Research 16:201–240.

Cesta, A.; Oddi, A.; and Smith, S. F. 1998. Profile Based Algorithms to Solve Multiple Capacitated Metric Schedul-ing Problems. In ProceedSchedul-ings of the4thInternational Con-ference on Artificial Intelligence Planning Systems AIPS-98, 241–223. AAAI Press.

Cesta, A.; Oddi, A.; and Smith, S. F. 2002. A Constraint-based method for Project Scheduling with Time Windows.

Journal of Heuristics 8(1):109–136.

Davenport, A.; Gefflot, C.; and Beck, J. 2001. Slack-based Techniques for Robust Schedules. In Proceedings of6th

European Conference on Planning, ECP-01.

Dechter, R.; Meiri, I.; and Pearl, J. 1991. Temporal Con-straint Networks. Artificial Intelligence 49:61–95.

Drummond, M.; Bresina, J.; and Swanson, K. 1994. Just-in-Case Scheduling. In Proceedings of the 12th

National Conference on Artificial Intelligence, AAAI-94,

1098–1104. AAAI Press.

El Sakkout, H., and Wallace, M. Probe Backtrack Search for Minimal Perturbation in Dynamic Scheduling.

Con-straints.

Goldberg, A. V., and Tarjan, R. E. 1988. A New Approach to the Maximum Flow Problem. Journal of the Association

for Computing Machinery 35(4):921–940.

Kolisch, R.; Schwindt, C.; and Sprecher, A. 1998. Benchmark Instances for Project Scheduling Problems. In Weglarz, J., ed., Project Scheduling - Recent Models,

Algo-rithms and Applications. Boston: Kluwer. 197–212.

Laborie, P., and Ghallab, M. 1995. Planning with Sharable Resource Constraints. In Proceedings of the14th Inter-national Joint Conference on Artificial Intelligence, IJCAI-95, 1643–1649.

Muscettola, N. 2002. Computing the Envelope for Stepwise-Constant Resource Allocations. In Principles

and Practice of Constraint Programming, 8th Interna-tional Conference, CP 2002, volume 2470 of Lecture Notes in Computer Science, 139–154. Springer.

Policella, N.; Smith, S. F.; Cesta, A.; and Oddi, A. 2003. Steps toward Computing Flexible Schedules. In

Proceed-ings of Online-2003: Workshop on “Online Constraint Solving: Handling Change and Uncertainty”, Kinsale, Co. Cork, Ireland.

Satish Kumar, T. K. 2003. Incremental Computation of Resource-Envelopes in Producer Consumer Models. In

Principles and Practice of Constraint Programming, 9th

International Conference, CP 2003, volume 2833 of Lec-ture Notes in Computer Science, 664–678. Springer.

Smith, S. F., and Cheng, C. 1993. Slack-based Heuristics for Constraint Satisfactions Scheduling. In Proceedings

of the11thNational Conference on Artificial Intelligence,

AAAI-93, 139–144. AAAI Press.

Smith, S. F. 1994. OPIS: A Methodology and Architecture for Reactive Scheduling. In Fox, M., and Zweben, M., eds.,

Figure

Figure 3: Chaining method: intuition.
Table 1: ∆µ(P, S) for the three metrics f lex seq , f ldt and dsrp.
Table 3: Comparison between the CPU-time (secs) required by the EBA approaches using both the incremental and no- no-incremental method for computing the resource envelope.

References

Related documents

Normally, candidates, who have passed the written test, can apply for a full driving licence for taxi without the need to attend any road test.. The Taxi written test is composed

Annexure A – Shipping industry tariff structure 119 Annexure B – Questionnaire completed by the container shipping industry 122 Annexure C – Questionnaire completed by the

Medical science is another field where large amount of data is generated using different clinical reports and other patient symptoms. Data mining can also be

beginning, where the setting, main character , and problem or conflict are introduced • a middle, where the characters try to solve the problem or conflict • an

However, as regards the safety and quality of food produced abroad and sold on the Slovak market, in these answers, Figure 2 also shows the dissatisfaction of respondents with

In addition, consistent with classic trade theory for a relatively low-skilled labor abundant country like Viet Nam, the increase in manual and routine (low skilled) tasks

Critique was therefore geared towards a ‘reality test’ that confirmed the semantic validity of central government discourses around the necessity of austerity, given national

Brocade delivers a resilient integrated replication solution for mainframe data center connectivity to provide organizations with the best reliability, availability, scalability,