A Heuristic Genetic Algorithm for Multi-Mode Resource-Constrained Project Scheduling Problem
Li Zheng 1 Qin Jinlei 2 Zhang Changming 1 1. Department of Computer Science and Technology North China Electric Power University (Baoding) Baoding, China 2. Information and Network Management Center North China Electric Power University (Baoding) Baoding, China
[email protected] [email protected] [email protected]
Abstract—A heuristic genetic algorithm for multi-mode resource-constrained project scheduling problem is given because the requisition of constraints of using renewable and nonrenewable resource in practical engineering is taken into consideration. Consumption of nonrenewable resource, weighted coefficient and the duration are combined, and objective function is constructed dynamically by choosing different weights. In this way, the optimal solution of scheduling mode can be gained which meets different needs of projects. It has been proved that by adopting the algorithm, not only duration can be the shortest, but also nonrenewable resources can be saved maximum, which will be great significance to achieve the optimal arrangement of time and resources in practical production.
II. PROBLEM DESCRIPTION MRCPSP can be described as follows. There are J tasks in a project, which are numbered orderly, and the encoding of task i (i = 1,2, ..., N) is greater than the encoding of all its tight pre-tasks. Any one of the tasks, for example, i (i = 1, 2, ..., N) , must be performed in one out of a set of modes, without interrupting or changing execution mode. Each execution mode has its duration and resource requirements, including renewable resources Rr and nonrenewable resource requirements Rn. A scheduling plan which can make specific managing objective optimal, for example, minimizing the total duration, will be produced under the condition of meeting timing constraints and resource constraints. A simple network description is shown in Fig. 1. Duration and resource requirements of each execution mode are shown in Fig. 2.
Keywords-heuristic genetic algorithm; weight; multi-mode resource-constrained project scheduling; scheduling pattern sequence
I.
INTRODUCTION
Project scheduling is a very important aspect of project management. Reasonable project scheduling plan is the basis of shortening the duration and lowering cost. Resourceconstrained project scheduling problem (RCPSP) is a NP hard problem, which requires arranging start time and completion time of all tasks under the condition of meeting timing constraints and resource constraints, so that a certain optimal object can be achieved, for example, minimizing the total duration of the project.[1] The multi-mode resource-constrained project scheduling problem (MRCPSP) is a generalized version of the RCPSP, where any one of the activities can be performed in one out of several modes.[2] In different executing modes of an active, the execution time and resource costs are different in general. Generally, the shorter the mode executes, the more cost or resource consumption required. Thus, in practice, in order to achieve the optimal purpose, it is needed to balance various costs. Almost all algorithms proposed by experts are based on a fixed constraint. The following proposed algorithm, from which we can gain the optimal under different constraints, is a dynamic combination of many aspects of constraints.
_____________________________________ 978-1-4244-5539-3/10/$26.00 ©2010 IEEE
582
Figure 1. A simple network description
Figure 2. Different execution modes and the costs of each task
As shown in Fig. 2, each task i can be performed by selecting one out of the |Mi| modes. The duration of active i, when executed in mode mi, is timi. The number of renewable resources and the number of nonrenewable resources consumed are expressed as Rr and Rn. In this paper, it is assumed that only one kind of renewable resource and only one of nonrenewable resource are referred to. If there are K kinds of renewable resources Rr and Q kinds of nonrenewable resources Rn, where Rr identified as 1, 2, ..., K and Rn identified as 1,2, ... Q. It can be concluded that the total amount of resource k(k ∈ {1,2, ... K}) is
R
Rkr , while that
(a) Infeasible schedule
n q
. When task i is of resource q(q ∈ {1,2,…Q}) is performed by mode mi, the requiring amount of resource k
rn
rr
is imik , while that of resource q is imiiq .Then the mathematical model can be formulated as follows: (1) Min. sn+1, s.t.
si + t imi ≤ s j i ∈ p ( j )
∑ rimr i k ≤ Rkr
i∈T (t ) N −1
∑r i =1
n imi q
(2) (3)
(b) Feasible schedule
≤ R qn (4)
s0 = 0
(5) Where si denotes the start time of activity i, and p(j) denotes the pre-ordered set of activity i, which means that activity j can’t be performed before its pre-ordered set finishing. The T(t) denotes set of activities in progress in period [t-1,t], t ∈ {1,…,sn+1}. The objective function (1) denotes minimum of the total duration of the project, which is identified by the smallest start time of activity n. Constraint set (2) stands for that task j can’t be performed before its pre-ordered set finishing. Constraints (3) and (4) illustrates that the total consumption of renewable and nonrenewable resources should not exceed the total amount, which is the premise of project feasibility. Modes adopted by every activity, once established, would constitute a sequence L. For example, from the precedent example, a sequence set {m2, m3, m4, m5, m6} can be gained, where mi ∈ {1,2} denotes the mode when task i performed. For instance, if every activity adopts mode 1, the set will be L1{1, 1, 1, 1, 1}. Other sets can be gained by the same way. L2{2,2,1,2,2} and L3{1,1,2,2,2} will be referred to in the following fig. 3.
(c) Feasible schedule Figure 3. schedules of the example
There are 5 nondummy activities in this example project, each with 2 modes. For each mode, 1 renewable resource and 1 nonrenewable resource are included. The availability for the renewable (nonrenewable) resource is 6(10). The activity-on-thenode network is shown in Fig. 1. In Fig. 2 the duration and requirements of renewable (nonrenewable) resource for mode mi of activity i are shown. Fig. 3a depicts a schedule with the duration of 4s. However, this schedule is infeasible with respect to the nonrenewable resource. The schedule uses 14 nonrenewable resources units, which exceeds the available 10 nonrenewable resources. Fig. 3b shows a schedule with the duration of 7s. This schedule is feasible because it uses exactly 10 nonrenewable resources units. The schedule shown in Fig. 3c is also a feasible schedule, but the duration is 9s, which is longer than the second one.
III. DESIGN OF THE HEURISTIC GENETIC ALGORITHM Generally, the one which can make the duration shortest and the consumption of resources not exceeding the available will be the best mode vector. Here the heuristic rules are introduced, so that the optimal solution of scheduling mode can be gained which meets different needs of projects. For each task i, every scheduling mode of it must be considered to, so that the optimal scheduling mode can be gained.
583
There is an example that includes 7 tasks, which are elements of set {1, 2, 3, 4, 5, 6, 7}. There are two types of resources. One is human resource, which belongs to renewable resource; and the other one is fund, which is nonrenewable resource. The limitation of renewable resources in unit time is 6, and the total number of nonrenewable resources is 10. The network diagram is shown in Fig. 1. The label in each circle is number of each task.
B. Encoding Encoding is very important, and it needs to make all chromosomes produced from the generating process produce a feasible schedule. For the problem referred to in this paper, when the initial population is generated, we can firstly determine the relative position of tasks with precedence constraints in the individual, and then randomly assigned other genes to the individual. In this way, the tasks represented by all chromosomes of the individual will all meet the precedence constraints. Therefore, the scheduling deduced will be feasible. The encoding process can be divided into two steps: In order to determine the scheduling sequence, the priority relationship between the activities need to be given; in addition, the scheduling modes of each activity, which produces the scheduling model sequences set must be produced. The priority of task i is p i, whose range is [1, n], and it is an integer. The conception of scheduling mode sequence has been referred to before.
A. Algorithm Structure The model and constraints of MRCPSP are more complicated than that of general RCPSP. Common exact methods, for example, enumeration method, and heuristic method are difficult to obtain the solution of project, especially when the number of tasks, scheduling modes and kinds of resources grows. The solving of problem is represented as the evolution of chromosomes in the genetic algorithm, and a good balance between solving efficiency and solving precision should be achieved. Genetic algorithm is a stochastic optimization method which mimics the process of biological heredity and evolution. Encoding space is used to instead of the parameter space of problem, while the fitness function as evaluation basis, encoding population as evolution basis, and establishing iterative mechanism through selection, crossover and mutation of individual, so that the individual can continue to be optimized in order to reach or approach the optimal solution. Heuristic genetic algorithm requires introducing the heuristic information on the basis of basic genetic algorithm, in order to determine the fitness function. In the MRCPSP the number of nonrenewable resources occupied per unit time under the premise ensuring the resource constraints can be selected as heuristic information. As we all know, except shortening the total duration, any project will require deducing the number of occupied resources. Therefore, the object function can be defined as follows:
C. Fitness Function The goal of RCPSP is to make the weighted total duration and the consumption of resources minimized, therefore, the minimum must be converted to fitness value in order to ensure that the outstanding individuals have the greatest fitness. Assuming x is an individual, f max and f min are respectively the maximum and minimum of the current population. The fitness function F(x) can be defined as a fraction, in addition,
λ is assumed as a smaller integer,
which can used to avoided F(x) equal 0 when f ( x ) equals
f max . F (x) =
f max − f ( x ) + λ f m ax + f m in
D. Selection operation Assuming the population size as P, when adopting roulette strategy, the selecting probability of individual i is
t m in
f = λ1 ⋅ T + λ 2 ⋅ ∑ R n t t =1
Where T denotes the total durations, and Rnt denotes nonrenewable resource funds occupied during the period [t-1, t]. Therefore, it can be seen that the total utilization of t min
∑R
nt
resources is t =1
Where f ( I ) denotes the fitness value of individual i. E. Crossover operation In this paper, location-based crossover operator is adopted, which is picking up certain genes from a parent, while the remaining genes of the offspring will be gained through scan the other parent from left to right. As for the mode scheduling sequence set, one-point crossover can be used, which produces an integer j, and the range of j is [1,n]. And then the previous j scheduling modes of the two cross individuals inherited from a parent, while the others inherited from another parent.
, while λ1 and λ 2 denote respectively the
λ1 + λ 2 =1. λ λ On the one hand, if 1 =0then 2 =1, and the fitness
weights of duration and resource, and
function represents the number of resources consumed. On
λ2 =0, then λ1 =1, and the fitness function λ λ represents the total duration. Once the value of 1 and 2
the other hand, if
are determined, the fitness function, which is the object function, will be fixed. Finally the minimum of object function can be gained, along with the task scheduling sequence and scheduling mode sequence.
F. Mutation operation In priority list, only task without priority will be mutated, while the task having priority sequence will not be mutated,
584
which is to ensure the individual gained through mutation is still a feasible scheduling. In the mode sequence set, mutation position can be produced randomly in order to increase the diversity of individuals, such as the scheduling model mutates from 1 to 2. IV.
REFERENCES [1]
[2]
EXPERIMENTAL RESULTS [3]
The total duration and resource consuming when λ1 =1 and λ2 =0 are shown as (a) in fig. 4, while total duration and resource consuming when λ1 =0.5 and λ2 =0.5 are shown as
[4]
(b) in fig. 4: [5]
[6]
[7]
(a) the weighted function value when λ1 =1 and
(b) the weighted function value when λ1 =0.5 and Figure 4. weighted function value of different
λ2 =0
λ2 =0.5
λ1 and λ2
In this paper, on the basis of basic genetic algorithm, the heuristic rules, nonrenewable resource consumption and duration are considered as the weighted components at the same time. Through the different weighted values, weight of the duration and resource consumption is respectively controlled, so that the requirements under different condition can be met. The experiment can also be extended to projects that include much more tasks and resources, which will be of great significance to MRCPSP in engineering practice. ACKNOWLEDGMENT This research is supported by the youth research fund of North China Electric Power University (200911024), research of genetic algorithm and matlab simulation solving RCPSP.
585
LIU Shi-xin, WANG Meng-guang, TANG Jin-fu. GA for solving resource-contained project scheduling problem. Journal of system engineering, 2002, 17(1):1-7 Yu Ying. Hybrid genetic algorithm for multi-mode resourceconstrained project scheduling problem. Journal of southeast universityNatural Science Edition, 2008, 38(4):736-740 Brucker P, Knust S. Lower bounds for resource-constrained project scheduling problems. European Journal of Operational Research 2003;149:302-13. Tormos P, Lova A. Intergrating heuristics for resource constrained project scheduling methods revisite: theory and computation. European Journal of Operational Research 1996;90:320-33. Fleszar K, Hindi KS. Solving the resource-constrained project scheduling problem by a variable neighbourhood search. European Journal of Operational Research 2004;155:402-13. Blazewicz J, Lenstra JK,Rinnooy Kan AHG. Scheduling subject to resource constraints: classification and complexity. Discrete Applied Mathematics 1983;5:11-24.Article in a conference proceedings: Kochetov Y, Stolyar A. Evolutionary local search with variable neighborhood for the resource constrained project scheduling problem. In: Proceedings of the 3rd international workshop of computer science and information technologies,2003.