New Sequential and Parallel Algorithm For Dynamic Resource Constrained Project Scheduling Problem
New Sequential and Parallel Algorithm For Dynamic Resource Constrained Project Scheduling Problem
Scheduling Problem
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
Table 1. Task’s informations used in scheduling 2. Literature Review of DRCPSP
example
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
main drawback of that hybrid approach is the utilization will only occur with some pair of tasks: two tasks that
of an exact method to solve the partial scheduling. The could be activated in the same time unit (according to graph
hybrid algorithm performed very well in instances having topology) but were activated in different time units. This
large number of tasks, but few time units. In hard instances, criterion was defined to investigate the reason why those
CPLEX may find many problems because it has to handle tasks were not activated at the same time. It probably occurs
a lot of binary variables. because those tasks have very different priorities. In this
The most recent paper about DRCPSP [15] used a dif- case, exchanging them might result in a different individual.
ferent solution representation: each task is represented by a After the last priority exchange, we always have a solution
real number which indicates the task priority. The scheduling value equal to or better than the original solution.
algorithm uses the priority list to choose the tasks that will LS Swap works very well on small and medium in-
be activated. This representation scheme always produces stances. For large instances, we have to use it at some
a feasible solution for any set of priorities. There is no specific times, otherwise the computational time will be very
more need to check the feasibility of solutions generated high. We propose to use LS Swap especially when a new
by crossover or mutation algorithms. best solution is found in order to explore the neighborhood
Therefore, EA priority proposed in [15] is the fastest al- of this new solution.
gorithm proposed so far. The premature convergence present Crossover and mutation are the same proposed by
in older EAs is not a serious problem for EA priority, EA priority: crossover generates a priority tasks list comput-
as is showed in [15], but the crossover operator (average ing the average priority for each priority from parent tasks;
between two priorities from parents) does not allow a wider mutation randomly changes the priority of a task.
exploration on the space of solutions. Generated offspring are often similar to their parents (due
to crossover computation) and mutation cannot improve
3. New Algorithms to Solve DRCPSP them because randomly changes are not enough to substan-
tially modify the stagnant population.
We propose a new Evolutionary Algorithm starting from This convergence is very common but undesirable in
the best EA proposed so far: EA priority. All features of metaheuristic approaches. To avoid it two mechanisms are
that version are maintained, but new operators are added proposed. If thirty offspring populations are generated with-
to improve the overall performance. This new EA will be out improving the best solution, we explore the neighbor-
called EA ages. hood of all solutions in subpopulation class A, composed
Solution refinement is a very important operation because, of 20% best solutions, using LS Swap on them. These
at scheduling time, the priorities of tasks are not concerned solutions have very good fitness, but they may be in different
about saving resources. After the scheduling, however, it is places of the solution space. If this is true, exploring these
very simple to check if there are waste resources. Starting solutions might cover a great area of this solution space
from the last time unit, we check if a task i and all its and we have good probability to find a better solution. This
successors generate more resources than the ones used to Large Exploration may take some time and it is used only
activate them. If this is true, we keep task i and its successors when population is stagnated.
into analyzed solution, otherwise, the tasks are removed. In some cases, the best solutions might be very similar
Every time we remove one or more tasks, we go back to and applying LS Swap on them might not find any better
the last time unit and restart the analysis. This refinement is solutions. In this case, there is nothing to be done. We need
used after each individual creation (initial population), but to discard the whole stagnant population and restart using
to put those tasks i down we set their priorities to zero. a new one. This new population must use the best priority
The above refinement and previously proposed local list generated so far. Therefore, the best solution is used as
searches (LS1 and LS2) hardly use the concept of neigh- a seed in order to generate different and good solutions. We
borhood of a solution. They are deterministic improvement propose to add a random factor λ to each priority of best
methods that are concerned about improving specific parts solution. Generated solutions are near the best one in space
of solution. This way of improving is objective and fast, of solutions and future operators may intensify the search of
but does not explore the space of solutions. The indirect solutions in this subspace. The proposed Evolutionary Algo-
representation allows any priority list to generate a feasible rithm tries to keep alive strong individuals and make them
solution. So, we define a neighbor solution S ′ as a solution continue their genotype in the following generations. The
similar to S but with two exchanged priorities. Local Search generations between two consecutive reconstructions com-
Swap makes a list of all pairs of tasks and randomly sorts pose an Age. Population Reconstructions can be understood
it. Then, LS Swap exchanges the priority of two tasks from as natural disasters that extinguish almost all living beings.
the list and schedules using these priorities. If a generated Next, one of them starts the repopulation of environment.
solution S ′ is better than original solution S, the exchange is Every Age will only begin after some generations without
maintained, otherwise, it is undone. Moreover, the exchange improvements.
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
The last difference between EA ages and EA priority divided into three classes: class A - composed of 20% best
is the stop criterion. EA priority has a fixed number of individuals; class C - composed of 20% worst individuals;
generations to provide a final solution. EA ages also has class B - remaining individuals. Parent Selection operator
a number of generations, but it is not fixed. Anytime it takes one random parent from class A and other random
generate a new best solution the number of remaining parent from class B.
generations is added to β, where β is computated by Eq.
1. Crossover uses these two parents to generate two new
individuals as follows. For each task priority, we compute
the average parent priority and add a random number to
generation
β= +4 (1) provide two slightly different offspring. After generating 100
20
offspring individuals, we use the elitist criterion to define
Generation corresponds to the generation number when which individuals will be discarded and which ones will
the new best solution is found. This formula was defined compose the next generation.
based on preliminary tests made with many instances. These
extra generations are very useful for the new EA because Mutation operator consists of changing the tasks priority
it can work harder on instances where it is easy to find of an individual. Each one has 5% chance of being mutated.
better solutions. Moreover, if EA ages finds a better solu- If it is chosen to be mutated, we add a random number
tion in later generations it must need more generations to into each task priority just as the second part of crossover
keep improving than if it find the best solution in earlier operator. Mutated individual is kept in the population even it
generations. So, the Eq. 1 provides more generations to new is worse than the original one. After mutation, the remaining
EA if it demonstrate to be working well. Fig. 3 shows the population is sorted.
evolutionary scheme.
When these evolutionary operators end, we need to know
if the stop criterion was met. If this is true, evolutionary
algorithm stops and shows the best solution found so far.
Otherwise, we analyze improvements obtained at this gen-
eration as follows.
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
4. Instances Table 2. Average Results of Evolutionary Algorithms
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
improvements, but the algorithm could make a better use of parallel steps. So, there is only one core being used in almost
time limit. half of all processing time.
Other operators like crossover, mutation and parent se- However, there is a positive characteristic in this parallel
lection are the same proposed in [15] and, therefore, their approach: the parallel version generates good solution faster.
benefits were already known. Table 6 shows the best solution value found by each version
We also propose a parallel version of EA ages. In at some specific times (10, 100, 1000 and 3600 seconds).
this version, evolutionary operators have their workload
divided into processing cores of a multicore processor. Table 6. Evolution of best solution using threads
These processors have the ability of executing simultaneous
Instance Threads 10s 100s 1000s 3600s
threads sharing the same memory space without exchanging 1 6519 6979 7025 7025
messages among them. When Crossover, Mutation, Large 400a 2 6424 7000 7100 7167
Exploration and Population Reconstruction take place, some 4 6762 7009 7094 7174
1 25236 28124 29413 29796
threads work only with a part of individuals in question. 700a 2 25916 28277 29661 30108
For example: if we are using two cores in Population 4 26214 28960 29674 30070
Reconstruction, the first thread reconstructs 50 individuals 1 46618 64885 67978 68765
1000a 2 59360 64904 68332 69431
and the second one other 50 individuals. After that, the 4 58992 65795 68710 69494
population is sequentially sorted and algorithm continues
until one of mentioned operator. At that point, the workload
In the three instances chosen for this test, a parallel ver-
is divided again among threads (cores). Each algorithm step
sion using two or four threads always had the best solution.
apart from the four evolutionary operators is sequentially
Moreover, the four threads version was a little better than
executed.
other version. Although it was an expected result, the poor
This parallelism is very interesting because almost all
speedup of this version could have disrupted it. Of course it
recent manufactured processors are multicore and operating
is possible to use more than four cores (or processors) with
systems have a load balance feature that allow each thread to
the parallel version just spreading individuals as equitable
execute in a different processing core. Obviously, operating
as possible among processing units. If sequential parts
system kernel and background applications compete for
of algorithm like individual sorting and natural selection
processor cores. So, using all cores may not provide a very
become parallel, certainly it will be very interesting too.
good speedup, but it is better than using a single core.
The multicore environment used in the following test is
a Intel Core2 Quad (Q6600) 2.4 GHz (each core), 4GB, 6. Concluding Remarks
Linux 2.6.24-19. We made two tests: the first one measured
the average speedup of using two or four threads instead of This paper presented a new Evolutionary Algorithm for
using a single one. Table 5 shows the relative speedup of the Dynamic resource Constrained Project Scheduling Prob-
two and four threads version of EA ages using the same lem (DRCPSP). This EA ages uses a indirect representation
sequential version stop criterion (50 plus extra generations). that can generate a feasible schedule from any priority list.
EA ages got around the population stagnate state using
Table 5. Relative Speedup of multi-thread version an Age scheme that destroy all individuals and reconstruct
new ones from a best individual. Other strong points like
Instance 2 threads 4 threads Extra Generations and the local search LS Swap also con-
300a 45.3% 113.1%
400a 80.2% 165.3% tributed to improve the literature results. Extra Generations
500a 85.1% 127.3% by themselves were responsible for a 3.6% improvement;
600a 79.9% 182.6% LS Swap made worthwhile explorations in the best solution
700a 67.3% 117.6%
800a 92.6% 139.0% neighborhood, mainly at initial generations.
900a 85.5% 107.3% A parallel version of EA ages was also proposed using
1000a 78.8% 130.2% two or four threads in a multicore processor. The speedup
would be better if a not so fine granularity scheme was
We can see in Table 5 that the two threads version got used. However, there is a good benefit of using the parallel
a reasonable speedup, but the same did not occur with four versions: they can find better solution in smaller amount
threads. of time. According to the presented results, the parallel
The reason may be the very fine granularity of EA ages EA ages is the algorithm that best uses the computational
parallelism. The parallel operators end their execution very power of present-day processors in order to find better
fast because they are responsible for few individuals. Se- solution for DRCPSP.
quential steps like sorting population and evaluation of a The literature of Evolutionary Algorithm provides a wide
possible new best individual take almost the same time of set of evolutionary operators. If we assume that each one
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.
can be well suited for specific instances, we can imagine [11] M. Rogalska, W. Bozejko, and Z. Hejducki. Time/cost opti-
a parallel algorithm where each population uses a different mization using hybrid evolutionary algorithm in construction.
configuration of operator. Each population can be improved Automation in Construction, 18:24–31, 2008.
in a different way, exploring better the solutions space. Each [12] A. R. V. Silva and L. S. Ochi. A dynamic resource
population can be executed in a different core, improving the constrained task scheduling problem. In Proc. of Latin-
granularity of Evolutionary algorithm and, consequentially, Ibero-American Congress on Operations Research (CLAIO),
its speedup. Montevideo (Uruguay), November.
Another promising technique consists of using exact
[13] A. R. V. Silva and L. S. Ochi. Effective grasp for the dynamic
methods with the indirect representation. If it is well ad- resource-constrained task scheduling problem. In Proc. of
justed, the exact method might handle only a small part of International Network Optimization Conference (INOC), Spa
the whole scheduling. The indirect representation has the (Belgium), April 2007.
ability to keep the priorities of a good partial schedule by
crossover operator computation. [14] A. R. V. Silva and L. S. Ochi. A hybrid evolutionary algorithm
for the dynamic resource constrained task scheduling problem.
In Proc. of the International Workshop on Nature Inspired
Acknowledgment Distributed Computing (NIDISC), LongBeach (USA), March
2007.
This work was partially supported by CNPq - grant [15] A. R. V. Silva, L. S. Ochi, and H. G. Santos. New effective
141074/2007-8 algorithm for dynamic resource constrained project scheduling
problem. In Proc. of International Conference on Engineering
Optimization (ENGOPT), Rio de Janeiro (Brazil), June 2008.
References
Authorized licensed use limited to: UNIVERSITY OF SYDNEY. Downloaded on April 05,2010 at 22:20:27 EDT from IEEE Xplore. Restrictions apply.