You are on page 1of 20

Sequence Scheduling With Genetic Algorithms

T. Starkweather, D. Whitley, K. Mathias and S. McDaniel


Computer Science Department
Colorado State University
Fort Collins, CO 80523.
303-491-7031

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

G. Fandel et al. (eds.), New Directions for Operations Research in Manufacturing


© Springer-Verlag Berlin · Heidelberg 1992
130

crossover on hyperplane selection. In the standard genetic algorithm, one parent


is selected on the basis of fitness, and the other is selected with a uniform dis-
tribution, so that all population members have a chance of mating with a good
performer.
The initial theory of how genetic algorithms work was developed by John
Holland[6J. Holland;s theorem deals with hyperplanes represented by schemata
in the population (denoted {). The property which Holland calls intrinsic par-
allelism indicates that a genetic algorithm will tend to sample from the space of
string encodings in such a way that hyperplanes in this space are represented in
successive generations in proportion to their observed fitness relative to the pop-
ulation average. This sampling behavior occurs without having to compute the
fitness averages for any individual hyperplane. Since there are many more than
N hyperplanes present in a population of size N, this represents a rare example
of combinatorial complexity working to advantage instead of disadvantage.
When applied to a problem with a binary encoding the genetic algorithm sam-
ples hyperplanes in an L-dimensional hypercube, where L represents the length
of the problem encoding. As a simple example, the 3 bit string 101 is not only
sampling a point in the search space that corresponds to 101, but is also a par-
tial sampling of its constituent schemata. Let * represent a universal match.
The schema 1** then would represent the hyperplane composed of all strings
that begin with 1. (This could correspond to the four "back" corners of the
cube, in which case 0** would be the plane where the "front" four corner reside.)
Therefore 101 is a partial sampling of 1**, *0*, **1, 10*, *01, 1*1 and even ***,
which contributes baseline information to the search about the average value of
all strings in the space (or population).
"Intrinsic parallelism" means that through continued application of the crossover
operator a large number of hyperplanes are sampled while only a small number of
strings are actually tested. Recombining the "genetic material" from two parents
by crossing the binary encodings allows other hyperplanes in the search space to
be sampled (or resampled), but these new samples will be biased toward those
hyperplanes which have displayed above average performance.
If both parents represent high performance strings, then the offspring may
also be high performance strings. If a schema is most often found in strings that
have above average performance, then this indicates that the schema represents a
hyperplane in the search space with above average performance. In other words,
the binary strings which lie in this hyperplane partition on average do a better
job at optimizing the target problem than the average string in the population.
Note that the offspring resample those hyperplanes (represented by schemata
131

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.

1.1 Hyperplane Selection in the Standard Model


There have been many variations proposed for the standard genetic algorithm.
The following formula is by Shaffer[8] based on Holland's original formula[6].

P({, t + 1) 2: [1- pc· (~~\ )(1 - P({, t))]FR· P({, t) (1)

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.

1.2 The GENITOR Model


All ofthe experiments reported in this paper were obtained using GENITOR (GE-
Netic ImplemenTOR). In the GENITOR approach the offspring do not replace
their parents, but rather a low ranking individual in the population. Another key
difference is that the GENITOR algorithm is designed to allocate reproductive tri-
als to individuals (Le., strings) based on their rank in the population rather than
an absolute measure of fitness relative to the population average. The GENITOR
algorithm abandons fitness values which are calculated as a function of absolute
performance and instead uses the rank of the string in the current population to
assign a fitness value.
In the GENITOR algorithm two parents are first selected from the population.
Copies of the parents are then recombined, producing two offspring. One of
the offsprings is randomly discarded, the other is then allowed to replace the
132

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.

2 Genetic Sequencing Operators


Up to this point, we have been talking about genetic algorithms which use binary
encoded information for parameter optimization. For sequencing problems, we
need a set of operators which explore the possible permutations for the sequence.
Furthermore, the encoding is typically symbolic rather than binary. Four ge-
netic sequencing operators that recombine permutations of symbolic encodings
are compared in this study: an enhanced edge recombination operator, order
crossover, a variant proposed by Syswerda[ll] which we shall refer to as order
crossover #2 and finally, PMX. This description of these operators also appears
in [9].

2.1 Enhanced Edge Recombination


The edge recombination operator is different from other genetic sequencing oper-
ators in that it emphasizes adjacency information instead of the order or position
of the items in the sequence. The "edge table" used by the operator is really an
adjacency table listing the connections into and out of a city found in the two
parent sequences. The edges are then used to construct offspring in such a way
that we avoid isolating cities or elements in the sequence.
For example, the tour [b a d f g e c j h i] contains the links [ba, ad, df, fg, ge,
ec, cj, jh, hi, ib], when one considers the tour as a hamiltonian cycle. In order to
preserve links present in the two parent sequences a table is built which contains
all the links present in each parent tour. Building the offspring then proceeds as
follows: (1) Select a starting element. This can be one of the starting elements
from a parent, or can be chosen from the set of elements which have the fewest
entries in the edge table. (2) Of the elements that have links to this previous
element, choose the element which has the fewest number of links remaining in
its edge table entry, breaking ties randomly. (3) Repeat step 2 until the new
offspring sequence in complete.
An example of simple edge recombination is given in figure 1. Suppose element
a is selected randomly to start the offspring tour. Since a has been used, all
occurrences of a are removed from the right-hand side of the edge table. Element
a has links to elements b, /, and j. Elements b and f both have 3 links remaining
133

Parant 1 : abc d a f g h i j
Parant 2: c f a j h dig b •
Offspring: a j ihdcfabg

Edga tabla: city links


a b, f,
b a, c, g,
a
c b, d, a,
f
d d, f, b,
c
a d, f, b,
c
f a, g, c,
a
g f, h, i,
b
h g, i, j, d
i h, j, d, g
j i, a, h

Figure 1: The Original Edge Recombination Edge Table

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.

2.2 Order Crossover


The original order crossover operator (which we refer to as order crossover) was
developed by Davis [1] (also see [7]). The offspring inherits the subsequence of
elements between the two crossover points, inclusive, from the selected parent
in the same order and position as they appeared in that parent. The remaining
elements are inherited from the alternate parent in the order in which they appear
in that parent, beginning with the first position following the second crossover
point and skipping over all elements already present in the offspring. Thus,
although the purported goal is to preserve the relative order of elements in the
sequences to be combined, part of the offspring inherits the order, adjacency and
absolute position of part of one parent string, and the other part of the offspring
inherits the relative order of the remaining elements from the other parent, with
disruption occurring whenever an element is present that has already been chosen.
An example is given in figure 2. The elements a, j, h, d, and i are inherited
from P2 in the order and position in which they occur in P2. Then, starting
from the first position after the second crossover point, the child tour inherits
from PI. In this example, position S is this next position. P1[S] = h, which is
already present in the offspring, so PI is search until an element is found which is
not already present in the child tour. Since h, i, and j are already present in the
child, the search continues from the beginning of the string and Off[S] = PI[2]
= b, Off[9]= PI[3] = c, Off[IO] = PI[4] = e, and so on until the new tour is
complete.
135

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.

Figure 2: Order Crossover #1

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

Figure 3: Order Crossover #2

2.3 Order Crossover #2


The operator which was developed by Syswerda [11) differs from the abo\'e order
operator in that several key individual positions are chosen randomly and the
order in which these elements appear in one parent is imposed on the other parent
to produce two offspring; in our experiments we produce only one offspring.
In the example of figure 3, positions 3, 4, 7, and 9 have been selected as the
key positions. The ordering of the elements in these positions from Parent 2 will
be imposed on Parent 1. The elements (in order) from Parent 2 are a. j. i and
b. In Parent 1 these same elements are found in positions 1, 2, 9 and 10. In
Parent 1 PI [1) = a, P1[2) = b, P1[9) = i and P1[1O) = j, where PI is Parent 1 and
the position is used as an index. In the offspring the elements in these positions
(i.e., 1, 2, 9, 10) are reordered to match the order of the same elements found in
Parent 2 (i.e., a, j, i, b). Therefore Off[l) = a, Off(2) = j, Off(9) = i and Off[lO)
= b, where "Off" is the offspring under construction. All other elements in the
offspring are copied directly from Parent 1.

2.4 Partially Mapped Crossover (PMX)


This operator is described in detail by Goldberg and Lingle [5). A parent and two
crossover sites are selected randomly and the elements between the two starting
positions in one of the parents are directly inherited by the offspring. Each
element in the subsequence between the two crossover points in the alternate
parent are mapped to the position held by this element in the first parent. Then
the remaining elements are inherited from the altemate parent. Just as in the
order crossover operator # 1, the section of the first parent which is copied directly
to the offspring preserves order, adjacency and position for that section. However,
it seems that more disruption occurs when mapping the other elements from the
136

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

Figure 4: PMX Crossover Example 1

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

Figure 5: PMX Crossover Example 2

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

3 Adjacency, Relative Order, and Matrix Representations


We have stressed that there is a real difference between adjacency, relative order
and position. One way in which this can be illustrated is to use a matrix repre-
sentation of the information contained in two parent strings. It has also recently
become popular to suggest matrix representations for these problems because it
allows a binary encoding of the space; we have also previously suggested a bi-
nary encoding of the space for the Traveling Salesman Problem (TSP)[16]. It can
easily be shown that the encoding we have suggested contains exactly the same
information as the matrix representation when adjacency is stressed. The work
of Fox and McMahon[3] with matrix representations is particularly relevant in
the study of relative order in sequencing problems.
When we discuss adjacency in the Traveling Salesman Problem, we typically
are referring to a symmetric Traveling Salesman Problem: the distance of going
from city A to B is the same as going from B to A. Thus, when we define a matrix
representing a tour, there will be two edges in every row of the matrix. where a
row/column entry of 1 represents an edge connecting the two cities. Thus, the
matrix for the tours [A BCD E F] and [C DEB F A] are as follows (left and
right, respectively).
A B C 0 E F A B C 0 E F
A 0 1 0 0 0 1 A 0 0 1 0 0 1
B 1 0 1 0 0 0 B 0 0 0 0 1 1
C 0 1 0 1 0 0 C 1 0 0 1 0 0
0 0 0 1 0 1 0 0 0 0 1 0 1 0
E 0 0 0 1 0 1 E 0 1 0 1 0 0
F 1 0 0 0 1 0 F 1 1 0 0 0 0

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

community) a hyperplane is defined in this binary space in which both of the


parents reside. The offspring must also reside in this hyperplane, assuming no
mutation occurs.
This matrix representation does bring out one feature rather well: the common
subtour information can automatically and easily be extracted and passed on to
the offspring. The original edge recombination operator did not do this[14). The
new version of edge recombination does allow this common edge information to
be passed on to the offspring[9).
The matrix defining the common hyperplane information also defines those
offspring that represent a recombination of the information contained in the par-
ent structures. In fact, any assignment of 0 or 1 bits to the locations occupied by
the # symbols are valid recombinations, but not all are feasible solutions to the
Traveling Salesman Problem. We would like to have an offspring that is not only
a valid recombination, but also a feasible solution.
We could define a version of edge recombination to directly apply to the matrix
representation. But the new edge recombination already works on this space.
We have previously shown that edge recombination will act to recombine binary
representations defined as Ii mask over the space of all possible edges[16), where
there are N(~-I) possible edges for a tour of-length N. For example, the edges for
[A BCD E F) are expressed as follows.

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.
\

4.1 The Traveling Salesman Problem


We do not offer comparative results in this paper to other approaches for the
Traveling Salesman Problem. We do note, however, that GENITOR is really
solving a more difficult version of the Traveling Salesman Problem than that
solved by most other algorithms. Most algorithms use local edge information
to do local improvements; GENITOR uses only the overall value of the total
sequence. David Goldberg [4] points out that genetic algorithms are actually
solving a "Blind" Traveling Salesman Problem. The Blind Traveling Salesman
Problem is interesting because for certain types of sequence optimization tasks
local information is not readily available. In a fair comparison on the "classic"
Traveling Salesman Problem, the genetic algorithm would be allowed to also use
local information about edge costs. In other words, parent and offspring tours
could be improved by using local information. A group of European researchers
[121 have used this type of strategy and have achieved impressive results on classic
Traveling Salesman Problems with pp to 666 cities. They found that by combin-
141

---
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
'. ..................

400 ' - - - - - - - - ' - - - - - - - - ' - -______' - -____--''--____---J


o 10000 20000 30000 40000 50000
recc:.blnat1ona

Figure 6: 30 City blind TSP with 4 Operators

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].

4.2 Flow-Shop Scheduling


The first scheduling problem to which we applied genetic algorithms dealt with
a printed circuit production line at Hewlett Packard in Fort Collins, Co. The
boards are assembled in stages, with each stage occurring in a different workcell
along the line. Different circuit boards require differing amounts of time and cost
at each workcell, as well as differing time and cost for setup at each cell. The
sequencing task in this problem is to determine the proper initial sequence for
a large number of jobs so that the setup time and idle time is minimized across
the line as a whole. The problem is modeled such that there is a simulator which
142

, ,
'. ,\
··· ,,,
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

Figure 7: 105 City blind TSP with 4 Operators

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

Figure 8: Matrix Defining Setup aa Function of Current Job

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.

Thus, M. um can still be represented as a TSP, and is no more difficult to


solve than the single machine example. This same argument holds if run cost
and idle costs vary, but are dominated by setup costs. There are problems,
however, where idle time is critical. For example one may wish to schedule the
use (or consumption) of a resource where set-up time is minimal or relatively
unimportant. Syswerda[ll] describes a problem where this appear to be the case;
Syswerda also suggests that differences he noted in the performance of different
genetic sequencing operators may depend on whether adjacency, relative order or
absolute position is critical to the application.
The point is that there are problems in the scheduling domain where adjacency
of elements in the sequence is important, just as in the TSP. However, if run
costs and idle time are a significant concern, this observation may no longer hold.
There are also problems of resource utilization where relative order appears to be
critical. It should not be surpri~ing that different operators are suited to different
kinds of problems.
144

)00000 r---...,.------.----r-----.----r----,
edge -
pItIX - -
order tl .. .

~'. order .2 .... .

"~\ ",
:, .
:\ "
250000 \\ '. ~----------J
""\ \

... "\""

.... '- .........


200000 ------------------------------------

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

Figure 9: Production/Shipping Scheduler Problem with 4 Operators

4.3 A Production/Shipping Scheduler


We have also examined a problem where resource utilization is critical. A pro-
totype scheduling system has been developed for the Coors brewery in Golden,
Co., which uses a genetic algorithm to optimize the allocation of beer production
and inventory to the orders at the plant. A simulator was constructed consisting
of a representation for beer production, the contents of inventory, arrangement
of truck and rail loading docks, and orders for a given 24 hour period.
The objective of the Coors scheduling package is the efficient allocation of
orders to loading docks in the plant, based on beer production. Beer production
occurs on approximately 16 production lines which operate during a 24 hour
period. Each line produces different types of beer and different types of packages
during a given time period. The data which is available for each line includes
flow-rate, start and stop times, and beer-type. There are up to approximately 500
beer types which can be produced, based on the actual type of the product and
various packages and labels. The scheduling simulator analyzes the production
schedule for the production lines, and creates a time-sorted list composed of
the beer-type, amount, and time available. This time-sorted list of production
is then examined during the time-steps of a given simulation. An input file
to the scheduling simulator contains the contents of inventory at the start of a
given time-period which is to be scheduled. New orders entering a loading dock
upon completion of a previous order initially check the inventory for available
145

product. Minimizing the contents of inventory is an important aspect of this


problem. This includes the physical work of moving product more than once on
the plant floor, the physical space used up by the product in inventory, as well as
refrigeration costs, etc. The schedule simulation places orders in rail and truck
loading docks and attempts to fill the orders with the product that comes out
of production and inventory. An order consists of one or more beer type and an
associated amount of that type. In a given 24 hour period, typically 200 orders are
present waiting to be filled. The schedule simulator attempts an efficient mapping
between the product that is available and these orders. A "good" schedule is one
which minimizes the average inventory in the system and fills as many orders as
possible. A sequence whose elements consist of order numbers is an individual in
the population maintained by the genetic algorithm. This sequence is mapped to
the loading docks by the schedule simulator and orders are filled based strictly
on this sequence. The genetic algorithm manipulates a population consisting
of sequences of orders. Initially these sequences are randomly created, and as
genetic search progresses new sequences are created by the process of genetic
recombination. For the genetic algorithm to work, an evaluation is needed for
the sequence. This evaluation process is performed on the sequence of orders
by the scheduling simulator, which models operation of the plant and creates a
schedule based on the sequence which was passed to it by the genetic algorithm.
As expected the relative order of the elements which make up the schedule se-
quence for this problem is more important than adjacency of the elements. This
means that genetic recombination operators which are good for the TSP (where
adjacency is important) may be poor for sequencing tasks where relative order
(and not adjacency) is critical. Experimentation with the four recombination op-
erators described earlier which emphasize different relationships among the items
in the sequence has yielded results which permit optimization of the sequence of
orders in a matter of minutes on a fast workstation. This is close to real time in
the context of the plant operations, allowing quick rescheduling in the event of
line breakages, shortfalls in production, and other unforeseen circumstances. Re-
sults are reported on schedule optimization for a 24 hour period based on actual
data from the plant. This is shown in figure 9.

5 Local Versus Global Operators


A common traditional search tool used on the TSP is the 2-opt strategy. Using
this method, N(~-l) local operations are performed over a sequence of length
N in a single pass. Unless the sequence we are interested already represents a
146

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

this application is exploited by operators which do not explicitly preserve the


adjacency of items in the sequence.

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.

You might also like