You are on page 1of 5

Jobshop scheduling in a shipyard

Thomas Stidsen1, Lars V. Kragelund2 and Oana Mateescu3


Abstract. Jobshop scheduling is considered a standard problem to
solve by means of Genetic Algorithms (GA) and a number of articles
have been written about this subject [3]. In spite of this, only few applications of GA have been published [2] on real jobshop scheduling
problems. Even though some applications may not be published for
business related reasons, more practical applications seem necessary,
in order to convince engineering and planning people of the use of
GA for jobshop scheduling.
A shipyard is a large and complex organization, including many
employees with many specialized functions, many different workshops differentiated over a large area and all dependent on each other
in complex ways. Because ships are usually built in small series, the
organization needs to be flexible in order to adapt to new needs and
for the planning people the demands are huge. If it is possible to establish efficient tools for jobshop scheduling in such an organization,
for at least parts of the planning, it will be of significant practical
value.

2
3

Department of Computer Science, University of Aarhus, E-mail: stidsen@daimi.aau.dk, WWW: http://www.daimi.aau.dk/ stidsen
Department of Computer Science, University of Aarhus, E-mail:
larsvk@daimi.aau.dk, WWW: http://www.daimi.aau.dk/ larsvk
Department of Computer Science, University of Aarhus, E-mail: savanna@daimi.aau.dk, WWW: http://www.daimi.aau.dk/ savanna

Problem definition

The scheduling task, which is to be performed, is the scheduling plan


for a workshop situated at the shipyard. The setup is explained in the
following subsections.

2.1

The workshop

The actual workshop produces large parts of the ship. These parts are
called blocks and they usually weigh more than 100 tons. The blocks
are all built of steel plates, which are welded together.

10

11 12

Initial stations
Injection gate Handwelder stations
Shipbuilder stations
Robot station

Introduction

This article presents a pilot project (based on a cooperation between


the companies Mrsk Data (MD), Odense Steel Shipyard (OSS)
and the authors) in the use of a GA for jobshop scheduling for one
large workshop situated at the largest shipyard in Denmark, OSS.
The shipyard mainly produces supertankers and containerships and
is currently producing a series of the largest containerships ever built.
Nowadays ships are not produced from scratch in a dry dock.
Instead, a lot of different workshops/assemblylines are used to construct large parts of the ship, which are then transported to the dry
dock and mounted. In this way the production is highly parallel, thus
significantly reducing the time needed to produce a ship. To avoid
waiting for different parts of the ship at the dry dock and to ensure an
efficient use of the resources, good scheduling is paramount. There
are different levels of scheduling, where the top level deals with the
problem of dividing the ship into large parts. Each of these parts are to
be produced at different workshops and then are to be delivered at the
dry dock at a given time. A lower level scheduling is then performed
at each workshop in order to ensure efficient use of the resources and
at the same time to fulfill the requirements of the macro scheduling
plan.
1




c 1996 Stidsen, Kragelund and Mateescu


ECAI 96. 12th European Conference on Artificial Intelligence
Edited by W. Wahlster
Published in 1996 by John Wiley & Sons, Ltd.

Figure 1. The B4-workshop at Odense Steel Shipyard.

The workshop consists of one large assembly line divided into 12


different parts, called stations, which is where the actual production is
performed (figure 1). At the first three stations the large steel plates are
placed on the assembly line. These three stations are not included in
the scheduling plan. At stations 4, 5, 6 and 8 the different parts of the
blocks are mounted and point-welded by workers called shipbuilders.
Station number 7 acts as a gate where new blocks can be injected into
the line; no work is performed at this station. Station number 9 is
a robot station where welding robots perform the welding. At the
three remaining stations, i.e. 10, 11 and 12, welding is done by handwelders. This is necessary, since not all welding can be performed by
robots and because the welding performed by the robots need to be
checked and occasionally repaired by human welders.
Each block to be produced is rolled through the workshop, thereby
getting assembled. It is not possible to roll a block from one station
into an occupied station. To ensure optimal use of the production
facility, it is obviously necessary to limit the number of empty stations.
To grasp these two requirements in the scheduling planning, it is
assumed that all stations roll at the same time. This is obviously very
critical for the scheduling, since a roll can only happen when all the
stations have finished their jobs. Each roll takes a certain amount
of time, where work cannot be performed on the blocks. Since the
blocks seldom occupy the entire space of each station, blocks are
placed together at each station, forming a so called package. In this

way the number of rolls needed to be performed is reduced when


producing a larger number of blocks. A package may hold up to
6 blocks, if this is geometrical possible, meaning that they can be
placed in some way inside the area of the stations. These geometrical
restrictions only apply at the two dimensional horizontal level. It is
important to note that the term package is only used in the planning
to describe a group of blocks, which are rolled together through the
workshop.
Besides the machines and the assemblyline, the workshop also
includes a number of workers. As mentioned earlier there are three
types: shipbuilders, robot-controllers and hand-welders. The workers can work in three different shifts, at different wages. The number
of workers is not fixed, but can be changed for each week, within some
limits i.e. there is a minimum and a maximum number of workers,
which can work at each station.

to be below a certain limit, in order to avoid the men from obstructing


each other.
Further, it should be noted that the scheduling plan should not
reduce the production time of the blocks, but instead reduce the
needed resources, yet deliver the blocks within the limits of the macro
scheduling plan. Notice that all parameters depend upon each other
making the problem epistatic and non-separable.

2.2

The skeleton of the GA is presented in figure 2. This is a so called


steady state GA, where the population is gradually changed through
generation of new individuals, replacing old individuals one by one.
This kind of GA was chosen in order to avoid premature convergence
and to make efficient use of the information supplied by the fitnessfunction. Further, this steady state is possible because we are working with a deterministic fitness-function [1]. The selection pressure
is obtained through three different tournament-selection procedures.
SelectForMutation performs a binary tournament i.e. randomly selecting two different individuals from the population and returning
the fittest. This amounts to a selection pressure equal to a linear
fitness ranking procedure, where the best individual has twice the
probability to be selected, compared to the medium individual and
the worst individual has zero probability. SelectForCrossover selects
at random 4 different individuals from the population, returning the
two fittest for crossover. The selection procedure SelectDead selects
at random 3 different individuals and returns the least fit individual.
This automatically creates an elite of two.
All the remaining functions: Initialize, Evaluate, ReplicateAndMutate and Crossover are domain dependent and will be presented
in the following subsections.

In the following we present the different parts of the GA, which was
constructed to produce the needed scheduling plans.

3.1

Constraints

Because we are working with a real jobshop task, not all scheduling
plans are possible: There are two different kinds of constraints or
limitations in the solution-space:




Geometrical constraints: Each package contains some blocks, which


must stay inside the rectangle defining the stations. The possible
packages are thus restricted.
Time constraints: These are more weak constraints, which are
introduced because the rest of the shipyard is dependent upon
the delivery of the blocks ! Therefore, for each block there is a
starting constraint-date and a finishing constraint-date associated.
These constraints are called weak, because there are no physical
obstacles for breaking the constraints, but a good scheduling plan4,
which breaks these time-constraints, may cost a fortune for other
parts of the shipyard.

Finally it should be noted that naturally all blocks should be produced. This may seem trivial, but some of our genetic operators
actually may violate this "constraint" and the resulting individuals
have to be repaired.

2.3

3.2

The scheduling plan

The macro scheduling plan defines the frame in which the scheduling
plan for the workshop should be designed. For each block and for
each type of work the number of working hours, which is to be
performed, is given. This measure is quite precise. Further, the macro
scheduling plan establishes the time constraint-dates i.e. defines when
the production of a block can be started and should be finished. The
scheduling plan for the workshop should be constructed within these
requirements. The scheduling plan can be viewed as consisting of a
number of parameters, which should be optimized. These parameters
are:








Definition of the packages.


The order in which the packages are to be produced.
The number of men assigned to each station for each week and
each shift.

Constraints

Allow constraint-violating solutions and ensure that the penalty


given through the fitness-function makes those regions of search
space unattractive to the GA.
Forbid constraint-violating solutions and repair chromosomes whenever genetic operators create new individuals, which break the
constraints.

The problem with the time-constraints cannot be easily solved using the forbidding approach, since it is very unclear how one should
change an individual, where one or more blocks break the timeconstraints. On the other hand, the geometrical constraints can be
checked rather simply and the removal of blocks from too big packages constitutes a simple way of repairing these packages. For these
reasons we choose to use the fitness approach on the time-constraints
and forbid packages breaking geometrical constraints.

Good in this perspective means locally good for the workshop, but maybe
bad from a wider perspective.

Section Title

The basic GA

The constraints are a very important part of the problem and the
strategy of how to solve the problem under the given constraints
affects the rest of the algorithm. In general there are two different
methods of using GA on constrained problems:

The last point is the means with which it is possible to change the
capacity of the workshop. The number of men assigned to a station has
4

The Genetic Algorithm

Stidsen, Kragelund and Mateescu

Population P;
Initialize(P);
Evaluate(P);
while (not Finished()) do
if (SelectOperator() = mutation) then
parent := SelectForMutation(P);
child := ReplicateAndMutate(parent);
else
** SelectOperator() = crossover **
(father, mother) := SelectForCrossover(P);
child := Crossover(father, mother);
endif

P4

2
6
7

3
4
9

5
8

1
10

Shift 1: 8
Shift 2: 7
Shift 3: 4

Figure 2. The tournament based steady state Genetic Algorithm

Station 4
Station 5
Station 6
Station 8
Station 9
Station 10
Station 11
Station 12

Workers, week 2

Station 4
Station 5
Station 6
Station 8
Station 9
Station 10
Station 11
Station 12

Shift 1: 6
Shift 2: 4
Shift 3: 0

Figure 3. An individual constituted of 4 packages produced in 2 weeks.

in the population, which do not break the geometrical constraints,


enforces a more intelligent initialization. Further the time-constraints
enforce some order in the blocks such that an initialization, which
creates a loose ordering of the blocks, will narrow down the search
space. Because we do not want to break the time-constraints, the GA
focuses on searching the interesting part of the search space. On the
other hand it is very important to create a diverse population initially,
otherwise the GA is hampered from the start and will just perform
local hillclimbing.
We have constructed an advanced initialization algorithm, but it is
quite complex and we will not discuss it in further detail.

Representation

The choice of representation is very important. The choice affects


most of the other parts of the GA and a bad representation may
seriously harm the mutation operators and crossover operators etc.
Two different things have to be represented in the chromosomes:
The order of the packages to be produced together with the blocks
contained, and the workers to be assigned to the different stations in
the workshop for each week and each shift. There are several different
possibilities, but we have chosen a direct representation. An example
of an individual is shown in figure 3.
The chromosome is divided into two different parts (in figure 3,
upper and lower part). The upper describes the order of the packages
and the blocks, which they contain. Each block is represented in the
package by an integer, which addresses further information about the
block. It should be noted, that each package fulfills the geometrical
constraint. The lower part assigns an amount of workers to each
station and each shift for all weeks in the production period.
This representation facilitates some interesting characteristics:
Packages can be swapped without violation of the geometrical constraints, if they are already satisfied. A crossover made between packages will satisfy the geometrical constraints.
The fact that the rolling times for all the rolls in the workshop are
not represented in the chromosomes, reflects that the fitness-function
is a greedy algorithm, which propagates the packages through the
workshop as quickly as possible, see subsection 3.7. Hence the rolling
times would be redundant information.

3.5

Mutations

The standard argument for mutations is, that they ensure the possibility that all parts of the search space may be visited. To accomplish
this, we have constructed several mutations.
To change the contents of the packages, we have designed the
following mutation types:





Swap packages: This mutation chooses a random point between


two packages and swaps the packages.
Move block: This mutation chooses a random block in a random
package and attempts to move this block to one of the neighboring
packages.
Swap blocks: This mutation chooses two neighboring packages
and attempts to swap a pair of blocks between these, if possible.

To change the worker scheme, we have designed the following


mutation types:

Initialization

Initialization is normally not considered important and for most GAs,


when working with binary chromosomes, these are just initialized at
random. In this jobshop assignment the initialization task is complicated by the constraints. The fact that we want to create individuals
Section Title

P3

Workers, week 1

result := BestOf(P);

3.4

P2

An individual

Evaluate(child);
dead := SelectDead(P);
P[dead] := child;
endwhile

3.3

P1

Block-info, block 1
Block-info, block 2
Block-info, block 3
Block-info, block 4
Block-info, block 5
Block-info, block 6
Block-info, block 7
Block-info, block 8
Block-info, block 9
Block-info, block 10


3

Add men: This mutation chooses a random week, a random station


and a random shift and adds a small random number of men, if
possible.
Remove men: This mutation chooses a random week, a random
station and a random shift and removes a small random number of
men, if possible.
Stidsen, Kragelund and Mateescu

Move men: Chooses two random weeks, two random stations and
two random shifts and moves a random number of men from the
one spot to the other, if possible.

Together, the previously mentioned mutations enable the possibility of reaching all parts of the search space. It might though be
argued, that none of these mutations, except Swap packages, are big
mutations. But several small mutations may accomplish the same effect, and this is possible even if each of the small mutations reduces
the fitness, because we only exert a rather weak selection pressure
on the population. Besides, it is rather easy to enlarge the mutations
and for instance, distribute the size of the mutation according to the
gaussian distribution.
All the previous mutations are so called blind mutations, which
alter the chromosomes with an equal probability on all parts. Because
the problem of fulfilling the time-constraints proved to be quite hard,
we added some special mutations, which increase the probability of
improving the worst parts of the chromosomes.

Split package: This mutation chooses a package, which consists


of blocks, which have very different finishing constraint-dates.
This package is then divided into two more "sensible" packages.
Sensible here means packages, where the finishing constraint-dates
are more alike.
Swap package: This mutation chooses two neighboring packages,
where the latest finishing constraint-dates are ordered in the wrong
way and swaps the two packages.

Crossover

F4

M1

M2

M3

M4

M5

2
6
7

3
4
9

5
8

1
10

6
7

2
3
9

4
5

8
10

F1

F2

F3

F4

M1

M2

M3

M4

M5

2
6
7

3
4
9

5
8

1
10

6
7

2
3
9

4
5

8
10

C1

C2

C3

C4

C5

2
6
7

3
4
9

8
10

1. Check the package just outside the workshop. For each block in
the package, check the starting constraint-dates and check the time
to see whether it is legal5 to start production of this package now.
If it is legal, roll the entire assemblyline and insert the new package
at station 4. If it is not legal, roll the entire assemblyline making
an empty station 4.
2. Given a number of packages in the workshop: For each of the
stations: Station 8, the last shipbuilder station, station 9, the robot
station, and station 12, the last handwelder station, calculate when
these stations with the given crew will have finished their jobs.
The latest of these dates is the next rolling time.
3. Return to 1.
A few things should be noted about this kind of simulation:





Fitness function

In order to achieve good results with the GA it is necessary to give the


GA a fairly accurate measure of the quality of each of the scheduling
plans, i.e. each individual in the population. To achieve this, we
have constructed a fitness-function, which simulates the production
of the blocks, according to a given scheduling plan, in a rather crude
fashion. The idea is quite simple and relates to the fact, that we want
Section Title

F3

to produce as fast as possible with as few men as possible, without


breaking the constraints. For each block, 3 types of work must be
performed: shipbuilder work, robot-controller work and handwelder
work. All of this work has to be performed in the workshop, at the
corresponding stations. Given a legal scheduling, the simulation of
the production is done step by step, as prescribed in the following:

The crossover is needed to ensure transfer of high quality parts of the


chromosome to other individuals. Unfortunately, it is quite difficult
to construct a crossover, which does not create offspring breaking
the constraints. We have chosen to make two different crossover
operators, one-point and two-point, which produce legal offspring,
but at the expense of more packages.
See figure 4, where the one-point crossover, performed on the
package part of the chromosome, is sketched. The danger with this
kind of crossover is, that it may create many new packages, since
the parents disagree on the order/contents of the packages. Hence
the crossover-operation creates new packages to the disputed blocks.
We have tested this on the data and found, that on average for each
crossover-operation, the offspring was expanded with half a package, which should be compared with the fact, that we work with
individuals consisting of 30 to 65 packages.
We have constructed a two-point crossover, which is very similar
to one-point crossover, but we will not describe it in further detail.

3.7

F2

Figure 4. The one point crossover of the package part of the chromosome.

We now have a total of 8 different mutation types, which have


to be selected according to a certain probability compared to the
other genetic operators. We have not attempted to fine tune these
parameters, but an obvious solution would be to use the adaptive
probabilities-technique as suggested in [1], chapter 6.

3.6

F1

All the work is finished, i.e. a sufficient amount of working hours


is assigned to all the blocks.
We do not break any starting constraint-dates.
We do not optimize any "obvious" drawbacks in the scheduling
plan, i.e. we do not perform any local optimization.

When the simulation of a scheduling plan is finished, the quality


of the scheduling plan according to the simulation of it has to be
estimated. In this case the fitness-function consists of three parts:
5

Here legal means that all packages have a fulfilled starting constraint.

Stidsen, Kragelund and Mateescu

1. The entire expenditure associated with the worker wages in the


production period.
2. Penalty terms associated with breaking the finishing constraintdates are added for each block, which has not been completed. We
use the following formula:
F

8blocks:tactual >tconstraint

k1

 k  tactual?tconstraint
e

2 (

as a support for the manual planners. In other words, the GA should


suggest initial plans, which the planners could then refine. The results
show, that the GA is able to create reasonable plans. Hence, there is
a basis for a development of a tool supporting the manual planners.

With this project we hope to have demonstrated, that it is possible to


create an actual working GA, which solves a non-standard problem of
great interest in a shipyard. We have attempted a pragmatic approach,
where we have used a non-standard representation and found, that
this representation do not hinder the GA from acquiring good results,
if the genetic operators are constructed with care. Further we hope
we have demonstrated:

(1)

The constants in equation 1 are assigned the following values:


k1 = 1000, k2 = 1:4. Further tactual is the actual finishing date
and tconstraint is the finishing constraint-date.
3. A penalty term corresponding to the blocks finished before the
finishing constraint-dates:
F

8blocks:tactual tconstraint

 ( constraint ? actual )
t




(2)

In equation 2, k = 500. This last term should model the expenses


associated with the storing of the completed blocks. This mainly
relates to the space these blocks occupy and the rust, which may
harm the finished blocks during the storing time before the block
is needed elsewhere at the shipyard.





Results

To evaluate the algorithm we have performed tests on 7 different


datasets provided by MD. The datasets contain between 45 and 88
blocks. We experimented with populationsizes between 500 individuals and 1500 individuals and performed 5.0 million genetic operations
for each run. Each of these runs took about 12.5 hours on a Silicon
Graphics Indy computer. These tests showed that a populationsize
of 500 yielded a higher degree of convergence, thereby obtaining
better performance. On the other hand, there was a higher risk of
finding sub-optimal solutions. But for all runs, no time-constraints
were violated.
It is not possible to compare the efficiency of the manual planning
for the workshop with the GA planning for the workshop. This is due
to different reasons:




Can a system consisting of a GA be trusted by the people, who


use the system, if they do not understand how the system gets
to solutions ? - Is it necessary to educate the planning people to
understand the GA ?
Will the system arrive to competitive solutions, given the computer
resources and time available ?
Is the system flexible, i.e. can it adjust to new demands like changes
in the workshop, different blocks to be produced etc. ?

These are non-technical considerations, which may seem irrelevant,


but which are of great importance to the users of this system.

ACKNOWLEDGEMENTS
We would like to thank the entire project group at OSS: Helle Jensen
(MD) who initiated this project, Ole Haastrup (MD), Christian Voigt
(MD), Esben T. Horup (OSS) for letting us base a part of this project
on his masters thesis and Claus Risager (OSS) for guidance throughout the project. Finally we want to thank our supervisor Professor
Brian Mayoh for making this project possible.

REFERENCES

We have only access to results for the manual planning concerning


the running-in period6 for the workshop.
Our simulation of the production is quite simple, compared to the
real production. Hence the resource expenditure is theorethical.

[1] L. Davis, Handbook of Genetic Algorithms, Van Nostrand, New York,


1991.
[2] Y. Uckun, S. Bagchi, K. Kawamura and Y. Miyabe, Managing Genetic
Search in Job Shop Scheduling, IEEE Expert, 8(Oct.1993) 15-24.
[3] D. Whitley, T. Starkweather and D. Shaner, The Traveling Salesman
and Sequence Scheduling: Quality Solutions Using Genetic Edge Recombination, Handbook of Genetic Algorithms, chapter 22, Van Nostrand, New York, 1991.

For these reasons, we will not attempt to compare the GA results with
the manual planning.
The aim of this project was not to automate the manual planning.
It was to investigate the possibility of creating a tool, which could act
6

GAs are flexible i.e. they are quite easy to adjust to new problems.
It is possible to implement domain knowledge through special
mutations, without requiring total knowledge about the problem.
It may be needed to create special initializations, in order to reduce
the number of conflicts from the given constraints.
Weak constraints, which cannot be solved by initialization methods
or repair methods, can be solved by the GA by using penalty-terms.

Quite an amount of work has to be performed, before a usable tool


for the planning for the workshop is possible. Whether this is done,
remains yet an open question. A lot of practical questions arise and
have to be evaluated, before such a development is decided:

The exactness of this fitness-function may certainly be debated.


The expenses associated with the workers are probably quite precise,
but the two remaining terms are more dubious, because of the less
concrete nature of these expenses. The rational is, that the expenses
associated with a delayed block may affect a large part of the shipyard,
leading to huge expenses and this should thus be avoided at any cost,
whereas the storing expenses are of a more moderate nature. Finally
it should be noted, that since we are only looking at the relative
fitness values, the absolute values, which may be huge because of the
exponential functions, are irrelevant.

Conclusion and future prospects

The running-in period refers to the time, when the robots were introduced
in the workshop. This introduction caused planning problems, thus making
the workshop inefficient.

Section Title

Stidsen, Kragelund and Mateescu

You might also like