Thesis
Thesis
Publication date:
2012
Citation (APA):
Pacino, D., & Jensen, R. M. (2012). Fast Generation of Container Vessel Stowage Plans: using mixed integer
programming for optimal master planning and constraint based local search for slot planning. IT University of
Copenhagen.
General rights
Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright
owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.
Users may download and print one copy of any publication from the public portal for the purpose of private study or research.
You may not further distribute the material or use it for any profit-making activity or commercial gain
You may freely distribute the URL identifying the publication in the public portal
If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately
and investigate your claim.
IT University of Copenhagen
Ph.D. Thesis
Author: Supervisor:
Dario Pacino Assoc.Prof. Rune Møller Jensen
October 5, 2012
Preface
During my undergraduate studies, I have always been focused on becoming a good
software designer and programmer. During my master studies at the IT-University
of Copenhagen I met Rune Møller Jensen who proposed I do a project within the
shipping domain. Without even realizing it I was thrown into the abyss of research,
which changed my career plans drastically. I wanted to be a researcher. I was very
thankful when the Dansk Maritim Fond granted me a full Ph.D. scholarship at the
IT-University of Copenhagen with Rune Møller Jensen as my supervisor.
The road to the successful conclusion of this Ph.D. project was not smooth. Very
little was known about the details of container stowage. There is no book telling the
whole story. In some way I hope this Ph.D. thesis can cover this knowledge gap for
future researchers. The years of industrial collaboration and the hard work of everyone
involved in this project has contributed to its success.
During my Ph.D. studies I also have had the pleasure of visiting Professor Pascal Van
Hentenryck at Brown University for a period of 5 months. During the visit I worked on
decomposition techniques for scheduling problems. The results of this project are pub-
lished in peer-reviewed venues. I have also had the pleasure to work with my colleagues
from the Decision Optimization Lab, Alberto Delgado and Kevin Tierney, and with
Yuri Malitsky on a machine assignment problem for a competition organized by EURO
(European Conference on Operations Research), for which we have qualified. These
collaborations have undoubtedly contributed to broadening my research prospectives
and finally to the completion of my Ph.D. study.
2
Abstract
3
Acknowledgments
Obtaining a Ph.D. is hardly a task one does alone, and in this regard I would like to
express my thanks to the people that have been helpful and supportive through out my
studies.
First of all, I must thank my wife Heidi and my children Leo, Anna and Luca. The
support and joy that a family can give, is, in my opinion, invaluable to endure the
periods of frustration that can afflict us during research. They have been running along
side with me in the marathon that writing this thesis has been.
I was very lucky to have Rune Møller Jensen as supervisor, and I would like to thank
him for all his constructive comments and for always being excited and supportive of
my research. He not only supported my research, but also made quite an effort to help
me with my future academic career. I regard him as my mentor and most of all as a
friend.
Thanks must also go to Alberto Delgado, Kevin Tierney and all of the Software
Development Group at the IT-University of Copenhagen for all their comments, ad-
vises and for taking me out for beers. I would also like to thank the IT-University of
Copenhagen and all the administrative staff for their support and friendliness.
A special thanks goes to Carsten Melchiors and Den Danske Maritime Fond for
grating fonds for the entire Ph.D. study. Without them this thesis would not exist.
Ange Optimization and Mærsk Line, have also been invaluable to this research and I
thank them for providing all the needed data and for answering countless questions. In
particular I would like to thank Kim Hansen, Nicolas Guilbert, Niels Christensen and
Tom Bebbington.
During my study I have met a number of very interesting people. One in par-
ticular is Professor Pascal Van Hentenryck, whom has been so kind to have me as
visiting researcher at Brown University. I would like to thank him, and all of the fellow
researchers, that I have meet in different scientific conference and meeting, for their
questions, criticism and interest in my research. My thanks must also go to all the
anonymous reviewers of my articles and papers for their hard work.
Last, but not least, I would like to thank the members of the thesis assessment com-
mittee: Stefan Voß, David Pisinger and Thore Husfeldt for all their valuable comments
and dedication.
4
CONTENTS
Contents
1 Introduction 7
1.1 Thesis Question . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.2 Thesis Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3 Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.4 Document Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3 Related Work 25
3.1 Single Model Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.2 Decomposition Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
5 Master Planning 37
5.1 A Model for Master Planning . . . . . . . . . . . . . . . . . . . . . . . 38
5.2 Complexity of the Master Planning Problem . . . . . . . . . . . . . . . 41
5.3 Computational Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.4 An Improved Stability and Stress Model . . . . . . . . . . . . . . . . . 47
5
CONTENTS
6 Slot Planning 59
6.1 The Slot Planning Problem . . . . . . . . . . . . . . . . . . . . . . . . 59
6.2 Constraint-Based Local Search (CBLS) . . . . . . . . . . . . . . . . . . 62
6.3 A CBLS for Slot Planning . . . . . . . . . . . . . . . . . . . . . . . . . 63
6.3.1 Constraint Violations . . . . . . . . . . . . . . . . . . . . . . . . 64
6.3.2 Objective Violations . . . . . . . . . . . . . . . . . . . . . . . . 66
6.3.3 Incremental evaluation . . . . . . . . . . . . . . . . . . . . . . . 66
6.3.4 Placement heuristic . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.3.5 The Search Strategy . . . . . . . . . . . . . . . . . . . . . . . . 70
6.4 Experimental Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 73
6.5 Dealing with Fractional and Infeasible Instances . . . . . . . . . . . . . 75
7 Conclusions 79
7.1 Outlook and Future Directions . . . . . . . . . . . . . . . . . . . . . . . 80
A Complexity Analysis 83
A.1 The k-Shift Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
A.2 UkSP is NP-Complete . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
A.3 Complexity of CkSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
A.4 The Hatch Overstow Problem . . . . . . . . . . . . . . . . . . . . . . . 85
A.5 Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
B Decomposition in Scheduling 89
B.1 Constraint Based Decompositions for Scheduling Problems . . . . . . . 89
B.2 The Flexible Jobshop Problem . . . . . . . . . . . . . . . . . . . . . . . 90
B.3 Prior Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
B.4 A Constraint-Based Scheduling Model . . . . . . . . . . . . . . . . . . 91
B.5 Large Neighborhood Search . . . . . . . . . . . . . . . . . . . . . . . . 91
B.6 Adaptive Randomized Decompositions . . . . . . . . . . . . . . . . . . 93
B.6.1 Time Decomposition . . . . . . . . . . . . . . . . . . . . . . . . 93
B.6.2 Machine Decomposition . . . . . . . . . . . . . . . . . . . . . . 95
B.6.3 Solution Merging . . . . . . . . . . . . . . . . . . . . . . . . . . 96
B.7 Experimental Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 96
B.8 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6
Chapter 1. Introduction
Chapter 1
Introduction
The world economy has always been heavily dependent on the ability of transporting
goods. In the years up to the 1950’s companies were operating mainly in local markets
where the competitive advantage depended on how close to the customers the products
were manufactured. After 1955, with the introduction of containerized shipping, all
this changed. Containers made it possible to transport products across the oceans
with reduced cost and complexity. The world’s economy changed to a global economy,
where Asian manufacturing companies could sell their products to the rest of the world
at lower costs than others, and where supply chains grew larger and more international
(Levinson, 2006).
Liner shipping companies faced this increasing demand by building larger ships,
that nowadays can carry up to 18,000 containers. We also saw the creation of special-
ized harbors that only handle container shipping, easing intermodal transportation and
supporting this new global economy.
Employing larger ships, however, is not enough for shipping companies to respond
to the demand for cheap transportation. The load of containers on a vessel must be
optimized so costs can be reduced. The distribution of containers defines how the
vessel sits in the water, and thus influences its bunker consumption. Moreover, load
and discharge operations at container terminals are costly, ergo reducing the number
of moves and the total time at port is essential to achieving cost reductions.
It is the job of stowage coordinators to ensure that the containers are correctly
stowed in the vessel in a cost efficient way. Stowage coordinators manually produce
a stowage plan 1 . Stowage plans define the exact position of each container within
a vessel and are used by container terminals during load and discharge operations.
Stowage planning is a central component in the liner shipping industry and can be
used in different contexts. For example, it can be used by string managers for the
design of cargo flows in a shipping network, where stowage plans define the possible
container intakes of the vessels given a specific mixture of cargo. In container terminals,
sequencing operations (the decision of which container to be taken from the yard at
1
Stowage plans, container ship stowage plans and container stowage plans will be used interchange-
ably in this thesis.
7
Chapter 1. Introduction
which point in time), are strongly affected by each vessel stowage plan. Integration
of stowage planning into terminal sequencing would improve terminal operations even
more.
Cost-efficient stowage plans, however, are hard to produce in practice. First, they
are made under pressure of time just hours before the vessel calls the port. Second,
large deep-sea vessels often require thousands of container moves in a port. Third,
complex interactions between low-level stacking rules and high-level stress limits and
stability requirements make it difficult to minimize time at port. Finally, robust plans
require stowage coordinators to evaluate the consequences of decisions in down-stream
ports. Information about containers in further ports is, however, scarce and based on
forecasting so several scenarios might need to be generated before a final plan can be
released.
From a research point of view, it is also hard to access information about stowage
planning. Detailed information about vessel designs is necessary in order to produce
correct stability and stress calculations. This data is considered confidential and thus
very hard to access without close collaboration with the industry. Expert knowledge
about stowage planning itself is also very important, but no book written about stowage
planning exists. Knowledge must be extracted from various guides, companies’ internal
documentations and the experience of senior staff.
These barriers did not stop academics from developing an interest in this problem,
and the past decades have seen a growing number of works published in the litera-
ture. Previous work on the stowage planning problem has been innovative on solution
approaches, but has been challenged by the inaccessibility of the problem. This has
lead to limited representative power of the developed models and a lack of benchmark
problems.
“Can container ship stowage plans with high enough quality for practical
usage be computed on standard equipment within the time required by the
work processes of stowage coordinators?”
In order to fully understand this question, it is important to clarify some of the key
aspects the question is built upon. The first of those aspects is “high enough quality.”
Like many other industrial problems, stowage planning is riddled with details, special
cases and solution preferences. This thesis does not aim at generating stowage planning
algorithms that can substitute human stowage coordinators. We believe that both the
research field and the current technology is not ready for such a challenge. This thesis
8
Chapter 1. Introduction
aims at producing stowage plans that can be used by human stowage coordinators as
guidance in the decision making process of generating a final stowage plan. More specif-
ically, automated stowage planning should model all key aspects of stowage planning
such that an automatically generated stowage plan can be used as a reference solution
that can easily be modified into a final plan.
The second important aspect of the thesis’ question is “computed on standard equip-
ment.” Shipping companies have teams of stowage coordinators and it would be un-
reasonable to believe that each coordinator is equipped with a super computer. We
aim at identifying the possibility of answering the thesis question using hardware that
is affordable, but still has high quality properties. The work presented in this thesis is
based on hardware corresponding to 8-12 AMD Opteron processors on a single machine.
The last, and most restrictive aspect or requirement of the thesis question is “within
the time required by the work processes of stowage coordinators.” Stowage coordinators
have a limited number of hours to produce the final stowage plan, however one must
consider that the stochastic nature of the forecasts used during stowage planning forces
coordinators to consider different scenarios. Should an automated stowage planning tool
take too long to produce plans, it would not be possible for the stowage coordinator to
consider all the necessary scenarios. Moreover, it is often the case that in problems as
complex as stowage planning, software only solves an abstraction of the problem and
thus stowage coordinators must also spend time on final adjustments. In accordance
with our industrial collaborators it was estimated that 10 minutes is the maximum
amount of time that a piece of software should take to deliver an answer, if it is to be
used during the everyday planning process.
The thesis attempts to answer the thesis question in a two phase research process.
Initially we analysed the currently available software packages and documentation to
collect all of the necessary knowledge. As questions arose, the expert knowledge of
stowage coordinators was used to fill-in the gaps. With all the collected information
it was possible, with the agreement of our industrial collaborators, to define a set of
stowage planning aspects that any software package should have in order to be consid-
ered representative. With a representative problem at hand, the second phase of the
research project focuses on the design of efficient algorithms for stowage planning. The
10 minutes required by the industry is a relatively short time to solve a complex and
large scale problem such as stowage planning. The literature has shown that monolithic
approaches tend to fail even on small instances (e.g. Ambrosino and Sciomachen (2003);
Giemsch and Jellinghaus (2004); Li et al. (2008)), while multi-phase approaches have
shown promising results, (e.g. Wilson and Roach (1999); Kang and Kim (2002); Am-
brosino et al. (2010)). This thesis, inspired by those last two works, presents a 2-phase
approach to stowage planning that is able to reach phase-wise optimal solutions within
the required time. An initial phase distributes containers into stowage areas along the
vessel while satisfying stability and stress forces and optimizing time at port. A second
phase then assigns specific positions to containers within each of the stowage areas while
satisfying low-level constraints such as stacking rules and robustness requirements. The
positive results obtained also motivated an extension of the current model to include
9
Chapter 1. Introduction
1. Accurate models
The models presented in this thesis are the most accurate models published in
the literature available. The master planning models include key aspects about
stress forces and vessel stability that have not yet been presented in the literature.
Solution objectives that guide the search toward robust stowage plans are also a
novel part of this thesis’ work.
3. Fast approach
The models and algorithms presented in this thesis are the fastest among those
taking into account similar stowage planning aspects.
4. Many instances
This thesis presents the first results that are based on a large set of industrial
benchmark instances. The instances are generated from stowage problems that
have sailed and thus are highly representative.
It should be noted that only three Ph.D. thesis have been published on the con-
tainer stowage problem: Aslidis (1989), Wilson (1997), and Kaisar (1999). The last
has, however, no related publications. Besides the above contributions, as part of the
collaboration with Professor Pascal Van Hentenryck, a number of contributions have
been made in the field of constraint based scheduling:
1. First Decoupling Analysis Of Flexible Jobshop Scheduling
To the best of our knowledge this thesis presents the first application of decoupling
techniques to scheduling problems.
1.3 Publications
• Pacino, D. and R. M. Jensen (2012).Constraint-based local search for con-
tainer stowage slot planning. In Proceedings of the International MultiCon-
ference of Engineers and Computer Scientists, pp. 1467-1472.
10
Chapter 1. Introduction
Chapter 3 Related Work. This chapter gives, to the best of our knowledge, a com-
plete review of all the academic work on the container stowage problem.
11
Chapter 1. Introduction
Chapter 5 Master Planning. This chapter describes the first phase of the Quad
approach to container stowage planning. In particular it introduces a Mixed
Integer Programming (MIP) model that can solve the master planning phase
and provides evidence of its efficiency. Later in the chapter, a refinement of the
model that focuses on achieving high precision for the stability calculations, is
also presented.
This chapter is based on the papers of Pacino et al. (2011), Pacino et al. (2012b),
and Pacino et al. (2012a). Note that the defendant has made significant contri-
butions to these papers and the implementation methods.
Chapter 6 Slot Planning. This chapter presents a detailed description of the CBLS
algorithm used to solve the slot planning problem in the second phase of the Quad
framework. The neighborhood, heuristics, and incremental calculations used in
the algorithm are described in detail together with the experimental results that
show evidence of the solution method’s efficiency.
This chapter is based on papers by Pacino and Jensen (2009), Pacino and Jensen
(2010) and Pacino and Jensen (2012). The defendant is responsible for the im-
plementation of the methods and is the main contributor to the papers.
Chapter 7 Conclusions. This chapter ends the thesis with the presentation of con-
cluding remarks and giving an outlook of future work and possible research di-
rections.
12
Chapter 2. Container Stowage Planning
Chapter 2
Seaborne shipping is nowadays the most used shipping mode. In general there are three
main seaborne shipping modes: industrial, tramp and liner. In industrial shipping it
is the owner of the cargo that owns the fleet and focuses on the minimization of cargo
transports costs. Tramp ships are operated like taxis, transporting available cargo to
destinations. It is often the case that such shipping companies have contractual com-
mitments with cargo companies. In liner shipping, vessels are assigned a route (or
string) and follow a specific schedule. Liner shipping is the preferred mode for con-
tainerized transportation and it is the assumed transportation mode in the remainder
of this thesis.
Containerization is the transportation of cargo into metallic boxes called containers.
Containers are transported by container vessels, which are ships specially designed for
the transportation of containers. Such vessels can carry thousands of containers with
a small crew. In general we will talk about 20’ and 40’ long containers and refer to
the space occupied by a 20’ container as a Twenty-foot Equivalent Unit (TEU). This
means that a 40’ container is equivalent to two TEUs.
1
Inspired by Steenken et al. (2004)
13
Chapter 2. Container Stowage Planning
are stored in long rows of container stacks accessible by gantry-cranes. Some stacks are
reserved for containers with special requirements, such as containers requiring electri-
cal power or containers carrying dangerous goods. Figure 2.1 shows an example of a
terminal layout.
Berths, in the quayside, are equipped with quay cranes that can lift containers to
and from a container vessel. Most of today’s quay cranes can twin-lift, meaning that
they can lift two 20’ containers or one 40’ container in one single lift. Quay cranes
have an average operational performance of 30-37 lifts per hour. Notice, however, that
a twin-lift takes a little longer (about 25 lifts per hour), than a single lift of a 40’
container, (about 32 lifts per hour). The lifting operation for hatch-covers (metallic
structures dividing the ship into on and below-deck parts), takes a longer time than
that of a container since the spreader (the hooking equipment of a crane), is harder
to align on a hatch than it is on a container. Most quay cranes run on rails that are
parallel to the vessel, and thus their movements are restricted by the adjacent cranes.
Some cranes have wheels and can move independently from each other. Quay cranes
must also respect security distances, and, depending on the operation to be performed,
they must be separated by 40, 60 or even 80 feet. A crane set is the operation of moving
a crane from its current position to another. It can take up to 2 minutes to move a
crane to an adjacent storage area along the vessel. Should a crane be moved across the
pilot house, it would be necessary to lift the crane arm. Such an operation can take up
to 25 minutes.
Given a vessel with a distribution of moves on its storage areas, a crane split is a
partitioning of the work areas to each of the cranes assigned to the vessel such that
the workload of each partition is close to equal. A good crane split will minimize the
14
Chapter 2. Container Stowage Planning
makespan of the load and discharge operations and thus minimize the time at port. An
example crane split of 4 cranes for a vessel with 15 storage areas is shown in Figure 2.2.
It is important to discuss crane productivity since a vessel not only has to pay a fee
for each move (load or discharge operation), but also for the team operating the cranes
and the cost of the vehicles feeding the cranes. The total move cost is thus linear in the
number of cranes utilized. The move cost, however, is often outweighed by the need for
reducing the time at port.
15
Chapter 2. Container Stowage Planning
9.6'
8.6'
45.0' 40.0'
8.0'
20.0'
8.0'
8.0'
stuffs, cereals and spices are also often transported in bulk containers where cargo can
be loaded through three hatches on the top. Cargo with non-standard dimensions, such
as overweight or tall cargo, is transported in Out-Of-Gauge (OOG) containers. Within
this category we find hard-top containers with a removable roof, open-top containers
without a roof, flatrack containers with only two end-walls that can be collapsed, and
platforms for heavy and oversized cargo.
In order to better fit Euro-pallets, pallet-wide containers use the 2 inch (ca. 5 cm),
space between container stacks to enlarge their capacity. Based on the stacking rules
that those containers follow, they are divided into three categories: PW0 which do not
need any special stacking rules, PW3 which can be stacked side by side but require a
standard container every two PW3s, and PW6 which cannot be stacked side by side.
Figure 2.4 shows two valid stacking configurations including a PW6 container. Notice
how the stacking rules involve more containers as palletwides are mixed with high-cubes.
PW6
PW6
HQ
(a) (b)
Figure 2.4: Valid palletwide container stowage, (a) without high-cubes (b) with high-cubes
Another classification of containers that require special stacking rules are the IMO
containers. All containers transporting hazardous materials fall under this category.
IMO containers are further classified by the numbers 1-4 depending on the level of
16
Chapter 2. Container Stowage Planning
risk. Containers in the IMO-1 group do not have any specific requirements. A one
container separation is required between IMO-2 containers. IMO-3 and IMO-4 require
more complex separation patterns, (see IMO (2010)). Most vessels have special storage
areas for IMO containers, often towards the bow below-deck.
Feeders with a capacity of 1,000 - 2,800 TEUs are usually employed to feed very large
vessels or service markets that are too small for larger vessels
Panamax with a capacity of 2,800 - 5,100 TEUs are vessels that can sail through the
existing Panama Canal
Post-Panamax with a capacity of 5,100 - 10,000 TEUs are vessels that exceed the
current Panama Canal beam
New Panamax with a capacity of 12,000 - 14,500 TEUs are vessels that exceed the
current Panama Canal beam, but will be able to sail through the new lane and
lock chambers that will be fully operative in the canal by 2015
ULCV Ultra Large Container Vessels (ULCVs) have a capacity ≥ 14,500 TEUs and
are already larger than the new Panama Canal beam (MAN Diesel & Turbo,
2008).
The layout of a container vessel is shown in Figure 2.5. The figure shows how
containers are arranged into storage areas called bays (or holds), throughout the entire
vessel length. Each bay is composed of a number of container stacks, and since load
and discharge operations only happen from the top, it is only the top container in a
stack that can be accessed at any point in time. A vertical position in a container stack
is called a cell and usually has a capacity of two TEUs, meaning that we can either
stow two 20’ containers or one 40’ (or 45’), container. Each TEU position within a cell
is referred to as a slot. Slots toward the bow of the vessel are called Fore slots and
those towards the stern are called Aft slots. In general there is a distinction between
on-deck and below-deck areas of a bay. The below-deck areas are closed by hatch-covers
(or hatch-lids), which are tight metallic structures that prevent water from coming in.
17
Chapter 2. Container Stowage Planning
47−49 43−45 39−41 35−37 31−33 27−29 23−25 19−21 15−17 11−13 7−9 3−5 1
(50) (44) (40) (36) (32) (28) (24) (20) (16) (12) (8) (4)
Line of sight
Containers below-deck can only be accessed once all containers on top of the hatch-cover
and the hatch itself are removed.
Figure 2.6 shows a graphical representation of a bay layout. In the figure it is
possible to see how the hatch-cover divides the on-deck and below-deck containers,
and also shows the standard indexing system used by the industry, where stacks are
enumerated from the middle out and tiers (vertical indexes), start from the bottom
and distinguish on-deck from below deck by starting at 82 (in most cases), after the
hatch-cover. The illustration also shows how, due to high-cubes, containers can be out
of sync with the tier indexing. As previously mentioned this can be problematic, for
example, in correlation with the stowage of pallet-wide containers.
2
Inspired by Tupper (2009)
18
Chapter 2. Container Stowage Planning
The perpendicular toward the stern is the aft perpendicular (AP ) and the one toward
the bow is the fore perpendicular (FP ). Vessels with a non zero trim angle distinguish
between the two drafts at the perpendiculars, namely the aft draft and the fore draft.
The difference between these two drafts is called trim. Each vessel has specific limits
within which the trim must be in order for the vessel to be seaworthy. Notice that some
vessels prefer non-zero trim values, which make it possible to achieve better propulsion
efficiency. In order to make sure that the propeller is sufficiently immersed, a minimum
aft draft is often required. Draft values are not only important during the initial
stability calculations but also during the sailing period. The route the vessel sails and
the ports and canals it will visit, present restrictions to the maximum draft of the vessel.
These requirements must be satisfied in order for the vessel to avoid the risk of running
aground.
When a vessel’s floating equilibrium is disrupted by an external force, the tendency
of the vessel of returning to its original position once this force is lifted is called vessel
stability. Vessel initial stability is calculated when the vessel floats in still waters and
can be affected by small external forces. Consider Figure 2.8, where a transversal section
of a container vessel is shown. The figure shows the center of gravity of the vessel G,
and the center of buoyancy B1 . The center of buoyancy is the center of gravity of the
volume of water displaced by the vessel. When an external force is applied, assuming
19
Chapter 2. Container Stowage Planning
FP
AP
Trim angle
W2 Trim δ
Draft Fore
W1 Draft Aft
Figure 2.7: Longitudinal section of a vessel showing trim, draft and waterlines
constant displacement and no free weights, it is safe to assume that the rotation will not
affect the center of gravity, which thus remains constant. The center of buoyancy, on
the other hand, changes as the underwater volume changes its form. The gray wedges
between the original waterline W1 and the waterline after the inclination W2 represent
the movement of the volume of water displaced by the vessel. The center of buoyancy
of the vessel thus changes to B2 . For small heeling angles (θ), it is safe to assume that
the volume of the wedges will grow linearly with θ. The metacenter of the vessel is
the intersection M between the center line going through G and the center line going
through B2 , and for small angles can be considered a fixed point. Once the external
force inclining the vessel is removed an equal and opposite force δ will bring the vessel
back to its original position. The perpendicular from G to B1 M is called the righting
level (z), thus the moment with which the vessel rolls back to is original position is
Mr = δz = δGM sin θ, where GM is called the metacentric height. Vessels have a
minimum required GM before they can be considered stable. The larger the GM the
more stable the vessel is. Too large values might, however, result in too “stiff”a vessel.
The weight distribution on a container vessel does not only affect its stability; The
forces at play on a vessel stress its physical structure and must be kept within the vessel’s
structural limits. The most basic structural stresses are those regarding the weight of
the container stacks, which must not exceed the maximum capacities. Nowadays ships
are designed to be light in order to reduce bunker consumption. It is thus important to
take structural weight limitations into account. Two weight limits exist for each stack,
one regarding the outer container supports and one regarding the inner supports. Limits
on the inner supports are often the most stringent as the vessel structure in the middle
of a stack is weaker. The inner supports are used only when 20’ containers are stowed.
When 20’ and 40’ containers are mixed in the same stack, only half of the 20’ weight is
considered to be supported by the outer supports, since the other half sits on the inner
supports.
Other structural stresses come from the distribution of the upward and downward
forces that act on the vessel. When a body floats in still water, it experiences two
acting forces: a downward force due to gravity (the weight), and an equal and opposite
(upward), force due to hydrostatic pressure. The upward force is the buoyancy and
its magnitude is equal to the mass of water displaced by the object. This is also true
for container vessels. Even though the total weight and buoyancy forces are equal, the
20
Chapter 2. Container Stowage Planning
metacentric height
δ
W1 z
G
W2
θ
B1 B2
shape of the hull and the uneven distribution of weight results in an uneven distribution
of forces along the vessel which stresses its structure. Each vessel has a fixed set of
calculation points called frames for which stress limits are known. Consider Figure 2.9.
It shows a longitudinal section of a container vessel with 14 frames. The W curve
represents the weight distribution along the vessel and the O curve is the corresponding
buoyancy. For each of the sections between each frame, the arrows denote the resulting
forces acting on each section. Should each one of these sections be allowed to freely
move, sections with a stronger downward force will sink more into the water while the
opposite would be true for those with stronger upward forces. Since the sections are
not allowed to move, they cause shearing and bending stresses over the vessel structure.
The shear force on a vessel, at a specific frame, is the integral of the forces on either
side of the frame. Similarly, the bending moment at each frame is the integral of the
moments on either side of the frame; another way of seeing this is using the load curve,
which shows the resulting force per length unit where moment is defined as force times
distance. Shear force is then the area under the load curve, from either the bow or the
stern to the frame of calculation. Shear force is shown in Figure 2.9 as the curve S.
The image also shows the bending curve B for the bending moment of the vessel, which
can also be computed as the area under the shear force curve S.
Modern container vessels are equipped with ballast tanks. These tanks can be used
to load water, and thus distribute extra weight along the vessel to, for example, im-
prove vessel stability or adjust weight distribution to reduce stress forces. Automatic
pumps can move water between the tanks, which is particularly useful during load and
discharge operations.
21
Chapter 2. Container Stowage Planning
O
W
1 2 3 4 5 6 7 8 9 10 11 12 13 14
22
Chapter 2. Container Stowage Planning
Container stowage on-deck has the same basic stacking restrictions as in stowage
below-deck. It is, however, uncommon to have Russian stacks, stacks of mixed 20’
and 40’ containers, on-deck. Container stacks on-deck are not supported by the vessel
structure as the ones below-deck, thus containers must be secured in a different way.
The stacking cones used below-deck are replaced by twist-locks, which similar to cones,
fit into the corner castings, but that can lock containers between each other when the
cone heads are twisted. Nowadays it is common to use automatic twist-locks which
release the containers automatically once a crane lifts them. The first two tiers of
containers are secured using lashing-rods. The use of lashing-rods presents, however,
a restriction on the positioning of 20’ containers. Ship personnel must be able to
reach in between two 20’ containers in order to tighten the lashing rods. Should a
40’ container be stowed in the path of 20’ containers it would not be possible to lash
those last containers. All containers above the second tier, that cannot be lashed, are
only supported by the twist-locks. For that reason, stacks on-deck with more than two
tiers must have at most a tier difference of one in order to support each other. Some
vessels are equipped with a lashing bridge (see Figure 2.5), a metallic structure similar
to the one found below-deck. Containers within the lashing bridge are firmly secured,
and the bridge gives the possibility of lashing the next two tiers on top of it. In that
way, it allows much higher and secure stacking of containers. If a lashing bridge is
present, it must be noted that long containers such as 45’ containers are only allowed
above the bridge. It is not allowed, even though physically possible, to stow 40’ on top
of 45’ containers since the 40’ cannot be lashed. The rolling moment of a vessel also
influences the way containers should be stacked on-deck in terms of security. Vessels
having a short rolling period, and thus a large GM (see Section 2.4 for the definition of
GM ) experience strong forces on the top tiers. For that reason, it is preferable to have
light containers at the top of a stack and heavy at the bottom. If heavy containers are
at the top, the resulting forces might collapse the entire stack. High container stacks
cannot be freely stowed on-deck due to wind forces. Shipping companies have different
wind-stacking rules. An example of such a rule is to not allow stacks to be more than
one tier higher than the ones supporting them on the side. The height that container
stacks can reach is also governed by the line-of-sight of the pilot house. The line-of-site
is a fictitious line from the pilot house to the sea at a distance equal to double the length
of the vessel, or 500 meters, which ever is smallest. Containers are not allowed above
this line or they will obstruct visibility, an example of which can be seen in Figure 2.5.
23
Chapter 2. Container Stowage Planning
at port. It was already shown in Section 2.1 how the distribution of moves on each of
the vessel’s bays has a direct impact on the crane-split and thus the total time that
terminal operations will take. Another, and very important, factor to the minimization
of time at port, is overstowage. Consider container a to be discharged in an arbitrary
port, and container b to be discharged at a later port. Once the vessel reaches the
port of discharge of container a, if container b is stowed on top of container a, b will
need to be discharged so that container a can be reached. Container b will then have
to be loaded again into the vessel to continue to its port of destination. Container b
is said to overstow container a and the extra moves caused by this overstowage are
called shifts. There also exists a more costly kind of overstowage, one that involves
hatch-covers. Consider again container a, but this time assume it is stowed below-deck.
Once container a has to be discharged, all the containers over the hatch-cover, that do
not have the same discharge port as a, will be overstowing a independently of which
stack they are stowed in since it is necessary to remove the hatch-cover. All these
containers will result in shifts. Clearly, stowing containers with a later discharge port
first will reduce this problem. However, such stowage would result in a horizontal layer
distribution of discharge ports which could have a disastrous impact on the stowage
plans at later ports. It is for this reason, that stowage coordinators must take future
ports into account when decisions about the stowage plans are taken. Normally stowage
coordinators have about six hours to produce a stowage plan. The information at their
disposal is: a loadlist containing information (weight, size and discharge port), about
the containers to be loaded on the vessel, a release containing the same information
about the containers already onboard the vessel, a forecast, based on historical data,
giving information about the containers to be expected in down stream ports, and port
data about the string, such as the number of assigned cranes and port depths. In
order to help stowage coordinators produce valid plans, they are often given access to
specialized software that can, in real time, calculate and give feed back on the state
of a vessel given a specific stowage plan. Stowage planning then becomes a complex
puzzle governed by expert guidelines, experience and the trial and error feed back of the
currently available software packages. One of the most successful stowage guidelines is
block stowage. When block stowing, stowage coordinators attempt to assign discharge
ports to sections of bays to minimize crane workloads and overstowage at current and
future ports. The containers in the loadlist are then loaded within those blocks if
possible. Stowage coordinators also use a number of rules-of-thumb that allow them to
produce robust plans, such as making sure that reefer plugs are correctly utilized such
that they can be available when containers have to be stowed in future ports.
24
Chapter 3. Related Work
Chapter 3
Related Work
Previous academic work is rich with innovative solution approaches, but has been chal-
lenged by the inaccessibility of the problem. This has led to limited representative
power of the developed models and a lack of test instances. The work can be clustered
into two main groups: approaches based on a single model of the entire problem and
approaches based on a decomposition of the problem into several optimization models.
Between the methods aiming at optimality, the latter approaches are the most success-
ful, however, most of the work in the literature focuses on heuristic approaches using a
single model. To the best of the author’s knowledge, this chapter presents a complete
review of the academic work for the container stowage problem.
Within the realm of single model optimization, mathematical modeling has been applied
by Ambrosino et al. (2004) and Li et al. (2008). Ambrosino et al. (2004) use a 0-1
Integer Programming (IP) formulation that considers 20’ and 40’ containers within
three weight classes. The model indirectly deals with lashing and GM constraints by
forcing containers to be ordered descending by weight from the bottom to the top in
stacks. Containers with special requirements, such as reefers, are not modelled and
overstowage is modelled as a constraint rather than an objetive. The goal of the model
is to minimize time at port. Using a preprocessing procedure, the proposed IP model
can solve stowage instances for a single vessel of 188 TEUs within 33 minutes on a
PC Pentium II. The model, however, only considers the current port. Li et al. (2008)
also propose a 0-1 IP model, but take a multi-port scenario into account. Similar
to Ambrosino et al. (2004) only standard 20’ and 40’ containers are modelled. This
work, however, does not consider weight limitations but does represent overstowage as
an objective. The authors claim to solve randomly generated problem instances for a
single vessel of 800 TEUs but present no details of the runtime results.
25
Chapter 3. Related Work
Placement Heuristics
Pure placement heuristics have been explored by Avriel et al. (1998) and Yoke et al.
(2009). Avriel et al. (1998) presented the Suspensory Heuristic Procedure, which is re-
stricted to a single bay vessel and solves the stowage problem of a single size container
without taking into account the stability of the vessel. The heuristic is aimed at mini-
mizing overstowage in a multi-port problem where only loading is allowed. Randomly
generated problem instances with vessels of up to 1,700 TEUs can be solved within 30
seconds. In the same paper, the authors also present an IP model that can solve this
problem to optimality for very small instances. Yoke et al. (2009) proposes a placement
heuristic based on the work practice of stowage coordinators. Containers are initially
grouped by discharge port, length, and type of special requirements. The vessel is
then partitioned in so called blocks to which discharge ports are assigned. After this,
containers are stowed into each group using heuristic rules. These rules minimize over-
stowage but do not embed stability considerations. The authors show evidence that
one problem instance for a single vessel of 5,000 TEUs can be stowed efficiently. The
feasibility of the plan is, however, not guaranteed. Some improvements to the heuristic
rules are presented by Fan et al. (2010) in order to take stability into account.
26
Chapter 3. Related Work
in a second stage. The second stage uses a swap neighborhood limited to containers
with the same discharge port to solve the stability as a multi-objective problem. For
the vessel of 5,000 TEUs examined by the authors, 10 non-dominant solutions can be
found within 2,600 seconds.
Genetic Algorithms
Dubrovsky et al. (2002) propose a compact encoding of a container stowage problem
similar to that described by Avriel et al. (1998). In this encoding, a single bay ves-
sel can be stowed with one size of container. Stability and container weights are not
taken into consideration. The solution process does, however, heuristically handle trim
requirements. Random problem instances, with vessels of 500 and 1,000 TEUs, have
been solved for 10 ports in 30 minutes. Another work that makes use of genetic algo-
rithms is that of Imai et al. (2006) where container stowage and terminal sequencing
are combined. Sequencing is introduced by modelLing the transportation time needed
for each container to be retrieved from the yard. Plans are only produced for the holds
and overstowage is modeled as a constraint. Stability is taken into account as well as
GM , trim, and heel angles. The algorithm, however, takes over 1 hour to generate
plans for random problem instances of vessels in the range of 500-2,000 TEUs.
Constraint Programming
The use of Constraint Programming (CP) for container stowage was introduced by Am-
brosino and Sciomachen (1998). In this work, a single bay vessel loading 350 containers
is modelled. The approach takes 20’, 40’, and IMO containers into account, and has
a heuristic handling of the stability constraints. The CP model is optimized within a
branch & bound framework where overstowage and intake are optimized. The model
27
Chapter 3. Related Work
also considers the use of Roll-On Roll-Off vessels. The authors claim to solve prob-
lem instances within 10 minutes, but no evidence is presented. Later, Delgado et al.
(2009) presented a different CP model which takes into account most of the stacking
constraints for vessel holds, but disregards IMO restrictions and stability. A detailed
description of the model and its improvements, such as symmetry breaking, channel-
ing constraints and partial evaluations are presented. An extension of this work was
later published (Delgado et al., 2012) where an in-depth comparison with an IP model
is shown. The approach can solve industrial problem instances of 100 TEUs vessel
partitions to optimality within 1 second, (in most cases). It must be noted that this
model solves the slot planning problem of the decomposition described in this thesis,
thus stability is assumed to be handled during the master planning phase. This is also
the approach used to generate the optimal solutions for the evaluation of the CBLS
algorithm presented in this thesis.
Simulation
Simulation in stowage planning is found in one of the earliest (Shields, 1984) and one
of the latest (Azevedo et al., 2012) contributions. Shields (1984) uses a Monte Carlo
model with the aim of handling the uncertainty of cargo in the loadlists. For each port,
container groups are loaded into the vessel using heuristic guidelines that try to prune
slots where the analysed containers cannot be stowed and thus aim to find bays that
can stow the entire group. Penalty functions are used to rank solutions and the three
best ones are selected for each port. An overall best solution between all ports is then
selected. No performance results were published. Azevedo et al. (2012) uses simulation
in a similar fashion, however, stochasticity is not taken into account. Azevedo et al.
(2012) proposes a solution search based on the selection of the loading and unloading
rules applied by stowage coordinators. The idea is to decide which overall rules to use,
and simulate them in order to generate a plan. The decision tree is then traversed
using beam search in order to reduce the search space. Stability and standard one
size containers (with unitary weight) are taken into account. The model optimizes
overstowage and stability with a runtime between 400 and 18,000 seconds for a 1,500
TEU vessel.
Other Approaches
Giemsch and Jellinghaus (2004) present an alternative approach to the uncapacitated
single bay problem, where a 2-step heuristic stows containers by their discharge ports
into stacks. The remaining containers, those for which a stack that does not force re-
handles cannot be found, are assigned to slots using a branch & bound search. The
authors claim to achieve better results than the Suspensory Heuristic Procedure by
Avriel et al. (1998), but no detailed results have been published. The same problem
is solved by Yanbin et al. (2008) using a multi-agent system, which, however, only
achieves results comparable to those of the Suspensory Heuristic Procedure. Nugroho
28
Chapter 3. Related Work
(2004) presents a very different approach, a case-based system. The idea is to find a
stowage plan similar to the one in question within a knowledge base. The database
of cases will then grow and be more accurate the more stowage plans are solved. No
sufficient experimental evaluation of the idea is presented.
29
Chapter 3. Related Work
assignment algorithm in order to find improving solutions. The approach can solve
randomly generated problem instances for 4,000 TEU vessels using three weight classes
for the containers in 640 seconds, while planning for eight ports.
A different decomposition approach is proposed by Ambrosino et al. (2006) that is
based, however, on the assumption that overstowage is a hard constraint in the model.
The authors present a 3-phase decomposition. In the first phase, containers are grouped
according to their discharge port and are distributed among the bays (which are devoted
to one discharge port) taking into account capacities. For each defined partition of the
vessel, an IP model is solved that assigns containers to specific slots. Once all partitions
are solved, a local search uses a swap neighborhood to improve the stability of the vessel.
The approach generates stowage plans for a single port, and with a vessel of 198 TEUs,
it runs in 3.5 minutes and finds solutions with a one percent optimality gap compared
to the IP model of Ambrosino et al. (2004). Later, the authors propose a modification
of the decomposition (Ambrosino et al., 2009) where a new IP model for the solution
of the single destination partitions is presented and the simple local search is changed
to a tabu search. The new modifications allow the decomposition to scale up to a 2,124
TEUs vessel with a runtime of 74.7 seconds. Further research on the decomposition
model was presented by Ambrosino et al. (2010), where a constructive heuristic was
developed and used after the initial bay assignment. The heuristic is based on Ant
Colony Optimization where the first decision is the assignment of containers to stacks
and the successive decision is the assignment of containers to slots. The found solution
is then improved using local search. The ant system is updated (pheromone update)
and a solution is returned once the ants start converging. The new heuristic was shown
to solve problem instances for a 5,632 TEU vessel in 139.4 seconds. Multi-port solutions
and overstowage have not yet been modeled.
Gumus et al. (2008) presents a multistage decomposition, where containers are
grouped into types. In the first stage, fractions of bay capacities are assigned to specific
discharge ports. The assignment is then refined at the tier level such that hatch covers
can be taken into account. Then, further refinement is made at the slot level. The
fourth, and last, stage assigns containers to the slots according to the assigned port
of discharge and uses a heuristic to handle vessel stability. Aside from the first stage,
solved with a mixed-integer program, the authors do not provide details of the other
stages. The decomposition is claimed to scale to large instances but no evidence has
been presented.
30
Chapter 4. Representative Problem and Algorithmic Framework
Chapter 4
Chapter 2 gave an in-depth overview of all the details and constraints that surround
the container stowage problem. From a research point of view, it would be unpractical
to study models of the problem that include all those details. Instead we propose to
study a representative problem. This problem should include all the core computational
components of the container stowage problem, and, at the same time, be detailed enough
for the industry to be able to evaluate the value of the obtained results.
31
Chapter 4. Representative Problem and Algorithmic Framework
handled by the stowage coordinator and thus simply resulting in a capacity reduction.
The same can be said about IMO containers since vessels often have dedicated bays
for those containers towards the bow. One could easily imagine models where IMOs
are forced to be stowed on such bays and where the final decision of their positioning
is left to the stowage coordinators. Reefer containers are more common, and represent
an everyday challenge for stowage coordinators. Due to the fact that vessels have a
limited number of reefer plugs, the positioning of those containers can greatly influence
a stowage plan. For this reason a representative stowage problem should include reefer
containers. It is debatable whether high-cube containers should be included into a
representative problem. It is true that the extra height of those containers might lead
to a reduction in the capacity of a vessel, but at the same time from a computational
stand point they can be seen as extra capacity constraints, and thus redundant from a
computational perspective.
32
Chapter 4. Representative Problem and Algorithmic Framework
solving the problem. To give an example, due to the shape of the vessel it can be
hard to handle bending moments as there is not enough capacity at the extremities of
the vessel. A solution to a container stowage problem that disregards bending might
require the stowage coordinator to change its container distribution such that less weight
is assigned at the vessel’s extremities. With regard to stress forces and ship stability,
ballast water can have a significant impact as well. Since the release of ballast water can
have significant environmental impacts, it is debatable whether the amount of water
in the tanks will change drastically within a stowage planning horizon. Nevertheless,
a representative stowage planning problem should at least take the weight distribution
of the water into account.
33
Chapter 4. Representative Problem and Algorithmic Framework
Definition 1. Given a vessel profile that includes hydrostatic data, capacity and layout
of bays, and given data about the ports in the planned route including a loadlist of
containers at the current port and a forecast for the containers in the down-stream
ports, generate a stowage plan for the containers in the loadlist such that:
The generated stowage plans should then minimize overstowage, hatch overstowage, and
maximize crane utilization.
34
Chapter 4. Representative Problem and Algorithmic Framework
which is the port we want to generate the stowage plan for. This output becomes
the input of slot planning. The Quad framework assumes that the way locations are
defined in the vessel is such that changes in how the containers are distributed within a
location does not affect the stability calculations significantly. In other words, as long
as the distribution of container groups between the locations is maintained, stability
and stress calculations can be discarded during slot planning. Slot planning thus only
handles stacking constraints while deciding the slot assignment of each container in the
container groups associated with each location. The assignment of containers, during
slot planning, is optimized with respect to overstowage within each location. The
generated output is a complete stowage plan for the current port.
The Quad framework is aimed at capturing the strict time requirement imposed by
the industry. It does so by first attempting to solve each of the decomposition problems
using exact methods, and then resorts to heuristic search should the method of choice
fail to find solutions in time. Figure 4.1 shows a graphic representation of the Quad
framework, where the dotted arrows show the possible ways that exact and heuristic
methods can interact within the framework.
Method
Exact Heuristic
loadlist
Slot Planning Master Planning
forecast
port data
vessel profile
MIP
Phase
current port
master plan
current port
stowage plan
Using an arrow with a solid line, the figure also shows the current state of the
implemented Quad framework. Master planning is successfully implemented as a mixed-
integer problem, the details of which are described in Section 5. Slot planning has been
implemented using different solution approaches. Exact methods have been explored
by Delgado et al. (2009) where CP was shown to outperform both an IP model and a
column generation approach. The heuristic search has been implemented using CBLS,
the details of which are presented in Section 6. Once a solution to master planning is
found, the current implementation uses the CP model to solve a slot planning problem
35
Chapter 4. Representative Problem and Algorithmic Framework
for each location. The CBLS model is used in all the cases where the CP model fails
to find solutions. The mixed-integer programming model for master planning and the
CBLS model for slot planning are part of the work behind this thesis.
36
Chapter 5. Master Planning
Chapter 5
Master Planning
The master planning problem has turned out to be the computationally most challeng-
ing part of the employed decomposition. It is in this phase that the general distribution
of containers is decided. During master planning, high level constraints such as stability
and stresses are handled. A good approximation of the stability and stress calculations
can be obtained by only considering the weight of the cargo in each vessel location.
Thus, the exact position of the containers is not important in this phase. Master
planning takes into consideration all the ports in the planned route and for each port
optimizes hatch-overstowage and crane utilization. The following sections will present
first an efficient master planning model that can be used to solve industrial strength
master plans and subsequently a refined model for the stability and stress calculations
with an analysis of its accuracy.
Before describing the master planning problem it is important to have a better
understanding of what locations are. Figure 5.1 depicts how locations are distributed
in bays. Locations are either on-deck or below-deck, and coincide with the position of
Bay Symmestrically split location
1 2 1
Hatch covers
3 4 3
37
Chapter 5. Master Planning
the hatch-covers, which makes it easier to model hatch overstowage. Some locations are
not composed of a continuous row of stacks. This is the case of locations representing
the extremities of a bay. This split and symmetric distribution of stacks is a useful tool
for the modelling of the transversal stability. With the assumption that containers and
their weights are symmetrically distributed in the locations, it is possible to disregard
stability constraints about the heel angle.
minimize
XX X T T
C O ypl
O
+ C P ypl
P
+ C R ypl
R
+ C yp (5.1)
p∈P l∈L p∈P
subject to
X X
x20τ 40τ
tl + 2xtl ≤ Cpl ∀p ∈ P, l ∈ L (5.2)
t∈TR ON
p
τ ∈T
38
Chapter 5. Master Planning
X X
x20τ 40τ
≤ CplR
tl + 2xtl ∀p ∈ P, l ∈ L (5.3)
t∈TR ON
p
τ ∈{RL,RH}
X X
xατ α
tl ≤ Cpl ∀p ∈ P, l ∈ L, α ∈ L (5.4)
t∈TR ON
p
τ ∈T
X
ατ
xατ
tl = LD t ∀α ∈ L, τ ∈ T, t ∈ TR (5.5)
l∈L
X X X
Wtατ xατ
tl ≤ Wpl ∀p ∈ P, l ∈ L (5.6)
t∈TR ON
p
τ ∈T α∈{20,40}
X X XX
G−ρ
p ≤ Gρl Wtατ xατ +ρ
tl ≤ Gp ∀p ∈ P, ρ ∈ {L, V } (5.7)
l∈L t∈TR ON
p
τ ∈T α∈L
X X XX
− +
Spf ≤ Wtατ xατ
tl ≤ Spf ∀p ∈ P, f ∈ F (5.8)
l∈LAf t t∈TR ON
p
τ ∈T α∈L
f
X X X
D
x20τ 40τ
∀p ∈ P, l ∈ LO
Rpi + ti +xti
≤ M δpl (5.9)
i∈LU t∈TR A
p
τ ∈T
l
X X
OV
x20τ 40τ O
∀p ∈ P, l ∈ LO
Rpl + tl +x tl − M (1 − δpl ) ≤ ypl (5.10)
t∈TR OV
p
τ ∈T
X X
D20
Rpl + x20τ
tl ≤ M φpl ∀p ∈ P, l ∈ L (5.11)
t∈TR A
p
τ ∈T
X X
OV 40
Rpl + x40τ P
tl − M (1 − φpl ) ≤ ypl ∀p ∈ P, l ∈ L (5.12)
t∈TR OV
p
τ ∈T
X X X
CT A
Rpl + x20τ 40τ
tl + 2xtl ≤ ypT ∀b ∈ B, p ∈ P (5.13)
l∈Lb t∈TR A
p
τ ∈T
X X
Fplτ x20τ 40τ
− CplR ≤ ypl
R
tl + 2xtl ∀p ∈ P, l ∈ L (5.14)
t∈TR ON
p
τ ∈T
39
Chapter 5. Master Planning
of a location is then calculated and kept within its maximum limit Wpl (reflecting vessel
capacities), by constraint (5.6).
Hydrostatic data, specific to each vessel, is used to calculate its trim, draft, buoyancy
and stability. Those calculations can be expressed as functions of displacement and
center of gravity of the vessel. Due to our assumption about constant displacement
(since no ballast can be added), hydrostatic calculations only depend on the center of
gravity of the vessel. This allows us to transform the stability, trim and draft restrictions
to bounds on the center of gravity. In constraint (5.7), for each port p ∈ P , the center
−ρ
of gravity limits, G+ρp and Gp , have been calculated, where ρ ∈ {L, V } represent the
longitudinal and vertical components. The center of gravity of each location is defined
by the constant Gρl . Due to the symmetrical position of the stacks in outer locations, it
is possible to distribute the weight of the containers in these stacks such that the vessel
is at even keel. For that reason we do not need specific constraints to ensure this.
Given a set of frames f ∈ F , where each frame is a calculation point as described
in Chapter 2, constraint (5.8) calculates the downward force created by the cargo aft
of each frame f , where LAff
t
is the set of locations aft of frame f , and Spf+
and Spf−
are
the maximum and minimum shear limits at frame f ∈ F for port p ∈ P , respectively.
Since the weight of the vessel is constant, we pre-compute the buoyancy forces and thus
only restrict the weight distribution over the vessel accordingly.
Constraints (5.9 - 5.14) define the various objective components minimized in (5.1).
A major objective is to minimize hatch-overstowage. This is modelled by the binary
variables δpl ∈ {0, 1}, indicating the presence of containers to load or unload at port
p ∈ P under on-deck locations LO . This is accomplished with constraint (5.9), where
LUl is the set of locations under l ∈ LO , TR A p is the set of transports that are either
D
loaded or unloaded in port p (we refer to such containers as active containers), and Rpi
are the containers already on board the vessel when arriving at the first port (hereafter
referred to as the release), that are discharged from location i in port p. In constraints
5.9-5.12) we make use of a BigM constant M . In our implementation of the model we
O
tighten these constants to the upper bounds of the constraints. Variable ypl is defined
in (5.10) to be the number of hatch-overstowing containers in an on deck location l in
port p given the set of transports TR OV p (and release containers RplOV
), that overstow
containers to load or unload in port p.
Overstowage can happen also within locations. One of the major constraints that
can force overstowage within a location is the fact that 20’ containers cannot be stowed
over 40’ containers. Having many 20’ containers with earlier discharge ports than the
40’ containers stowed in a location is thus an undesirable configuration. An estimate
of the potential overstowage between 20’ and 40’ containers within each location is
defined by constraints (5.11) and (5.12). Constraint (5.11) introduces a new set of
Boolean variables φpl for each port p ∈ P and location l ∈ L, indicating the presence of
P
20’ containers to load or unload. These indicator variables define the cost variable ypl
in constraint (5.12). This variable holds the number of potential overstows between 40’
D20 OV40
and 20’ containers within a location. The constants Rpl and Rpl are the number of
containers in the release discharged and potentially overstowing in port p, respectively.
40
Chapter 5. Master Planning
Proof. We reduce HOP to master planning by creating a vessel with 2|H| locations such
that for each on deck location there is a corresponding counterpart below deck. The
set C of containers are created as 40’ reefer containers, where c ∈ C has load port in(c)
41
Chapter 5. Master Planning
and discharge port out(c) for c ∈ C. For each hatch h ∈ H the forced hatch lifts can
be modelled by adding |r(h)| onboard containers in a location associated with h below
deck with discharge ports equal to those in r(h). In order to disallow stowing other
containers below deck, we make sure that the reefer capacity below deck is zero. All
locations will have 40’ capacity equal to m, and we increase height, weight, shear and
stability limits to infinity. Solving the master planning problem will now give us k 0 as
the minimum number of hatch overstows which will result in a ”yes” instance if k 0 ≤ k
and in a ”no” instance otherwise. Since in this way it is possible in polynomial time to
reduce HOP to master planning we have proven that master planning is NP-Hard.
MIP relaxation The results, however interesting, are not strong enough to be of
practical use for stowage planning decision support. A much higher rate of success is
required. Our proposition is to tackle the weaknesses of the IP model by relaxing the
integrality constraint on the decision variables x20τ
tl and x40τ
tl and thus solving a MIP
problem. We experimentally evaluated this MIP relaxation by comparing the results
to the optimal ones from the IP model.
Table 5.3 presents results for optimal runs and for 2 and 5 percent gap from the LP
relaxation of the MIP model. In terms of objective value, MIP and IP solutions are
very similar. In contrast, runtime results are drastically different. It is now possible
to generate complete stowage plans for nearly all instances within 10 minutes. Only 4
of the 30 instances could not be solved within this time frame, and 12 could be solved
42
Chapter 5. Master Planning
Instances Characteristics
ID Vessel Route Encoding
Cap. Loc. Ports Util. Weight Loadlist & Release Moves Transports Bools
(TEU) (%) (%) forecast
1 5802 58 7 58 56 11194 0 8163 16 425
2 9112 100 7 80 65 27648 1515 26801 11 450
3 9112 100 7 80 65 27648 1515 26801 11 450
4 9882 87 7 66 65 14102 1438 16331 14 448
5 5802 58 8 52 21 10268 1545 12988 18 408
6 9078 100 10 65 48 39936 1409 26207 20 571
7 8334 80 11 58 40 14862 2743 26702 37 607
8 2480 40 8 42 38 4444 388 5130 20 249
9 9958 87 8 58 51 15037 1741 16332 19 585
10 3354 47 7 40 36 5717 139 5108 13 267
11 2480 40 6 61 55 5306 191 5937 11 137
12 3354 47 5 36 11 1831 111 3036 7 182
13 8434 100 6 69 58 22127 525 9121 4 350
14 7474 90 6 83 86 16985 1956 23131 8 206
15 7464 90 9 71 48 28436 1754 19824 9 320
16 4988 71 8 74 37 12292 289 10863 19 603
17 7464 90 5 82 68 12297 1816 19183 6 146
18 4434 61 4 68 30 4294 433 7239 6 153
19 4978 70 9 50 57 12651 132 8678 12 646
20 4672 67 7 54 42 10006 182 7491 15 417
21 7170 68 11 81 33 33037 1317 27296 15 387
22 7470 90 7 80 75 20974 1878 24244 9 353
23 5004 70 12 61 48 24093 582 13514 23 549
24 8292 80 10 63 67 23440 3220 18287 26 622
25 2480 40 9 44 59 6117 433 5190 30 353
26 8292 80 6 86 62 18484 1433 19275 13 346
27 2748 44 7 31 52 2548 402 3269 17 261
28 6966 72 7 69 61 20981 648 15606 15 474
29 6966 72 4 47 50 4185 1457 6185 6 120
30 9090 80 11 63 58 31250 2624 19513 20 386
Table 5.1: Problem instances overview. Columns under Vessel indicate ship dependent data:
Cap.. is the maximum TEU capacity of the ship and Loc. is the total number of loca-
tions. Notice that given the same number of locations, different vessels can have different
capacities. Columns under Route show information about the route, Ports indicates the
number of calls on the route, Util. and Weight are the maximum percentage of utilization
during the voyage in terms of TEU and weight. Loadlist and Release are respectively the
total number of containers to be loaded in the vessel and the number of containers already
onboard in TEUs. Moves is the total number of crane moves on the route. The Encoding
columns present the number of Boolean variables (Booleans), needed by the master plan-
ning phase after preprocessing, while Transports is the total number of active transports.
43
Chapter 5. Master Planning
IP Results
Optimal 2% Gap 5% Gap
ID Objective Time Gap. Time Gap Time Total
(105 ) (sec.) (%) (sec.) (%) (sec.) (sec.)
1 0.61 timeout - timeout 4.88 17969.09 17970.92
2 7.97 timeout 1.9 227.74 3.45 47.56 58.78
3 7.97 timeout 1.9 231.82 3.45 47.75 58.90
4 19.13 5430.72 0.79 112.19 3.25 106.60 108.87
5 35.31 10210.36 0.38 255.10 0.38 255.10 256.33
6 13.95 timeout 1.42 5511.46 2.2 4533.47 4548.34
7 63.90 timeout 1.88 899.84 4.96 177.22 179.22
8 2.55 8520.11 0.64 27.15 0.64 27.15 28.37
9 73.12 16658.4 0.13 2358.92 4.69 1026.21 1030.25
10 0.69 timeout 1.84 11025.54 5 4730.26 4734.02
11 50.49 timeout - timeout - timeout timeout
12 1.91 timeout 1.39 8.02 2.31 6.92 19.11
13 22.62 timeout 2 6096.07 4.15 602.4 619.42
14 - timeout - timeout - timeout timeout
15 14.82 timeout 0.5 190.53 0.5 190.53 199.97
16 5.41 timeout - timeout - timeout timeout
17 4.66 4.45 0.01 4.45 0.01 4.45 6.51
18 2.80 69.61 0.56 6.11 0.56 6.11 11.13
19 0.79 timeout - timeout 4.89 16305.32 16311.27
20 7.10 timeout 1.96 4229.4 2.69 3345.58 3349.62
21 2.35 timeout 1.21 2740.46 2.15 1747.86 1757.61
22 13.38 timeout 0.7 2082.79 0.7 2082.79 2087.89
23 41.38 timeout 2 8073.32 4.96 1149.13 1154.83
24 322.55 timeout - timeout - timeout timeout
25 24.16 timeout 0.74 3326.15 0.74 3326.15 3328.01
26 4.76 952.36 0.56 53.21 0.56 53.21 53.21
27 0.36 timeout 1.9 260.49 2.05 84.01 88.01
28 2.23 timeout - timeout 4 16429.07 16435.85
29 0.53 timeout 1.46 10.89 3.98 10.43 13.39
30 76.44 timeout 1.99 284.30 2.18 82.99 85.33
Table 5.2: Master Planning with IP. The first column is the instance number. The next
columns present grouped results of three runs of the model: the first for optimality and
the others ending respectively at 2 and 5 percent gap from the LP relaxation. Column
Objective is the optimal value, and column Gap the distance to optimality with regard to
Obj. Times are reported in Time, while time to generate a complete stowage plan is shown
in column Total which includes the runtime of the slot planning phase. Instances that
could not be solved within 5 hours are marked with timeout. The bold face shows results
obtained within 10 min.
master planning.
This model enables shipping companies to use standard solvers and eases the process
of adding side constraints. We also believe the MIP model can be used in practice as a
decision support tool.
Further details are shown in Table 5.4, where the experiments between the IP and
MIP models at 5% gap are compared. What is important to notice is that the difference
in objective value and all of its components is very small between the two models. This
further confirms that the MIP model can effectively be used in exchange of the IP
model, exchanging very little quality loss for a larger gain in runtime performance.
Figure 5.2 is a high-level visualization of the optimal master planning solution of a
small stowage planning problem, in this case instance 18. The figure depicts the status
44
Chapter 5. Master Planning
MIP Results
Optimal 2% Gap 5% Gap
ID Gap Time Gap. Time Gap Time Total
(%) (sec.) (%) (sec.) (%) (sec.) (sec.)
1 - timeout - 1718.57 0.011 782.93 784.75
2 - 105.24 0.012 22.37 0.007 17.99 29.90
3 - 106.86 0.012 22.52 0.007 18.17 30.08
4 0.000 31.25 0.006 9.71 0.032 9.71 13.10
5 0.000 1074.08 0.003 47.65 0.003 47.65 48.79
6 - timeout 0.004 346.78 0.020 332.46 346.28
7 - timeout 0.008 143.74 0.008 92.19 94.95
8 0.002 16.91 0.006 5.68 0.006 5.68 7.35
9 0.000 107.01 0.001 101.28 0.049 101.28 106.57
10 - 663.15 0.012 157.82 0.025 41.59 44.95
11 - timeout - timeout - timeout timeout
12 - 2.04 0.016 0.65 0.025 0.65 12.17
13 - 17098.95 0.009 137.75 0.008 58.08 76.92
14 - 645.51 - 13.09 - 13.09 13.09
15 - 1304.77 0.012 16.05 0.012 16.05 24.88
16 - 15844.06 - 8775.7 - 2665.65 2672.48
17 0.001 1.77 0.006 1.54 0.006 1.54 4.06
18 0.001 1.52 0.005 1.12 0.005 1.12 5.29
19 - timeout - 216.28 0.009 81.55 87.30
20 - 9050.47 0.010 70.43 0.017 70.43 74.34
21 - timeout 0.006 84.36 0.027 72.88 82.91
22 - timeout 0.011 61.80 0.021 12.14 20.42
23 - timeout 0.005 1543.14 0.010 304.03 309.97
24 - 2858.98 - 2328.33 - 1609.04 1615.88
25 - timeout 0.004 63.63 0.013 37.92 39.64
26 0.002 54.59 0.004 8.59 0.004 8.59 8.59
27 - 93.86 0.000 4.95 0.013 4.40 6.52
28 - timeout - 4624.16 0.017 1794.5 1799.89
29 - 1.68 0.012 0.95 0.038 0.95 3.06
30 - 102.41 0.002 37.54 0.024 28.02 30.85
Table 5.3: Master Planning with MIP. The second column describes the gap between the IP
and MIP optimal solution. For the other columns see Table 5.2. Note that the gap in this
table is with regards to the corresponding IP solutions.
of the vessel upon arrival at each port. The top shows the state of the vessel as it
arrives at the first port before any load or discharge operations are performed. The left
side depicts the load of each bay with a color coding indicating the port of discharge.
On the right side, each of the vertical lines represents a transport assigned to a location
of the associated bay. The beginning of the line indicates the loading port and the end
the discharge port. The horizontal gray box between the vessels represents the ports.
As illustrated, the crane makespan objective imposes a distribution of containers along
the ship to maximize concurrent crane operations. Vessel bays, throughout the entire
route, also tend to hold most containers with the same port of discharge to minimize
overstowage.
45
Chapter 5. Master Planning
Table 5.4: Comparison between IP and MIP results at a 5% gap. The experiments are pre-
sented for each column with a pair of IP and MIP results. The first group column shows
the total objective value, the second the overstowage component, the third the location
overstowage, the fourth the makespan, the fifth the reefer proportion component, and the
last the runtime.
46
Chapter 5. Master Planning
LM o + GLl vl
P
l∈L
LCG = (5.15)
W
where LM o is the constant longitudinal moment of the empty vessel, GLl is the longitu-
dinal center of gravity of location, l ∈ L, vl is the weight
P of location, l ∈o L and W is the
o
displacement. Displacement is given by W = W + l∈L vl where W is the constant
weight of the empty vessel. Since we load all the containers in the loadlist, the total
weight of the locations does not change and we can thus assume W to be constant,
which makes equation (5.15) linear. Now let us consider the same equation where we
47
Chapter 5. Master Planning
where U is the set of ballast tanks, GLu is their longitudinal center of gravity and vu
is the variable defining the weight of the water to be loaded in the tank u ∈ U . The
displacement of the vessel is now no longer constant, since, in contrast to the cargo,
we do not know in advance the amount of water in the tanks. Thus equation (5.16) is
non-linear. In order to deal with this, we propose the following approximation:
48
Chapter 5. Master Planning
a plane. This is only true for displacement levels that are not at the extremes of the
data tables, but it is reasonable to assume that the displacement of a stowage plan will
be within these extremes.
5 50
4
45
Metacenter (m)
3
Trim (m)
2 40
1
-30 35
0
-25
-1 -20 30
-15 0
-2 -10 Lcg (m) 100000
200000
00
25
s)
00
-5 300000
ne
0
-30
00
-25 400000 on
00
0
00
0 -20
t (t
0
00
60
-15 500000
00
0
0
-10
50
-5 n
00
0
e
40
0 600000
0
cem
30
20
Lcg (m)
pla
10
(a) (b)
Figure 5.3: (a) Trim as a function of displacement and longitudinal center of gravity (Lcg)
(b) Metacenter as a function of displacement and Lcg.
Given the assumption that we only allow limited changes to the amount of ballast
water, it is possible to linearize the hydrostatic calculations with the planes described
above. Those planes can thus be used in our model. Not all the hydrostatic calculations
are, however, as smooth as the ones for trim and metacenter shown in Figure 5.3. The
buoyancy of a vessel is the volume of water that the vessel displaces. In order to calculate
this volume, it is necessary to know the shape of the vessel hull. For this purpose the
hydrostatic data tables provide the possibility of calculating the submerged area of a
vessel at a specific point called a station. Figure 5.4 shows an example of such areas
and how stations are distributed along the vessel.
Given two adjacent stations, s1 and s2 , the buoyancy of the vessel section between
W
the two stations is approximated by (As1 +As2 )d(s2
1 ,s2 )δ
, where As is the underwater
area at station s from now on called bonjean, d(s1 , s2 ) is the distance between the two
stations, and δ W is the density of the water. As Figure 5.4 shows, stations are not evenly
distributed along the vessel. A greater concentration is found at the extremities of a
vessel where the hull changes the most. Figure 5.5 shows two plots of the hydrostatic
data related to the bonjean at one of the first stations and at a station in the middle of
a vessel. As expected, the function describing the hull at the bow is highly non-linear
since the hull greatly changes, which is not the case for stations in the middle of the
vessel. Within specific displacement ranges it is, however, still possible to approximate
the function linearly. Should one want to model displacement ranges that include the
most non-linear parts, piecewise linear approximations with a few binary variables can
be used.
49
Chapter 5. Master Planning
Waterline
Area at station
Stations
Water displacement
Underwater area
60
1400
Bonjean area (m2)
50
1200
Bonjean area (m2)
40
1000
30 800
20 600
10 400
0 200
0
-5 600000 0 600000
-10 500000
500000 0 400000
-15 400000 -5 300000
300000 -10
-20 -15 200000
Lcg (m) 200000 -20 100000
-25 Lcg (m) -25 -30 0
100000 Displacement (tonnes) Displacement (tonnes)
-30 0
(a) (b)
Figure 5.5: (a) Underwater area as a function of displacement and longitudinal center of
gravity (Lcg) at a bow station (b) Underwater area as a function of displacement and Lcg
at a middle station.
50
Chapter 5. Master Planning
minimize
X
yu (5.21)
u∈U
subject to
X X
x20τ 40τ
tl + 2xtl ≤ Cp 0 l ∀l ∈ L (5.22)
t∈TR ON
p0
τ ∈T
X X
xατ α
tl ≤ Cp0 l ∀l ∈ L, α ∈ {20, 40} (5.23)
t∈TR ON
p0
τ ∈T
X X
x20τ 40τ
≤ CpRS
tl + xtl 0l
∀l ∈ L (5.24)
t∈TR ON
p0
τ ∈{RL,RH}
X X
0.5x20τ 40τ
≤ CpRC
tl + xtl 0l
∀l ∈ L (5.25)
t∈TR ON
p0
τ ∈{RL,RH}
X X
xατ ατ
tl = LD t ∀τ ∈ T, α ∈ {20, 40} (5.26)
t∈TR ON
p0
l∈L
X X
Wtατ xατ Wα
tl = vp0 l ∀l ∈ L, α ∈ {20, 40} (5.27)
t∈TR ON
p0
τ ∈T
51
Chapter 5. Master Planning
X X X
Wfα + pαlf vpW0 l + pαuf xp0 u − pαsf vpB0 f = vpSα
0f
∀f ∈ F, α ∈ {Aft, Fore} (5.42)
l∈L u∈U s∈S
X X X
Mfα + aαlf pαlf vpW0 l + aαuf pαuf xp0 u − aαsf pαsf vpB0 s = vpBα
0f
∀f ∈ F, α ∈ {Aft, Fore} (5.43)
l∈L u∈U s∈S
Shear − SAft
Lp0 f ≤ wf vp0 f + (1 − wf )vp0 f ≤ LShear
sFore
p0 f
+
(5.44)
LpBending−
0f
≤ wf vpBFore
0f
+ (1 − wf )vpBAft0f
≤ LBending+
p0 f (5.45)
Eu − xu ≤ yu ∀u ∈ U (5.46)
xu − Eu ≤ yu ∀u ∈ U (5.47)
Constraints (5.22), (5.23), (5.24) and (5.26) are equivalent to constraints (5.2), (5.4),
(5.3) and (5.5) of the previous model, and are therefore not further discussed.
Once a 20’ container is placed on a reefer cell, if that cell has two reefer plugs,
the cell-wise capacity is reduced as the extra plug cannot be used for a 40’ container.
For that reason an extra constraint for the reefer cell’s capacity (CpRC 0l
) is required,
(constraint (5.25)). Chapter 2 discussed how the weight of 20’ and 40’ containers dif-
ferently affect the structure of the vessel. To achieve a more accurate model, we take
this information into account with constraint (5.27) that defines the variables vpW0 l20 and
vpW0 l40 , holding the weight of the 20’ and 40’ containers in location l ∈ L respectively.
With constraint (5.28) we constrain each of the variables to the respective limits Wp200 l
and Wp400 l . The combined total weight is constrained in (5.29). All stability calcula-
tions are based on the weight of containers in a location. Constraint (5.30) defines
the auxiliary variable vpW0 l representing the weight of containers in location l ∈ L. The
displacement (total weight), of the vessel is represented by the auxiliary variable vpW0
with constraint (5.31) where Wpo0 is the constant weight of the empty vessel and on-
board containers. Constraint (5.32) defines the capacity (Cu ) of the tanks, while given
Eu as the initial condition of the tanks, constraint (5.33) defines the allowed ballast
change. Variable vpLcg 0l
represents the longitudinal center of gravity of location l and is
computed in constraint (5.34) using the approximation defined in (5.20). The constant
LM o is the constant longitudinal moment of the vessel, GLp0 u is the longitudinal center
of gravity of the tank u ∈ U and W is the approximated constant displacement. The
same approximation is used in constraint (5.35) for the calculation of the vertical center
of gravity represented by the variable vpVcg 0
. Given the displacement of the vessel vpW0
and its approximated longitudinal center of gravity vpLcg 0
, constraint (5.36) approximates
W Lcg
trim with a plane given by the coefficients AT , AT and AT . The calculated trim is then
required to be within the limits LTrim− and LTrim+ . Changing the coefficients accord-
ingly, constraint (5.37) and (5.38) approximate the aft and fore draft of the vessel. Both
drafts are kept within the maximum limits LDraftA+ and LDraftF + . Due to the propeller
it is also necessary to constrain the draft aft to be at least LDraftA− . The metacenter is
also calculated using a linear approximation and is defined in constraint (5.39) by the
variable vpM0 . The GM is then calculated in constraint (5.40) and required to be above
the limit LGM . The buoyancy of the section of a vessel between two adjacent stations
52
Chapter 5. Master Planning
is defined in constraint (5.41) by the variable vpBo (i,j) . Set S is the set of adjacent station
pairs (i, j), D(ij) is the distance between the two stations, and δ W is the density of
the water. Again, the hydrostatic linearization is used in this calculation. In shear and
bending calculations we take into account the forces at play aft or fore of a frame. Since
frames do not always coincide with the starting points of tanks, locations or buoyancy
stations, it is necessary to know, given a frame f ∈ F , the fraction of weight that
needs to be taken into account from a location l, tank u or station s. For this purpose
the constant pAftlf ∈ [0, 1] is used to denote the fraction of cargo to be considered from
location l ∈ L aft of frame f ∈ F and pFore lf for the fraction fore of the frame (pAft Fore
uf , puf
for the tanks and pAft Fore
sf , psf for the buoyancy). Since the shear forces and bending mo-
ments are calculated per frame, errors in the linearization accumulate the further away
from the calculation frame the weights are. This can become problematic in the case
of bending where the forces are multiplied by the arm, thereby substantially increasing
the approximation error. Shear and bending calculations can be done for either the
fore or aft part of a frame. It stands to reason that aft stress calculations are more
accurate at the stern of the vessel and fore calculations at the bow. For that reason a
more precise modelling of stress forces requires the calculation at both the aft and fore
part of a frame where the two resulting stresses are blended such that aft calculations
are weighted more at stern and less at bow. Constraint (5.42) calculates the shear
forces both aft and fore of each frame f ∈ F and defines the shear variable vpS0 f , and
where W αf is the constant weight aft or fore of frame f . The final shear calculation
where the aft and fore shear are mixed using a scaling factor wf ∈ [0, 1] (such that
it is 1 for the first frame at bow and 0 in the first frame at stern), is kept within the
−
limits LShear
p0 f
+
and LShear
p0 f in constraint (5.44). The same calculation is made for the
bending. The bending variable vpBα 0f
is defined in constraint (5.43) where aαlf , aαuf , aαsf
are the arm to frame f ∈ F of location l ∈ L, tank u ∈ U and buoyancy section
s ∈ S for both the aft and fore calculation. The constant moment of the vessel is given
by the constant Mfo and bending is kept within the limits LBending+ p0 f and LBending−
p0 f by
constraint (5.45). Constraints (5.46) and (5.47) define the cost variable yu quantifying
the changes in tank configuration from the initial estimate. The approximation error
increases with the amount of difference from the estimated amount of water in each
tank, thus objective 5.21 minimizes this difference.
53
Chapter 5. Master Planning
Instances Characteristics
TEU (%) Weight (%)
ID Displacement (tons) Tanks (tons)
Total Release Load Total Release Load
1 91.79 39.05 52.74 32.05 13.12 18.93 148520 5160
2 73.83 36.66 37.17 45.43 23.14 22.29 176008 8161
3 59.74 18.45 41.29 42.23 12.07 30.16 168696 6952
4 80.98 28.93 52.06 53.01 19.91 33.10 192286 6962
5 65.65 13.38 52.28 25.76 8.00 17.76 135396 10578
6 48.61 18.01 30.60 24.89 8.83 16.06 133489 10578
7 69.27 28.29 40.98 40.86 17.40 23.46 161492 5199
8 45.81 13.16 32.64 28.84 7.77 21.07 143815 9976
9 58.56 24.89 33.67 30.14 13.78 16.36 141487 5239
10 59.04 20.47 38.57 31.97 9.96 22.01 146120 7341
Table 5.5: Characteristics of the test instances. Starting from the left the columns indicate:
the ID of the instance, the total utility percentages in terms of TEU capacity used, thereof
the percentage of containers in the release and in the loadlist. The next three columns
indicate percentages of utilization in terms of weight, in total, for the containers in the
release and in the loadlist. The initial displacement, and the estimated ballast water are
given by the last two columns.
of gravity values, and can thus extract accurate information from the hydrostatic data
tables.
The presented model has been slightly modified to make it possible to force changes
on the amount of ballast water loaded in the tanks. We thus performed experiments
allowing different changes in displacement and observed how the accuracy of the model
changes. First we consider the linear approximation about the center of gravity of the
vessel. We focus on the longitudinal and vertical center of gravity, since our assumption
of even transversal weight distribution still holds.
0.9 1.6
0.8 1.4
Vcg approx. error (m)
Lcg approx. error (m)
0.7 1.2
0.6
1
0.5
0.8
0.4
0.6
0.3
0.2 0.4
0.1 0.2
0 0
-8 -6 -4 -2 0 2 4 6 8 -8 -6 -4 -2 0 2 4 6 8
Displ. variation (%) Disp. variation (%)
(a) (b)
Figure 5.6: (a) Error in the longitudinal center of gravity (lcg) (b) Error in the vertical center
of gravity (vcg).
54
Chapter 5. Master Planning
Figure 5.6 shows two graphs describing how the approximation of the longitudi-
nal (a) and vertical (b) center of gravity behave as the displacement changes. For both
graphs, the horizontal axis represents the percentage of displacement change, while the
vertical axis represents the error in meters. Each point in the graph is generated by
forcing changes in the ballast water of the 10 test instances. In Figure 5.6a it is possible
to see, as expected, that when the displacement is unchanged, the value of the longi-
tudinal center of gravity is accurate and the more the displacement moves away from
its true value the less accurate the approximation becomes. Note that for a displace-
ment range of 5 percent, the calculation inaccuracy is at most 0.3 meters and thus still
accurate enough for practical usage. The calculations for the vertical center of gravity
are not as accurate (Figure 5.6b). Within the 5 percent range, the linearized value
is, however, at most 0.8 meters from the correct one. This was an expected result, as
it is not possible to precisely estimate the vertical center of gravity of, for example,
locations since we do not know where the containers will be stowed. In order to keep
the center of gravity constant, its initial position must be estimated, which in this case
is the center of a location. This is not the case for the longitudinal center of gravity
since the size of the locations does not allow it to change much. The accuracy of the
vertical center of gravity is, however, still acceptable.
0.4 1.6
0.35 1.4
0.3 1.2
Trim error (m)
GM error (m)
0.25 1
0.2 0.8
0.15 0.6
0.1 0.4
0.05 0.2
0 0
-8 -6 -4 -2 0 2 4 6 8 -8 -6 -4 -2 0 2 4 6 8
Disp. variation (%) Disp. variation (%)
(a) (b)
Figure 5.7: (a) Error for the trim (b) Error for the GM .
Now that we have shown that linearizations for the center of gravity are accurate,
we focus on analyzing the accuracy of the hydrostatic data linearization. In Figure 5.7
we use the same graph as before with the horizontal axis describing the percentage of
displacement changes and the vertical axis the calculation error. Figure 5.7a represents
the error for the trim which, as can be seen, is very small. Within a 5 percent displace-
ment range, the error is at most 15 centimeters. Figure 5.7b shows the same analysis for
the calculation of GM . Notice that both for the trim and GM calculations, an error is
present even when the displacement is unchanged. The error we see in this area of the
55
Chapter 5. Master Planning
graph is due to the linearization of the hydrostatic functions. For GM it also includes
the approximation error of the vertical center of gravity.
We now move our focus to the linearization of the bonjean areas which we expect
to be the most inaccurate. Figure 5.8a shows the same analysis we have done so far
for the bonjean areas. The graph shows the maximum error over all bonjean areas as
a function of the displacement changes. As can be seen, the variation in displacement
is not the main source of error. Most of the inaccuracy is due to the linearization of
the hydrostatic data. Figure 5.8b shows how the bonjean error is concentrated at the
extremities of the vessel where the hull changes most. The horizontal axis represents
the position of the station on the vessel (where 0 is at bow), and the vertical axis is the
bonjean error. Worthy of note is the fact that the largest errors are found for stations
at the bow. This can be explained by the fact that the range of drafts in our test data
forces the linearization of these bonjean areas to be right by the inflection point of the
hydrostatic curve (see Figure 5.5a), where the linearization is most inaccurate. Better
approximations can then be expected for larger drafts, as it is the case for the bonjean
of the stations at the stern. The inaccuracy of the bonjean is, however, still quite small
if we consider that in the worst case, there is an error of only 4 square meters over an
area of over 111 square meters.
4.5 4.5
4 4
3.5 3.5
Bonjean error (m)
3 3
2.5 2.5
2 2
1.5 1.5
1 1
0.5 0.5
0 0
-8 -6 -4 -2 0 2 4 6 8 0 50 100 150 200 250 300 350 400
Disp. variation (%) Pos. of stations from the stern (m)
(a) (b)
Figure 5.8: (a) Approximation error of the total bonjean as a function of displacement change
(b) Approximation error of the bonjean areas per station.
Shear forces and bending moment calculations depend on the buoyancy of the vessel,
which is in turn calculated using the bonjean approximations. Figure 5.9a shows, in
the same way as the other graphs, how the percentage error in the shear calculation
(the vertical axis), behaves as a function of the variation of the displacement, (the
horizontal axis). As expected, the dominant error is not the approximation of the center
of gravity of the vessel since the inaccuracy is more or less the same, independently of
how much the displacement changes. A more tight relation can be seen when the
56
Chapter 5. Master Planning
shear calculation is related to the error in the bonjean linearization. Figure 5.9b shows
the percentage error of the shear force calculation as a function of the total error in
bonjean area from the hydrostatic linearization. As depicted, the error in the shear
calculation increases with the error in the bonjean linearization. The graph also groups
the data points according to their displacement range, and for the data points with no
displacement change we can see that the tendency remains the same. One must also
take into account that the linearization error of the bonjean is amplified in the shear
forces calculation by the fact that it becomes accumulated in the summation of the
forces. This particular information is very important when analyzing the error in the
bending moment calculation, since this accumulated error is multiplied by the arm of
the moment and thus multiplies its impact.
1.4 1.4
[-10,-5] [0.1,1]
1.2 1.2 [-5,-2.5] [1,2.5]
Shear force error (%)
Shear force error (%)
[-2.5,-1] [2.5, 5]
1 1 [-1,-0.1] [5,10]
[-0.1,0.1]
0.8 0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0 2 4 6 8 10 12 14 16 18 20
-8 -6 -4 -2 0 2 4 6 8
Total bonjean error (m2)
Disp. variation (%)
(a) (b)
Figure 5.9: (a) Approximation error of the shear forces as a function of displacement change
(b) Approximation error of the shear forces as a function of the total bonjean error.
Figure 5.10a shows the error in the bending calculation as a function of the changes
in displacement. As expected, comparable to the shear force calculation, the main
source of error is not the approximation of the longitudinal center of gravity, but rather
the error in the linearization of the bonjean areas. Due to the fact that the bonjean
error is amplified by the multiplication of the arm, it is necessary to look at the error
at each calculation frame in order to see how the error of the bending moment changes.
We do this by forcing the displacement to remain constant, thus removing the error of
the longitudinal center of gravity approximation, and analyzing how the bending error
changes at each calculation frame as the draft of each of the 10 test instances changes.
The result is shown in Figure 5.10b, where the horizontal axis represents the frames
of the vessel and the vertical axis is the percentage of error in the bending moment
calculation. Each of the lines plotted in the graph represent one of the 10 test instances
each of which has a different draft. As expected, the bending moment is less accurate
at the bow and stern due to the imprecision in the bonjean calculations. One more
57
Chapter 5. Master Planning
6 1.4
Draft 10.76
Bending approx. error (%)
Figure 5.10: (a) Approximation error of the bending moment as a function of displacement
change (b) Approximation error of the bending moment at each bonjean station.
thing worthy of notice is that there is no direct relation between the bending error and
the draft of the vessel. This is due to the non-linear shape of the hull. The bending
error for constant displacement does not exceed 1.4 percent. However, when variable
displacement is considered an error of up to 3.5 percent might be reached within a 5
percent displacement variation. We consider these approximations acceptable. Higher
accuracy can be achieved by reducing the linearization error of the hydrostatic functions
for bonjean.
58
Chapter 6. Slot Planning
Chapter 6
Slot Planning
The slot planning phase refines the plan generated during master planning. It assigns
the containers associated with each location to specific slots within the location. It
is during this phase that container stacking constraints are handled. The abstracted
decisions taken during master planning might, however, not always be feasible. Slot
planning must thus be able to handle these situations. The master planning objectives,
minimization of overstowage and minimization of crane makespan, produce master plans
where the average number of discharge ports per location is close to one. This becomes a
feature of the input of the slot planning instances. In comparison to the general problem
complexity, the instances are thus much simpler, as far as overstowage is concerned.
We therefore expect heuristic solutions to achieve high quality solutions fast.
As previously mentioned (chapter 5), such efficiency in runtime allows us to spend
most of the time in the harder master planning phase. The slot planning phase uses
the following simple algorithm:
1. The container to slot assignment for a specific location is solved using the con-
straint programming model of Delgado et al. (2012).
2. If no solution is found within a given time limit, the problem is solved using a
CBLS algorithm.
3. If no feasible solution is found, a heuristic procedure drops containers until a
feasible solution is found.
(a) The feasible solution is optimized using the same CBLS algorithm.
The CBLS algorithm and the procedure to handle infeasible instances are part of the
research behind this thesis and are described in detail in the following sections.
59
Chapter 6. Slot Planning
containers. The problem requires proper handling of stacking rules between the con-
tainers and the fulfillment of stack weight and height limits. Taking into consideration
the containers already onboard the vessel and stowed in the location, the objective is
to minimize overstowage, cluster containers with the same discharge port in the same
stack, free as many stacks as possible and minimize the number of non-reefer containers
stowed in reefer slots. Compared to the representative problem described in chapter 4,
wind-stacking rules are the only missing requirement if it is assumed that stability and
stresses are handled by the master planning phase.
Formally, let S be a set of stacks in a location, Ts be a set of tiers for each stack
s ∈ S and let P = {1, 2} be the set describing the aft=1 and fore=2 position of a slot.
Given the set C of all containers to be stowed in the location, we define the decision
variable xstp ∈ C ∪ {⊥} to be the assignment of container c ∈ C to the slot in stack
s ∈ S, tier t ∈ Ts and position p ∈ P, or the empty assignment ⊥. An overview of the
sets, constants and functions used in this section is given in Table 6.1.
Sets
S ∈ {1, ..., N S } The index set of stacks in the location, where N S is the number
of stacks.
Ts ∈ {1, ..., NsT } The index set of tiers for a stack s, where NsT is the maximum
number of tiers in the stack s ∈ S.
P ∈ {1, 2} The index set representation of the aft (p = 1) and fore (p = 2)
position of a cell.
C ∈ {1, ..., N C } The index set of containers to stow in the location, where N C is
the number of containers.
CP ⊂ C The subset of containers in the release .
Constants
⊥ The empty assignment.
A20
stp ∈ B True iff the slot in stack s ∈ S, tier t ∈ Ts and position p ∈ P can
hold a 20’ container.
A40
st ∈ B True iff the cell in stack s ∈ S and tier t ∈ Ts can hold a 40’
container.
Ws ∈ R+ The maximum weight of the stack s ∈ S.
Hs ∈ R+ The maximum height of the stack s ∈ S.
Attribute functions
w(c) : C ∪ {⊥} 7→ R+ The weight of the container c ∈ C or 0 if c = ⊥.
h(c) : C ∪ {⊥} 7→ R+ The height of the container c ∈ C or 0 if c = ⊥.
r(c) : C ∪ {⊥} 7→ B True iff the container c ∈ C is a reefer.
⊥(c) : C ∪ {⊥} 7→ B True iff the container c = ⊥.
d(c) : C 7→ N The discharge port of the container c ∈ C.
f (c) : C ∪ {⊥} 7→ B True iff the container c ∈ C is a 40’ container.
t(c) : C ∪ {⊥} 7→ B True iff the container c ∈ C is a 20’ container.
Table 6.1: Constants, attribute functions, and variables of the slot planning model.
60
Chapter 6. Slot Planning
We propose a logic based model. A feasible solution to the proposed slot planning
problem fulfills the following constraints:
The assignment convention for the 40’ containers is maintained by constraint (6.1),
where f (c) indicates if container c ∈ C ∪ {⊥} is a 40’ container and ⊥(c) indicates it
is an empty assignment (c = ⊥). Physical support from below is guaranteed for all
containers via constrains (6.2), where t(c) is true if container c ∈ C ∪ {⊥} is a 20’
container. Cell capacities for 20’ and 40’ containers are fulfilled by constraint (6.3) and
(6.4), where the constant A20 40
stp is the 20’ capacity of a slot and Ast is the 40’ capacity of
a cell. Stacking rules between 20’ and 40’ containers are modelled by constraint (6.5),
where NsT is the index of the top tier in stack s ∈ S. Each container is assigned to
exactly one slot (6.6). Given a set of release containers C P constraint (6.7), ensures the
original assignment (sc , tc , pc ), is maintained.
Reefer slots are indicated with the constant AR stp = true, and 20’ reefer containers
are forced to be stowed in those slots by constraint (6.8), while (6.9), ensures that 40’
reefer containers are stowed in cells where either one of the two slots has a power-plug.
Reefer containers are identified by the function r(c). Stacks weights and heights are
maintained within limits by constraints (6.10) and (6.11), where w(c) and h(c) are
respectively the weight and height of container c ∈ C ∪ {⊥}. Stack weight and height
limits are defined by the constants Ws and Hs
Two of the objectives modelled in the slot planning phase are known from the
literature, namely overstowage minimization and the clustering of containers with the
same discharge port on one stack. The other objectives have not been modelled before
and are aimed to generating a robust plan. The first of these attempts at leaving as
many stacks free of containers as possible, thus generating space in the location for the
next ports. The second, reduces the number of non-reefer containers stowed in reefer
61
Chapter 6. Slot Planning
slots since those are scarce. Following is the modelling of the slot planning objective
components:
XXX
oos = ostp (6.12)
s∈S t∈Ts p∈P
XXX
our = urstp (6.13)
s∈S t∈Ts p∈P
X
ops = | {d(xstp ) | t ∈ Ts , p ∈ P, ¬⊥(xstp )} | (6.14)
s∈S
X
ous = us s (6.15)
s∈S
In (6.12) one unit of cost is counted for each container that is overstowing another
one below in the stack, where ostp defines whether a container c ∈ C in stack s ∈ S,
tier t ∈ Ts and slot position p ∈ P overstows another container in the stack. Thus,
ostp = 1 if ¬⊥(xstp ) and there exists a tier t0 ∈ {ts , ..., t − 1} below t with an overstowed
container d(xst0 p ) < d(xstp ) (d(c) return the discharge port of container c). Otherwise
ostp = 0. Objective (6.13), counts one unit cost for each misused reefer slot, where
urstp = 1 if AR stp and (f (xst1 ) ∧ ¬r(xst1 ) ∨ t(xstp ) ∧ ¬r(xstp )), and 0 otherwise. Notice
that a 40’ non-reefer container will add a unit cost for each reefer slot it covers. In order
to favor stacks stowing containers with the same port of destination, one unit cost is
counted for each discharge port present in the stack, (6.14). In order to minimize the
number of used stacks, one unit cost for each stack used is counted by (6.15), where
us s = 1 if there exists a t ∈ Ts and p ∈ P such that ¬⊥(xstp ), and 0 otherwise.
An optimal solution to a slot planning problem optimizes the following weighted
sum:
min C O oos + C C ops + C S ous + C R our (6.16)
where the cost weights C O , C C , C S and C R represent the priority given to each objective
by the stowage coordinators.
62
Chapter 6. Slot Planning
63
Chapter 6. Slot Planning
• swap 40 ((xst1 , xst2 ), (xs0 t0 1 , xs0 t0 2 )) where (s, t) 6= (s0 , t0 ), pairwise swaps the values
of the cell variables (xst1 , xst2 ) and (xs0 t0 1 , xs0 t0 2 ) and covers the following swap
types 1) (400 , ⊥) ↔ (400 , ⊥), 2) (⊥, 200 ) ↔ (400 , ⊥), 3) (200 , ⊥) ↔ (400 , ⊥), 4)
(200 , 200 ) ↔ (400 , ⊥) and, 5) (⊥, ⊥) ↔ (400 , ⊥).
Proposition 2. The swap neighborhood Γ defined by the union of swap 20 and swap 40
swaps for a slot planning problem Π is complete.
Proof in Appendix C.
and
The “no hanging containers” constraint for 20’ and 40’ containers (6.2) is represented
by
t−1
X
ν3 (π, s, t, p) = ¬ (¬⊥(πstp ) ⇒ (t(πst0 1 ) ∧ t(πst0 2 )) ∨ f (πst0 1 ))
t0 =ts
X X X
σ3 (π) = ν3 (π, s, t, p).
s∈S t∈Ts \{ts } p∈P
64
Chapter 6. Slot Planning
Thus, for some stowed containers, the degree of violation is defined as the number of
slots in cells below with insufficient support. The reefer constraints (6.8) and (6.9) are
represented by
ν4 (π, s, t, p) = ¬ r(πxtp ) ⇒ AR R R
stp ∨ f (πstp ) ∧ (Ast1 ∨ Ast2 )
XXX
σ4 (π) = ν4 (π, s, t, p).
s∈S t∈Ts p∈P
The maximum stack height constraint (6.11) and the maximum stack weight constraint
(6.10) are represented by
( Hπ
ϑs −Hs
max 0, |ϑCπ | : ¬⊥(πstp )
ν5 (π, s, t, p) = s
0 : otherwise
XX
σ5 (π) = max ν5 (π, s, t, 1), ν5 (π, s, t, 2)
s∈S t∈Ts
( Wπ
−Ws
max 0, ϑs|ϑCπ |
: ¬⊥(πstp )
ν6 (π, s, t, p) = s
0 : otherwise
XXX
σ6 = ν6 (π, s, t, p).
s∈S t∈Ts p∈P
where ϑW π
= t∈Ts p∈P w (πstp ) is the weight, ϑHπ
P P P
s s = t∈TS max (h (πst1 ) , h (πst2 ))
is the height of stack s and ϑCπ
P P
s = t∈Ts p∈P ¬⊥(πstp ) is the current number of
containers stowed in stack s for assignment π. For these constraints, the violation
degree is distributed equally over variables holding containers since it is not possible to
identify which one of them will have the largest influence. Finally, the no 20’ over 40’
container constraint (6.5) is represented by
t−1
X
ν7 (π, s, t, p) = ¬ (t(πstp ) ⇒ ¬f (πst0 1 ))
t0 =ts
N T
X X X
σ7 = ν7 (π, s, t, p).
s∈S t=ts +1 p∈P
Similar to ν3 , the violation degree of a 20’ container is the number of 40’ containers
stored below.
The remaining constraints are implicitly satisfied by the algorithm by first assigning
release containers to their given position, and by heuristically placing the remainder of
the containers to variables at the beginning of the algorithm according to the convention
of assigning 40’ containers, constraint (6.1), the release constraint (6.7), and the all-
loaded constraint (6.6), are also satisfied.
65
Chapter 6. Slot Planning
ν9 (π, s, t, p) = AR
stp ∧ (f (πst1 ) ∧ ¬r(πstp ) ∨ t(πstp ) ∧ ¬r(πstp ))
XXX
σ9 = ν9 (π, s, t, p).
s∈S t∈Ts p∈P
0 : otherwise
XXX
σ10 = ν10 (π, s, t, p).
s∈S t∈Ts p∈P
As for ν5 and ν6 , we distribute the violation degree equally over variables holding
containers since it is not possible to identify which one of them will have the largest
influence.
66
Chapter 6. Slot Planning
assignment π. For a constraint or objective σ ∈ {σ1 , ..., σ11 }, we then define the delta
change δπ (σ, γ) = σ(π 0 ) − σ(π).
Taking the weight constraint (σ6 ) as an example, the violation based on the swap
can be recalculated by removing the weight of the swapping containers from the cur-
rent weight of their respective stacks and then adding it to the current weight of the
respective stacks of destination. The difference in violation between the new weight
violation and the original one would be the result of the delta evaluation. The delta
evaluations for constraints σ1 , σ2 , σ4 , and σ5 are similar to the weight constraint and
will not be described further. The σ3 and σ7 constraints on the other hand are more
complex, since the swap may affect many containers in the involved stacks. Here we
show how to define one of these constraints for a specific swap case. The remaining
constraints can be implemented using similar ideas.
We consider the constraint of no 20’ on top of 40’ containers (σ7 ), for a swap
γ = (hs, t, ci, hs, t0 , c0 i) within the same stack of a 40’ container with two null containers
(swap 40 type 5). The other cases can be defined in a similar fashion. If the 40’ container
is above the null containers, the value of the delta evaluation is equal to the number
of 20’ containers between the null containers and the 40’ container. Otherwise it is
simply the negative of this. Thus, if tb π (c, c0 ) denote the number of 20’ containers
stored between container c and c0 , the delta evaluation for this swap case is defined by
t0 X
(
tb π (c, c0 ) : t > t0 0
X
δπ (σ7 , γ) = , where tb π (c, c ) = t(πstp ).
−tb π (c0 , c) : otherwise m=t p∈P
Similar to the constraints, the delta evaluation of the objectives can be divided
into simple (σ9 and σ10 ), and complex (σ8 and σ11 ), cases. The delta evaluation for
objectives σ9 and σ10 are similar to the weight constraint (σ6 ) and are therefore not
described further. Here we show how to define the delta evaluation of the overstowage
objective, (σ8 ). The delta evaluation of the pure stack objective (σ11 ) can be computed
in a similar way.
Consider a single 20’ to 20’ swap γ = (hs, t, ci, hs0 , t0 , c0 i) (swap 20 type 1), between
two distinct stacks. The delta evaluation is computed using the following schema. For
each container, we remove the violation it contributes, and we add the violation that it
creates when swapped to its new position. A graphical representation of the algorithm is
shown in Figure 6.1. Consider for the moment the container c, following the evaluation
schema. Its violation ν8 (π, s, t, p), must first be removed, but also the violations of
the containers overstowing c. For this purpose we have defined the function oπ (s, t, c),
which given a cell (s, t), and a container c, counts the number of containers stowed
under the specific cell which are overstowed by c. Formally
0
t−1
XX 0 : ⊥(c) ∨ ⊥(c )
oπ (s, t, c) = ovπ (c, πst0 p0 ), where ovπ (c, c0 ) = 1 : d(c) > d(πst0 p0 ) .
t0 =1 p0 ∈P
0 : otherwise
67
Chapter 6. Slot Planning
0 0
2 vastπ (c, c0 ) 2 vasπ0 t0 (c0 , c)
ν8 (π, s, t, p) ν8 (π, s0 , t0 , p0 )
2 2
0 0 0
oB
π (s, t, c ) oB
π (s , p , c)
Figure 6.1: Graphical representation of the delta evaluation of the overstowage objective for
a 200 ↔ 200 swap between two distinct stacks.
One violation can now be subtracted for each container ca above c which only over-
stow c (i.e., d(ca ) > d(c) ∧ oπ (s, t, ca ) = 1), since only in this case will the violation
of ca change to zero when c is removed. This is done using the function vaπst (c) =
PN T P
m=t+1 n∈P ¬⊥(π smn ) ∧ oπ (s, m, π smn ) = 1 ∧ d(π smn ) > d(c) . The next step is
adding the violations created by replacing c0 with c in stack (s0 , t0 ). Here we can use
oπ (s0 , t0 , c) and add one violation if oπ (s0 , t0 , c) > 0. Counting the number of violations
caused by c to the containers above c0 is similar to the vaπst (c) computation, but we
must remember that the current violation is based on c0 being present in stack (s0 , t0 ).
The previous function is thus modified to be
N T
0π
X X
0
va s0 t0 (c, c ) = ¬⊥(πs0 mn )∧
m=t0 +1 n∈P
Performing the same operations for c0 the complete delta evaluation is given by
0 0 00
δπ (σ8 , γ) = − ν8 (π, s, t, p) − vaπst (c) + oB π
π (s , t , c) + vas0 t0 (c, c )
0
− ν8 (π, s0 , t0 , p0 ) − vaπs0 t0 (c0 ) + oB 0 π 0
π (s, t, c ) + vast (c , c),
68
Chapter 6. Slot Planning
Incremental evaluation is then also applied to the computation of the current assign-
ment if a beneficial swap is found. The model is not recalculated entirely, only those
parts that are influenced by the change are re-evaluated. Such partial re-evaluation is
referred to as an incremental update. Incrementally maintained variables in the model
are the violation variables (ν1 ...ν11 and σ1 ...σ11 ), and the auxiliary variables, (ϑW H
s , ϑs
C
and ϑs ). Incremental updates are implemented using very similar principles to the
incremental evaluation of swaps and are therefore not discussed any further.
This ordering reduces overstowage by placing first containers with a later discharge port.
20’ containers are placed before 40’ containers in an attempt to avoid the placement of
20’ containers on top of 40’ containers (σ7 ), and reefer containers are assigned before
non-reefer since usually reefer slots are at the bottom of a bay, (σ4 ).
The placement procedure is shown in Algorithm 1. A critical point is the assignment
of 20’ containers, since it is possible to have two 20’ containers with different discharge
ports being assigned to two different stacks and generating odd cells, (cells that only
contain one 20’ container). In order to avoid this behavior, the placement heuristic uses
the oddSlot flag, which is raised when a 20’ container is assigned to a slot in an empty
cell. When the flag is raised, the heuristic is forced to place the next 20’ container in the
empty slot of the odd cell, (line 3-4 and 15-16). This check ensures that as long as the
number of containers to load in the location is consistent with the location capacity, the
placement heuristic will always be able to assign all containers to a slot. The procedure
places the containers one at a time (line 2), first trying to find space on a stack that
contains containers with the same discharge port, (line 5-6). If none is found, it tries to
find a stack with containers that have a greater discharge port minimizing overstowage,
(line 7-8). If it is not yet possible to find a placement for the container, then an empty
stack is chosen, (line 9-10). Should none of those cases find a suitable assignment, the
container is pushed to the WAIT STACK , (line 11-12). Once a placement has been
69
Chapter 6. Slot Planning
tried for each container, the WAIT STACK is emptied and each container is placed
sequentially on the first available stack, (line 13-18). The selection of stacks (lines 5-
10), is done in an order s based on the number of tiers: s s s0 ⇔ |Ts | ≤ |Ts0 |. This
ordering helps the heuristic identify an assignment which uses as few stacks as possible.
70
Chapter 6. Slot Planning
o
P11
tion of a possible
P11 swap. And similarly for the objectives ν (π, s, t, p) = i=8 νi (π, s, t, p)
o
and δπ (γ) = i=8 δπ (σi , γ).
The general search procedure is outlined in Algorithm 2. It is important to notice
that the swap selection is done through the selection of two slots, where a slot is defined
by the triple τ = hs, t, pi, where s is the stack, t is the tier, and p is the position of the
slot. Let T denote the set of all slot triples. The function Γ(τ, τ 0 ) : T × T 7→ Γ then
defines the swap based on the containers found in the two slots defined by τ and τ 0 .
23 return π;
The algorithm starts with the initial candidate assignment returned by the place-
ment heuristic on line 2, and then performs the first hill-climbing CBLS over the neigh-
borhood until all the constraints are satisfied, (line 3-8). The step function, which
selects a new assignment, makes the selection of the slots that will define the swap in
two phases. It begins (line 5), by selecting a slot triple τ = hs, t, pi preventing, however,
the selection of slots holding pre-placed containers or null containers, and selects only
those that actually violate some constraints. Between all the possible slots the one that
71
Chapter 6. Slot Planning
contains the container with the maximum degree of violation is selected. The algorithm
proceeds (line 6), by selecting another slot triple τ 0 = hs0 , t0 , p0 i and prioritizes swaps
that improve the objective value. The selection in this case filters out all the slots
holding pre-placed containers and make sure that the second slot is not the same as
the first one. Moreover it selects only slots which resulting swap actually minimize the
violations the most. The sideMove flag has been included in the filter in such a way that
if raised, it will allow the selection of swaps which will result in an assignment that does
not improve the solution, in an attempt to escape the local minima. The sideMove flag
is initiated in line 1 and is raised in line 8 if no selection of swap is performed. Should
a swap selection have been made, the swap is then actually performed in line 7 using
the function swap(π, γ).
Once a feasible solution is reached, the second hill-climbing phase begins, (line 9-23).
Here the objectives start having a central role in the search process.
The swap selection in this phase needs, however, to be smarter since for some
objectives, in particular overstowage (σ8 ), free stack (σ10 ), and pure stack (σ11 ), a
single swap often does not lead to a change in the objective value. To address this
problem, we have defined a tie-breaking function that can evaluate a swap that has
no objective value improvement, but still causes a more desirable assignment. The
function is called eval π (o, γ) and equals the evaluation value of the swap γ for the
objective o ∈ {σ8 , σ9 , σ10 , σ11 }.
For the overstowage objective (σ8 ), the evaluation function is defined as the number
of containers overstowed by each container, which will make the algorithm choose a
container that overstows many containers over one that only overstows a single con-
tainer. For the free stack objective (σ10 ), the swap is evaluated by the number of
containers in the stack, so that the search rather swaps containers that are in almost
empty stacks. The pure stack objective (σ11 ), calculates the evaluation by summing
the quadratic product of the number of containers with the same discharge port, which
will favor those stacks that have the most containers
P11 with the same discharge port. The
o
optimality phase uses the function eval π (γ) = i=8 eval π (σi , γ) as Pa11tie-breaking rule,
o
and similar
P to the feasibility phase the functions ν (π, s, t, p) = i=8 νi (π, s, t, p) and
δπo (γ) = 11 i=8 δπ (σi , γ) represent the total number of objective violations and the sum
of all the delta evaluations of swaps, respectively.
The selection of candidare slots from which a swap is generated is performed simi-
larly to the first phase. The first slot is selected between all the non-empty slots holding
no pre-placed containers; the one with the maximal objective violation is chose, (line
13). The second slot is selected randomly from among all the slots that generate swaps
leading to feasible solutions with improved objective value, (line 14). Should a swap
not be selected, the tie-breaking rule comes into action at line 19, where a new second
slot is selected using the tie-breaking rule as defined by the evaluating function on non-
improving swaps. The counter sideMove is used to limit the number of side moves that
the algorithm may perform. The local search terminates once the maximum number of
side moves is reached, (line 11).
In general, using a neighborhood operator that checks all possible swaps given an
72
Chapter 6. Slot Planning
Table 6.2: Test Set Characteristics. The first column is an instance class ID. Columns 2, 3,
4, and 5 indicate whether 40’, 20’, reefer, and high-cube containers are present. Column 6
indicates whether more than one discharge port is present. Finally, column 7 is the number
of instances of the class.
initial selection, is clearly more expensive in terms of runtime than a more stochastic
one where only a limited number of swaps is evaluated. However this selection has
shown to perform moves that are highly valuable in terms of solution improvement,
allowing the search to converge quickly.
73
Chapter 6. Slot Planning
Table 6.3: Algorithm Analysis (a) Cost gap between returned solution and optimal solution.
(b) Cost gap between first feasible solution and optimal solution. (c) Number of itera-
tions needed to find the first feasible solution. (d) Worsening of the cost of the heuristic
placement when searching for the first feasible solution.
The results also support our initial hypothesis suggesting that the problem is under-
constrained and that as such it is possible to heuristically find high quality solutions in
short time. The results also point to the fact that the optimality phase improves only a
limited number of instances, which however is important especially in the cases where
the optimality gap after the feasibility phase is more than 20%.
The limited improvement of solutions in the optimality phase probably happens
because the search does not allow for a large degree of diversification. Preliminary
tests using tabu search have shown that local diversification was often unsuccessful at
escaping a local minimum due to large structural differences between the local minimum
and an optimal solution. A possible approach to solving this problem could be to change
the initial placement and the search procedures to follow the heuristic less closely. This
method, however, would probably be more expensive in terms of runtime performance.
The average runtime of the instances is 0.18 seconds, with a worst case scenario of
0.65 seconds. Figure 6.2 shows the runtime of the algorithm as a function of the size
of the instance measured in TEUs. As depicted, the execution time scales well with
the instance size. Figure 6.3 compares the execution time between our algorithm and
the complete constraint programming approach used for generating optimal solutions.
When generating the instance set for investigating the optimality gap shown in Ta-
ble 6.3, we excluded instances that were not solvable by the CP approach within 160
seconds. However, in a comparison between the two approaches these instances are
particularly interesting.
As depicted, the CP approach is highly competitive within the set of instances that it
74
Chapter 6. Slot Planning
Runtime performance
0.7
0.6
0.5
Time (sec.)
0.4
0.3
0.2
0.1
Runtime
0
0 50 100 150 200 250
TEUs
LS vs CP runtime comparison
0.8
CP time
0.6
0.4
Normal
0.2 Unsolved
More than 5 sec.
0 More then 3 sec.
0 0.2 0.4 0.6 0.8 1
LS time
Figure 6.3: Execution time comparison between our algorithm and the complete constraint
programming approach used to generate optimal solutions.
can solve in 160 seconds. However our approach can solve the problematic instances for
CP fast as well. This result indicates that the under-constrained nature of the problem
might force exact methods to spend an excessive amount of time proving optimality.
75
Chapter 6. Slot Planning
rolls out the stowed container, (line 3). Since the removed container might be in the
middle of a stack it might be necessary to lower down all the containers in higher
tiers, (line 6). Should the removed container be a 20’ container (line 4), it is necessary
to remove the other 20’ container as well, (line 5). The process is iterated until no
more violations exist and thus the solution is feasible, (line 1). Note that this heuristic
procedure aims at reaching a feasible solution fast. The procedure could, each time
a container is dropped, run a search for a new feasible solution thus minimizing the
number of dropped containers. We do not believe, however, this to be necessary as we
do not expect a large number of dropped containers.
The slot planning experiments discussed in this section are based on master plans
obtained from the IP and MIP multi-port master planning experiment with 5% opti-
mality gap previously presented in chapter 5.
So far we have talked about single instances of slot planning, however, when com-
plete stowage plans are generated, master plans based on the MIP model may have
fractional numbers of containers to stow in locations, which is physically impossible. It
is thus necessary to deal with fractionality looking at the vessel as a whole.
We attempt to stow a fractioned container in one of the locations where a fraction
of it has been assigned by the master plan. If none of these locations have capacity left,
the container is rolled out.
The quality of each slot plan is evaluated, again, by comparing it with the best slot
plan generated by CP for the same location within twenty minutes. In the cases where
the number of containers of one or more types were reduced by CBLS, the slot plan is
evaluated against the best plan generated by CP within twenty minutes, stowing the
same containers as CBLS. Table 6.4 summarizes the results of our experiments.
Vessels are slot planned fast by our approach. For the instances with a master plan
available, slot plans are generated within an average of 5.9 seconds in total. There is no
time-wise dominance of slot plans generated from MIP and IP master plans, indicating
that integrality constraints do not affect the complexity of slot planning. When slot
planning IP master plans, a reduction in the number of containers rolled out due to
fractionality and odd number of 20’ containers in locations is observed in most of the
instances. This is, however, a very small fraction, (0.88% max). In the instances where
IP and MIP master plans are provided, the number of containers rolled out by CBLS
76
Chapter 6. Slot Planning
Table 6.4: Slot Planning MIP (Cont.) and IP (Int.) master plans with 5% gap. The first
and second columns are the id of the instance and the number of containers to stow in the
first port. The next columns show grouped results of slot planning based on MIP and IP
master plans. The third and fourth columns show the runtime for the slot plans, fifth and
sixth columns are the number of locations to which slot planning was to be performed. The
seventh and eighth columns totalize the number of rolled out containers by fractionality
and odd number of 20’ containers, the ninth and tenth columns are the containers rolled
out by CBLS, and the eleventh and twelfth columns are the percentage of total containers
rolled out. The last two columns show the average gap of the slot plans. A dash indicates
that no master plan was provided.
differs in average only in 0.85 containers, (4.65 for the IP and 5.5 for the MIP master
plans). These facts indicate no considerable impact of using MIP master plans.
Instance number four has the maximum roll-out for IP and MIP slot plans. This
instance contains locations where entire stacks are limited to a specific container length.
Such particularity constrains the possible combinations of containers that fulfill stack
weight limits, forcing CBLS to drop containers. Even considering this outlier, the aver-
age percentage of roll-out containers is 1.7% and 1.5% when slot planning IP and MIP
master plans, respectively. These numbers are reasonable given the amount of contain-
ers typically rolled from a loadlist by stowage coordinators. Note that the improved
77
Chapter 6. Slot Planning
weight constraints in the master planning model with ballast tanks (see Section 5.4),
would solve this particular issue since specific weight constraints are considered for each
container length.
Of the slot plans generated for the IP and MIP master plans 2.24% have an opti-
mality gap over 5%, and only 1.24% a gap over 10%. The maximum gap, however, is
55%. CP generated optimal slot plans within one second for 96.2% of the locations of
the MIP master plans and 96.0% of the locations of the IP ones. Moreover, CP was
able to prove optimality 87.8% and 86.5% of the slot plans generated for the locations
for the MIP and IP master plans, respectively.
78
Chapter 7. Conclusions
Chapter 7
Conclusions
The aim of this thesis has been to investigate the possibility of applying automated
stowage planning in practice. The work presented does not aim to show that stowage
coordinators can be substituted by automated planners, but rather to explore the pos-
sibility of using automatically generated stowage plans in decision support tools for
stowage coordinators. In order to answer the research question, two main aspects of
automated stowage planning were to be taken into account. First, the quality of the
generated solution and second, the performance of the system in terms of runtime. To
ensure the generated solutions are of high quality, we have proposed a representative
model in collaboration with the industry. This representative problem includes all the
relevant computational components of container stowage planning and all the details
that make the solutions of this problem possible to evaluate by stowage coordinators.
The representative problem requires the handling of vessel stability and stress forces,
the consideration of 20’ and 40’ containers and all their stacking rules, and the opti-
mization of overstowage and crane utilization.
The algorithmic approach presented in this thesis hierarchically decomposes the
problem into a master planning and a slot planning phase. During the master planning
phase, groups of containers are assigned to sub-sections of the vessel. During this
phase, stability and stress forces are solved, and hatch-overstowage and crane utilization
are optimized. The slot planning phase, solves the stowage problem of each location,
handling stacking constraints and optimizing overstowage. This decomposition, and the
runtime performance of the two phases, is able to solve large scale container stowage
problems within 10 minutes, which is the time limit given by the industry for a tool
to be useful within the day to day planning routine of stowage coordinators. Further
improvements of the master planning model were presented in this thesis that analysed
the possibility of including ballast tanks in the optimization model.
The experimental results collected in this thesis show that automated stowage plans
can be generated for the representative problem within the 10 minute time frame set by
the industry, thus giving a positive answer to the research question central to this thesis.
Moreover, it has been shown that ballast water can be successfully modelled using
standard mathematical programming methods via the use of linearization of hydrostatic
79
Chapter 7. Conclusions
data. The possibility of modelling such problems with standard modelling tools provides
the industry with the flexibility of easily adding side-constraints and changing the
objectives.
A very different research direction can be the analysis of the knowledge of stowage
coordinators. Successful approaches to stowage planning, such as the one used in this
thesis, are based on the work process of stowage coordinators. It is not always simple,
however, to extract this knowledge, as different heuristic rules might be used by different
coordinators. Systematic analysis of historical data might allow learning algorithms to
infer heuristic rules which can be applied to improve the current models. An example
could be to estimate the distribution of containers with the same discharge port on
a vessel given a loadlist and a release. Such information could be used as branching
heuristics, thus boosting the solution process.
80
Chapter 7. Conclusions
81
Chapter 7. Conclusions
82
Chapter A. Complexity Analysis
Appendix A
Complexity Analysis
The main reference, within the published academic works that analyse the container
stowage problem with respect to computational complexity is the work of Avriel et al.
(2000). The authors analyse the most basic components of the problem and prove
that the decision problem of container stowage is NP-complete. This chapter briefly
introduces this work and shows additional complexity results for the container stowage
problem.
83
Chapter A. Complexity Analysis
Figure A.1: A kSP instance with m = 3. The instance is a “yes”-instance for any k ≥ 3.
Possible configurations (disregarding symmetric ones), are shown at each time step with
the discharge time of the container in each slot. Gray slots contain containers that must
be shifted, and each configuration is labeled with the number of containers that will be
shifted at that time-step. A path through the configurations represents a complete stowage
plan, and the optimal plan is shown with bold arcs.
84
Chapter A. Complexity Analysis
h2 c5
h1 c3
c5 h2 c
1
c4 h2
c3 c4
c2 h1 c2
c1 h1
1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9
(a) (b)
Figure A.2: (a) A HOP instance with m = 2 and k = 1. (b) An assignment of containers to
hatches with only one hatch overstow (for h1 ) showing that it is a “yes”-instance.
85
Chapter A. Complexity Analysis
86
Chapter A. Complexity Analysis
e1 e2 e3 e4
a1
a2
a3
f1
f2
1 2 3 4 5 6 7 8 9
Figure A.3: The HOP instance of the SCP defined in Example 3. As in Figure A.2(b) We
show an assignment that proves the HOP to be a “yes”-instance, since there is no more
than 3 hatch overstows.
container transports overlap each other. Further, none of these assignments overstow.
Then assign |A|−n blocking containers to the hatches representing subsets that are not
included in the cover and assign the remaining n blocking containers to extra hatches.
This is possible since no other containers are assigned to these hatches and there are
enough extra hatches because n ≤ k 0 . Since all the subsets in A are assumed to be non-
empty, we have that all |A| assignments of blocking containers overstow. The number
of overstowing containers, however, is still not greater than k as required.
Conversely, suppose that the HOP has a feasible assignment with n ≤ k overstows.
Since all blocking containers overstow, we must have n ≥ |A|. But since k = |A|, we
have n = k = |A|. This means that no element containers overstow, which is only
possible if they are assigned to hatches that represent subsets that form a cover A0 of
S. The size of this cover can at most be k 0 because every subset in the cover requires an
extra hatch to move a blocking container and there are only k 0 of these extra hatches.
A.5 Remarks
The complexity results presented in this chapter are worth a few remarks. Previous
work has shown that even a simple component of the container stowage problem, such
as the Capacitated k-Shift Problem, is NP-Complete. We have further confirmed these
findings by showing that, even when only considering hatch-overstowage, the problem
is still NP-Complete.
87
Chapter A. Complexity Analysis
88
Chapter B. Decomposition in Scheduling
Appendix B
Decomposition in Scheduling
This appendix presents the results of a collaboration with Professor Pascal Van Hen-
tenryck. The aim of the collaboration was to explore the application of constraint
based decomposition frameworks on scheduling problems, specifically on the flexible
jobshop problem. Particular attention is given to the Adaptive Randomized Decompo-
sition (ARD) framework that was applied to these problems for the first time.
89
Chapter B. Decomposition in Scheduling
These results are obtained with a rather naive CBS search, which requires little de-
velopment effort on top of a modern constraint-based scheduling and does not use
advanced search heuristics or learning techniques. As a consequence, they further
demonstrate the versatility of the general-purpose approach of combining CBS with
local search and decomposition schemes. The ARD schemes are also shown to be close
in quality and efficiency to LNS, indicating that they are likely to provide high-quality
solutions to large-scale problems which cannot be handled globally.
90
Chapter B. Decomposition in Scheduling
problem. Simultaneous approaches (Barnes and Chambers, 1996; Brucker and Neyer,
1998; Jurisch, 1992; Hurink et al., 1994; Vaessens, 1995; Mastrolilli and Gambardella,
2000; Hmida et al., 2007, 2010; Gao, 2008; Pezzella et al., 2008), tend to identify neigh-
borhoods which either solve the routing and the assignment into different transactions
(Barnes and Chambers, 1996; Brucker and Schlie, 1990; Jurisch, 1992; Hurink et al.,
1994; Hmida et al., 2007, 2010), or at the same time, (Dauzère-Pérès and Paulli, 1997;
Vaessens, 1995; Mastrolilli and Gambardella, 2000; Gao, 2008; Pezzella et al., 2008).
Specifically to the benchmarks used in this paper, Mastrolilli and Gambardella (2000)
proposed a tabu search procedure using two neighborhoods functions defined by the
moving of an operation and its feasible or optimal insertions, improving a large num-
ber of the best-known upper bounds. A hybrid search combining genetic and variable
neighborhood descent algorithms was implemented by Gao (2008), reporting better
performance than the tabu search. However, details of new upper bounds have not
been reported. A constraint programming approach was developed by Hmida et al.
(2010) using discrepancy search but the results are dominated by both Mastrolilli and
Gambardella (2000) and Gao (2008).
91
Chapter B. Decomposition in Scheduling
1 range A = . . . ;
2 range M = . . . ;
3 int [ ] d [A] = . . . ;
4 int [ ] m[A] = . . . ;
5 set { P r e c e d e n c e } P = . . . ;
6 A c t i v i t y a c t [ a in A ] ( ) ;
7 A c t i v i t y makespan ( ) ;
8 UnaryResourcePool p o o l (M) ;
9 var{ int } sm [A ] ;
10
11 minimize
12 makespan . end ( )
13 subject to {
14 f o r a l l ( c in P)
15 act [ c . before ] precedes act [ c . a f t e r ] ;
16 f o r a l l ( a in A)
17 a c t [ a ] p r e c e d e s makespan ;
18 f o r a l l ( a in A)
19 a c t [ a ] p o o l . r e q u i r e s (m[ a ] , d [ a ] ) ;
20 f o r a l l ( a in A)
21 sm [ a ] = p o o l . g e t S e l e c t e d M a c h i n e ( a c t [ a ] ) ;
22 }
23 using {
24 f o r a l l ( a in A) by ( s i z e (sm [ a ] ) )
25 t r y a l l (m in m[ a ] )
26 sm [ a ] = m;
27 f o r a l l (m in M) by ( s l a c k (m) )
28 rank (m) ;
29 f o r a l l ( a in A)
30 label ( activity [ a ] . start ());
31 }
between the “fixed” variables, and not actual starting times. In particular, the idea is
to extract a partial order from the current best solution and to ensure that the new
solution satisfies this ordering, (e.g., Carchrae and Beck (2009); Godard et al. (2005);
Cesta et al. (2000); Michel and Van Hentenryck (2004)). This is captured, for flexible
jobshops, by the following definitions.
Definition 2 (POS-feasible Solution). Let R be a set of activities to relax and (σo , µo )
be a feasible solution. A solution (σ, µ) is POS-feasible with regard to (σo , µo ) and R if it
satisfies σ(a) ≥ σ(b) + d(b, µ(b)) for all a, b ∈ A \ R such that σo (a) ≥ σo (b) + d(b, µo (b))
and µo (a) = µo (b).
It is also desirable to fix the machines of the activities which have not been relaxed.
Definition 3 (Fully POS-feasible Solution). Let R be a set of activities to relax and
(σo , µo ) be a feasible solution. A POS-feasible (σ, µ) is fully POS-feasible with regard to
92
Chapter B. Decomposition in Scheduling
(σo , µo ) and R if it is POS-feasible with regard to (σo , µo ) and R and satisfies µ(a) =
µo (a) ∧ µ(b) = µo (b) for all a, b ∈ A \ R.
The neighborhoods in this paper only consider fully POS-feasible solutions and are
generalizations of those used in Carchrae and Beck (2009). They differ on the choice of
the set R of activities to relax and whether or not some additional machine constraints
are placed on the relaxed activities. Three main neighborhoods are considered:
2. At step i, the solution πi−1 is used to obtain the decoupling (Po , Ps ) of P with
solutions πo and πs . The problem Po is then re-optimized and its solution πo∗ is
used to obtain the new solution of πi = MERGE(πo∗ , πi−1 ).
The choice of algorithms for optimizing the sub-problems is independent from the ARD
scheme. Our results were obtained by using CP and LNS algorithms.
93
Chapter B. Decomposition in Scheduling
P d = {(a, b) ∈ P|a ∈ Rd ∧ b ∈ Rd },
A feasible solution to the time decomposition satisfies all traditional constraints of the
flexible shop, as well as the additional constraints:
∀a ∈ Rd : σ(a) ≥ φ(µ(a))
∀a ∈ Rd : ω(a) ≤ γ(µ(a))
∀a ∈ Rd : σ(a) ≥ α(a)
∀a ∈ Rd : ω(a) ≤ β(a).
The time decomposition remains essentially a flexible shop problem, and can be solved
using the same algorithms. However, since the problem is now decoupled, knowledge
of how the re-optimized schedule will affect the overall solution is missing. Moreover,
using the makespan minimization as objective is not flexible enough as we will illustrate
shortly. It is more appropriate to use an objective function that maximizes the distance
between each activity and their completion time bounds, allowing a better left shift of
the entire schedule.
Figure B.2 illustrates the benefit of this new objective. Part (a) shows the decompo-
sition (jobs are denoted by colors), part (b) shows the optimized schedule using the
94
Chapter B. Decomposition in Scheduling
m1
m2
m3
0 1 2 3 4 5 6 7 8 9 10 11 12
makespan
a) Original Problem
m1 m1
m2 m2
m3 m3
0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5 6 7 8 9 10 11 12
sub−problem makespan makespan sub−problem makespan makespan
makespan objective, and part (c) the schedule obtained with the new objective. The
new objective achieves a better makespan overall, although its local makespan is worse.
and a reduced set of machines md (a) for all activities a ∈ Rd defined by md (a) =
m(a) ∩ Md . A feasible solution to a machine decomposition satisfies all constraints of
the flexible shop, as well as the additional constraints:
∀a ∈ Rd : σ(a) ≥ α(a)
∀a ∈ Rd : ω(a) ≤ β(a).
95
Chapter B. Decomposition in Scheduling
Since the machine decomposition has full knowledge of the activities within each ma-
chine, minimizing the makespan guarantees the generation of non-degrading solutions
as long as the machines on the critical path are in the set Md .
µm (a) = µd (a) if a ∈ Rd
µm (a) = µo (a) otherwise
and such that σm is assigned a start date minimizing the set of precedence constraints
{(a, b)|µo (a) = µd (b) ∧ a 6∈ Rd ∧ b ∈ Rd ∧ σd (b) ≥ ωo (a)} ∪
{(a, b)|µd (a) = µo (b) ∧ a ∈ Rd ∧ b 6∈ Rd ∧ σo (b) ≥ ωd (a)} ∪
{(a, b)|µd (a) = µd (b) ∧ a ∈ Rd ∧ b ∈ Rd ∧ σd (b) ≥ ωd (a)} ∪
{(a, b)|µo (a) = µo (b) ∧ a 6∈ Rd ∧ b 6∈ Rd ∧ σo (b) ≥ ωo (a)}.
96
Chapter B. Decomposition in Scheduling
The ARD(CP) and ARD(LNS) use a time decomposition chosen between 20% and
50% of the horizon, with a 5% step increase. The machine decomposition uses |M|/2
machines. The hLNS search selects activities with 50% probability in the random
relaxation, time windows randomly chosen between 25% and 50% of the horizon, and a
number of machines randomly selected in [2, |M|/4] in the machine relaxation. Three
additional relaxations are derived from these relaxations by fixing the machine of a
relaxed activity to its current selection with a 33% probability.
Overall Quality of the Results Table B.1 depicts the quality of solutions found in
5 and 10 minutes by using the Mean Relative Error (MRE) computed as 100%(U B −
LB)/LB. The first column describes the set of instances, while the following columns
present the aggregated results for each of the algorithms, giving the best performance
and showing the average performance in parenthesis. Algorithms hLNS, ARD(CP), and
ARD(LNS) achieve comparable results to those found using the best heuristic methods
and the best solutions of hLNS and ARD(LNS) often produce improvements over the
dedicated heuristics, in particular on la21-25 and la26-30. Note also that hLNS and
ARD produce results that are about 0.5% in average from the best upper bound.
These results are surprisingly good, given that the CBS algorithms use a rather
simple search: They thus require very little development effort on top of a modern
constraint-based scheduler (e.g., LNS adds another 50 lines of code), and could certainly
be improved by using more advanced search techniques, such as texture-based heuristics
Beck et al. (1997).
Table B.2 presents the best results for runs of 5 and 60 minutes for all the ex-
periments. Bold face means an improvement over the best known upper bound (last
column), while italics means that the best known upper bound has been matched. It
is interesting to point out that hLNS improves or matches all the best results in 60
minutes and improves more than 50% of them. In fact, hLNS produces similar results
97
Chapter B. Decomposition in Scheduling
Impact of the Neighborhoods We now study the impact of the various neighbor-
hoods and decompositions on runs of 15 minutes. Figure B.3 compares the time and
machine decompositions, as well as their hybridization. The results show the clear ben-
efit of the hybridization. Figure B.4 depicts the results for a large neighborhood search.
For these runs of 15 minutes, they indicate that the random and time neighborhoods are
most important: The machine neighborhood does not seem to bring additional bene-
fits. Figure B.5 shows that the machine neighborhood provides improvements for longer
runs: It compares LNS with and without the machine neighborhood and ARD(LNS).
98
Chapter B. Decomposition in Scheduling
1340
Time Decomposition
Machine Decomposition
Hybrid Decomposition
1320
1300
Makespan
1280
1260
1240
1220
0 2 4 6 8 10 12 14 16
Minutes.
1310
Time & Machine Neighborhood
Random & Time Neighborhood
Random & Machine Neighborhood
1300 Hybrid Neighborhood
1290
1280
Makespan
1270
1260
1250
1240
1230
1220
0 2 4 6 8 10 12 14 16
Minutes.
The results indicate that the machine neighborhood starts improving the results after
15 minutes and is necessary for LNS to dominate ARD(LNS). These results also shed
some interesting light on the strength of the decomposition approach, which does not
99
Chapter B. Decomposition in Scheduling
rely on the random neighborhood, giving us some reasonable confidence that it will
scale nicely on large-scale instances.
1280
ARD(LNS)
hLNS without Machine Neighborhood
hLNS
1270
1260
1250
Makespan
1240
1230
1220
1210
0 10 20 30 40 50 60
Minutes.
100
Chapter C. Completeness of the CBLS neighborhood
Appendix C
Proposition 3. The swap neighborhood Γ defined by the union of swap 20 and swap 40
swaps for a slot planning problem Π is complete.
Proof. We prove the claim by showing that any current assignment π of the variables
of Π can be changed to an arbitrary assignment π 0 via a sequence of swaps. Let xπstp
denote the value of variable xstp in assignment π. Assume without loss of generality
that the variables of Π are re-assigned from π to π 0 according to some total ordering of
the cells ≺. Consider assigning the variables of cell (s, t) at some point in this ordered
re-assignment. We have two cases:
0 0
1. f (xπst1 ) (i.e., a 40’ container must be placed in the cell). If xπst1 = xπst1 the cell
0
assignment is correct. Otherwise find the container xπst1 in a cell (s0 , t0 ) and use
swap 40 of type 1 to 5 to assign it to xst1 .
0 0
2. ¬f (xπst1 ) (i.e., 20’ containers or empties must be placed in the cell). If xπst1 = xπst1
then the aft slot of the cell is assigned correctly. Otherwise find the container
(including ⊥), in the fore slot of the cell or in another cell (s0 , t0 ) and use swap 20
type 1 or 2 to assign it to xst1 . Do the same for xst2 , except only look for the
container in another cell (s0 , t0 ).
Because all variables of cells previous to (s, t) have already been assigned, the cells
(s0 , t0 ) with containers to swap into (s, t) must come after (s, t) (i.e. (s, t) ≺ (s0 , t0 )).
Since the cell (s, t) is arbitrarily chosen, all cells can be re-assigned from π to π 0 using
the resulting sequence of swaps.
101
Chapter C. Completeness of the CBLS neighborhood
102
BIBLIOGRAPHY
Bibliography
(2010). Storck Guide: Stowage& Segregation to IMDG Code. Storck Verlag Hamburg.
103
BIBLIOGRAPHY
Avriel, M., M. Penn, and N. Shpirer (2000). Container ship stowage problem: complex-
ity and connection to the coloring of circle graphs. Discrete Applied Mathematics 103,
271–279.
Avriel, M., M. Penn, N. Shpirer, and S. Witteboon (1998). Stowage planning for
container ships to reduce the number of shifts. Annals of Operations Research 76,
55–71.
Azevedo, A., C. Ribeiro, A. Chaves, G. Sena, L. Salles Neto, and A. Moretti (2012,
February). Solving the 3d containership stowage loading planning problem by repre-
sentation by rules and beam search. In Proceedings of the 1st International Conference
on Operations Research and Enterprise Systems - ICORES 2012.
Beck, J., A. Davenport, E. Sitarski, and M. Fox (1997). Texture-based heuristics for
scheduling revisited. In Proceedings of the National Conference on Artificial Intelli-
gence, pp. 241–248. Citeseer.
Bent, R. and P. Van Hentenryck (2010). Spatial, Temporal, and Hybrid Decompositions
for Large-Scale Vehicle Routing with Time Windows. In D. Cohen (Ed.), Principles
and Practice of Constraint Programming, Volume 6308 of Lecture Notes in Computer
Science, Berlin, Heidelberg, pp. 99–113–113. Springer Berlin Heidelberg.
Bona, B., P. Brandimarte, C. Greco, and G. Menga (1990). Hybrid hierarchical schedul-
ing and control systems in manufacturing. IEEE Transactions on Robotics and Au-
tomation 6 (6), 673–686.
Botter, R. and M. Brinati (1992). Stowage container planning: A model for getting an
optimal solution. In Proceedings of the 7th Int. Conf. on Computer Applications in
the Automation of Shipyard Operation and Ship Design, pp. 217–229.
Brucker, P. and J. Neyer (1998, March). Tabu-search for the multi-mode job-shop
problem. OR Spektrum 20 (1), 21–28.
Carchrae, T. and J. Beck (2009). Principles for the design of large neighborhood search.
Journal of Mathematical Modelling and Algorithms 8, 245–270. 10.1007/s10852-008-
9100-2.
104
BIBLIOGRAPHY
Cesta, A., A. Oddi, and S. Smith (2000). Iterative flattening: A scalable method
for solving multi-capacity scheduling problems. In Proceedings of the National Con-
ference on Artificial Intelligence, pp. 742–747. Menlo Park, CA; Cambridge, MA;
London; AAAI Press; MIT Press; 1999.
Dauzère-Pérès, S. and J. Paulli (1997). An integrated approach for modeling and solving
the general multiprocessor job-shop scheduling problem using tabu search.
Delgado, A., R. M. Jensen, and C. Schulte (2009). Generating optimal stowage plans for
container vessel bays. In Proceedings of the 15th Int. Conf. on Principles and Practice
of Constraint Programming (CP-09), Volume 5732 of LNCS Series, pp. 6–20.
Dubrovsky, O., G. Levitin, and M. Penn (2002). A genetic algorithm with a compact
solution encoding for the container ship stowage problem. Journal of Heuristics 8,
585–599.
Fan, L., M. Low, H. Ying, H. Jing, Z. Min, and W. Aye (2010). Stowage planning of
large containership with tradeoff between crane workload balance and ship stability.
Volume 2182, pp. 1537–1543.
Gao, J. (2008, September). A hybrid genetic and variable neighborhood descent al-
gorithm for flexible job shop scheduling problems. Computers & Operations Re-
search 35 (9), 2892–2907.
Godard, D., P. Laborie, and W. Nuitjen (2005). Randomized large neighborhood search
for cumulative scheduling. In Proceedings of the International Conference on Auto-
mated Planning & Scheduling (ICAPS 2005), pp. 81–89.
105
BIBLIOGRAPHY
Hentenryck, P. and L. Michel (2009). Constraint-based local search. The MIT Press.
Hmida, A. B., M.-J. Huguet, P. Lopez, and M. Haouari (2007). Climbing depth-
bounded discrepancy search for solving hybrid flow shop problems. European Journal
of Industrial Engineering 1 (2), 223–243.
Hmida, B. A., H. Mohamed, H. Marie-José, and P. Lopez (2010). Discrepancy search
for solving flexible scheduling problems. In 2th International Workshop devoted to
Project Management and Scheduling.
Hurink, J., B. Jurisch, and M. Thole (1994, December). Tabu search for the job-shop
scheduling problem with multi-purpose machines. OR Spektrum 15 (4), 205–215.
Imai, A., K. Sasaki, E. Nishimura, and S. Papadimitriou (2006). Multi-objective simul-
taneous stowage and load planning for a container ship with container rehandle in
yard stacks. European Journal of Operational Research (171), 373–389.
Jensen, R., E. Leknes, and T. Bebbington (2012). Fast interactive decision support
for modifying stowage plans using binary decision diagrams. In Proceedings of the
International MultiConference of Engineers and Computer Scientists (IMECS’12),
pp. 1555–1561.
Jurisch, B. (1992). Scheduling jobs in shops with multi-purpose machines. Ph.d. disser-
tation, Universitat Osnabruck.
Kaisar, E. (1999). A Stowage Planning Model for Multiport Container Transportation.
Ph. D. thesis, University of Maryland.
Kang, J. and Y. Kim (2002). Stowage planning in maritime container transportation.
Journal of the Operations Research Society 53 (4), 415–426.
Levinson, M. (2006). The Box: How the Shipping Container Made the World Smaller
and the World Economy Bigger. Princeton University Press.
Li, F., C. Tian, R. Cao, and W. Ding (2008). An integer linear programming for con-
tainer stowage problem. In M. Bubak, G. van Albada, J. Dongarra, and P. Sloot
(Eds.), Computational Science ICCS 2008, Volume 5101 of Lecture Notes in Com-
puter Science, pp. 853–862. Springer Berlin / Heidelberg.
Liu, F., M. Low, W. Hsu, S. Huang, M. Zeng, and C. Win (2011). Randomized algo-
rithm with tabu search for multi-objective optimization of large containership stowage
plans. In J. Bse, H. Hu, C. Jahn, X. Shi, R. Stahlbock, and S. Vo (Eds.), Compu-
tational Logistics, Volume 6971 of Lecture Notes in Computer Science, pp. 256–272.
Springer Berlin / Heidelberg.
Low, M. Y.-H., M. Zeng, W.-J. Hsu, S.-Y. Huang, F. Liu, and C. A. Win (2011).
Improving safety and stability of large containerships in automated stowage planning.
IEEE Systems Journal 5 (1), 50–60.
106
BIBLIOGRAPHY
MAN Diesel & Turbo (2008, 08). Propulsion trends in container vessels.
Michel, L. and P. Van Hentenryck (2004). Iterative relaxations for iterative flattening
in cumulative scheduling. In ICAPS04.
Pacino, D., A. Delgado, and R. Jensen (2012). Modeling ballast water in container
stowage planning. Accepted for presentation at the 25th European Conference on
Operational Research (EURO 2012), 8-11 July 2012, Vilnius (LT).
Pacino, D., A. Delgado, R. Jensen, and T. Bebbington (2012a). An accurate model for
seaworthy stowage planning with ballast tank. Under review for the 3nd International
Conference on Computational Logistics, (ICCL12).
Pacino, D. and R. M. Jensen (2009). A local search extended placement heuristic for
stowing under deck bays of container vessels. In The 4th Int. Workshop on Freight
Transportation and Logistics (ODYSSEUS-09).
Pacino, D. and R. M. Jensen (2012). Constraint-based local search for container stowage
slot planning. In Proceedings of the International MultiConference of Engineers and
Computer Scientists, pp. 1467–1472.
107
BIBLIOGRAPHY
Sciomachen, A. and A. Tanfani (2003). The master bay plan problem: a solution
method based on its connection to the three-dimensional bin packing problem. IMA
Journal of Management Mathematics 14, 251–269.
Scott, D. and D. Chen (1978). A loading model for a container ship. Technical report,
Matson Navigation Company, Los Angeles.
Steenken, D., S. Voss, and R. Stahlbock (2004). Container terminal operation and
operations research - a classification and literature review. OR Spectrum 26, 3–49.
Vaessens, R. R. (1995). Generalized job shop scheduling : complexity and local search.
doctoral thesis, Eindhoven University of Technology.
Wilson, I., P. Roach, and J. Ware (2001). Container stowage pre-planning: using search
to generate solutions, a case study. Knowledge-Based Systems 14 (3), 137–145.
Wilson, I. D. and P. Roach (2000). Container stowage planning: A methodology for gen-
erating computerised solutions. Journal of the Operational Research Society 51 (11),
248–255.
108
BIBLIOGRAPHY
Zhang, W., Y. Lin, and Z. Ji (2005). Model and algorithm for container ship stowage
planning based on bin-packing problem. Journal of Marine Science and Applica-
tion 4 (3).
109