A new graph model and heuristic algorithm for multi-mode task scheduling problem

A new graph model and heuristic algorithm for multi-mode task scheduling problem

A new graph model and heuristic algorithm for multi-mode task scheduling problem Massimiliano Caramia a, Stefano Giordani b a Istituto per le Applica...

87KB Sizes 2 Downloads 124 Views

A new graph model and heuristic algorithm for multi-mode task scheduling problem Massimiliano Caramia a, Stefano Giordani b a Istituto

per le Applicazioni del Calcolo “M. Picone” - CNR, Viale del Policlinico, 137 - 00161 Rome, Italy. E-mail: [email protected]

b Dipartimento

di Informatica, Sistemi e Produzione, University of Rome “Tor Vergata”, Via del Politecnico, 1 - 00133 Rome, Italy. E-mail: [email protected]

1

Introduction

We consider a multi-mode scheduling problem with dedicated resources. Given are a set T = {T1 , . . . , Tn } of n independent tasks (i.e., not related by precedence constraints), and a set R= {R1 , . . . , Rr } of r single unit dedicated renewable resources (e.g., processors). At any time each resource can be used by a single task at most. Each task Tj can be executed without preemption in one m out of its possible mj ≥ 1 execution modes Mj = {Mj1 , . . . , Mj j }, where each mode Mji = (Rij , pij ) identifies a subset Rij of resources R simultaneously required by the task for a certain processing time pij if the task is executed with that particular mode. The aim of the problem is to find a mode assignment for each task, and a schedule of the tasks to be executed in the assigned mode, such that the schedule length, i.e., the makespan, is minimized. Examples of this problem arise whenever a group of tasks or activities have to be scheduled over time in different alternative modes with the objective of completing them as soon as possible. The problem we consider corresponds to a subclass of the general multi-mode resource-constrained project scheduling problem, obtained by limiting the availability of the renewable resources to one unit at a time, and no precedence relations. The problem is known to be NP-hard [3]. The case of scheduling with multiple modes has been dealt with in the literature in a number of papers related to the project scheduling area (e.g., see the survey [5]). For models for scheduling problems with dedicated resources, like the one we address in this paper, the reader can refer to [1]. In [2], it has been studied the problem of scheduling tasks with prespecified processor allocation in the case only a single mode is available for each task. The more general case in which a task can be schedule by one of alternative execution modes Preprint submitted to Elsevier Science

3 March 2003

has been analyzed e.g. in [4]. For the case of independent tasks (i.e., not related by precedence constraints) a graph model representing conflicts among multi-mode activities has been proposed in [3]; in that paper, the complexity of special cases is investigated and upper and lower bounds of the objective function are derived from the graph representation. In this paper, we reformulate the multi-mode scheduling problem as a single mode scheduling problem with minimum time lags and with limited availability resources, propose a graph model for the latter problem, and show that finding an optimal schedule is the same as finding an optimal interval coloring of the graph. Finally, we propose a heuristic algorithm for interval coloring and experiment with known scheduling benchmarks, and random instances.

2

The auxiliary single mode scheduling problem 

Let C¯max = 1 + j maxi [pij ] be un upper bound on the makespan, and m = maxj [mj ] be the maximum number of possible execution modes for any task; ∗ of an optimal schedule for the multi-mode schedulclearly, the makespan Cmax ¯ ing problem is less than Cmax . Let us consider, for each task Tj , m − mj additional dummy execution modes Mji = (Rij , pij ), for i = mj + 1, ..., m, with Rij = ∅ and pij = C¯max ; that is, these are new modes in which task Tj , for its execution, requires C¯max time and no resource. Clearly, in an optimal schedule ∗ < C¯max . each task would be executed with a non-dummy mode, since Cmax Let us introduce the following single mode scheduling problem with minimum time lags and limited resource availability. We consider a set of m · n + (m − 1) 1 m independent and non-preemptive tasks Θ = {t11 , . . . , tm 1 , . . . , tn , . . . , tn , d1 , . . ., dm−1 }, and a set R ∪ {R0 } of r + 1 single unit dedicated renewable resources. In particular, resource R0 is always available but in m periods, called holes (see [7]), with starting times sk = (2k − 2)C¯max and lengths hk = C¯max , with k = 1, . . . , m, respectively. Each task tij , for j = 1, . . . , n and i = 1, . . . , m, represents task Tj of the original multi-mode scheduling problem when executed according to mode Mji , and therefore it simultaneously requires the subset Rij of resources R for pij time. While, each task dz , for z = 1, . . . , m − 1, requires all the set R∪{R0 } of resources for C¯max time. Moreover, tasks tij , and thj , with i = h, have to be scheduled with a minimum time lag of length C¯max between the ending time of the preceding task and the starting time of succeeding one. The aim is to schedule all the tasks minimizing the makespan, while fulfilling both resource, availability and minimum time lags constraints. In the following, we show that from an optimal schedule of the single mode problem so defined we can obtain an optimal schedule for the multi-mode one. 2

Since resource R0 is only available at certain time periods as stated above, it is easy to see that in any optimal schedule for the single mode problem each task dz , with z = 1, . . . , m − 1, of length C¯max is scheduled in time interval I2z = [(2z − 1)C¯max ; 2z C¯max ]. Hence, without loss of generality, by now we consider a feasible schedule S of this type. With this perspective, S can be seen as a composition of partial schedules (S1 , . . . , Sk , . . .), where each partial schedule Sk is defined in the time interval Ik = [(k − 1)C¯max ; k C¯max ] of size C¯max , and where, for even k = 2z, with z = 1, . . . , m − 1, Sk is formed only by task dz . A direct consequence is that all the other m·n tasks must be executed in the odd intervals I2q−1 , with q ≥ 1. In particular, since between tasks tij and thj , with i = h, there must exist at least a time lag of C¯max , it follows that Lemma 1 Given a feasible schedule S, two tasks tij and thj , with i = h, are assigned to different odd partial schedules S2qi −1 , S2qh −1 , with qi = qh . Since for each index j we have m tasks {t1j , . . . , tm j }, by Lemma 1 we have that Theorem 2 A schedule S is formed by at least 2m − 1 partial schedules (S1 , . . ., S2m−1 ), with Sk starting at (k − 1)C¯max time and of length at most C¯max . Corollary 3 An optimal schedule S ∗ is formed exactly by the composition of 2m − 1 partial schedules (S1 , . . . , S2m−1 ), and each Sk with odd k contains exactly one task tij , for each j = 1, . . . , n. Let lk be the length of the partial schedule Sk . Clearly, we have that Lemma 4 The length of an optimal schedule S ∗ of the single mode scheduling problem is 2C¯max ∗ (m − 1) + l2m−1 , with l2m−1 ≤ lk , for k < 2m − 1. Given such an optimal schedule S ∗ of the single mode problem, let us consider the last partial schedule S2m−1 . By Corollary 3, and Lemma 4 we have that Theorem 5 The partial schedule S2m−1 of length l2m−1 is an optimal schedule for the multi-mode scheduling problem.

3

The graph model and heuristic algorithm

In this section we propose a weighted graph model representing tasks and their incompatibility relationship in the single mode scheduling problem, and show that an optimal schedule can be derived by an optimal interval coloring of such a graph. Let us consider the (weighted) graph G = (Θ, E), with weights on vertices and edges, where the vertex set Θ represents tasks, and the edge set E represents incompatibility relationship between tasks. In particular, each vertex (task) dz is adjacent to all the other vertices, since task dz makes use of all the resources, while there is an edge (tij , thk ) between two vertices tij and thk , 3

with j = k, if and only if the related tasks share at least one resource. Finally, let (tij , thj ) be the edge joining vertices tij and thj , with i = h. Now, assign a weight equal to pij to vertex tij and a weight equal to zero to all the edges but edges (tij , thj ) which are assigned a weight equal to C¯max . According to this graph model, an optimal solution to the scheduling problem corresponds to an optimal interval coloring of the graph. In fact, the scheduling problem consists in assigning to each task (vertex) Ti a processing time period of size pi , such that no couple of conflicting tasks (adjacent vertices) can be simultaneously processed, and the time required to execute all the tasks is minimized. Clearly, as color intervals can be seen as processing time periods, the problem corresponds to solve the interval coloring on G. The interval coloring problem is slightly modified in order to take into account a minimum time lag between tasks tij and thj , which directly translate into minimum color interval separations of size equal to the weight of the edge (tij , thj ), between color intervals assigned to vertices tij , thj . Moreover, since in an optimal schedule tasks dz , with z = i, . . . , m − 1, are scheduled respectively in time periods I2z , we can preassign color intervals I2z to vertices dz representing those tasks. We propose a heuristic algorithm for interval coloring, which is an extension of the set coloring algorithm presented in [6], and experiment it on random instances, and modified multi-mode instances from ProGen [5].

References [1] Bla˙zewicz, J., K. Ecker, E. Pesch, G. Schmidt, and J. W¸eglarz, Scheduling Computers and Manufacturing Processes, (Springer Verlag, Berlin, 1996, 2001). [2] Bianco, L., P. Dell’Olmo, and M.G. Speranza, Nonpreemptive Scheduling of Independent Tasks with Prespecified Processor Allocations, Nav. Res. Log., 41 (1994) 959–971. [3] Bianco, L., P. Dell’Olmo, and M.G. Speranza, Scheduling Independent Tasks with Multiple Modes, Disc. Appl. Math., 62 (1995) 35–50. [4] Bianco, L., P. Dell’Olmo, S. Giordani, and M.G. Speranza, Minimizing Makespan in a Multimode Multiprocessor Shop Scheduling Problem, Nav. Res. Log. 46 (1999) 893–911. [5] Brucker, P., A. Drexl, R. M¨ ohring, K. Neumann, and E. Pesch, Resourceconstrained project scheduling problem: Notation, classification, models and methods, European Journal of Operational Research 112 (1999) 3–41. [6] Caramia, M., P. Dell’Olmo, Solving the minimum-weighted coloring problem, Networks 38 (2) (2001) 88–101. [7] Kubiak, W., J. Bla˙zewicz, P. Formanowicz, J. Breit, Two-machine flow shops with limited machine availability, Eur. J. Oper. Res. 136 (2002) 528–540.

4