Development of a heuristic project scheduler under resource constraints

Development of a heuristic project scheduler under resource constraints

EUROPEAN JOURNAL OF OPERATIONAL RESEARCH ELSEVIER European Journal of Operational Research 79 (1994) 176-182 Development of a heuristic project sch...

496KB Sizes 1 Downloads 66 Views

EUROPEAN JOURNAL OF OPERATIONAL RESEARCH

ELSEVIER

European Journal of Operational Research 79 (1994) 176-182

Development of a heuristic project scheduler under resource constraints R. Minciardi *, M. Paolucci, P.P. Puliafito Dipartimento di Informatica, Sistemistica e Telematica, l,Ta Opera Pia 11A; 16145 Genova, Italy

Abstract

The construction of a heuristic project scheduler under resource constraints is dealt with. The approach used is based on the decomposition of the original problem instance into a sequence of successive instances of a simpler subproblem, each corresponding to a certain 'decisional horizon'.

Keywords: Project scheduling; Decomposition; Heuristics

1. Introduction

This p a p e r describes the main aspects of the research work carried out by our group within the framework of the International Exercise on decision support systems proposed and coordinated by IIASA, the International Institute of Applied Systems Analysis [1]. Our contribution has been focused on the problem of defining efficient heuristics. The combinatorial difficulties arising from the scheduling model proposed and the non-regular nature [4] of the cost functional considered (which takes into account the maximum and (weighted) total tardiness and earliness) make heuristic approaches preferable to pure optimization ones. In fact, the

* Corresponding author.

problem dealt with in the Exercise is a generalization of well-known NP-complete problems (e.g., the minimization of the maximum completion time (makespan) in a job-shop [7], and the minimization of weighted total tardiness and earliness, on a single machine, with distinct due-dates

[2]). The first heuristic of our approach is related to the problem decomposition: we follow an eventdriven technique, and build a schedule by solving a sequence of successive instances of the same subproblem. Further heuristics are used to generate feasible schedules for the subproblem instances considered. The overall schedule so obtained turns out to be semi-active [4], and determines a set of decisions for the assignment and sequencing of tasks over the resources. Then, such decisions are retained and interpreted as constraints on the final step, i.e., timetabling optimization.

0377-2217/94/$07.00 © 1994 Elsevier Science B.V. All rights reserved SSDI 0377-2217(94)00124-U

R. Minciardi et al. / European Journal of Operational Research 79 (1994) 176-182 For the readers' convenience, we briefly recall here the data structure describing a problem instance: • a set R of available resources; each resource included in R is characterized by one or more availability (working) interval(s), each defined by an opening-time and a closing-time; a set of resources can be used to process only one task at a time and no preemption is allowed; • a set P of projects, each consisting of several tasks organized into a general structure made up of binary precedence relations; each project can have a release-time, a due-date, and a deadline; • a set T of tasks; each task "/'i is characterized

by: - a release-time a(,ri), a deadline b(7i), and a due-date d('ri); - a class F(7 i) of resource-sets which can be used to execute ~i; - a processing time t/ of the task ~'i on every resource-set pj ~ F(~'i); - two weights for the tardiness and earliness of the task; • a set of ordered couples of tasks (~'i, ~'y)~ T × T (which determine the precedence relations) and, for each of the ordered couples, a minimum waiting-time a(ri, ~'y) and a maximum waiting-time fl(,ri, ~'j), A feasible schedule is found by assigning each task ~'~ to a resource-set pj ~ F('ri), with a specific starting time s(~L), and without any violation of the time constraints. In connection with the above model, a problem instance is characterized by the criteria that should be used for schedule evaluation. The general performance measure considered in the Exercise is a weighted sum of the maximum tardiness, the total weighted tardiness, the maximum earliness, and the total weighted earliness of tasks as well as projects [1].

177

logical structure of the overall scheduler can be summarized as follows: 1) The problem-instance data are analyzed and a starting list of future events is fixed; a partial current schedule (PCS) is initialized as an empty set of scheduling decisions. 2) Let t be the time instant of the first event on the list; an Instance of the Scheduling SubProblem, i.e., ISSP(t), is constructed. 3) A feasible (semi-active) solution to ISSP(t) is found; as a consequence, the PCS is extended, and the list of future events is updated. 4) If there is any other task to be scheduled, go to Step 2, otherwise continue. 5) If the overall performance criterion does not take into account earliness criteria, a complete feasible schedule is found; otherwise a further timetabling optimization is performed, while maintaining the same assignment and sequencing decisions. Whenever an event occurs, an ISSP is generated. Events are of the following types: (i) the initial instant; (ii) one (or more) resource(s) become(s) available (due to occurrence of openingtimes, or to task completion); (iii) one (or more) task(s) become(s) activable. Once an ISSP has been solved, the PCS is extended by 'implementing' one or more decisions among those derived from the solution to the ISSP. Accordingly, the list of future events is updated. This procedure does not ensure that a feasible schedule, if any, will be found. Hence, suitable 'backtracking' strategies have to be applied. Such strategies allow one to remove some implemented decisions from the PCS, and to reconsider the solutions to previous ISSPs in order to eliminate possible causes of unfeasibility.

3. Generation of an instance of the scheduling subproblem 2. The event-driven a p p r o a c h

In our approach, a problem instance is solved through the generation and solution of a sequence of instances of a simpler subproblem involving a reduced set of tasks and resources. The

Every time one of the above-mentioned events occurs, an ISSP is generated, which is relevant to a well-defined 'time-horizon'. Let t be the time instant at which the generating event occurs. We assume that a set of scheduling decisions have

R. Minciardi et al. /European Journal of Operational Research 79 (1994) 176-182

178

already been implemented in the PCS. Then, the following sets can be determined: T t = {the set of tasks not yet activated but activable at time instant t}. Tt* = {the set of tasks not yet activated and not activable at time instant t}. R t = {the set of resources immediately available at time instant t}. The time-horizon tf(t) for the ISSP can be defined in many ways. If we compute the earliest completion time cj('l'i) = t + t/ for any task "/'i~ Tt and any resource-set py ~ F(-ci) and py c R t, then one possible way to determine tf(t) is the following:

tf(t)

=

max ¢iET t

max cj('ci) pjcR~

(i)

where: 7~t = {the set of tasks ~-i e T t such that at least a pj c R t and py ~ F(~"i) exists}. An alternative way to define tf(t) is to specify an arbitrary length A and to set t f ( t ) = t + A . Once tf(t) has been fixed, a further set of tasks ~rt can be defined: Tt = {~'i ~ Tt* s.t.: (i) all predecessors (if any) have already been activated at time t and (ii) z i is foreseen to become activable at a time instant t* e (t, Q(t) ], on the basis of the PCS and of the current list of future events} The tasks in Tt are included into the definition of ISSP(t) to increase the set of tasks in competition. Then, the set of tasks 7] considered in the definition of the ISSP(t) can be expressed as

5,= 7",uT,.

(2)

Analogously, the set of resources taken into account in the definition of ISSP(t) can be expressed as

(3) where Rt = {the set of resources that are not available at the time instant t, but that are foreseen to become available at a time instant t* ~ (t, tf(t) ], on the basis of the PCS and of the current list of future events}.

Then the ISSP(t) can be defined as the problem of scheduling the tasks in ~,, using the resources in /~t- It is worth noting that no precedence relationship holds among the tasks belonging to T r

4. Generating a solution to the scheduling subproblem Note that, in general, it is not strictly necessary that the solution to an ISSP(t) should schedule all the tasks in 7]. Actually, some unscheduled tasks can be re-considered in connection with some ISSP(t'), with t' > t. We choose to make use of a set of simple rules for the assignment/sequencing of tasks over resources. We have grouped such rules so as to form a 'task selection function' and a 'resource-set selection function'. The user can choose some coefficients affecting the procedure, whose primary objective is to generate a feasible schedule for the ISSP. Let us define the following quantities for each task ~'i ~ 7]: - the earliest activation time, i.e., 8t(7i), which is the earliest instant at which a given task can be activated, taking into account an a-priori time constraint (i.e., the release time for the task considered) and time constraints deriving from the PCS at the considered time instant t (relevant to minimum waiting-times); - the latest activation time, i.e., et(~'i ), which takes into account only time constraints deriving from the PCS (i.e., maximum waiting-times). Then, we define a task ~'i ~ ~Ft as being essential to ISSP(t) whenever (i) et(~"i) <_tf(t) a n d / o r (ii) b ( T i ) < t f ( t ) . Clearly, for the solution to ISSP(t), an essential task is more critical than a non-essential one, since it must be activated a n d / o r completed before the time instant tf(t), otherwise a feasible solution cannot be achieved. As a consequence, we define a feasible solution to ISSP(t) as a (feasible) schedule for all essential tasks in Tt. The Task Selection Function (TSF), 7t(,ci), used for the solution to ISSP(t) has a merely additive

R. Minciardi et al. / European Journal of Operational Research 79 (1994) 176-182

structure: for each task 7 i ~ ? t , such that the set l~t('T i) = {pj; pj ~ F(Yi), pj c R t} is not empty, H '~t(Ti) = E ka6th(~g) (4)

h-1 where kh, h = 1. . . . . H, are weighting coefficients. At present, (4) includes nine different terms, each corresponding to a different heuristic. Two of such terms are related to the 'urgency' of the completion and of the activation, respectively, for the task considered. A third term refers to the 'tightness' of the 'activability interval' (b('r i) (~t(7i)) with respect to the minimum processing time for the task. A fourth term selects tasks for which 'just-in-time' allocations seem to be more critical. A fifth term is inversely proportional to the 'best' task execution time, hence it tends to select tasks requiring minimum processing times. A sixth term has an analogous meaning to that of the fourth term, but takes into account the project due-date. Finally, the last three terms are related to the so-called 'Highest-Level-First' heuristic [5]. In the model considered, the level of a task, i.e., a 'measure' of the longest path (in the precedence-relation graph) from that task to a terminal node, can be estimated in three different ways: (i) by computing the overall length of a path on the basis of the longest processing times for the tasks and of the maximum waiting-times; (ii) by computing the overall length of a path on the basis of the shortest processing times for the tasks and of the minimum waiting-times; (iii) by computing the length of a path only on the basis of the number of links making up the path. Clearly, this choice is rather arbitrary. Even the additive structure of function (4) is arbitrary; a lexicographic structure could be chosen, as well. Similarly, for each task ~'/.~ 7~t and each resource-set Pi such that "rj ~ Ft(L), we define the 'Resource-Set Selection Function' (RSF), qb(Pj, Ti), as

q~t( pj, "ri) = hit ~ + h2n j + h 3 card(pj) q- h 4 m a x { A t ( p j )

-

-

(~t(Ti) , 0}

(5)

179

where: a) hs, s = 1. . . . . 4, are weighting coefficients; b) n j is the overall number of tasks already assigned to pj (including those assigned in the PCS, and those assigned in the solution to ISSP(t)), and not yet completed at time t; c) card (pj) represents the number of resources belonging to the resource-set Pi; d) At(pi) is the earliest time instant at which the resource-set pi becomes available, taking into account previous task assignments to resources belonging to pj, and the opening times of such resources. On the basis of the definitions of the two above functions, we can state a simple algorithm to find a feasible solution to ISSP(t).

A n algorithm for the solution to ISSP(t): Step 1. determine 7~t and ~, as in Section 3; Step 2. determine the set Tt, defined as the set of tasks belonging to 7~t, and such that l~t(zi) is not empty; Step 3a. test whether some essential task belongs to 7~t but not to 7~t'; if yes, stop the algorithm, since no feasible solution to ISSP(t) can be found; if not, continue; Step 3b. test whether any task z i in 7~; exists such that 6t(zi)>_ b('ri); this task is certainly essential, since, obviously, 6t(L) _< Q(t); if yes, stop the algorithm, since no feasible solution to ISSP(t) can be found; if not, continue; Step 4. for each task Ti ~ Ttt, compute the TSF ~/t(Ti); Step 5. select from Tt' a task z* for which %( z* ) = max ~, ~ ~;%(-ci)',Step 6. set F F ( z * ) = Ft(z*); Step 7. if FF(~-*) is an empty set and ~-* is an essential task, then a 'priority assignment' procedure is called; if FF(~-*) is an empty set and ~'* is not an essential task, then delete ~-* in ft', and go back to Step 5; otherwise continue; Step 8. select from F F ( z * ) a resource-set p* such that

~t ( P*, ~'*)

=

min qb( Pj, ~ ) ; ps E FF(T~)

180

R. Minciardiet al. ~European Journal of OperationalResearch 79 (1994) 176-182

Step 9. test whether the task z* can be assigned to the resource-set p* in a feasible way, taking into account: (i) the a-priori time constraints, (ii) the constraints arising from the PCS at time t, (iii) the constraints arising from previous assignments of tasks belonging to 7~" t, if not, delete p* from FF(r*), and go back to Step 7; if yes, continue; Step 10. assign the task r* to the resource-set p*, after setting the activation time as early as possible; delete ~-* from Tt'; set n j = n j + 1; Step 11. update the availability intervals for the resources belonging to p* (i.e., such resources are set unavailable over the time interval corresponding to the execution of r*); Step 12. if there is any other task in Tt, go back to Step 5, otherwise the algorithm stops, as a feasible schedule for ISSP(t) has been found. For the sake of brevity, the above algorithm has not been fully detailed, since the 'priority assignment' procedure that may be called at Step 7 has not yet been specified. The purpose of this procedure is to reinitialize the solution to ISSP(t) by forcing the algorithm to select the essential task ~-/* (requiring the call) as the first task to be scheduled. Then the algorithm goes on. Clearly, calls to this procedure for the solution to ISSP(t) may be repeated; if the number of such calls exceeds a prefixed value, then the algorithm stops, and no feasible solution has been found. Obviously, this does not necessarily imply that no feasible solution to ISSP(t) exists, since the algorithm does not perform an exhaustive search over all possible assignments of the essential tasks. This algorithm stop is analogous to those that may occur at Step 3a and 3b: if no feasible solution has been found to ISSP(t), control returns to the main algorithm.

5. Finding a global feasible schedule

A complete schedule for the overall problem can be generated by using the conceptual procedure presented in Section 2. Let us consider in

more detail Step 3 in that procedure. Whenever a feasible solution to ISSP(t) has been found, the following operations have to be performed: a) some of the scheduling decisions made for the solution to ISSP(t) are actually 'implemented' in the PCS; b) the list of future events is updated on the basis of the decisions implemented; c) the availability over time is reduced for the resources involved in the implemented scheduling decisions. As to the set of decisions related to point a), several possibilities exist, and our system allows one to choose between the following two alternatives: A) all scheduling decisions made for the solution to ISSP(t) are implemented; B) only the scheduling decisions regarding the activation of tasks at time instants preceding te(t) are implemented, where te(t) is the instant (after t) of the next future event before the updating of the PCS; The rationale for using alternative B, instead of A, is to avoid implementing immediately, in the PCS, scheduling decisions that might be ruled out when solving successive ISSPs. In this sense, alternative B is more 'cautious' than alternative A in the construction of the overall schedule. Of course, this goal is attained at the cost of a greater computational effort. In outlining the logical procedure in Section 3, we have not considered the possibility that no feasible schedule may be found for ISSP(t). Actually, this is a possible outcome of the algorithm described in Section 4. In this case, the algorithm selects one or more essential tasks for which it is not able to find a feasible schedule. Then, a backtracking procedure must be activated, which reconsiders the solutions to previous ISSPs in order to release some resources that can be used to schedule the 'critical' tasks selected. As a consequence of the backtracking procedure, the solutions to such previous ISSPs have to be modified. Since we do not aim to perform an exhaustive search for an overall feasible schedule, we have set a maximum number of successive backtracking steps. Whenever this number is exceeded, our system fails to find a feasible sched-

R. Minciardi et al. / European Journal o f Operational Research 79 (1994) 176-182

ule. Nevertheless, the construction of the overall schedule goes on, even though the schedule for some tasks is unfeasible. Once a complete feasible schedule has been obtained, a timetabling optimization step is needed, if the overall performance criterion takes into account earliness components. Such optimization is carried out, taking into account the a-priori constraints and the assignment and sequencing decisions associated with the feasible schedule found.

6. Some performance results

The system has been developed in C-language in an MS-DOS environment on an IBM-AT compatible computer. We tested the performance of our system in some specific cases. In this section, we briefly report the results obtained for three problem instances: a) a Job Shop with six machines and six jobs [3]; b) a Job shop with ten machines and ten jobs [3]; c) a photo-development and printing problem. For instances a) and b), the overall performance criterion was to minimize the makespan. We used our system to solve problems a) and b) several times, choosing different values for the parameters affecting the various heuristics. The best result obtained for problem a) was: makespan equal to 55, obtained with k I . . . . . k 7 = 0, k 8 and k9 set to various pairs of non-zero values (e.g., k s = k 9 = 1 ) , 3 < A < 5 (a-priori fixed), and by use of alternative A. Similarly, for problem b): makespan equal to 1097, obtained with k 3 = k 7 = k s = 1, k i = O, i -~ 3,7,8, A = 150 (a-priori fixed), and by use of alternative A. Actually, for problem a), the optimum cost is known to be 55 [3], and, for problem b), it is known to be 930 [6]. It should be remarked that the scheduling problem dealt with in this paper is quite more general than the problem of minimizing the makespan in a job shop. Therefore, it is likely that an algorithm especially devised for pure job shop problems may behave better than our system. The time of computation (i.e., a few seconds for problem a) and less than half a minute for problem b), on an IBM-AT compatible corn-

181

puter) did not significantly change during the tests. Case c) is a very difficult instance, as it involves 100 tasks and 9 resources [8]. Such an instance is characterized by very extensive use of resources, by various negative minimum waitingtimes, and by the occurrences of some 'solvable' task cycles (i.e., for each cycle, the sum of the minimum waiting-times, corresponding to the links in the cycle, is negative or zero) in the precedence graph. A further difficulty related to case c) lies in very tight maximum waiting-times; actually, the occurrences of task cycles prevent any definition of a task level. For such a case, our heuristics have been modified in order: i) to check the existence of solvable cycles; ii) to ensure that all tasks belonging to the same cycle will be included in the set of tasks considered for the same ISSP. Then, to solve such an ISSP, 'level heuristics' can still be used, after an arbitrary break of the cycle. Analogously, the occurrences of tight maximum waiting-times have been coped with by modifying the procedure for the ISSP construction, so as to constrain couples of tasks linked by such precedence relations to be executed in the same ISSP. Up to now, our system has failed to find a feasible schedule for case c). The best result achieved is a schedule that turned out to be unfeasible for 4 tasks. Such a result was obtained by a-priori setting A = 1 and by implementing the decisions according to alternative B. The required time of computation did not exceed three minutes.

7. Conclusions

In the paper, we have presented the approach we followed in the development of a heuristic project scheduler under resource constraints. The main heuristic used concerns the decomposition of the overall problem instance into a sequence of instances of a simpler subproblem. The solution to such a subproblem has been described in some detail. Some preliminary tests to evaluate the performance of the proposed system have yielded acceptable results.

182

R. Minciardi et al. / European Journal of Operational Research 79 (1994) 176-182

References [1] Anthonisse, J.M., van Hee, K.M., and Lenstra, J.K., "Resource-constrainted project scheduling: An international exercise in DSS development", Decision Support Systems 4 (1988) 249-257. [2] Baker, K.R., and Scudder, G.D., "Sequencing with earliness and tardiness penalties: A review", Operations Research 38 (1990) 22-36. [3] Fisher, H., and Thompson, G.L., "Prohabilistic learning combinations of local job-shop scheduling rules", in: J.F. Muth and G.L. Thompson (eds.), Industrial Scheduling, Prentice-Hall, Englewood Cliffs, NJ, 1963, 225-251. [4] French, S., Sequencing and Scheduling, Ellis Horwood, Chichester, 1982.

[5] Gonzales, J., "Deterministic processor scheduling", Computing Surveys 9 (1977) 173-204. [6] Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., and Shmoys, D.B., "Sequencing and scheduling: Algorithms and complexity", Report BS-R8909, Centre for Mathematics and Computer Science, Amsterdam. [7] Lenstra, J.K., Rinnooy Kan, A.H.G., and Brucker, P., "Complexity of machine scheduling problems", Annals of Discrete Mathematics 1 (1977) 343-362. [8] Jensen, A., Klieb L., Noorlander, C., and Wolf, G., "User manual of PLATE: A Decision Support System for resource-constrained project scheduling problem", Report, Eindhoven University of Technology, Eindhoven, 1990.