3.3.3 Makespan Calculator
A makespan calculator is used by the scheduler to
calculate the makespan of a schedule produced. It
virtually allocates the jobs on the resources as
specified by the schedule and returns the makespan.
To get information about the jobs and the resources
the makespan calculator contacts the information
keeper, whenever it needs it. The scheduler uses this
makespan to determine how good or bad is the
schedule produced.
Figure 4: Chromosome with mapping and sequence strings
4 GENETIC ALGORITHMS
BASED APPROACH FOR
SCHEDULING
4.1 Chromosome Representation
In this paper, two representations of chromosomes
have been used, the first representation considers the
assignment of jobs on the resources while the other
considers the order of jobs on the resources as well.
In the first representation, the chromosome consists
of a string where the positions in the string represent
the jobs to be scheduled and the value at each
position represents the resource on which job has to
be executed. This string is termed a mapping string
as it gives mapping of jobs on the resources. In this
case the order of jobs on the resources is not
considered and is left to the resource to decide the
order as shown in Figure 3.
In the second representation, another string is
used in addition to the mapping string to consider
the order of jobs to be run on the resources. In this
string the positions in the string represent the jobs
and the values at each position in the string represent
the sequence in which the jobs are submitted to the
resources. This string is termed a sequence string as
it gives the sequence of jobs submission on the
resources as given in Figure 4.
In this example, if we consider the allocations to
the resource 4 we find that jobs 4, 5 and 9 are
allocated to this resource. If we do not consider the
sequence string, then the jobs 4, 5 and 9 will be
executed on resource 4 in the order {4, 5, 9}. On the
other hand, the sequence string enforces the order
{9, 4, 5}.
4.2 Initial Population Generation
In the initial population step, a fixed number of
chromosomes are generated. In GA used here,
random methods are used to generate mapping
strings and sequence strings. While creating the
initial population of sequence strings, the values in
the genes are kept unique at the chromosome level.
To create the initial population of mapping strings of
the chromosomes, the list of feasible resources is
used, which every job-information unit contains.
The information keeper generates this list for every
job in the job information pool. In this step the
values are assigned in the mapping strings randomly,
from the list of feasible resources for each job. For
example, if job 2 has resources 1, 2 and 4 in the list
of feasible resources then while creating an initial
population of mapping strings, any value can be
assigned at position 2 out of 1, 2 and 4.
To create the initial population of sequence
strings, for each string the values are assigned based
on the following two constraints: first, the values
should be unique and second, the values should be
less than the total number of jobs. A simple method
is used to create these strings. For each string a list L
is created containing number ranging from 1 to j,
where j is the total number of jobs to be scheduled.
A value k is picked up from L and put into the
sequence string at its starting index. The value k is
then removed from L. After that, each time k is
picked randomly from L, put in the first available
index in the sequence string and then removed from
L. This process is repeated to generate every
sequence string in the initial population. The reason
for using random methods to generate an initial
population is to introduce diversity into the
population - the more diverse the initial population,
the more chances there are to reach an optimal
solution
.
4.3 Evaluation
In the evaluation step the population under
evaluation is checked for fitness. The smaller the
makespan, more fit the chromosome is. To
determine the fitness the GA makes use of the
makespan calculator. In case the order is not
Figure 3: Chromosome with mapping string.
ICEIS 2005 - SOFTWARE AGENTS AND INTERNET COMPUTING
166