Professional Documents
Culture Documents
Abstract
The application of genetic algorithms to sequence scheduling problems grew out of attempts
to use this method to solve Traveling Salesman Problems. A genetic recombination operator
for the Traveling Salesman Problem which preserves adjacency (or edges between cities) was
developed; this operator proved to be superior to previous genetic operators for this problem
[15]. Recently, a new enhancement to the edge recombination operator has been developed
which further improves performance when compared to the original operator. Using this
operator in the context of the GENITOR algorithm we obtain best known solutions for 30 and
105 city problems with considerable consistency. Our first test of this approach to scheduling
was optimization of a printed circuit production line at Hewlett Packard[16]. Success with this
problem led us to apply similar methods to production scheduling on a sequencing problem
posed by the Coors Brewing Co. This work has resulted in new findings regarding sequencing
operators and their emphasis on adjacency, order, and position.
1 Introduction
A genetic algorithm employs a population of strings representing different possible
solutions to a problem. It therefore searches from multiple points in the search
space. It also typically involves a selection and recombination mechanism, such
that strings with above average performance have a better chance of undergoing
recombination and contributing new offspring to the population which represent
new sample points in the search space.
In the standard genetic algorithm developed by Holland[6], an entire popu-
lation of individuals undergoes selection and recombination as part of a single
generation. The individuals of each new generation are either copied into the
new generation from the previous one, or are created by the application of ge-
netic operators. These operators may include mutation; however, an operator
such as mutation is given a very low probability of occurring, the idea being that
it serves only to prevent the search from stagnating. The crossover operator is
intended be the primary operator driving the search, so for the sake of simplicity
the following discussion will ignore other operators and focus on the effects of
or genetic fragments) inherited from the parents, but they resample them in a
new context. Thus, by testing one new string, additional information is gained
about the 2L hyperplanes that intersect at a comer in the hypercube where that
string resides.
The product of the terms outside the square brackets (FR· P({, t)) is the expected
number of offspring from members of {, where F R refers to the fitness ratio, or the
ratio of the average fitness of the members of a hyperplane, {, to the population
average. The term in the square brackets is the expected number of these which
are not disrupted by crossover, or one minus the probability of disruption. The
probability of disruption is made up of 3 independent events: (1) that crossover
will occur, (2) that the crossover will occur within the defining length of the
hyperplane, and (3) that the mate of the parent that is undergoing crossover
is not also a member of the same hyperplane (thus always yielding the same
hyperplane)[8, page 92]. Also, members of the hyperplane can come about in
the next generation by the mating of 2 members from the population, such that
neither member is in the hyperplane. Therefore the equation is expressed as an
inequality.
lowest ranking string in the population-the offspring does not replace a parent
string. This new string is then ranked according to its performance relative to
the remainder of the population, so that it may now compete for reproductive
opportunities.
Parant 1 : abc d a f g h i j
Parant 2: c f a j h dig b •
Offspring: a j ihdcfabg
in their table entries, but element j has only 2 links remaining. Therefore, j is
selected as the next element in the offspring, and all occurrences of j are removed
from the right-hand side of the edge table. Element j has links to i and h, both
of which have 3 links remaining. Therefore, one of these elements are selected at
random (element i in figure 1) and the process continues until the child tour is
complete.
When the original edge recombination operator was first implemented, we
realized that it had no active mechanism to preserve "common subsequences"
between the 2 parents. We have developed a simple solution to this problem.
When the "edge table" is constructed, if an item is already in the edge table and
we are trying to insert it again, that element of the sequence must be a common
edge. The elements of a sequence are stored in the edge table as integers, so if
an element is already present, the value is inverted: if A is already in the table,
change the integer to -A. The sign acts as a flag. Consider the following sequences
and edge table: [a b c d e f] and [c deb fa].
a: b, -f, c d: -c, -a
b: a, c, a, f a:-d,f,b
c: b, -d, a f: ., -a, b
The new edge table is the same as the old edge table, except for the flagged
elements. One of three cases holds for an edge table entry. 1) If four elements are
entered in the table as connections to a given table entry, that entry is not part of
a common subsequence. 2) If three elements are entered as connections to a given
table entry, then one of the first two elements will be negative and represents the
beginning of a common subsequence. 3) If only two elements are entered for a
given table entry, both must be negative and that entry is an internal element
in a common subsequence. Giving priority to negative entries when constructing
134
offspring affects edge recombination for case 2 only. In case 1, no connecting ele-
ments have negative values, and in case 3 both connecting elements are negative,
so edge recombination behaves just as before. In case 2, the negative element
which represents the start of a common subtour is given first priority for being
chosen. Once this common subsequence is started, each internal element (case
3) of the sequence has only one edge in and one edge out, so it is guaranteed
that the common sections of the sequence will be preserved. The implementation
of this idea (along with better mechanisms to ensure random choices when ran-
dom choices are indicated) improved our performance on the Traveling Salesman
Problem. Using a single population of 1000 and a total of 30,000 recombinations
GENITOR with the enhanced edge recombination operator finds the optimal so-
lution on the 30 city problem described in Whitley et al. [14] on 30 out of 30
runs. On a 105 city problem the new operator finds the "best known" solution
on 14/30 runs with no parameter tuning using a population of 5000 and 1 million
recombinations.
Punt 1: abc d • f g h i j
Parnt 2: c f a j h dig b •
Croee Pte:
Ofbpring:
.---------.
f g a j h d i be.
Par.llt 1: abc d • f g h i j
Punt 2: c f a j h dig b •
Cro •• Pte:
Ofbpring:
•• ••
a jed • f g h i b
Parent 1: abc d e f g h i j
Cro .. Pta:
Parent 2:
*-------*
d i j hag c e b f
Offspring: h i e d e f jab g
Parent 1: abc d e f g h i j
Cross Pta: *-------*
Parent 2: c f a j h dig b e
Offspring: a jed e fig b h
unselected parent. In the first example (figure 4), the elements in positions 3,
4, 5 and 6 are inherited by the child from Parent 1 (P1). Then beginning with
position 3, the element in P1 (i.e., c) is located in p2 at position 7; position 7 in
the offspring is filled with the element j from Parent 2 at position 3. Therefore,
Off[7] = P2[3] = j. Moving to position 4 in Parent 1, we find a d and see that
it occurs at position 1 in Parent 2, so Off[l] = P2[4] = h. At position 5, Parent
1 = e which is found at position 8 in Parent 2, so Off[8] = P2[5] = a. Parent
1 at position 6 = I, while I is at P2[10] so Off[lO] = P2[6] = g. The remaining
elements are directly inherited from P2: Off[2] = P2[2] = i, and Off[9] = P2[9] =
b.
Since the segment of elements from the alternate parent does not contain any
elements in the key segment of the first parent, both adjacency and relative order
are preserved.
In the second example (figure 5), the mapping proceeds as above with Off[3 to
6] = P1[3 to 6). Next Off[l) = P2[3) = a, since P1[3) = c and P2[1] = c. Next,
we note that P1(4) = d and P2(4) = j. Since P2(6) = d, this is the preferred
position for j in the offspring, but it has already been filled. City j is skipped
over temporarily. Element h maps to element e which occupies position 10 in
parent 2, so Off[lO] = h. City d maps to element I which occupies position
2 in parent 2, so Off[2] = d; even though this is a duplicate it is left in the
offspring temporarily. Elements i, 9 and b are then inherited from P2 leaving a
sequence with no j element and two d elements. The element d which is outside
the originally selected positions 3 through 6 is replaced with a j resulting in a
complete and legal sequence. Note that when this substitution occurs, it results
in a mutation where neither adjacency, position, or relative order is preserved
by the substitution. Also note that PMX is influenced by position, especially in
Example 2.
137
One thing that is convenient about the matrix representation is that it is easy
to extract common information about where common links occur and where no
links occur. This can also be expressed in the form of a matrix, where a 0 or 1
respectively is placed in the matrix where there is agreement in the two parent
structures. If the values in the parent matrices conflict, we will place a # in
the matrix. Using the two above structures as parents, the following common
information is obtained.
ABC 0 E F
A 0.. 0 0 1
B • 0 • 0 • •
C •• 0 100
0001010
EO. 0 10.
Fl' 0 0 • 0
This matrix can be interpreted in the following way. If we convert the # sym-
bols to * symbols, then (in the notation typically used by the genetic algorithm
138
ab ac ad ae af be bd be bf cd ce cf de df ef
100011000100101
If one maps both parent strings and the offspring produced by edge recombi-
nation, one would find that the binary representation is in fact undergoing recom-
bination (see [16]). Note that the matrix representation is symmetric around the
diagonal which is always zero. The space of all possible edges is therefore defined
by the lower triangle of the matrix (the lower left half of the matrix minus the
diagonal). Thus the matrix representation and the binary mask which we have
defined are identical.
Assuming one wishes to exploit adjacency information using a recombination
operator, there would appear to be only two ways one can improve on edge re-
combination: 1) produce an operator that results in a lower rate of incidental
mutation in the underlying binary space during recombination or 2) exploit SOme
kind of linkage between the bits in the underlying representation. This second
observation has to do with the fact that edge recombination produces an effect
similar to "uniform crossover" in normal binary representations of parameter op-
timization problems[lO]. Both "uniform crossover" and "edge recombination"
139
cause each bit to be independently inherited from the parents. On normal binary
representations of parameter optimization problems it is also possible to use op-
erators (1 and 2 point crossover) where the probability of bits being passed on
together is related to the distance of the bits from one another in terms of their
location on the binary encoding. There is some evidence to suggest that linkage
allows higher order hyperplane information to be more effectively exploited dur-
ing genetic search, but the issue of linkage is still a topic of debate in the genetic
algorithm community (c.f., [2]).
One point of this matrix representation is to illustrate that this is just another
way of describing the search space. It can also be shown that edge recombination
does a very good job of recombining representations in this underlying space.
An edge table, in effect, stores just the information about the "1" bits in the
binary matrix. By storing only this information, edge recombination becomes an
algorithm with complexity O(N) since there is one pass over each parent to build
the edge table and one pass through the table to construct the offspring. The
matrix representation is of complexity O(N2).
Another thing the matrix representation can make explicit is the difference be-
tween (symmetric) adjacency and relative order. Consider the same two parents:
[A BCD E F) and [C DEB F A). We will represent relative order as follows.
Each row will be the relative order information for a particular city. The columns
will be all cities. If A is the first city in a sequence, then a 1 will be placed in
every column (except column Ai the diagonal will again be zero) to indicate A
precedes all other cities. This representation is given by Fox and Mcl\lahon(3).
Thus, the matrix for [A BCD E F) and [C DEB F A) are as follows (left and
right, respectively).
A B C D E F A B C D E F
A 0 1 1 1 1 1 A 0 0 0 0 0 0
B 0 0 1 1 1 1 B 1 0 0 0 0 1
C 0 0 0 1 1 1 C 1 1 0 1 1 1
D 0 0 0 0 1 1 D 1 1 0 0 1 1
E 0 0 0 0 0 1 E 1 1 0 0 0 1
F 0 0 0 0 0 0 F 1 0 0 0 0 0
The common information can also extracted as before. This produces the
following matrix.
A B C D E F
•• •• •• •• •• •
A 0
B 0 1
•• ••
C 0 1 1 1
D 0 0 1 1
E 0 0 0 1
F
• 0 0 0 0 0
Note that this binary matrix is again symmetric around the diagonal, except
140
the lower triangle and upper triangle have complementary bit values. Thus only
N(~-l) elements are needed to represent relative order information.
We have not tried to study the various "order" crossover operators in terms of
their ability to do recombination in this particular space; some work of this kind
has been done by Fox and McMahon[3]. Fox and McMahon also define several
operators that work directly on these binary matrices for relative order.
While matrices may not be the most efficient form of implementation, they
do provide a tool for better understanding sequence recombination operators de-
signed to exploit relative order. It is clear that adjacency and relative order are
different and are best expressed by different binary matrices. Likewise, abso-
lute position information also has a different matrix representation, for example,
with the rows representing cities and the columns representing positions. Cy-
cle crossover (see [9] and [7]) appears to be a good absolute position operator
although we have not found any problems where absolute position is critical.
4 Sequencing Problems
In addition to use on the Traveling Salesman Problem, the genetic algorithm
approach is general enough to be applied to a wide range of sequencing problems
because the local information about the distance between cities is not used by
the operator or the genetic algorithm. All that is needed is the ability to evaluate
the overall sequence and rank sequences relative to each other.
\
---
900~~--~~----~~-----,-------,------~
'I
'I edqe -
.,
',I
,I
"
"
....
order U .. .
order 12 .... .
"1
, I
100
,I
,I
, I
, I
, I
',I
'I
700
"1
'1
'\ I'
600
I'.
I.
\ .
'~ \" .'.
\
"', ....
'~.----------~------------------
500
'. ..................
ing genetic operators and local search methods developed by Lin/Kernigan they
obtained superior results to 5 other approaches on 8 different problems ranging in
size from 48 to 666 cities (median size 318). Thus, it appears likely that genetic
methods could become a basic part of the tool kit for solving Traveling Salesman
Problems and that the genetic algorithm could be viewed as a structure in which
to organize and apply many of the tools that already exist. The reader interested
in comparison tests on the classic Traveling Salesman Problem should consult the
results of Ulder et al. [12].
As can be observed in figures 6 and 7, the operator which emphasizes adjacency
(edge recombination) well out-performs the other genetic operators on both a 30-
city and lOS-city TSP. The coordinates for these problems are listed in [15].
, ,
'. ,\
··· ,,,
edq'e -
1'.000 . pRIX--
order II .. .
, , order 12 .... .
'.. ,,
, ,
,
'.. ,,
, ,
, ,
S4/}OO • \
'.,.,
"
"
','.,
.,.,
.,
34000 ~--------~----------------------------
'"
••••••.; ••.•.•.•.•.•. .,.,."1'.1'.•. , .•.".1'1'••• ,,.
1400':: O~---:2:-:'00~0-:-:OO:---.::::40::.00==0=0==='=00""OO=0==='=00"'0=OO===1.d. 06
reca.b1neUonl
takes as input a sequence of tasks for the assembly line. The simulator is driven
by a genetic algorithm containing a population of these sequences. The assembly
line is simulated using the input sequence to determine which tasks should be
performed in what order. This model of the assembly line permits an evaluation
of the sequence, which is then passed back to the genetic algorithm. All the
genetic algorithm needs to know to effectively recombine these sequences is the
relative evaluation of each individual sequence. Results have been reported using
a FIFO version of the flow-shop, as well as a version which allows reordering of
jobs between each set of workcells[16].
It can be shown that there is a one-to-one mapping from certain flow-shop
problems to a TSP. Consider a FIFO flow-shop which has one machine and a
collection of unique items which must be executed. Also assume that there is a
matrix which has differing set-up costs for each type of job; set-up costs depend
upon the job which a machine is currently running. This matrix is illustrated
by figure 8. The diagonal is zero. Run costs do not enter into the optimization
of a given schedule because they are constant for all possible schedules. This
problem is then a TSP in which the matrix contains the "distance" between the
"cities". In such an example, the "distance" from item A to item B is probably
not the same as that from B to A, so it is an asymmetric TSP. Now, consider
a series of individual machines like the one described, but with the machines
connected by FIFO queues, so that the order of work is the same from machine
to machine. A real-world analogy to this is a flow-shop with conveyor belts
143
NEXT 108
A • C N
A
•
C
CUItRENT
lOB
between individual machines. In this case, the cost of running job B immediately
after running job A is the sum of the setup costs from the matrices from each
type of machines, assuming the run costs are constant and idle costs is ignored.
Because the total setup costs are a linear combination, the series of matrices for
each type of machine can be represented as a single matrix.
)00000 r---...,.------.----r-----.----r----,
edge -
pItIX - -
order tl .. .
"~\ ",
:, .
:\ "
250000 \\ '. ~----------J
""\ \
... "\""
150000 0~--5....
00-0- - - 1 0....
00-0- - 1....
50'-00---20.... 0-0- - ) . J
00-0--2-50... OOOO
rec:aeabl nat 10ns
local minima, multiple passes are required to reach and confirm a local minima
with respect to this operator. However, we will assume only a single pass of
the 2-opt strategy is used for each local improvement. For each of these local
operations, it is not necessary to evaluate the overall sequence on a TSP because
the local operations affect the global evaluation in a knoWn way. However, for
those scheduling problems which do not directly map to a TSP, this is not always
the case. In scheduling systems that rely on complex simulations, for example,
it may be necessary to more or less evaluate the entire sequence iI1 order to
determine the effects of a local decision.
We would like to describe in a more formal way the relative costs of global
versus local evaluation in the context of a genetic algorithm. First we describe
two kinds of evaluation costs: the cost of a complete (i.e., global) evaluation and
the cost of a partial "local" evaluation. The complete evaluation assumes no prior
information is available. The partial "local" evaluation is the cost of evaluating
the sequence after a local improvement operator (e.g. 2-opt) is applied.
Let C, be the cost of a complete evaluation. Let C, be the cost of a local
evaluation. For our purposes, there are also global versus local operator costs:
the cost of 2-opt is less than the cost of the edge recombination operator. Let
OP, be the cost of a global operator. Let OF, be the cost of a local operator.
We now wish to compare the cost of doing K repetitions of 2-opt (where a single
pass is made over the sequence of elements) to the cost of doing X repetitions of
the global operator by itself. We are particularly interested in the difference in
cost for these two strategies within the context of a genetic algorithm. We start
by characterizing the cost of using just recombination on a TSP versus the cost
of using recombination plus local improvement by using a single pass of 2-opt
improvements for each new string that is generated.
Ignoring other algorithm costs, the cost of doing X repetitions of the global
operator with complete evaluations is just X(C, + OP,).
The genetic algorithm plus local improvement involves a global operator ap-
plication and evaluation (C, + OP,) and N(~-l) local evaluations giving a cost
of N(~-I)(C, + OF,). Thus, allowing K repetitions, we would like to evaluate the
following equality.
N(N -1) .
K(C, + OP, + 2 (C, + OF,)) = X(C, + OP,)
In the TSP we would expect the relative costs of local versus global evaluation
to be favorable for the following reasons: local evaluation is cheaper relative to
global evaluation and the global evaluation function is cheap relative to the cost
of the global recombination operator.
147
Our real motivation is to try to consider what this trade off means in the con-
text of scheduling applications. In particular, for certain scheduling applications
we assume that local evaluation is not used (the impact of local changes can
only be evaluated by global evaluation, or local evaluation costs which approach
global evaluation costs); furthermore we assume evaluation costs dominate opera-
tor costs. Using these assumptions we drop the operator costs from the equations
and replace the local evaluation costs with the global evaluation costs. We still
assume a 2-opt style of local operator. This yields
N(N -1)
K(G, + 2 (G,» = X(G,).
The evaluation costs can now be factored from the equality yielding:
K(N(N - 1) + 1» = X
2
The kinds of problems we are thinking of are things like the Coor's warehouse
scheduling problem. The simulation costs dominate operator costs and it is not
clear how local evaluation could be achieved at substantially lower costs than the
global evaluation function. Under these kinds of conditions using local improve-
ment operators may not be practical unless they produce optimizations which
cannot be achieved using recombination alone. For example, assuming N = 100
and X = 100,000 evaluations implies K = 10; likewise for X = 1,000,000 we obtain
K = 101. Even if the cost of local evaluation is half that of global evaluation, this
only approximately doubles K. If a population size of only 100 strings is used,
we would use all K local improvements just initializing the population while the
genetic search using only recombination carried out 1 million trials. This suggests
local improvements may only be viable if local evaluation costs are considerably
lower than global evaluation costs or if K local improvements will yield good
solutions without genetic search.
6 Conclusions
A given sequencing problem may exhibit an emphasis on adjacency or relative
order between the elements in the sequence. In the TSP, relative order still
plays a role in the attempt to optimize the overall sequence, but adjacency of
elements is clearly the crucial information. In the case of the Production/Shipping
scheduler outlined in this paper, resource consumption is involved. Load docks
are temporarily made unavailable as certain tasks are allocated resources, while
product is permanently consumed. The relative order information needed for
148
ACKNOWLEDGEMENTS
This research was supported in part by NSF grant IRI 9010546 and a grant from the Colorado
Institute of Artificial Intelligence (CIAI). CIAI is sponsored in part by the Colorado Advanced
Technology Institute (CATI), an agency of the State of Colorado.
References
[1] L. Davis. (1985) "Applying Adaptive Algorithms to Epistatic Domains." In Proc. International
Joint Conference on A rtificialIntelligence.
[2] W. Spears and K. Dejong. (1991) "On the Vitures of Uniform Crossover." To appear in Proc.
Fourth International Conference on Genetic Algorithms. Morgan Kaufmann.
[3] B. Fox and M. B. McMahon. (1991) "An Analysis of Reordering Operators for Genetic Algo-
rithms." In Foundations of Genetic Algorithms. G. Rawlins, ed. Morgan Kaufmann.
[4] D. Goldberg. (1989) Genetic Algorithms in Search, Optimization and Machine Learning. Ad·
dison Wesley, Reading, MA.
[5] D. Goldberg and R. Lingle. (1985) "Alleles, loci, and the Traveling Salesman Problem." In
Proc. International Conference on Genetic Algorithms and their Applications.
[6] J. Holland. (1975) "Adaptation in Natural and Artificial Systems." University of Michigan
Press.
[7] I. Oliver, D. Smith, and J. Holland. (1987) "A Study of Permutation Crossover Operators
on the Traveling Salesman Problem." In Proc. Second International Conference on Genetic
Algorithms and their Applications.
[8] D. Schaffer. (1987) "Some Effects of Selection Procedures on Hyperplane Sampling by Genetic
Algorithms." In Genetic Algorithms and Simulated Annealing. L. Davis, ed. Morgan Kauf·
mannn.
[9] T. Starkweather, S. McDaniel, K. Mathias, C. Whitley, and D. Whitley. (1991) "A Comparison
of Genetic Sequencing Operators." To appear in Proc. Fourth International Conference on
Genetic Algorithms. Morgan Kaufmann.
[10] G. Syswerda. (1989) "Uniform Crossover in Genetic Algorithms." In Proc. Third Int'l. Confer-
ence on Genetic Algorithms. J. D. Shaeffer, ed. Morgan Kaufmann.
[11] G. Syswerda. (1990) "Schedule Optimization Using Genetic Algorithms." In Handbook of Ge·
netic Algorithms. l. Davis, ed. Van Nostrand Reinhold, New York.
[12] N. Ulder, E. Pesch, P. van Laarhoven, H. Bandelt, E. Aarts. (1990) "Improving TSP Exchange
Heuristics by Population Genetics." In Parallel Problem Solving In Nature. Springer/Verlag.
[13] D. Whitley and J. Kauth. (1988) "GENITOR: A Different Genetic Algorithm" In Proc. Rocky
Mountain Conf. on Artificial Intelligence.
[14] D. Whitley, T. Starkweather, and D. Fuquay. (1989) "Scheduling Problems and Traveling
Salesman: The Genetic Edge Recombination Op.erator." In Proc. Third Int'l. Conference on
Genetic Algorithms. J. D. Shaeffer, ed. Morgan Kaufmann.
[15] D. Whitley and T. Starkweather. (1990) "GENITOR ll: A Distributed Genetic Algorithm."
Journal of Ezperimental and Theoretical Artificial Intelligence. 2:189-214.
[16] D. Whitley, T. Starkweather, and D. Shaner. (1990) "Traveling Salesman and Sequence
Scheduling: Quality Solutions Using Genetic Edge Recombination." In Handbook of Genetic
Algorithms. L. Davis, ed. Van Nostrand Reinhold, New York.