An Improved Genetic Algorithm For Resource Constra
An Improved Genetic Algorithm For Resource Constra
net/publication/260549157
CITATIONS READS
10 527
3 authors:
s. Diana Ganapathy L.
NITIE-National Institute of Industrial Engineering NITIE-National Institute of Industrial Engineering
2 PUBLICATIONS 10 CITATIONS 113 PUBLICATIONS 315 CITATIONS
Ashok Pundir
NITIE-National Institute of Industrial Engineering
135 PUBLICATIONS 321 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Economic Corridors: Collaborating & Converging with the Global Opportunities View project
All content following this page was uploaded by s. Diana on 02 April 2018.
34
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.9, September 2013
r
jA( t )
j ,k Rk k K ; t 0 (3)
is employed to generate a precedence and resource feasible
active schedule using one and two point crossover techniques.
Fj 0 j 1,2,3,.....n 1 (4)
GA proposed by Kohlmorgen et al. (1999) uses the concept of
Island Model and studied the variants of parallel Genetic
algorithm. A random key representation was employed which
uses a real values between 0 and 1 for each task. A two point
The objective function (1) minimizes the total duration
standard crossover was applied to the representation.
(makespan) of the project by minimizing the finish time of
n+1th activity. Constraint (2) shows the precedence
Lee and Kim (1996) tested three different algorithms namely
relationship which doesn’t allow activity J to start until all its
Simulated Annealing (SA), Tabu Search (TS) procedure and a
predecessors, i, are finished. Constraints (3) limit the resource
GA based on the random key representation. A parallel SGS
demand imposed by the activities being processed at time t to
was used to develop an active schedule. A different variant of
the available capacity. Constraints (4) shows the finish time to
pair wise interchange for SA and TS was applied and for GA
be non – negative.
one point crossover was employed.
The difficulty with this formulation is that the conceptual
Alcaraz and Maroto (2001) developed a GA which used a
constraint (3) cannot be explicit because it depends on the
serial SGS and activity list representation. A schedule is
unknown jobs scheduled at time t. Various time indexed
generated using an additional gene which decided whether a
formulations are available to work around this difficulty, but
forward or backward scheduling needs to be employed.
they exponentially increase the size of the formulation.
During the crossover stage child’s activity can be generated
by using either forward or backward scheduling. Alcaraz et al.
3. REVIEW OF GENETIC ALGORITHM (2004) (c.f. Kolisch and Hartmann, 2006) extended the
LITERATURE FOR RCPSP genetic algorithm of Alcaraz and Maroto (2001). SGS is
Genetic algorithm (GA) was developed by Goldberg (1989) as generated based on an additional gene (Hartmann, 2002) and
a computational approach to solve hard problems. It mimics the forward backward improvement of Tormos and Lova
the principles of biological evolution to solve hard (2001).
optimization problems. It provides an environment where the
solutions in a population continuously crossbreed, mutate and Coelho and Tavares (2003) introduced a crossover operator
compete with each other in a survival of the fittest strategy, called Late join Function Crossover and they employed Serial
until they evolve into the best solutions. The search for better SGS and activity list representation. The late join crossover
solutions in the GA based approach is largely context creates an offspring by copying the father chromosomes and
independent and hence they can be readily applied across a then swapping the adjacent pair from the mother in reverse
variety of situations. order.
GA considers a population of solutions instead of one Hindi et al. (2002) proposed a crossover technique similar to
solution. After creating the initial population, new solutions Hartmann (1998) which preserved the order thus not violating
are generated by mating two existing solutions (Crossover) or the precedence constraint. The main difference between the
by altering an existing one (Mutation). The fittest of these two was in the way the initial population is generated. A serial
survive and move on to the next generation by the means of a SGS and Activity list representation were used.
selection process while the rest are discarded. Fitness value
measures the quality of solution, depending on the objective GA developed by Toklu (2002) is applied on the schedules
function of the problem to be solved. directly and a penalty function is used to evaluate the
violation of constraints as infeasible schedules may be
Pseudo code of basic Genetic Algorithm generated.
35
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.9, September 2013
Kim and Ellis (2008) presented a permutation-based elitist 4. PROPOSED GENETIC ALGORITHM
genetic algorithm and observed the performance of the One of the biggest advantages of Hartmann’s approach is that
algorithm on large-sized projects. Initial population is the permutations generated from the crossover operation are
generated randomly and then Elitist selection mechanism is guaranteed to be precedence feasible. However, this also
used to discard the worse solutions thus keeping just the best restricts the exploratory power of the GA because of limited
solutions in the population. opportunities for mutation and crossover. Hence, the above
RCPSP GA algorithms may not really capture the potential of
Valls et al. (2008) suggested a hybrid genetic algorithm with the schema building blocks proposed by Holland (1975).
activity list representation and which makes use of forward– Holland’s GA performs mutation and crossover at bit level.
backward improvement of Valls et al. (2005). They developed Bit string representations may help prevent premature
a cross over scheme (Peak Crossover where instead of random convergence and give better solutions. For permutation
generation of the crossover point, properties of the schedule problems like RCPSP, obtaining feasible solutions using bit
were used when combining the parents. During first phase strings is not simple using the bit string representation.
parts of the parent schedule corresponding to peaks in the
resource usage is inherited. During the second phase evolution In case of binary strings, during the crossover stage, parent
is carried out using the neighbors, corresponding to best chromosomes are swapped as shown in Fig. 1. Child 1 is
individual generated from first phase. The neighbors are produced by taking initial part of parent 1 and tail part of
constructed with the approach used in Valls et al. (2003). parent 2. Similarly for child 2, initial part is taken from parent
2 and tail end from parent1. This allows greater freedom in
Goncalves et al. (2009) proposed a random key based genetic generating children. In case of Hartmann’s one point
algorithm which used the concept of parameterized active crossover, child 1 is produced by taking initial part from the
schedule (Goncalves et al., 2005). In the first phase priorities parent 1 and then the parent 2 list is scanned from the
are given to the activities and delay time and in the second beginning and those activities which are not part of the initial
phase these priorities are used to construct a parameterized part and considered as shown in Fig. 2. This ensures
active schedule. Instead of one point or two point crossover precedence feasibility of child.
parameterized uniform crossover (Spears and Dejong, 1991)
was employed.
Parent 1
Mehdi and Fariborz (2009) developed a Genetic algorithm
with new crossover strategy which uses combination of order 1001101100111110
crossover and partially mapped crossover. The crossover is Crossover Point
similar to Hartmann (2002) but it creates only one child. Parent 2
1000111001101010
Goncalves et al. (2011) developed a biased random key
genetic algorithm with forward-backward improvement.
Active schedule was created using serial scheduling scheme
Child 1 1001101101101010
based on the priorities of activities and then schedule was
improved using forward backward improvement procedure.
After schedule improvement gene adjustment was carried out
Parent 1 Parent 2
to reflect the changes in priorities. In this study instead of
using gene by gene mutation, some new individuals are
Child 2 1000111000111110
introduced in the next generation.
36
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.9, September 2013
upper bound value. This paper presents the variation of the 5. COMPUTATIONAL EXPERIENCE
simple Genetic Algorithm of Hartmann (HGA) with different
representation scheme and crossover logic to see if better WITH PROPOSED GA
results can be obtained for the worse case instances. Proposed For carrying out the computational analysis of Genetic
variant of genetic algorithm described below attempts to Algorithms, a select list of difficult instances from the
combine the power of bitwise representation while ensuring standard benchmark instances of PSPLIB were identified. The
precedence feasibility of schedules generated. identification is done as follows. Only the problems with large
number of activities, that is, those in J120 set are considered
for reporting because many of the smaller problem instances
4.1 Details of Proposed Genetic Algorithms in J30 and J60 were readily solved. It is seen from the PSP
The proposed variant of HGA called as DGA; uses the Library that the 600 instances of J120 data set are grouped
classical binary representation to denote activity priority. In into 60 sets of 10 instances each. The possible optimality gap,
this variant (DGA), the chromosome for each activity has 8 UB-LB, is calculated for each of the 600 instances. Then the
bits and thus can represent up to 255 values of priority. The average gap over the 10 instances in each of the 60 instance
activity priorities are used to generate the precedence feasible sets is calculated. The instance sets are then sorted in
activity list through a roulette wheel selection process. The descending order on average gap as shown in Table 1. Only
activity list is then used to generate an active schedule using a instances with larger average gaps are considered for the
serial SGS. The makespan for the schedule is computed and analysis. the Table shows only the top 10 instance sets with
stored as a fitness function for that chromosome. Once the higher average gap.
initial population of parents is generated, they are sorted in
fitness order. Using an elitist scheme, two best parents are For detailed computational analysis, the worst three instance
used to obtain new offspring by one point binary crossover of sets in Table 1, that is, J120_51, J120_56 and J120_31 are
the priority chromosomes. Occasionally a mutation operator is taken up. For comparison purpose, results were also obtained
applied to change the existing priority sequence. The by GA coded in C language based on Hartmann’s (1998)
offspring are added to the parent pool, and the best of these single point crossover rule which we call as HGA.
are retained as parents for the next generation.
Table 1: Average Gap between Upper and Lower Bounds
Pseudo Code for Generate Parents for DGA for the 10 instances in each instance set sorted in
descending order
For ( i=1 to POPSIZE)
Average Gap
Generate Binary Random sequence Sl. Instance Set
Generate Activity Priority using binary random (UB-LB)
Priority
Generate Precedence Feasible activity list through 1 J120_51 23.5
Roulette Wheel Selection
2 J120_56 20.1
Evaluate each parent in the population
End For 3 J120_31 18.8
4 J120_36 16.1
4.1.1 Initialization 5 J120_11 16.0
Priority for each activity is encoded as 8 bit binary string. The
string is generated by random assignment of 0’s and 1. This 6 J120_16 13.8
can represent upto 255 values of priority. An activity list is 7 J120_52 13.3
generated from precedence feasible candidates based on the
priority value using a roulette wheel selection. Using the 8 J120_46 12.8
activity list, an active schedule is generated using SGS and
makespan value is calculated. 9 J120_26 12.7
10 J120_57 12.0
4.1.2 Crossover and Mutation
Using an elitist strategy, pairs of adjacent parents in the
population are selected for crossover. A one point binary
crossover is carried out on the priority parents as shown in The proposed GA discussed in the earlier section 4.1 was
Fig. 1. The generated children are then converted to tested on the instance set j120_51, j120_56 and j120_31 from
precedence feasible activity list and makespan computed as instance J120 as this set consists of some instances with high
before. Then they are added to the parent population. gap between the upper and lower bound values for makespan.
Occasionally, a binary mutation is used on the child priority The instances were solved using the following parameter
sequence. values: Population size as 200, number of Generations as 500,
crossover probability as 0.95 and mutation probability as 0.95.
The proposed GA is compared with the HGA and the average
4.1.3 Selection makespan obtained from five replications (using different
The combined pool is then sorted based on minimum
random seeds) and a summary of results is reported in Table 2
makespan value (fitness value) and only the best ones are
retained for the next generation.
4.1.4 Termination
The process is repeated for several generations so that
convergence is obtained.
37
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.9, September 2013
38
International Journal of Computer Applications (0975 – 8887)
Volume 78 – No.9, September 2013
[16] Jin lee Kim. “Hybrid genetic algorithm parameter effects [22] Spears, W.M., and Dejong, K. A. “On the virtues of
for optimization of construction resource allocation parameterized uniform crossover”, Proceedings of the
problem”, Construction research Congress ASCE, 2012. Fourth International Conference on Genetic Algorithms,
1991, 230-236.
[17] Kanchan, J., Karuna, J. “A modified genetic algorithm
for resource constrained project scheduling problem”, [23] Toklu, Y.C. “Application of genetic algorithms to
International journal of Computer Applications, 57, construction scheduling with or without resource
2012, 41-45 constraints”, Canadian Journal of Civil Engineering, 29,
2002, 421–429.
[18] Kohlmorgen, U., Schmeck, H., Haase, K. “Experiences
with fine-grained parallel genetic algorithms”, Annals of [24] Tormos, P., Lova, A. “A competitive heuristic solution
Operations Research, 90, 1999, 203–219. technique for resource-constrained project scheduling”,
Annals of Operations Research, 102, 2001, 65–81.
[19] Kolisch, R., Hartmann, S. “Experimental investigation of
heuristics for resource-constrained project scheduling: [25] Valls, V., Ballestin, F., Quintanilla, M.S. “A Resource
An update”, European Journal of Operational Research, Constrained Project Scheduling: A critical activity
174, 2006, 23-37 reordering heuristic”, European Journal of Operational
Research, 149, 2003, 282–301.
[20] Lee, J.K., Kim, Y.D. “Search heuristics for resource
constrained project scheduling”, Journal of the [26] Valls, V., Ballestin, F., Quintanilla, M.S. “Justification
Operational Research Society, 47, 1996, 678–689. and RCPSP: A technique that pays”, European Journal of
Operational Research, 165, 2005, 375–86.
[21] Mehdi, D. and Fariborz, J. “A new efficient Genetic
algorithm for project scheduling under resource [27] Valls, V., Ballestin, F., Quintanilla, M.S. “A hybrid
constraints”, World Applied Sciences Journal, 7, 2009, genetic algorithm for the RCPSP”, European Journal of
987-997. Oerational Research, 185, 2008, 496-508.
IJCATM : www.ijcaonline.org 39