Mar 17, 2005 - (FCCs) accounted for 5.9 million TEUs of this total. .... A fleet of 75 vehicles, called straddle carriers, transfer the containers between the ...... Declare free the space occupied by ship i during its handling time; since a ship ..... ble savings that the heuristic can provide to the port with respect to a manual plan.
U NIVERSITÀ DEGLI STUDI DELLA C ALABRIA Facoltà di Ingegneria Dipartimento di Elettronica Informatica e Sistemistica Corso di dottorato in Ricerca Operativa XVI CICLO
T ESI DI
DOTTORATO
New Optimization Models and Algorithms for the Management of Maritime Container Terminals
Luigi Moccia
A NNO A CCADEMICO 2003-2004
Thesis submitted to the Università della Calabria for the doctoral degree in Operations Research Candidate: Luigi Moccia Title: New Optimization Models and Algorithms for the Management of Maritime Container Terminals Date: 17th of March 2005 Università della Calabria advisor: Prof. Manlio Gaudioso HEC Montréal advisors: Prof. Gilbert Laporte and Prof. Jean-François Cordeau
Contents 1 Introduction
1
1.1
Container terminal operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.2
The Gioia Tauro maritime terminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4
1.3
Summary of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
1.4
Sommario della tesi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8
2 The Berth Allocation Problem
11
2.1
Overview of the Berth Allocation Problem
2.2
Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3
Mathematical models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4
2.5
. . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.3.1
DBAP formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.3.2
MDVRPTW formulation
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Tabu search heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 2.4.1
T 2 S - A tabu search heuristic for the discrete case . . . . . . . . . . . . . . . . . . 19
2.4.2
(T S)2 - A tabu search heuristic for the continuous case . . . . . . . . . . . . . . . 21
Computational results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.5.1
Test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.5.2
Results for the discrete case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
2.5.3
Computational results for the continuous case . . . . . . . . . . . . . . . . . . . . 28
3 The Quay Crane Scheduling Problem
32
3.1
Overview of the Quay Crane Scheduling Problem . . . . . . . . . . . . . . . . . . . . . . 32
3.2
Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.3
Mathematical models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 I
3.4
3.5
3.6
3.3.1
Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.3.2
The Kim and Park formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.3.3
Observations on the Kim and Park formulation . . . . . . . . . . . . . . . . . . . 40
3.3.4
Formulation F 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Valid inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.4.1
Lower bounds on the QC completion time . . . . . . . . . . . . . . . . . . . . . . 45
3.4.2
Subtour elimination constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.4.3
Order matching constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Branch-and-Cut algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.5.1
Variable fixing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.5.2
Branching priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.5.3
Initial pool of inequalities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.5.4
Separation Heuristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Computational results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.6.1
Test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.6.2
Implementation details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.6.3
Results with the formulations F 1 and F 2 . . . . . . . . . . . . . . . . . . . . . . . 56
3.6.4
Results with the branch-and-cut algorithm . . . . . . . . . . . . . . . . . . . . . . 57
4 The Generalized Quadratic Assignment Problem
61
4.1
Overview of the Generalized Quadratic Assignment Problem . . . . . . . . . . . . . . . 61
4.2
Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.3
Mathematical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.4
Memetic heuristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.5
4.4.1
Initial population . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.4.2
Genetic procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.4.3
Post-optimization tabu search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.4.4
Recovering feasibility: procedure TABUFIX . . . . . . . . . . . . . . . . . . . . . . 69
Parameter setting and sensitivity analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.5.1
Test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.5.2
TABUFIX parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.5.3
Other memetic parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 II
4.6
Computational results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4.6.1
Test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.6.2
Implementation details and results . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.6.3
Robustness analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
5 The Service Allocation Problem
82
5.1
Overview of the Service Allocation Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.2
Mathematical model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.3
5.4
5.2.1
Quadratic SAP formulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.2.2
Linearization of the SAP formulation . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.2.3
Extension of the linearized model to a two dimensional grid . . . . . . . . . . . . 88
5.2.4
Linearization of the GQAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
M-SAP, a memetic heuristic for the SAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 5.3.1
Initial population . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.3.2
Genetic procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
5.3.3
Post-optimization tabu search: POTS2 . . . . . . . . . . . . . . . . . . . . . . . . . 93
5.3.4
Recovering feasibility: procedure TABUFIX2 . . . . . . . . . . . . . . . . . . . . . 94
5.3.5
Differences between M-SAP and M-GQAP . . . . . . . . . . . . . . . . . . . . . . 95
Computational results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5.4.1
Test instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
5.4.2
Implementation details and results . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6 Conclusions and future developments
101
III
List of Figures 1.1
Maritime terminal layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
1.2
Terminal layout at Gioia Tauro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
2.1
Berth - time space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2
Distribution ship lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.3
The quay as a set of segments with dynamically changing lengths . . . . . . . . . . . . . 23
2.4
Ships’ arrivals at Gioia Tauro port per week (yearly average) . . . . . . . . . . . . . . . . 26
3.1
Successor inequality for S = {i, j, l} ⊆ Ω . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.2
Predecessor inequality for S = {i, j, l} ⊆ Ω . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.3
Lifted directed subtour elimination constraint of Proposition 1 . . . . . . . . . . . . . . . 49
3.4
Lifted directed subtour elimination constraint of Proposition 2 . . . . . . . . . . . . . . . 50
3.5
Lifted directed subtour elimination constraint of Proposition 3 . . . . . . . . . . . . . . . 50
3.6
Lifted directed subtour elimination constraint of Proposition 4 . . . . . . . . . . . . . . . 51
3.7
Lifted generalized order constraint with m = 2, Proposition 5 . . . . . . . . . . . . . . . 52
4.1
Example of partition construction induced by different pivot choices. . . . . . . . . . . . 66
4.2
Example of one iteration of the merging cycle. . . . . . . . . . . . . . . . . . . . . . . . . 67
5.1
Central part of the Gioia Tauro layout illustrating the berthing constraint for split services at bays 8 and 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.2
Linear disposition of the bays modelled by the SAP . . . . . . . . . . . . . . . . . . . . . 87
5.3
Two-dimensional case with L1 norm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4
Relative importance of the Gioia Tauro’s services . . . . . . . . . . . . . . . . . . . . . . . 96
5.5
Lower Bounds of two implementations of L1 SAP . . . . . . . . . . . . . . . . . . . . . . . 98
IV
List of Tables 1.1
Throughput, in million TEUs, of the top-20 ports, years 2000 - 2002. . . . . . . . . . . . .
5
2.1
Port route subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.2
Subdivision of the Gioia Tauro quay into favorite and acceptable areas . . . . . . . . . . 25
2.3
Summary of the average results (10 instances for every problem size) . . . . . . . . . . . 28
2.4
Number of constraints, variables and non-zero coefficients in the reduced MIP solved by CPLEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2.5
Results for truncated CPLEX and T 2 S, part I . . . . . . . . . . . . . . . . . . . . . . . . . 29
2.6
Computational results for truncated CPLEX and T 2 S, part II . . . . . . . . . . . . . . . . 30
2.7
Computational results for (T S)2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.1
Description of the instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.2
Comparison between F 1 and F 2 formulations.
3.3
Comparison between solutions on instance set I1 reported in Kim and Park (2004) and
. . . . . . . . . . . . . . . . . . . . . . . 58
with the formulation F 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.4
Comparison between three variants of formulation F 2 on instance set I1. . . . . . . . . 59
3.5
Results of the branch-and-cut algorithm on instance set I2 compared to formulation F 2. 60
4.1
Instance codes of the sets T1 and T2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.2
TABUFIX sensitivity to parameter θf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.3
TABUFIX sensitivity to parameter λ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.4
TABUFIX sensitivity to parameter ηf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.5
Sensitivity of the memetic algorithm to population size. . . . . . . . . . . . . . . . . . . . 74
4.6
Sensitivity of the memetic algorithm to $ with ξ = 1. . . . . . . . . . . . . . . . . . . . . 74
4.7
Sensitivity of the memetic algorithm to $ with similar computation times. . . . . . . . . 74 V
4.8
Sensitivity of the memetic algorithm to θ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.9
Sensitivity of the memetic algorithm to µ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.10 Sensitivity of the memetic algorithm to δ. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4.11 Sensitivity of the memetic algorithm to η. . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4.12 Computational results for instance set I1. . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 4.13 Computational results for CPLEX on instance set I2 with different values of the MIP parameter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 4.14 Computational results for the memetic heuristic on instance set I2. . . . . . . . . . . . . 80 4.15 Comparison between the solution values of the memetic heuristic (M) and the CPLEX (C) branch-and-bound algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.16 Comparison between the solution values of the memetic heuristic (M-GQAP) and of a previous version (MEM0) with a complete different parameter setting. . . . . . . . . . . 81 5.1
Computational results for real data instances.
5.2
M-SAP on instance "39-16" varying ξ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.3
Random generated instances. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
5.4
M-SAP sensitivity to ξ on instance set R. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
VI
. . . . . . . . . . . . . . . . . . . . . . . . 99
Chapter 1
Introduction Since the dawn of civilization, maritime and fluvial transportation has shaped the urbanization process. The reason lies mostly in physics: moving goods on water requires much less energy than on earth. However, everything has changed with the industrial revolution: engines have provided the power necessary for terrestrial and, in the last century, airborne transportation. Location choices nowadays are vastly different than they were in the pre-industrial era and cities can now grow far from the water banks. Nevertheless, the laws of physics still apply and maritime transportation remains the cheaper way to move goods. There are now more than 2000 ports around the world, ranging from single berth locations handling a few hundred tons a year to multipurpose facilities handling up to 300 million tons a year. The world port traffic is made up of 37% of liquid bulk products (mainly oil, petroleum products, and chemicals), of 23% of dry bulk goods (coal, iron ore, grain, bauxite, and phosphate), and of 40% of general cargo. For statistics on maritime transport we refer the reader to UNCTAD (2003). Over the last 20 years the use of containers for general cargo has increased steadily. Containers are large metal boxes made in standard dimensions and measured in multiples of twenty feet called “twenty foot equivalent units” (TEUs). In 2002 the production of containers reached 1.6 million TEUs, an increase of 25% over the level of the previous year. This activity is dominated by China which holds a 87% market share. Containers possess several advantages: they require less product packaging, they help reducing damage, and they yield higher productivity during the various handling phases. Moreover containers allow for inter-modal transportation because transshipment between ships, trucks or trains is easily performed. Between 1995 and 2001 the worldwide container port throughput has
1
CHAPTER 1. INTRODUCTION
2
increased from 135 to 237 million TEUs. Container port throughput is different from container traffic which, in 2001, amounted to 70 million TEUs and preliminary estimates for the 2002 indicate a level of 75.8 million TEUs. The ratio between worldwide container port throughput and container traffic, approximately equal to 3.4, is explained by transshipment activities. Containers flow along the three main East-West routes (transpacific, Europe-Far East and transatlantic) is estimated at 34 million TEUs, while North-South routes are believed to carry about 15 million TEUs and the intra-regional routes account for the remaining balance. In the container transportation industry the hub and spoke arrangement is widely adopted. Deep sea vessels, also called mother vessels, operate between a limited number of transshipment terminals (hubs), while smaller vessels (feeders) link the hubs with the other ports (spokes). This network topology results in the consolidation of capacity along the routes linking the hubs and in their growth. In recent years, mother vessels have strongly increased in size, attaining up to 8000 TEUs. The average size of vessels above the 5000 TEUs which have been delivered and ordered during the 2002 was 5060 and 6700 TEUs, respectively, and these data clearly shows a trend toward route consolidation. In 2002 the seaborne container carrying capacity reached 8 million TEUs and Fully Cellular Containerships (FCCs) accounted for 5.9 million TEUs of this total. A FCC is a vessel especially designed to carry containers, with cell-guides under deck and necessary fittings and equipment on the deck. Ultralarge container vessels cut down transport cost. However, hub ports are forced to invest heavily to accommodate these ships by deepening and widening channels and by constructing new berthing services of sufficient depth and length. Transshipment ports are large intermodal platforms, and a limited number of them handle an important share of the world traffic. Thus, in 2001 the first twenty container ports handled 48% of the total traffic. These trends require a continuous improvement in managerial practices at transshipment terminals which can be viewed as large material handling systems. Advanced communication and information technologies already exist and the next step will be the introduction of customized optimization techniques. Customization is a key factor since maritime terminals differ from each other in their layouts and material handling equipments.
1.1 Container terminal operations When ships arrive at the port, they enter in the harbor waiting to moor at the quay (Figure 1.1). The quay is a platform protruding into the water to facilitate the loading and unloading of cargo. The
CHAPTER 1. INTRODUCTION
11 00 00 11
3
11 00 00 11 00 11
Vehicles
Ships waiting in harbor
Arriving ships Berths
Yard
Berthed ships
Quay crane
11 00 00 11 00 11
Figure 1.1: Maritime terminal layout locations where mooring can take place are called berths. These are equipped with giant cranes, called pier or quay cranes, used to load and unload containers which are transferred to and from the yard by a fleet of vehicles. In a transshipment terminal the yard allows temporary storage before containers are transferred to another ship or to another mode (e.g., rail or road). Containers relocation in the yard is also performed to speed up the loading process. A high degree of coordination is required to ensure a fast transshipment process. The decisions related to the port layout and material handling equipments are taken at the strategic level, and the time horizon of these decisions covers several years. In this thesis the focus is on the decision problems at the tactical and operational levels. A possible classification of these problems, according to their structure follows:
CHAPTER 1. INTRODUCTION
4
Scheduling (when?): equipment needs to be scheduled (quay cranes, vehicles, yard cranes), e.g., the ships must know when to berth and unberth; Location (where?): ships must moor at a berth, containers must be transfered to some slots in the yard for temporary storage (yard management); Assignment (how many?): amount of resources assigned to perform an operation, like the number of quay cranes to handle a vessel, etc; Routing (which path or route?): vehicles pickup and deliver containers between the yard and the quay cranes; yard cranes operate between different sectors of the yard. The decision problems can also be grouped in relation to the flow of containers in the terminal: 1. arrival of the ship; 2. unloading and loading of the ship; 3. transport of containers from the ship to yard and vice versa; 4. inter-terminal transport and, eventually, link with other transportation modes. The need for an optimal management of logistics activities at modern container terminals is well recognized (Daganzo (1990); De Castilho and Daganzo (1993); Taleb-Ibrahimi et al. (1993)). For a recent overview and classification of the various equipments and decision problems in such systems, see Vis and Koster (2003) and Steenken et al. (2004). A review of operational research issues in maritime logistics, focused on ship routing and scheduling, is also presented by Christiansen et al. (2004).
1.2 The Gioia Tauro maritime terminal This study was initiated at the request of the Gioia Tauro Maritime Terminal, located in southern Italy. This port is mainly devoted to transshipment activities involving mother vessels and feeders operating in a hub and spoke manner. Nearly 50 spoke ports are linked to Gioia Tauro. In just a a few years, Gioia Tauro has become the largest transshipment port on the Mediterranean Sea, and at the world level Gioia Tauro ranks 17th (Table 1.1). This achievement is impressive since the port only opened in 1995, and no infrastructures existed until 1993. The port throughput for 2003 reached 3.2 million TEUs and 3250 ships. The harbor entrance is 250 meters wide and the water depth is 18 meters. The quay length is 3100 meters. The
CHAPTER 1. INTRODUCTION
Ranking 2002 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
5
Port Hong Kong Singapore Busan Shanghai Kaoshiung Shenzhen Rotterdam Los Angeles Hamburg Antwerp Long Beach Port Klang Dubai New York Quingdao Bremenhaven Gioia Tauro Manila Tokyo Felixstowe
2002 18.6 16.9 9.3 8.6 8.5 7.6 6.5 6.1 5.4 4.8 4.5 4.5 4.2 3.8 3.1 3.0 3.0 2.9 2.8 2.8
Year 2001 17.9 15.5 8.1 6.3 7.5 5.1 6.1 5.2 4.7 4.2 4.5 3.8 3.5 3.3 2.6 2.9 2.5 2.8 2.8 2.8
2000 18.1 17.0 7.5 5.6 7.4 4.0 6.3 4.9 4.3 4.0 4.6 3.2 3.1 3.0 2.1 2.7 2.7 2.9 3.0 2.8
Table 1.1: Throughput, in million TEUs, of the top-20 ports, years 2000 - 2002. channel along the quay presents a multi-water depth configuration, ranging from 13.5 to 15.5 meters. There are 23 quay cranes available, 18 of which are mounted on rail, while the others roll on tires. A fleet of 75 vehicles, called straddle carriers, transfer the containers between the quay cranes and the yard. These vehicles are capable of transporting up to two containers at a time and can insert containers directly into the right yard slot. Straddle carriers are usually used for the transport of full containers over relatively short distances (less than 500 meters). Different vehicles are used for longer transfers. The yard surface occupies 1.1 million square meters and can store nearly 59,000 TEUs (1,100 of which can be refrigerated). The yard contains four main areas. Three of these, called A, B and C, are parallel to the quay, with area A being the closest to the sea and area C being the most distant. Areas A and B are divided into 16 bays each. Thus a bay is identified by a level index from one to 16 and by an area code. The distance between adjacent bay centers is 150 meters. The layout of the Gioia Tauro yard is represented in Figure 1.2 which illustrates only a subset of the bays to keep the figure dimensions reasonable, and also because the central part of the yard presents additional details which will be explained later in Chapter 5. An average bay consists of 32 lines, each containing 16 slots. A slot can host up to three one-TEU containers stacked one on top of the other, but it is preferable to stack only two containers. Accordingly, the yard capacity is computed assuming two TEUs per slot, and thus the average bay has a capacity of 1024 TEUs. There is a significant variation
CHAPTER 1. INTRODUCTION
6
16 slots
C
32 lines
16
15
14
B
A
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
Maximum stacking level 111111 000000 Usual stacking level
111111 000000 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111 000000 111111
3
2
1
Area D
Figure 1.2: Terminal layout at Gioia Tauro in the capacity of the bays of area B, which range from 749 to 890 TEUs, and in the bays of area A, which range from 1002 to 1240 TEUs. When we consider the total capacity of the bays of areas A and B having the same level index, this quantity ranges from 1882 to 2106 TEUs. Area C is dedicated to the empty containers which have an eight to ten day average dwell time, much more than for a full container. This is the reason why these are located in the most remote positions of the yard. Empty
CHAPTER 1. INTRODUCTION
7
containers can be stacked up to five high. Area D is a dynamic area used for empty containers or full containers, depending on the situation. A railway station and a connection with the southern Italy highway network are also present. At the time of writing, Gioia Tauro employs 940 workers.
1.3 Summary of the thesis We studied three management problems. The first is the Berth Allocation Problem (BAP), the second is the Quay Crane Scheduling Problem (QCSP) and the third is the Service Allocation Problem (SAP). This last problem can be modelled by an extension of the Quadratic Assignment Problem (QAP), called the Generalized Quadratic Assignment Problem (GQAP) for which we also developed a new heuristic. In the Berth Allocation Problem (Chapter 2) the aim is to optimally schedule and assign ships to berthing areas along a quay. The objective is the minimization of the total service time for all ships, defined as the time elapsed between the arrival in the harbor and the completion of handling. Two versions of the BAP are considered: the discrete case and the continuous case. The discrete case works with a finite set of berthing points. In the continuous case ships can berth anywhere along the quay. Two formulations and a tabu search heuristic are developed for the discrete case. Only small instances can be solved optimally. For these sizes the heuristic always yields an optimal solution. For larger sizes it is always better than a truncated branch-and-bound applied to an exact formulation. A heuristic is also developed for the continuous case. Computational comparisons are performed with the first heuristic and with a greedy constructive procedure. The Quay Crane Scheduling Problem (Chapter 3) consists of determining a sequence of unloading and loading movements for cranes assigned to a vessel, in order to minimize the vessel completion time as well as the crane idle times. Idle times originate from interferences between cranes since these roll on the same rails and a minimum safety distance must be maintained between them. The productivity of container terminals is often measured in terms of the time necessary to load and unload vessels by quay cranes, which are the most important and expensive equipment used in ports. We formulate the quay crane scheduling problem as a vehicle routing problem with side constraints, including precedence relationships between vertices. For small size instances our formulation can be solved by CPLEX. For larger ones we have developed a branch-and-cut algorithm incorporating several families of valid inequalities which exploit the precedence constraints between vertices. In the Generalized Quadratic Assignment Problem, considered in Chapter 4, we are given n
CHAPTER 1. INTRODUCTION
8
weighted facilities, m capacitated sites, a traffic intensity matrix between facilities, a distance matrix between sites, unit traffic costs, and assignment costs of facilities to sites. The aim is to determine an assignment of facilities to sites in such a way that the sum of assignment and traffic costs is minimized and the total weight of all facilities assigned to the same site does not exceed the site capacity. The GQAP is a generalization of the QAP in which n = m and exactly one facility must be assigned to each site. We describe a memetic heuristic for the GQAP, as well as an integer linear programming formulation which can be solved by CPLEX for small size instances. For larger instances, feasible solutions can be obtained by means of a truncated branch-and-bound procedure. Computational experiments show that on small instances the proposed heuristic always yields an optimal solution; on larger instances it always outperforms the truncated branch-and-bound algorithm. The Service Allocation Problem (Chapter 5) is a tactical problem arising in the yard management of a container transshipment terminal. The objective is the minimization of container rehandling operations inside the yard. The SAP can be formulated as a GQAP with side constraints. Two mixed integer linear programming formulations are presented. The first one exploits characteristics of the yard layout at Gioia Tauro where the berth and the corresponding yard positions extend along a line. The second formulation is an adaptation of a linearization for the GQAP. In both cases only small instances can be solved optimally. An evolutionary heuristic was therefore developed. For small size instances the heuristic always yields optimal solutions. For larger sizes it is always better than a truncated branch-and-bound algorithm applied to the exact formulations. Conclusions are reported in Chapter 6.
1.4 Sommario della tesi Tre sono i problemi gestionali trattati nella tesi. Il primo riguarda il Problema della Allocazione degli Attracchi (PAA), il secondo è il Problema della Schedulazione delle Gru di Banchina (PSGB) e il terzo consiste nel Problema dell’Allocazione dei Servizi agli Spazi di Piazzale (PASSP). Questo ultimo problema può essere modellato come un’estensione del Problema dell’Assegnamento Quadratico (PAQ), chiamato Problema dell’Assegnamento Quadratico Generalizzato (PAQG) per il quale abbiamo sviluppato una nuova euristica. Nel Problema dell’Allocazione degli Attracchi (Capitolo 2) vogliamo schedulare e assegnare le navi agli attracchi lungo la banchina in maniera ottimale. L’obiettivo è la minimizzazione del tempo
CHAPTER 1. INTRODUCTION
9
totale di servizio, definito come il tempo intercorso tra l’arrivo della nave in baia e la fine delle operazioni di carico e scarico. Due versioni del PAA sono considerate: il caso discreto e quello continuo. Il caso discreto considera un insieme finito di punti di attracco. Nel caso continuo le navi possono attraccare dovunque lungo la banchina. Due formulazioni e una euristica di tipo tabù sono state sviluppate per il caso discreto. Soltanto istanze di piccola dimensione possono essere risolte all’ottimalità. Per queste istanze l’euristica sempre individua una soluzione ottima. Per istanze di dimensione maggiore l’euristica raggiunge soluzioni che sono sempre migliori di quelle ottenute troncando un albero di separazione e valutazione sulla formulazione esatta. Una euristica è stata sviluppata anche per il caso continuo. Questa seconda euristica è stata confrontata con esperienze computazionali alla prima euristica e ad una opportuna procedura costruttiva. Il Problema della Schedulazione delle Gru di Banchina (Capitolo 3) consiste nel determinare una sequenza di carico e scarico per le gru assegnate ad una nave. Vogliamo minimizzare il tempo di completamento della nave così come i tempi d’ozio delle gru. Tempi d’ozio originano dalle interferenze tra gru, dato che queste si muovono su un’unica rotaia e una distanza di sicurezza deve essere osservata fra di loro. La produttività dei terminali per container è spesso valutata in funzione del tempo necessario per caricare e scaricare le navi da parte delle gru di banchina, che sono l’equipaggiamento più importante e costoso utilizzato in un porto. Abbiamo formulato il PSGB come un problema di instradamento di veicoli con vincoli aggiuntivi, tra cui vincoli di precedenza tra i vertici del grafo associato. Per istanze di dimensione piccola la nostra formulazione può essere risolta da CPLEX. Per istanze di dimensione maggiore abbiamo sviluppato un algoritmo di separazione e valutazione con piani di taglio che incorpora diverse famiglie di disuguaglianze valide che utilizzano le relazioni di precedenza tra vertici. Nel Problema dell’Assegnamento Quadratico Generalizzato, considerato nel Capitolo 4, abbiamo n impianti caratterizzati da un peso, m siti con delle capacità, una matrice di traffico tra impianti, una matrice di distanze tra siti, costi di trasporto per unità di distanza e costi di assegnamento di impianti a siti. Lo scopo è di determinare un assegnamento degli impianti ai siti in modo da minimizzare la somma dei costi di assegnamento e di trasporto, e allo stesso tempo, rispettare i vincoli di capacità sui siti. Il PAQG è una generalizzazione del PAQ dove n = m e esattamente un impianto deve essere assegnato ad un sito. Noi introduciamo una euristica di tipo memetico per il PAQG, così come una formulazione lineare intera che può essere risolta da CPLEX per istanze di piccola dimensione. Per istanze di dimensione maggiore possono essere individuate soluzioni ammissibili tramite una albero
CHAPTER 1. INTRODUCTION
10
di separazione e valutazione troncato. Prove computazionali mostrano che sulle istanze di piccola dimensione l’euristica proposta ottiene sempre una soluzione ottima; sulle istanze di dimensione maggiore migliora considerevolmente rispetto ai risultati dell’albero di separazione e valutazione troncato. Il Problema dell’Allocazione dei Servizi agli Spazi di Piazzale (Capitolo 5) è un problema di tipo tattico relativo alla gestione del piazzale in un terminal container di trasbordo. L’obiettivo è la minimizzazione della movimentazione interna al piazzale dei container. Il PASSP può essere formulato come un PAQG con vincoli aggiuntivi. Due formulazioni di programmazione lineare mista vengono presentate. La prima utilizza una caratteristica del piazzale del porto di Gioia Tauro dove la banchina e le corrispondenti posizioni di stoccaggio si estendono lungo una linea. La seconda formulazione adatta una linearizzazione del PAQG. In entrambi i casi solamente istanze di piccola dimensione possono essere risolte all’ottimalità. Una euristica di tipo evolutivo è stata pertanto sviluppata. Per istanze di piccola dimensione l’euristica sempre porta a soluzioni ottime. Per istanze di dimensione maggiore è sempre migliorativa rispetto ad un albero di separazione e valutazione troncato applicato alle formulazioni esatte. Le conclusioni sono riportate nel Capitolo 6.
Chapter 2
The Berth Allocation Problem 2.1 Overview of the Berth Allocation Problem The berth allocation problem consists of assigning incoming ships to berthing positions. Managers face two interrelated decisions: where and when the ships should moor. The problem can be represented in a two-dimensional space (Figure 2.1) where ships are rectangles whose dimensions are the ship length, including a safety margin, and the handling time. These rectangles must be placed in the decision space without overlapping each other and while satisfying several constraints. In the spatial dimension, there are constraints relative to the depth of the water (allowable draft) and to the maximum distance in relation to the most favorable location along the quay, computed with respect to the location of the outbound containers and to the reserved space for the inbound containers. In the temporal dimension the constraints are expressed as time windows on the completion time of ship servicing. Some time windows are soft and can be relaxed with an appropriate penalty cost. The handling time data deserve a more detailed discussion. These data depend upon another related decision which is the number of quay cranes assigned to the incoming ships. Of course, this decision affects the handling time and has an impact on the BAP. In a complex system like a transshipment port the decision making process is often hierarchical, and the quay cranes assignment problem is solved before the berth allocation. In addition, the handling time of a ship depends on its berthing point and is a function of the distance from the berth to the pickup and delivery area of containers stored in the yard. This dependency strongly affects the performance of the port. The planning hori-
11
Quay length
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
12
Service time
Ship’s length + safety margin
Berthing point
Handling time
Waiting time
Time Arrival time
Berthing time
Completion time
Figure 2.1: Berth - time space zon of the BAP is one week, and the berthing plan is updated every day. Since the problem is solved with a rolling horizon some areas of the berth-time space are not always available when the problem is reoptimized. Some parts of the quay may also be unavailable because of maintenance operations. The arrival time of the ships is known in advance. Every ship has its own time window determined by its arrival and its maximal allowable completion time. Managers want to minimize both port and user costs, which are related to service time. The objective of the BAP is to minimize the total service time of all ships. In some versions of the problem it is possible to include some penalty terms in the objective function. For example, as mentioned, there can be a penalty when the service time of a ship exceeds the contracted value.
2.2
Literature review
The BAP can be modeled as a discrete problem if the quay is viewed as a finite set of berths. In this case the berths can be described as fixed length segments, or, if the spatial dimension is ignored, as points. When ships are of different lengths, dividing the quay into a set of segments is, however, difficult to accomplish because requirements vary dynamically. Using long segments will result in poor space utilization while using short segments will likely result in an infeasible solution. Continuous
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
13
models circumvent these difficulties by considering that ships can berth anywhere along the quay. In the discrete case, the BAP can be modeled as an unrelated parallel machine scheduling problem (Pinedo (1995)) where a ship is treated as a job and a berth as a machine. The ship’s arrival time is the job release time. In the continuous case, the BAP is a two-dimensional cutting stock problem with additional constraints. In both cases, the BAP is NP-hard (Garey and Johnson (1979)). Imai et al. (2001) have proposed the Dynamic Berth Allocation Problem (DBAP) formulation in which the quay is represented as a finite set of berthing points. In other words, the spatial dimension of ships and berths is not considered. This formulation is called “dynamic” as opposed to a previous one called the Static Berth Allocation Problem (SBAP) (Imai et al. (1997)) which considers the case where all ships are already in the port when the berths become available. The SBAP is solvable in polynomial time with the Hungarian method (Papadimitriou and Steiglitz (1982)) since it is reducible to an assignment problem. In their paper, the authors take advantage of this characteristic. They propose a suitable Lagrangean relaxation for the DBAP where the subproblem is an assignment problem. Their computational results show that the DBAP is easy to solve as long as the instances are “close” to the static case, in the sense that most ships are already in the port when the berths become available. The objective function is the sum of the ship service times. As the authors point out this objective function does not consider ship priorities. The DBAP formulation is further discussed in Section 2.3.1. Nishimura et al. (2001) have presented a non-linear integer program and a genetic algorithm based on a different representation of the spatial dimension in which the quay is a collection of segments and up to two ships can share the same segment at the same time if their lengths are compatible with the length of the berth segment. Additional constraints relative to the water depth of the berths are also introduced. The DBAP formulation was extended (Imai et al. (2003)) to consider service priorities which are handled by introducing in the objective function a term corresponding to service time. Priorities, based for example on volumes, can also be incorporated in the model. The resulting formulation is non-linear. The authors show that with a suitable Lagrangean relaxation, the subproblem becomes a quadratic assignment problem. Since this problem is not well solved by exact methods, the authors have developed a genetic heuristic. In Lim (1998) the quay is represented as a continuous line. A heuristic solves the problem of deciding the berthing points given the berthing time of the ships, assuming constant handling times. This approach does not solve the general problem in which the berthing time is a decision variable
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
14
and the handling time varies along the quay. More recently Park and Kim (2003) have introduced a non-linear integer programming model that also considers quay crane assignments, but assumes linearity between the handling time and the number of cranes. Here the quay is represented as a continuous line. The objective function to minimize is the sum of penalty terms over all ships. For example, in the temporal dimension, the ship waiting times generate a linear cost for the port. In the spatial dimension, the authors assume that an optimal berthing point is known, and they apply a penalty whenever a different choice is made. The algorithm uses Lagrangean relaxation and a subgradient optimization technique. Finally, Kim and Moon (2003) have formulated a mixed integer linear programming model for the continuous case. A commercial solver is able to find the optimum for instances involving seven ships and a three day time horizon. A simulated annealing heuristic is proposed to solve instances of realistic dimensions. Our aim is to devise fast and effective heuristics for the discrete and continuous cases of the BAP. We first model the discrete version of the problem and we then extend it to the continuous case. In the discrete case medium size instances can be solved exactly under some assumptions, which enables an assessment of the quality of the heuristic. Since the continuous problem cannot be solved exactly, the assessment of the heuristic developed for this case can only be inferred from the discrete scenario. Two exact formulations for the discrete case will be presented and discussed in the Section 2.3. Tabu search heuristics for the discrete and continuous cases are introduced in the Section 2.4, followed by computational results in Section 2.5.
2.3 Mathematical models We consider two different formulations for the discrete case. The first is the Dynamic Berth Allocation Problem (DBAP) proposed by Imai et al. (2001). The second is a Multi-Depot Vehicle Routing Problem with Time Windows (MDVRPTW) formulation.
2.3.1 DBAP formulation As mentioned in the literature review, the DBAP formulation considers the quay as a finite set of berthing points. In what follows berthing points or berth segments will be called berths. This formulation takes into account the ship arrival times, which can be seen as lower bounds of the service
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
15
time windows of the ships, but it does not consider upper bounds. In fact, the authors point out that their model does not consider the relative importance of the ships. In reality some ships, like mother vessels, have tight time windows. The model is based on position variables for the ships assigned to the berths. All input data for the model are deterministic: • N : set of ships and n = |N |; • M : set of berths and m = |M |; • tki : handling time of ship i at berth k; • ai : arrival time of ship i; • sk : start of availability time of berth k; • ek : end of availability time of berth k. The model also uses the following variables and sets: • P : set of service positions, |P | = |N | = n; • xkip ∈ {0, 1} k ∈ M, i ∈ N, p ∈ P ; xkip = 1, if and only if ship i is assigned at position p to berth k; k ∈ < k ∈ M, i ∈ N, p ∈ P : idle time of berth k between the departure of the (p − 1)th ship • wip
and the arrival of the ship i assigned to the position p; © ª • N (k) = i ∈ N | ai ≥ sk ⊆ N : set of ships that arrive in the port after berth k becomes available; • P (p) = {q ∈ P | q < p} ⊆ P : set of positions before p. The DBAP can then be formulated as follows:
minimize
X XX© k∈M i∈N p∈P
subject to
X X X ª k (n − p + 1)tki + sk − ai xkip + (n − p + 1)wip k∈M i∈N (k) p∈P
(2.1)
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
X X
16
xkip = 1
∀i ∈ N
(2.2)
xkip ≤ 1
∀k ∈ M, p ∈ P
(2.3)
∀k ∈ M, i ∈ N (k),
(2.4)
k∈M p∈P
X
X X
i∈N k k (tkj xkjl + wjl ) + wip − (ai − sk )xkip ≥ 0
j∈N l∈P (p)
∀p ∈ P XX
k (tki xkip + wip ) ≤ ek − sk
∀k ∈ M
(2.5)
∀i ∈ N, k ∈ M, p ∈ P.
(2.6)
i∈N p∈P k xkip ∈ {0, 1} , wip ≥0
In this model, constraints (2.2) state that every ship must be assigned to only one berth. Constraints (2.3) allow at most one ship to be assigned to the same position on the same berth. When a ship i is assigned to berth k in position p, and its arrival time ai is larger than the completion time k is incurred at the berth. Constraints of the ship served in position (p − 1), then some idle time wip k (2.4) impose conditions on wip . If ship i is assigned to position p at berth k and has an arrival time ai k less than the completion time of the ship in position (p − 1), then wip is zero. Otherwise the objective k function (to be minimized) forces wip to be equal to ai minus the completion time of the ship in po-
sition (p − 1). We have added constraints (2.5) to the original formulation in order to take in account the available time of the berths. The objective function minimizes the sum for each ship of the service time. As mentioned, the service time is the difference between the completion time and the arrival time of the ship in port. Imai et al. (2001) have proved that in an optimal solution q ships assigned to the same berth k are scheduled consecutively from position (n − q + 1) to n, meaning that xkip = 0 ∀i ∈ N, p ≤ n − q. The completion time of a ship i, assigned to berth k in position p, can be obtained by adding: • sk : start of availability time of berth k; • the handling times of the ships served before the pth position on the berth: P P k k j∈N l∈P (p) tj xjl ; • the berth idle times caused by the ships served before the pth position on the berth:
P
P j∈N
l∈P (p)
k • tki + wip , the sum of the handling time of the ship i and the berth’s idle time between the depar-
ture of ship (p − 1) and the arrival of ship i.
k wjl ;
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
17
Subtracting the arrival time from the completion time we obtain the service time. This yields the following non-linear objective function to be minimized: X X X X X k∈M i∈N p∈P
k k (tkj xkjl + wjl ) + wip + tki + sk − ai
j∈N l∈P (p)
xkip .
(2.7)
The following observation can be used to linearize this function. Every handling time tki , as well as k each idle time wip , are part of the completion time of the ship i assigned to berth k, but are also part
of the completion time of the (n − p) ships scheduled after i. Therefore, (2.7) can be written as: X XX©
ª k (n − p + 1)(wip + tki ) + sk − ai xkip .
(2.8)
k∈M i∈N p∈P
It can be seen that the objective function (2.1) used by Imai et al. (2001) is a refinement of (2.8).
2.3.2 MDVRPTW formulation Legato et al. (2001) have observed that the BAP can be modeled as an MDVRPTW (see, e.g., Cordeau et al. (2001)). In this model the ships are seen as customers, and the berths as depots at which one vehicle is located. There are then m vehicles, one for each depot. Each vehicle starts and ends its tour at its depot. The ships are modeled as vertices in a multi-graph. Every depot is divided into an origin vertex and a destination vertex. Time windows can be imposed on every vertex. At the origin and destination vertices, the time windows correspond to the availability period of the corresponding berth. The input data are the same of the DBAP formulation plus one: • bi : upper bound of the service time window on the ship i. The problem is modeled on a multi-graph Gk = (V k , Ak ), ∀k ∈ M , where V k = N ∪ {o(k), d(k)} and Ak ⊆ V k × V k . The following variables and constants are defined: • xkij ∈ {0, 1} k ∈ M, (i, j) ∈ Ak , xkij = 1 if and only if ship j is scheduled after ship i at berth k; • Tik k ∈ M, i ∈ N : berthing time of ship i at the berth k, i.e., the time when the ship moors (see Figure 2.1); k • To(k) k ∈ M : starting operation time of berth k, i.e., the time when the first ship moors at the
berth;
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
18
k • Td(k) k ∈ M : ending operation time of berth k, i.e., the time when the last ship departs from the
berth; © ª k • Mij = max bi + tki − aj , 0 , k ∈ M, i and j ∈ N . The MDVRPTW model is as follows: XX
minimize
Tik − ai + tki
i∈N k∈M
X
xkij
(2.9)
j∈N ∪{d(k)}
subject to X
X
xkij = 1
∀i ∈ N
(2.10)
xko(k),j = 1
∀k ∈ M
(2.11)
xki,d(k) = 1
∀k ∈ M
(2.12)
∀k ∈ M, ∀i ∈ N
(2.13)
∀k ∈ M, ∀(i, j) ∈ Ak
(2.14)
ai ≤ Tik
∀k ∈ M, ∀i ∈ N
(2.15)
xkij ≤ bi
∀k ∈ M, ∀i ∈ N
(2.16)
k sk ≤ To(k)
∀k ∈ M
(2.17)
k Td(k) ≤ ek
∀k ∈ M
(2.18)
∀k ∈ M, ∀(i, j) ∈ Ak .
(2.19)
k∈M j∈N ∪{d(k)}
X
j∈N ∪{d(k)}
X
i∈N ∪{o(k)}
X
xkij −
j∈N ∪{d(k)}
X
xkji = 0
j∈N ∪{o(k)}
k Tik + tki − Tjk ≤ (1 − xkij )Mij
Tik + tki
X j∈N ∪{d(k)}
xkij ∈ {0, 1}
The objective function is always the minimization of the sum of the service times. When ship i is not P assigned to berth k, the corresponding term in the objective function is zero because j∈N ∪d(k) xkij = 0 and Tik = ai , and the objective is minimized. Constraints (2.10) state that for every ship i there is exactly one active arc (i, j) ∈ Ak ∀k ∈ M . Constraints (2.11) and (2.12) define the degree of the depots, while flow conservation for the remaining vertices is ensured by constraints (2.13). The consistency of the Tik variables with the sequence on the berth is achieved by constraints (2.14). The service time windows on the ships are set by constraints (2.15) and (2.16), and the availability time windows on the berths by constraints (2.17) and (2.18).
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
2.4
19
Tabu search heuristics
For small instances, both integer linear programming formulations of Section 2.3 can be solved by CPLEX. From a computational point of view, DBAP is better than MDVRPTW in that it can solve larger instances. However, neither model can be used for the optimal solution of instances of realistic size. The MDVRPTW formulation is in a sense more interesting than DBAP since it can easily accommodate time windows, and easily lends itself to the development of heuristics. We have developed such a heuristic, based on tabu search (Glover (1986)) for solving the discrete version of the BAP as a variant of the MDVRPTW. Since this heuristic focuses on the temporal dimension we call it T 2 S (Time based Tabu Search). An extension of the tabu search heuristic to the spatial dimension is also presented for the continuous case. It is called (T S)2 (Time and Space based Tabu Search).
2.4.1 T 2 S - A tabu search heuristic for the discrete case Our T 2 S heuristic is inspired but different from the MDVRPTW algorithm of Cordeau et al. (2001). In the berth allocation problem, the function to be minimized is the sum for every ship of the service time in the port, as opposed to to the distance traveled in the MDVRPTW. Since the cost evaluation of the moves from a current solution is a recurrent step in the tabu search algorithm, some data structure were introduced to track the changes in the cost function in order to reduce the computational load. Other differences in the initialization phase and the insertion procedure will be explained in Section 2.4.1. Notation and overview of the algorithm Denote by S the set of BAP solutions that satisfy constraints (2.10) - (2.15) and (2.17). The heuristic explores the solution space by moving at each iteration from the current solution s to the best solution in its neighborhood N (s). Each solution s ∈ S is represented by a set of m berth sequences such that every ship belongs to exactly one sequence. This solution may, however, violate the time window constraints associated with the ships and the berths. The time window constraint on ship i on a berth k is violated if the completion time Tik + tki of the ship is larger than the time window’s upper bound bi . Berthing before ai is not allowed; in other words, Tik ≥ ai . Similarly, the time window of berth k is violated when the completion time of a ship i assigned to berth k is larger than the berth time window’s upper bound.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
20
Let c(s) denote the cost of solution, and let w(s) denote the total violation of time window constraints, equal to the sum of the violations on the n ships and the m berths. Solutions are then evaluated by means of a penalized cost function f (s) = c(s) + αw(s), where α is a positive parameter. By dynamically adjusting the value of this parameter the relaxation mechanism facilitates the exploration of the search space and is particularly useful for tightly constrained instances. The tabu search method is based on the definition of attributes used to characterize the solutions of S. They are also used to control tabu tenures and to implement a diversification strategy. With each solution s ∈ S is associated an attribute set B(s) = {(i, k): ship i is assigned to berth}. The neighborhood N (s) of a solution s is defined by applying a simple operator that removes an attribute (i, k) from B(s) and replaces it with another attribute (i, k 0 ), where k6=k 0 . When ship i is removed from berth k, the sequence is simply reconnected by linking the predecessor and successor of the ship. Insertion in sequence k 0 is then performed between two consecutive ships so as to minimize the value of f (s). When a ship i is removed from berth k, its reinsertion in that berth is forbidden for the next θ iterations by assigning a tabu status to the attribute (i, k). An aspiration criterion allows the revocation of the tabu status of an attribute if that would allow the search process to reach a solution of smaller cost than that of the best solution identified having that attribute. To diversify the search, any solution s ∈ N (s) such that f (s) ≥ f (s) is penalized by a factor proportional to the addition frequency of its attributes, and by a scaling factor. More precisely, let ρik be the number of times attribute (i, k) has been added to the solution during the process and let ζ be the number of the current iteration. A penalty p(s) = λc(s)ρik /ζ is added to f (s). The scaling factor c(s) introduces a correction to adjust the penalties with respect to the total solution cost. Finally, the parameter λ is used to control the intensity of the diversification. These penalties have the effect of driving the search process toward less explored regions of the search space. For notational convenience, assume that p(s) = 0 if f (s) < f (s). Description of the T 2 S heuristic The algorithm uses two different procedures to generate a starting solution. The first procedure, called R-G (random-greedy), places the ships at random in a queue. The first ship in the queue is assigned to the berth which allows the minimum completion time. For each subsequent ship an evaluation of all the possible assignments is performed and the insertion yielding the minimum cost increase is selected. The second procedure, called FCFS-G (first come, first served - greedy), orders
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
21
the ships in the queue according to their arrival time. This queue is processed as in R-G. In both cases the initial solutions are constructed by relaxing the time window constraints. These initial solutions are usually infeasible, but this is not a problem for the tabu search heuristic. The search starts from the solution produced by the R-G procedure and selects, at each iteration, the best non-tabu solution s ∈ N (s). After each iteration, the value of the parameter α is modified by a factor 1 + δ, where δ > 0. If the current solution is feasible with respect to time window constraints, the value of α is divided by 1 + δ; otherwise, it is multiplied by 1 + δ. This process is repeated for η iterations and the best feasible solution s∗ is updated throughout the search. The algorithm then restarts with the solution provided by the FCFS-G procedure. The complete algorithm can be summarized as follows: 1. Set h := 1. 2. Initialization phase: obtain a solution s ∈ S using the R-G procedure, if h = 1; otherwise use the FCFS-G procedure. 3. Set α := 1. If s is feasible, set s∗ := s and c(s∗ ) := c(s); otherwise, set c(s∗ ) := ∞. 4. For j := 1, ..., η, do (a) Select a solution s ∈ N (s) that minimizes f (s)+p(s) and is not tabu or satisfies its aspiration criterion. (b) If solution s is feasible and c(s) < c(s∗ ), set s∗ := s and c(s∗ ) := c(s). (c) Compute w(s) and update α accordingly. (d) Set s := s. 5. If h = 1, set h := 2, s∗1 := s∗ and go to Step 2. 6. Set s∗ := min{s∗1 , s∗ } and stop.
2.4.2 (T S)2 - A tabu search heuristic for the continuous case Since the T 2 S heuristic works with a given set of berthing points the ship allocation to these points may not always satisfy the spatial constraints when the berthing points are too close to each other. Discrete models can be applied when the length of the quay is not a limiting factor for the terminal performance. This is not true for large transshipment terminals. To properly take ship lengths into
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
22
account we have examined the ship length distribution obtained from the Gioia Tauro database (Figure 2.2). The average length is 183 meters, and the standard deviation is 71 meters. As can be easily observed, the maximum length is less than twice the average and the minimum length is almost equal to half the average. 20
(%)
15
10
5
0
11 00 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 0011 11 000 111 000 111 00 11 00 00 11 000 111 000 111 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 000 111 00 11 00 11 00 11 00 11 000 111 000 111 000 111 00 11 00 11 00 11 00 11 00 11 00 11 00 11 000 111 000 111 000 111 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 11 000 111 000 111 000 111 00 11 00 11 00 11 00 11 00 11 00 11 00 11 00 000 111 000 111 000 111 00 11 00 11 00 11 00 11 0011 11 0011 11 00 11 00 11 000 111 000 111 000 111 00 11 00 00 11 00 11 00 11 0011 0011 11 00 11 000 111 000 111 00011 111 00 00 00 11 00 11 100
125
150
175
200 225 250 Ship length
275
300
325
350
Figure 2.2: Distribution ship lengths We therefore subdivide the quay into m berth segments where each segment k has a length Lk close to the ship length average. A segment k that is not the initial or the final berth segment (k 6= 1 and k 6= m) is then divided into two equal parts, left and right. Each segment has two neighbours, the right part of the segment k − 1 and the left part of the segment k + 1. Figure 2.3 shows an example. The initial and final segments are considered as special cases with only one neighbour and are not divided. These end segments can be used to model not only the beginning and the end of the quay, but also natural discontinuities on the quay, like sharp curves. In fact at Gioia Tauro there is such a discontinuity in the middle of the quay. The length of a segment can be dynamically adjusted during the course of the algorithm. Thus a segment can accept a ship larger than its length, expanding itself toward one or the two of its neighbours. Conversely, when a segment accepts a ship smaller than its length, the unused space can be allocated to ships berthing in neighbouring segments. Of course the relation between the length of segments and ships matters. If ship lengths had been highly variable, our discretization approach would have caused a heavy fragmentation of the decision space.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM Berth k −1
Berth k
23 Berth k + 1
Quay length
Maximum extension for ships sequenced on berth k
Figure 2.3: The quay as a set of segments with dynamically changing lengths Modifications to the T 2 S heuristic Representing the quay as a collection of variable length segments induces some changes in the tabu search algorithm. Every ship insertion or deletion in a berth sequence has an impact on the neighbouring berth segments. We now describe the new deletion and insertion procedures. A deletion procedure of ship i from berth k consists of the following steps: 1. Declare free the space occupied by ship i during its handling time; since a ship may also occupy part of neighbouring berths, the data structure relative to the these berths must also be updated. 2. Iteratively call the deletion procedure for all ships that may follow ship i in berth sequence k. 3. Reinsert at minimum cost, using the insertion procedure explained below, all ships deleted in Step 2 in berth sequence k. Let r be the number of ships already assigned to berth k. The insertion procedure for ship i in berth k evaluates all possible r + 1 new sequences originated from the original one plus the progressive shifting of ship i to be inserted. Each new sequence then differs from the original one by its tail, i.e., the subsequence from ship i to the last ship in the original sequence. In the algorithm for the discrete case, which only took into account the temporal dimension, the evaluation of the r + 1 new
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
24
sequences was straightforward, involving only an adjustment of the berthing time of the ships in the tail sequence. This was accomplished by a single scanning of the tail sequence. Incorporating the spatial constraints and the interactions between neighbouring segments requires additional computations. For example, if ship i is inserted in position q, with q ≤ r, then all ships in positions q, .., r are deleted with the above mentioned procedure, meaning that their allocated space is declared free. Then a feasible space allocation is searched for the ship i and the deleted r − q + 1 ships. For every ship the search for a feasible space allocation requires considering possible expansion to neighbouring segments and respecting, eventually, some earlier contractions that were required by the insertion procedure in neighbouring berths. The procedure looks for a feasible allocation that results in a good packing of ships in the two-dimensional space. In (T S)2 the initial solution is also built in a different way. The R-G procedure described in Section 2.4.1 was effective to avoid an initial local minimum, but with the spatial allocation the degree of fragmentation of this initial solution was important, requiring an important augmentation in the number of iterations to fix it. We therefore opted for the FCFS-G procedure. Note that this starting procedure is close to the behavior of the human planners. All tabu search mechanisms in (T S)2 are the same as in the discrete case.
2.5 Computational results We now present computational experiments for the discrete and continuous versions of the BAP. We first describe how realistic test instances were generated, and we then provide results obtained with the various algorithms.
2.5.1 Test instances In order to generate realistic instances, a statistical analysis of the traffic and berth allocation data at Gioia Tauro was performed (Legato et al. (2002)). The ships served at the port are classified according to their function (feeders and mother vessels) and according to their port route. A port route is the sequence of ports visited by a ship and is determined by the shipping company. There are 36 port routes for the feeders and 16 for the mother vessels. A shipping company usually requests from the port management that areas of the yard and of the quay be dedicated to a subset of port routes. These are called favorite areas. This constraint is
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
25
not always fully enforced in practice. In order to avoid traffic congestion a ship may be assigned to an acceptable area which is different from its favorite area. Port routes can be subdivided into six subsets. In Table 2.1, we provide two statistics on these subsets: the proportions of ships and of the container traffic. The quay is treated by the management as five areas, each dedicated to one or more port routes subsets and capable of accepting some others. In Table 2.2, we show the relationships between port routes subset and the quay areas in term of favorite and acceptable (indicated by “F” and “A”). To generate the instances we used a finer subdivision consisting of 13 berth segments. Berthing areas are not the only reason why ships are classified into different port route subsets. The statistical distribution of ship lengths and handling times also vary significantly between the various subsets. The generation of our test instances therefore takes into account various length and handling time distributions. Subset
Description
Ships
Container traffic
CF DF O1 O2 O3 O4
Common feeder Dedicated feeder Mother vessel Mother vessel Mother vessel Mother vessel
(% of total) 36.7 27.5 9.2 6.3 14.3 6.0
(% of total) 19.1 31.8 24.6 7.4 11.4 5.7
Table 2.1: Port route subsets
Subset CF DF O1 O2 O3 O4
525 m. F
A
Total quay length: 2850 meters 700 m. 350 m. 350 m. A A A A A F A A F A A F
925 m. F F
Table 2.2: Subdivision of the Gioia Tauro quay into favorite and acceptable areas The average number of ships arriving at Gioia Tauro is 60 per week (Figure 2.4). Since our exact formulation for the discrete case could not handle such a large value we worked with a smaller number of ships and a smaller quay length. For the discrete case five sizes were considered: 25 ships and 5, 7, 10 berths; 35 ships and 7, 10 berths. For each problem size, ten instances were randomly generated with different seeds.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
26
70
60
ships per week
50
40
30
20
10
0 1996
1997
1998
1999 year
2000
2001
2002
Figure 2.4: Ships’ arrivals at Gioia Tauro port per week (yearly average) The earliest available time of berth k, denoted by sk , was generated as in Imai et al. (2001): • sk is the same for every berth; • sk is set for each instance equal to a given fraction f of the time duration between the first and last arriving ships. The parameter f , equal to the expected proportion of ships present in the port when the berths become available, controls how much an instance is close to the “static” case. Thus, for f = 1 the DBAP reduces to the SBAP. The computational experiments carried out by Imai et al. (2001) show that the DBAP is easy to solve with a Lagrangean relaxation heuristic as long as f is large. Four different instance groups were defined by Imai with f equal to 1/2, 5/8, 3/4 and 7/8. We carried out similar tests with the DBAP formulation implemented in CPLEX. Our instances are not the same as those of Imai et al. since we used the handling times observed at Gioia Tauro. Nevertheless, we reached conclusions similar to those of Imai et al.. These results will be presented in the next subsection. The computational effort required by CPLEX to solve the problem is inversely related to f. Optimal solution can typically be obtained for f ≥ 1/2. Unfortunately, when the berth allocation is solved with one week rolling horizon, realistic values for f are in the range 1/21, .., 1/7. For our application f was fixed at 1/12. But, in order to make the problem easier for CPLEX, four other classes were defined for instances involving 25 ships and 5 berths with the value of f used by Imai et al.. We realize that these instances are not realistic; they were only generated to measure the performance of the heuristic. To summarize, we generated 90 instances subdivided into two subsets: • I1: 40 instances with f equal to 1/2, 5/8, 3/4 and 7/8; problem size 25 ships and five berths,
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
27
• I2: 50 instances with f = 1/12 and with five different problem sizes. These 90 instances were created for the DBAP formulation. Therefore the time windows associated with the ships have no upper bound.
2.5.2 Results for the discrete case The DBAP formulation was implemented in CPLEX 7.1 with a time limit of two hours. Some sensitivity analyses to the CPLEX MIP solver parameters were carried out, but the best results were obtained with the default values of these parameters. The tabu search algorithm was implemented in ANSI C. Computational experiments were performed on a SUN workstation (900 MHz). Table 2.3 provides average results obtained on each instance size. The instances of subset I1 are easily solved by CPLEX and T 2 S, which are almost always able to reach the optimum. However, this subset was only used as a first benchmark. The more challenging instances are those of subset I2. Here CPLEX could not reach an optimal solution within the time limit. We therefore used a truncated branch-and-bound which stops with the best feasible solution identified after two hours. In contrast T 2 S was capable of identifying, within a few seconds, a much better solution than the truncated CPLEX algorithm. The number of constraints, variables and non-zero coefficients in the reduced MIP solved by CPLEX are reported in Table 2.4 for each instance size. The iteration count limit η in the tabu search heuristic was set equal to 104 , but in the vast majority of the instances the best solution was identified before 103 iterations. The tabu search parameters used for these computations are as follows: • θ : tabu duration equal to b7.5 log nc; • λ : diversification intensity parameter equal to 0.015; • δ : penalty adjustment parameter equal to 0.5. These values are the same used in Cordeau et al. (1997) and in Cordeau et al. (2001). We provide in Tables 2.5 and 2.6 results for the I2 instances with additional statistics (number of nodes explored in the branch-and-bound tree rounded to the nearest multiple of 100). The advantage of this heuristic with respect with the truncated CPLEX algorithm is clear from these results: T 2 S is not only much faster, but it also identifies much better solutions than the truncated CPLEX algorithm.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
28 T 2S
Truncated CPLEX
T 2 S vs CPLEX
Problem Size (ships x berths)
f (a)
Objective Value
Gap(b) (%)
CPU (s)
Objective Value
CPU (s)
Improvement (%)
25 x 5
1/2
1722
0.3
2809
1722
6
-
25 x 5
5/8
2187
0.0
188
2187
6
-
25 x 5
3/4
2551
0.0
39
2551
6
-
25 x 5
7/8
2877
0.0
19
2877
6
-
25 x 5
1/12
1058
49.0
7200
879
4
17
25 x 7
1/12
990
87.1
7200
745
4
25
25 x 10
1/12
1009
109.9
7200
766
4
24
35 x 7
1/12
2040
68.1
7200
1236
8
39
35 x10
1/12
2036
83.7
7200
1188
6
42
Table 2.3: Summary of the average results (10 instances for every problem size) a - fraction of the time duration between the first and last arriving ship. b - The gap is calculated with respect to the value of the linear relaxation as (upper bound - lower bound)/upper bound. Problem size (ships x berths)
Constraints
Variables
Non-zero coefficients
25x5
2870
5885
1,493,055
25x7
3972
8233
2,068,323
25x10
5580
11485
2,843,955
35x7
7634
15985
7,979,899
35x10
10979
22474
11,329,854
Table 2.4: Number of constraints, variables and non-zero coefficients in the reduced MIP solved by CPLEX
2.5.3 Computational results for the continuous case In the continuous case an exact formulation developed by Kim and Moon (2003) is capable of solving only very small size instances. Therefore, the results of the (T S)2 heuristic are evaluated against two benchmarks: • The final solution of the T 2 S heuristic applied on the same input data, but of course, discarding the spatial constraints. The discrete case can be regarded as a relaxation of the continuous case since the solution of the T 2 S heuristic may be infeasible with respect to the spatial constraints. • The starting solution, provided by the FCFS-G procedure. This comparison estimates the possible savings that the heuristic can provide to the port with respect to a manual plan. Thirty instances were randomly generated. Computational results are provided in Table 2.7. The (T S)2 heuristic finds within 120 seconds solutions which are, on the average, 8% better than those obtained by the FCFS-G procedure. This improvement is highly significant in practice.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
29
Truncated CPLEX
T 2S
T 2 S vs CPLEX
Problem size (ships x berths)
Instance
Objective value
Gap (a) (%)
Number of nodes(b)
Objective value
Improvement (%)
25 x 5
1 2 3
846 1244 1033
29.5 53.7 12.9
23700 2300 15700
759 965 974
11 29 6
4 5 6 7 8
946 1082 1255 1039 843
75.3 37.0 31.4 57.6 85.2
9300 15600 16200 7500 8800
702 965 1129 835 629
35 12 11 24 34
9 10
1066 1227
74.2 32.7
9700 8400
755 1077
41 14
1 2 3 4
869 918 971 983
90.1 94.1 52.2 98.3
1900 4000 7200 1400
667 671 823 655
30 37 18 50
5 6 7 8 9 10
948 1175 1094 939 987 1018
78.5 107.4 115.8 64.4 75.6 94.6
2700 1000 1000 3600 3700 2700
728 794 740 782 759 830
30 48 48 20 30 23
1
900
86.8
1900
717
26
2 3 4 5
957 1135 1082 1010
103.6 119.7 92.6 79.4
1800 300 900 1800
736 764 819 855
30 49 32 18
25 x 7
25 x 10
Table 2.5: Results for truncated CPLEX and T 2 S, part I a - The gap is calculated with respect to the value of the linear relaxation as (upper bound - lower bound)/upper bound. b - Number of nodes in the branch-and-bound tree rounded to the nearest multiple of 100.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
30
Truncated CPLEX
T 2S
T 2 S vs CPLEX
Problem size (ships x berths)
Instance
Objective value
Gap(a) (%)
Number of nodes(b)
Objective value
Improvement (%)
25 x 10
6 7 8
919 867 1046
138.0 124.0 108.7
900 900 1600
694 673 860
32 29 22
9 10
1141 1032
138.3 107.5
500 1200
726 812
57 27
1 2 3 4
1606 2050 2245 1778
56.0 73.3 67.6 63.0
800 520 500 700
1019 1196 1230 1150
58 71 83 55
5 6 7 8 9
1962 2496 1494 2582 2244
77.5 50.6 69.1 68.8 85.3
600 500 600 500 300
1179 1703 1181 1330 1245
66 47 27 94 80
10
1941
69.4
700
1130
72
1 2 3 4 5 6
1578 1854 1667 2284 2739 1956
90.1 70.5 110.9 93.2 75.3 79.6
300 400 70 70 60 300
1128 1197 953 1239 1372 1221
40 55 75 110 102 62
7 8 9 10
2124 2133 1668 2001
86.7 100.9 44.1 86.0
0 110 900 280
1052 1219 1315 1198
102 75 27 67
35 x 7
35 x 10
Table 2.6: Computational results for truncated CPLEX and T 2 S, part II a - The gap is calculated with respect to the value of the linear relaxation as (upper bound - lower bound)/upper bound. b - Number of nodes in the branch-and-bound tree rounded to the nearest multiple of 100.
CHAPTER 2. THE BERTH ALLOCATION PROBLEM
31
T 2S
(T S)2
Comparison(a)
FCFS - G
Improvement(b)
Objective value
Objective value
(%)
Objective value
(%)
1 2 3
1415 1263 1139
1706 1355 1286
21 7 13
1899 1417 1349
10 4 5
4 5 6 7 8
1303 1208 1262 1279 1299
1440 1352 1565 1389 1519
11 12 24 9 17
1548 1449 1747 1482 1616
7 7 10 6 6
9 10 11 12 13 14
1444 1212 1378 1325 1360 1233
1713 1411 1696 1629 1519 1369
19 16 23 23 12 11
1873 1611 1851 1814 1575 1435
9 12 8 10 4 5
15 16 17 18 19
1295 1375 1283 1346 1370
1455 1715 1322 1594 1673
12 25 3 18 22
1609 1854 1388 1923 1829
10 7 5 17 9
20 21 22 23 24
1328 1346 1332 1266 1261
1450 1565 1618 1539 1425
9 16 21 22 13
1615 1640 1747 1770 1625
10 5 7 13 12
25 26 27 28 29 30
1379 1330 1261 1365 1282 1351
1590 1567 1458 1550 1415 1621
15 18 16 14 10 20
1845 1707 1588 1669 1512 1797
14 8 8 7 6 10
Average
1310
1517
16
1659
8
Instance
Table 2.7: Computational results for (T S)2 a - Comparison between the solutions provided by (T S)2 and T 2 S, calculated as ((T S)2 - T 2 S)/T 2 S. b - Improvement of the T 2 S heuristic with respect to the FCFS-G procedure.
Chapter 3
The Quay Crane Scheduling Problem 3.1 Overview of the Quay Crane Scheduling Problem The productivity of container terminals is often measured in terms of the time necessary to load and unload vessels by quay cranes (QCs), which are the most important and expensive equipment used in ports. The Quay Crane Scheduling Problem (QCSP) consists of determining a sequence of unloading and loading movements for cranes assigned to a vessel in order to minimize the vessel completion time as well as the crane idle times. Idle times originate from interferences between cranes since these roll on the same rails, and thus cannot cross each other, and from the need to maintain a minimum safety distance between them. In our study we consider as input the number of quay cranes assigned to the vessels. Of course this decision affects the vessel completion time. In a complex system like a transshipment port the decision making process is often hierarchical, and the quay cranes assignment problem is solved before the QCSP. The number of quay cranes assigned to a vessel often depends on contracts between the terminal and shipping companies. The input data for the QCSP consists of the vessel stowage plan, of the ready time of each crane, and of a yard map showing the storage locations of containers to be loaded on the vessel. A first classification of the containers to be handled in a given ship bay is made according to their positions, on the deck or in the hold, and of their kind of operations: loading or unloading. Unloading always precedes loading: the deck is unloaded before the hold, the hold is then loaded, then the deck. Containers having the same size, origin and destination are assigned to neighbor slots in the vessel to
32
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
33
simplify operations at the origin and destination ports. Containers located in a given ship bay can be divided into different tasks when they share the following attributes: ship bay number, position (deck or hold), operation (loading or unloading), size, destination port for outbound containers, or origin port for inbound containers. We assume that quay cranes have the same productivity for the same task, expressed in moves per hour. In the machine scheduling terminology, they can be viewed as identical machines executing non-preemptable tasks. Precedence relationships between tasks are the result of their position in the ship and of their associated operation type, as described above. Other precedence constraints can be imposed to take into account vessel load balance during the operations. Given the task positions in the vessel layout and the quay crane characteristics, certain pairs of tasks cannot be performed simultaneously. A safety distance between movements must be observed to avoid collisions, which translates into additional constraints between pairs of tasks. Depending on the yard layout and technology, some tasks may not be executed simultaneously to avoid workload peaks in specific areas of the yard. Container terminals in the Asia-Pacific region rely on the "Indirect Transfer System" (ITS) in which containers in the yard are stacked in compact sections. A dedicated gantry crane, called transtainer, moves them from and to the vehicles which link the yard with the quay and the gates. The ITS minimizes yard surface requirements, but poses specific constraints on the QCSP because tasks that interact with the same transtainer cannot be performed simultaneously. European and North-American container terminals are based on the "Direct Transfer System" (DTS) in which vehicles (e.g. straddle carriers) used to transfer containers between the yard, the quay and the gates are also capable of moving them between the slots in the yard. The DTS requires a larger surface because dedicated lanes in the yard are required for the vehicles to access the slot positions. However, in this case, the quay crane scheduling interaction with the yard is less critical. Our purpose is to model the QCSP as a mixed integer linear program and to solve it exactly by means of a branch-and-cut algorithm. The remainder of the article is organized as follows. The next section briefly reviews relevant work on the QCSP and closely related problems. Section 3.3 defines the QCSP formally and introduces a mixed integer linear formulation. Section 3.4 describes the valid inequalities used in the branch-and-cut algorithm which is then described in Section 3.5, along with separation heuristics and preprocessing techniques. Computational experiments are reported in Section 3.6.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
34
3.2 Literature review The QCSP was first introduced by Daganzo (1990) who assumes the ships to be partitioned into bays and defines a task as the loading and unloading of all containers of a given bay. As a result, no precedence constraints are considered between groups of containers in the same bay. A task is preemptable since it involves different operations which, in our study, are represented as different tasks. Cranes can be moved freely, but no interference among QCs is modelled, and more than one vessel is considered. The paper presents an algorithm for determining the number of cranes to be assigned to bays of multiple vessels. Under similar assumptions, Peterkofsky and Daganzo (1990) provide a branch-and-bound algorithm to determine the departure times of multiple vessels and the number of cranes to be assigned to individual ship bays in a specific time interval. The objective function to be minimized is the sum of the delay costs. More recently Kim and Park (2004) have assumed that there may be multiple tasks associated with a ship bay, and thus the loading and unloading operations associated with the same bay are divided into different tasks. We have made the same assumptions in Section 3.1. Kim and Park present a mixed integer formulation of the QCSP which cannot be solved in reasonable time, and therefore the authors propose a reduction of the solution space, and then an exact method capable of solving small and medium size instances. For larger instances a heuristic algorithm based on a greedy randomized adaptive search procedure (GRASP) is used to quickly identify feasible solutions. Lim et al. (2004) study the same multi-vessel QCSP as Daganzo (1990) but integrate spatial constraints (non-crossing and minimum safety distance between QCs), and non-simultaneity between tasks. However, precedence constraints are not considered and the scheduling problem is modelled without integrating it over the time, i.e. it is seen as a static crane-to-task matching. A probabilistic tabu search and a "squeaky wheel" optimization heuristic are applied to the problem, while dynamic programming algorithms can solve simplified variants. The single crane version of the QCSP is a particular case of the Precedence Constrained Traveling Salesman Problem (PC-TSP) in which every vertex may have multiple predecessors and successors. The asymmetric PC-TSP has been studied, among others, by Balas et al. (1995) and Ascheuer et al. (2000) who proposed several families of valid inequalities based in large part on the strengthening of existing inequalities for the asymmetric TSP. This problem has applications, for example, in the scheduling of flexible manufacturing systems (see, e.g., Ascheuer 1996). Some of the proposed PCTSP inequalities also apply to the QCSP. In particular, the predecessor and successor inequalities
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
35
proposed by Balas et al. will be used in our algorithm. The QCSP also shares some characteristics with the Vehicle Routing Problem with Pickup and Delivery (VRP-PD) and the Dial-a-Ride Problem (DARP). However there is a difference between the time precedence constraint in the QCSP, where a QC can start a task only if the preceding tasks are already completed by any QC, and the route precedence constraint in the VRP-PD or the DARP, where a delivery node can be visited by a vehicle only after the pickup node has been visited by the same vehicle.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
36
3.3 Mathematical models We introduce our main notation in Section 3.3.1, followed by the Kim and Park (2004) mixed integer formulation in Section 3.3.2, by some observations in Section 3.3.3, and by an improved model in Section 3.3.4.
3.3.1 Notation We are given a set of n tasks, Ω = {1, ..., n}, and a set of q quay cranes, K = {1, ..., q}. A set Φ of ordered task pairs (i, j) describes the precedence relationships, i.e., i must precede j whenever (i, j) ∈ Φ. Similarly tasks i and j cannot be performed simultaneously whenever (i, j) ∈ Ψ. Note that Φ ⊆ Ψ. The input data for the model are: pi , ∀i ∈ Ω, the processing time of task i, rk , ∀k ∈ K, the earliest available time of QC k, li , ∀i ∈ Ω, the location of task i expressed by a ship bay number, lk0 , ∀k ∈ K, the starting position of QC k expressed by a ship bay number, lkT , ∀k ∈ K, the final position of QC k expressed by a ship bay number, t, the travel time between two consecutive bays, tij , ∀i, j ∈ Ω, the travel time of a QC from location li to location lj , tij = t × |li − lj |, tk0j , ∀j ∈ Ω, k ∈ K, the travel time of a QC k from location lk0 to location lj , tk0j = t × |lk0 − lj | tkiT , ∀i ∈ Ω, k ∈ K, the travel time of a QC k from location li to location lkT , tkiT = t × |li − lkT | (tkiT = 0, ∀i ∈ Ω means that we do not consider the quay crane travel time after the completion of the last task), α1 , the weight assigned to the makespan component of the objective function, α2 , the weight assigned to the total completion time component of the objective function. We also define additional sets:
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
37
0
Φ = {(i, j) ∈ Φ : li = lj }, the subset of precedences related to the loading, unloading, hold, deck priorities, π(i) = {j ∈ Ω : (j, i) ∈ Φ}, a set of tasks that must be completed before i starts, σ(i) = {j ∈ Ω : (i, j) ∈ Φ}, a set of tasks that can only start after i is completed, 0
0
0
π (i), σ (i), defined as above but on the set Φ instead of Φ, 0
0
Υ(i, j) = {l ∈ Ω : l ∈ π (j), l ∈ σ (i)}, a set of tasks belonging to the same ship bay that can start only after i is completed and must be completed before j starts. We denote by ζ(i, j) a lower bound on the difference between the starting time of a task j and the completion time of a task i which uses the precedence relationships inside a ship bay: 0 ζ(i, j) = P
if Υ(i, j) = ∅
l∈Υ(i,j)
pl
, ∀i, j ∈ Ω.
otherwise
Similarly ζ(0, j) represents a straightforward lower bound on the starting time of a task j when j has predecessors on the same ship bay: 0 ζ(0, j) = P
l∈π
0
if π (j) = ∅ 0
(j) pl
otherwise
, ∀j ∈ Ω.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
38
3.3.2 The Kim and Park formulation In the Kim and Park formulation the problem is modelled on a graph G = (V, A), where V = Ω ∪ {0, T }, 0 and T being initial and final states of the cranes and A ⊆ V × V . For notational convenience define Ω0 = Ω ∪ {0} and ΩT = Ω ∪ {T }. The formulation uses the following variables: xkij ∈ {0, 1} ∀(i, j) ∈ A, k ∈ K, if QC k performs task j immediately after task i, then xkij = 1; otherwise xkij = 0; if i = 0 and xkij = 1, then task j is the first task of QC k; similarly if j = T and xkij = 1, then task i is the last task of QC k; Di ∀i ∈ Ω, the completion time of task i; zij ∈ {0, 1} ∀i, j ∈ Ω, if task j starts later than the completion time of task i then zij = 1, otherwise zij = 0; C k ∀k ∈ K, the completion time of QC k; W, the makespan, i.e., the earliest time at which all QCs can complete their work. The Kim and Park model, denoted by F 1, is as follows:
minimize α1 W + α2
X k∈K
Ck
(3.1)
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
39
subject to Ck ≤ W X xk0j = 1
∀k ∈ K,
(3.2)
∀k ∈ K,
(3.3)
∀k ∈ K,
(3.4)
xkij = 1
∀j ∈ Ω,
(3.5)
xkji = 0
∀i ∈ Ω, ∀k ∈ K,
(3.6)
∀i, j ∈ Ω, ∀k ∈ K,
(3.7)
∀(i, j) ∈ Φ,
(3.8)
∀i, j ∈ Ω,
(3.9)
j∈Ω
X
xkiT = 1
i∈Ω
XX X j∈ΩT
k∈K i∈Ω
xkij −
X
j∈Ω0
Di + tij + pj − Dj ≤ M (1 − xkij ) Di + pj ≤ Dj Di + pj − Dj ≤ M (1 − zij ) zij + zji = 1 k X X v=1
u∈Ω0
∀(i, j) ∈ Ψ,
(3.10)
∀i, j ∈ Ω, li < lj , ∀k ∈ K,
(3.11)
Dj + tkjT − C k ≤ M (1 − xkjT )
∀j ∈ Ω, ∀k ∈ K,
(3.12)
rk − Dj + tk0j + pj ≤ M (1 − xk0j )
∀j ∈ Ω, ∀k ∈ K,
(3.13)
xkij ∈ {0, 1}
∀k ∈ K, ∀(i, j) ∈ A,
(3.14)
zij ∈ {0, 1}
∀k ∈ K, ∀i, j ∈ Ω,
(3.15)
C k , Di ≥ 0
∀i ∈ Ω, ∀k ∈ K,
(3.16)
xvuj −
k X X v=1
xvui ≤ M (zij + zji )
u∈Ω0
where M is a sufficiently large constant. The makespan is defined by constraints (3.2). Constraints (3.3) and (3.4) ensure, respectively, that each crane k leaves its initial state 0 and ends at its final state T . Each task j is assigned to one and only one crane k by constraints (3.5). Constraints (3.6) define the flow balance for each task and each crane. Constraints (3.7) determine the completion time for each task and eliminate subtours. Precedence relationships are enforced by constraints (3.8). Constraints (3.9) define variables zij . Constraints (3.10) guarantee that tasks i and j cannot be performed simultaneously when (i, j) ∈ Ψ. The non-crossing requirement among QCs is modelled by constraints (3.11). If tasks i and j, with li < lj , are performed simultaneously, then zij + zji = 0. Assuming that both QCs and tasks are ordered in increasing order of their relative bay locations in the ship, if k1 < k2 , QC k1 performs tasks j and QC k2 performs task i, then a crossing between the two quay cranes will take
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM place. However, in such a case,
Pk
P u∈Ω0
v=1
xvuj −
Pk v=1
P u∈Ω0
40 xvui = 1, which cannot be allowed
because of constraints (3.11) and the fact that zij + zji = 0. The completion time of each QC is defined by constraints (3.12), while constraints (3.13) enforce time variables associated with the first task of each QC.
3.3.3 Observations on the Kim and Park formulation In this section we present several strengthenings of formulation F 1. Consistency of the variable zij If task j starts later than the completion time of task i, then zij = 1. In this situation the left-hand side of (3.9) is negative and the constraint is satisfied for zij = 0. The formulation can therefore be strengthened by adding the following constraints:
Dj − pj − Di ≤ M zij
∀i, j ∈ Ω.
(3.17)
To avoid QC collisions constraints (3.9) and (3.17) need some refinements. For example, consider two tasks i and j on the same bay, i.e. li = lj . Collisions between QCs working on tasks belonging to the same bay are avoided because of constraints (3.10) forcing the non-simultaneity of the associated tasks. Suppose that task i is completed at time Di by QC k which leaves the bay moving left; also suppose that QC h, h > k, has already completed a task u in a bay located right to the bay where are located i and j. If tuj ≤ Di − Du then the QC h can start task j as soon as QC k completes task i, i.e. Dj − pj = Di and no interference is detected by the model since zij can take the value 1; however a collision does happen. Under this condition, task j should not start before time Di + t which will allow the QC that has processed task i to move safely to another bay, assuming that the safety distance between QCs is equal to the length of a ship bay. This can be achieved by forcing the variable zij to be equal to 0 if Dj − pj = Di and the QC processing j comes from a neighbor bay. Then, when li = lj , constraints (3.9) and (3.17) should be restated as follows:
Di + pj − Dj +
X
X
txkuj ≤ M (1 − zij )
∀i, j ∈ Ω, li = lj ,
(3.18)
∀i, j ∈ Ω, li = lj .
(3.19)
k∈K u∈Ω0 ,lu 6=li
Dj − pj − Di −
X
k∈K
X
u∈Ω0 ,l
u 6=li
txkuj ≤ M zij
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
41
We note also that precedence constraints (3.8) can be replaced by the following variable fixing:
zij = 1, zji = 0
∀(i, j) ∈ Φ.
(3.20)
And, because Φ ⊆ Ψ, we can avoid writing constraints (3.10) when (i, j) ∈ Φ:
zij + zji = 1
∀(i, j) ∈ Ψ \ Φ.
(3.21)
When the precedence between two tasks i and j is transitively derived, the associated precedence constraint between them is unnecessary, but to improve the linear relaxation, we can incorporate in constraints (3.18) a lower bound of the time between the completion of the task i and the start of the task j whenever Υ(i, j) 6= ∅. Note that in this case (i, j) ∈ Φ, zij = 1 and the right-hand side of (3.18) is equal to zero. We can add to the left-hand side of (3.18) the quantity ζ(i, j) which, as mentioned above, defines a lower bound on the difference between the starting time of a task j and the completion time P P P of a task i. Furthermore we can also add the quantity k∈K u∈Ω0 ,lu 6=li l∈Υ(i,j) txkul representing a lower bound on the QC waiting times between the starting of the tasks in Υ(i, j). For notational ˜ j) = {Υ(i, j) ∪ {j}}. Then constraints (3.18) become: convenience let Ωi = {u ∈ Ω0 : lu 6= li } and Υ(i,
Di + pj + ζ(i, j) − Dj +
X X
X
txkul ≤ M (1 − zij )
∀i, j ∈ Ω, li = lj .
(3.22)
˜ k∈K u∈Ωi l∈Υ(i,j)
Non-crossing constraints The large constant M is unnecessary in constraints (3.11) since the maximum value of the left-hand side is equal to 1. Moreover constraints (3.11) are only relevant when zij + zji = 0, and we can therefore avoid writing these constraints for (i, j) ∈ Ψ. We also note that in constraints (3.11) the Pk P Pk−1 P term v=1 u∈Ω0 xvui can be written as v=1 u∈Ω0 xvui because if task j is assigned to QC k and zij + zji = 0 (relevant case of simultaneity between two tasks), then task i belongs to a QC h with Pk P Pk−1 P v h 6= k. Since v=1 u∈Ω0 xvui ≥ v=1 u∈Ω0 xui this also constitutes a strengthening. The noncrossing constraints (3.11) can therefore be rewritten as follows: k X X v=1 u∈Ω0
xvuj −
k−1 X
X
v=1 u∈Ω0
xvui ≤ zij + zji
∀i, j ∈ Ω, li < lj , (i, j) ∈ / Ψ, ∀k ∈ K.
(3.23)
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM Similarly, since k X X v=1 u∈Ω0
P
Pk−1
u∈Ω0
xvuj +
v=1
xvui = 1 −
q X X
P
Pq
u∈Ω0
xvui ≤ 1 + zij + zji
v=k
42
xvui , we also can rewrite constraints (3.23) as:
∀i, j ∈ Ω, li < lj , (i, j) ∈ / Ψ, ∀k ∈ K.
(3.24)
v=k u∈Ω0
A lower bound for the task starting time A trivial lower bound for the starting time of a task i is d0i = mink {rk + tk0i }. Taking into account the precedence relationships inside a ship bay leads to some refinements. The lower bound a(i) on the starting time of a task i can be computed recursively as:
a(i) = max{d0i + ζ(0, i),
max
(a(j) + pj )}.
j∈π(i)\π 0 (i)
(3.25)
The value a(i) is always defined since the precedence graph is acyclic, for otherwise the problem would not be feasible. Using a(i) we can replace M in constraints (3.13) with rk + tk0j − a(j). An upper bound for the task completion time An upper bound on task completion time can be used instead of M in equations (3.7), (3.9) and (3.12). The upper bound for the task completion time corresponds to the upper bound for the makespan, minus the travelling time tkiT . We note that computing an upper bound on task completion time with a constructive heuristic will not be valid since the objective function is the weighted sum of the makespan and of the sum of the QC completion times. The sum of the QC completion times correP sponds to a constant part, i∈Ω pi , plus the QC travelling times and the QC idle times caused by the interferences between cranes. In any practical case the idle times are much larger than the travelling times, and therefore we can conclude that the sum of the QC completion times decreases when interferences between cranes are reduced. A larger makespan may yield a reduced QC interference, and therefore the two elements of our objective function are conflicting. Anyhow, when only one QC is allowed on a vessel, the interference waiting times are eliminated by definition, and the corresponding makespan U is easy to compute. Using this value as an upper bound on task completion time does P not cut off any feasible solution. The makespan upper bound is set equal to mink {rk + i∈Ω pi + T k }, where T k is a feasible solution value for the TSP associated with QC k over all tasks. Since the quay crane moves along a line this TSP instance is immediately solved.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
43
3.3.4 Formulation F 2 We now introduce a new formulation for the QCSP which integrates the observations made in Section 3.3.3. To define branching priorities and simplify the equations we introduce new variables yik ∈ {0, 1}, ∀i ∈ Ω, k ∈ K and yik = 1 if and only if task i is assigned to QC k, and yik = 0 otherwise. Formulation F 2 has the same objective function (3.1) and is subject to constraints (3.2), which define the makespan, plus the following:
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
X
44
xk0j = 1
∀k ∈ K,
(3.26)
xkiT = 1
∀k ∈ K,
(3.27)
xkij
∀i ∈ Ω, ∀k ∈ K,
(3.28)
xkji
∀i ∈ Ω, ∀k ∈ K,
(3.29)
∀i ∈ Ω,
(3.30)
∀i, j ∈ Ω,
(3.31)
∀i, j ∈ Ω, li 6= lj ,
(3.32)
∀i, j ∈ Ω, li 6= lj
(3.33)
∀i, j ∈ Ω, li = lj ,
(3.34)
∀i, j ∈ Ω, li = lj ,
(3.35)
∀(i, j) ∈ Φ,
(3.36)
∀(i, j) ∈ Ψ \ Φ,
(3.37)
∀i, j ∈ Ω, li < lj , (i, j) ∈ / Ψ, k ∈ K,
(3.38)
6 Dj + tkjT − C k ≤ Mjk (1 − xkjT )
∀j ∈ Ω, ∀k ∈ K,
(3.39)
7 rk − Dj + tk0j + pj ≤ Mjk (1 − xk0j )
∀j ∈ Ω, ∀k ∈ K,
(3.40)
∀k ∈ K, ∀(i, j) ∈ A,
(3.41)
∀k ∈ K, ∀i, j ∈ Ω,
(3.42)
∀i ∈ Ω,
(3.43)
∀i ∈ Ω, ∀k ∈ K,
(3.44)
j∈ΩT
X
i∈Ω0
X
yik =
j∈ΩT
X
yik = X
j∈Ω0
yik = 1
k∈K 1 (1 − Di + tij + pj − Dj ≤ Mij
X
xkij )
k∈K
Di + pj − Dj ≤ Mj2 (1 − zij ) Dj − pj − Di ≤ Mi3 zij
+
X X
Di + pj + ζ(i, j) − Dj X 4 txkul ≤ Mij (1 − zij )
˜ k∈K u∈Ωi l∈Υ(i,j)
Dj − pj − Di −
X X
5 txkuj ≤ Mij zij
k∈K u∈Ωi
zij = 1, zji = 0 zij + zji = 1 k X
X
v=1 u∈Ω0
xvuj +
q X
X
xvui ≤ 1 + zij + zji
v=k u∈Ω0
xkij ∈ {0, 1} yik , zij ∈ {0, 1} a(i) + pi ≤ Di ≤ U C k ≥ rk
1 4 where Mij = U + tij − a(j), Mj2 = U − a(j), Mi3 = U − pj − (a(i) + pi ), Mij = U + ζ(i, j) − a(j) +
˜ j)|, M 5 = U − pj − (a(i) + pi ), M 6 = U + tk − rk , M 7 = rk − a(j) + tk . t × |Υ(i, ij 0j jT jk jk Constraints (3.26) and (3.27) ensure, respectively, that each crane k leaves its initial state 0 and
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
45
ends at its final state T , but unlike what is stated in constraints (3.3) and (3.4) of F 1, a QC k is allowed to go from its initial state directly to its final state. This modification enlarges the solution space but allows the detection of instances in which a reduction of the number of QCs is beneficial. Constraints (3.28) and (3.29) define variables yik . Only one group of these constraints would have been necessary, but together with constraints (3.30) they also model the assignment of each task to one and only one crane and the flow balance for each task. Constraints (3.31) determine the completion time for each task and eliminate subtours. Constraints (3.32) - (3.36) have already been discussed in Section 3.3.3 The non-crossing requirement among QCs is modelled by constraints (3.38) as discussed in Section 3.3.3. The completion time and the earliest starting time of each QC are defined by constraints (3.39) and (3.40), respectively.
3.4 Valid inequalities We now describe several families of valid inequalities for the QCSP. All of these inequalities are redundant for model F 2 but can strengthen its LP relaxation. The following additional notation will be used to describe the valid inequalities. Given a vertex set S ⊆ V , define S¯ = {i ∈ V |i 6∈ S} and δ(S) = δ + (S)∪δ − (S) where δ + (S) = {(i, j) ∈ A|i ∈ S, j 6∈ S} P and δ − (S) = {(i, j) ∈ A|i 6∈ S, j ∈ S}. For notational convenience, let xij = k∈K xkij denote the P P total flow on arc (i, j) and define x(S) = i,j∈S xij . Similarly, let x(A0 ) = (i,j)∈A0 xij for any arc set A0 ⊆ A.
3.4.1 Lower bounds on the QC completion time To strengthen the formulation F 2 we introduce lower bounding inequalities on the QC completion time. New variables are required: w0k , ∀k ∈ K, a lower bound on the idle time of the QC k at the starting time, ρk , ∀k ∈ K, a lower bound on the travel time for the QC k on its right side, λk , ∀k ∈ K, a lower bound on the travel time for the QC k on its left side, υk , ∀k ∈ K, the maximum value between ρk and υk .
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
46
The defining constraints are then: w0k ≥
X
ζ(0, j)xk0j
∀k ∈ K,
(3.45)
ρk ≥ tk0i yik
∀i ∈ Ω, li > lk0 , ∀k ∈ K,
(3.46)
λk ≥ tk0i yik
∀i ∈ Ω, li < lk0 , ∀k ∈ K,
(3.47)
υk ≥ ρk
∀k ∈ K,
(3.48)
υk ≥ λk X pi yik C k ≥ w0k + rk + 2λk + 2ρk − υk +
∀k ∈ K,
(3.49)
∀k ∈ K,
(3.50)
∀k ∈ K.
(3.51)
0
j∈Ω,π (j)6=∅
i∈Ω
ρk , λk , υk ≥ 0
Constraints (3.45) define a straightforward lower bound w0k on the idle time of the QC k at the starting time when the first task performed by the QC k requires preceding tasks to be completed. Note that we are assuming that all the crane earliest available times rk are equal. This assumption holds for our instance set but is not true in general. However, a slightly different constraint, not reported here, can work for the general case. Constraints (3.46) compute ρk as a lower bound on the travel time of the QC k with respect to the starting position lk0 . Analogously, constraints (3.47) define a lower bound on the travel time λk of QC k. Constraints (3.48) and (3.49) define υk as the maximum value between ρk and υk . Using ρk , λk and υk we can compute a lower bound on the QC travel time. Since a crane moves along a line, this quantity cannot be less than 2λk +2ρk −υk . Therefore constraints (3.50) define the QC completion time as bounded by the sum of the starting idle time, travel time and processing times of its assigned tasks. Another way of defining a lower bound on the QC completion time is: C k ≥ rk +
X
(tk0j + ζ(0, j))xk0j +
j∈Ω
X X i∈Ω
(pi + tij )xkij
∀k ∈ K.
(3.52)
j∈ΩT
In the following we consider inequalities (3.45) - (3.51) and (3.52) as part of formulation F 2.
3.4.2 Subtour elimination constraints In the case of the QCSP, the subtour elimination constraint x(S) ≤ |S| − 1 for S ⊆ Ω can be lifted in many different ways by taking into account the precedence relationships. Balas et al. (1995) have
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
47
proposed two families of inequalities for the asymmetric PC-TSP that also apply to the QCSP. The following inequality, called a successor inequality (or σ-inequality) is valid for the QCSP: X
x(S) +
X
X
xij +
¯ j∈S i∈S∩σ(S)
X
xij ≤ |S| − 1.
(3.53)
¯ j∈S∩σ(S) i∈S\σ(S)
Example. Consider the set S = {i, j, l} ⊆ Ω for which a non-transitively derived precedence relationship between i and l exists, i.e. l ∈ σ(i) and σ(i) ∩ π(l) = ∅. Suppose also that task j does not have precedence relationships with the other tasks in S. We will use this set S to illustrate lifted subtour elimination constraints later in this section. We note that σ(S) = {l}∪σ(l)∪σ(j). We depict in Figure 3.1 the successor inequality associated with S, where the lifted arcs are indicated with dotted lines.
S¯ \ σ(S)
σ(l) i
l
σ(j) j
σ(S)
S
Figure 3.1: Successor inequality for S = {i, j, l} ⊆ Ω Similarly, for any set S ⊆ Ω, the following predecessor inequality (or π-inequality) is valid for the QCSP:
x(S) +
X
X
¯ i∈S j∈S∩π(S)
xij +
X
X
xij ≤ |S| − 1.
(3.54)
¯ i∈S∩π(S) j∈S\π(S)
Example. The set π(S) is equal to {i} ∪ π(i) ∪ π(j). We illustrate in Figure 3.2 the corresponding predecessor inequality where the lifted arcs are shown by dotted lines. Because we have a directed formulation, we can also lift subtour elimination constraints by taking into account the orientation of the arcs. For an ordered set S = {i1 , i2 , . . . , ih } ⊆ Ω with h ≥ 3,
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
48
S¯ \ π(S)
π(i) i
l
π(j) j
π(S) S
Figure 3.2: Predecessor inequality for S = {i, j, l} ⊆ Ω Grötschel and Padberg (1985) proposed the following inequalities for the asymmetric TSP: h−1 X
xij ,ij+1 + xih ,i1 + 2
j=1 h−1 X
h−1 X
xij ,i1 +
j=2
xij ,ij+1 + xih ,i1 + 2
j=1
h X
j−1 h−1 XX
xij ,il
≤
h−1
(3.55)
xij ,il
≤
h − 1.
(3.56)
j=3 l=2
xi1 ,ij +
j=3
j−1 h X X j=4 l=3
Considering different orderings of the nodes in S we can obtain different liftings. As in Cordeau (2003) these inequalities can be further lifted by taking precedence relationships into account. Two families of valid inequalities for the DARP that exploit this idea are introduced in Cordeau (2003) and are also valid for the QCSP. We report these inequalities in Propositions 1 and 3 along with their proofs because we extend them in Propositions 2 and 4. These new propositions take into account situations occurring with the QCSP structure, i.e. tasks can have multiple predecessors and successors, which is different from the DARP structure. Proposition 1. Let S = {i1 , i2 , . . . , ih } ⊆ Ω. The following inequality is valid for the QCSP: h−1 X j=1
xij ,ij+1 + xih ,i1 + 2
h−1 X j=2
xij ,i1 +
j−1 h−1 XX j=3 l=2
xij ,il +
X
xl,i1
≤
h − 1.
(3.57)
¯ l∈S∩σ(S)
Proof. Suppose that S¯ ∩ σ(S) 6= ∅ and one arc of the form (l, i1 ) with l ∈ S¯ ∩ σ(S) is part of the solution. Then no arc (ij , i1 ) with 2 ≤ j ≤ h can belong to the solution. As a result, if the left-hand side of (3.57) is larger than h − 1, then there exists a subpath linking the h elements of S. But because S contains at least one task il which must precede l, i.e. l ∈ σ(il ), this subpath together with the arc (l, i1 ) would violate the precedence constraint for il . ¤
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
49
Example. One possible lifted directed subtour elimination constraint (obtained with i1 = j, i2 = i, i3 = l) is illustrated in Figure 3.3.
S¯ \ σ(S)
σ(l) i
l
σ(j) 2 j
σ(S)
S
Figure 3.3: Lifted directed subtour elimination constraint of Proposition 1 Proposition 2. Let S = {i1 , i2 , . . . , ih } ⊆ Ω and i1 ∈ σ(S). The following inequality is valid for the QCSP: h−1 X
xij ,ij+1 + xih ,i1 + 2
j=1
h−1 X
xij ,i1 +
j=2
j−1 h−1 XX
xij ,il +
j=3 l=2
X
xl,i1
≤
h − 1.
(3.58)
¯ l∈S
Proof. Suppose that one arc (l, i1 ) with l ∈ S¯ is part of the solution. If l ∈ S¯ ∩ σ(S) Proposition 1 still holds. Hence assume that l ∈ S¯ \ σ(S). Then no other arc entering i1 can belong to the solution. But, if the left-hand side of (3.58) is larger than h−1, then there exists a subpath linking the h elements of S, starting from i1 . But because S contains at least one task id that must precede i1 , i.e. i1 ∈ σ(id ), this subpath would violate the precedence constraint for id . ¤ Example. We illustrate in Figure 3.4 the case with i1 = l, i2 = j, i3 = i. Proposition 3. Let S = {i1 , i2 , . . . , ih } ⊆ Ω. The following inequality is valid for the QCSP: h−1 X
xij ,ij+1 + xih ,i1 + 2
j=1
h X j=3
xi1 ,ij +
j−1 h X X j=4 l=3
xij ,il +
X
xi1 ,l
≤
h − 1.
(3.59)
¯ l∈S∩π(S)
Proof. The proof is similar to that of Proposition 1 by observing that if one arc (i1 , l) with l ∈ S¯ ∩ π(S) is part of the solution, then no arc (i1 , ij ) with 2 ≤ j ≤ h can belong to the solution. ¤ Example. In Figure 3.5 we report a lifted directed subtour elimination constraint obtained with i1 = j, i2 = i, i3 = l. Proposition 4. Let S = {i1 , i2 , . . . , ih } ⊆ Ω and i1 ∈ π(S). The following inequality is valid for the
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
50
S¯ \ σ(S)
σ(l) i
l 2
σ(j) j
σ(S)
S
Figure 3.4: Lifted directed subtour elimination constraint of Proposition 2
S¯ \ π(S)
π(i) i
l
π(j)
2 j
π(S) S
Figure 3.5: Lifted directed subtour elimination constraint of Proposition 3 QCSP: h−1 X j=1
xij ,ij+1 + xih ,i1 + 2
h X j=3
xi1 ,ij +
j−1 h X X j=4 l=3
xij ,il +
X
xi1 ,l
≤
h − 1.
(3.60)
¯ l∈S
Proof. The proof is similar to that of Proposition 2. ¤ Example. In Figure 3.6 we depict a lifted directed subtour elimination constraint obtained with i1 = i, i2 = j, i3 = l.
3.4.3 Order matching constraints The following Propositions 5 and 6 were introduced in Cordeau (2003) and are also valid for the QCSP. These propositions explain why lifted subtour elimination constraints dominate TSP comb constraints.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
51
S¯ \ π(S)
π(i)
2 i
l
π(j) j
π(S) S
Figure 3.6: Lifted directed subtour elimination constraint of Proposition 4 Proposition 5. Let i1 , . . . , im and s1 , . . . , sm be 2m tasks such that (ih , sh ) ∈ Φ. Let H ⊂ Ω and ˜ = ∪m {ih }. The Th ⊂ Ω, h = 1, . . . , m be sets such that {ih , sh } ⊆ Th and H ∩ Th = {ih }. Define H h=1 following inequality is valid for the QCSP:
x(H) +
m X
x(Th ) +
h=1
X X ¯ i ˜ j∈H\T i∈H
xij ≤ |H| +
m X
|Th | − 2m.
(3.61)
h=1
Proof. First observe that x(H) ≤ |H|−1 and x(Th ) ≤ |Th |−1 for h = 1, . . . , m. Let α be the number ¯ \ Th ; if x(Th ) = |Th | − 1 then there exists a path connecting all of tasks ih such that xih ,j = 1, j ∈ H tasks in Th , including ih and sh and ending at ih . However, this path cannot end at ih because of the precedence constraint involving the pair (ih , sh ) ∈ Φ. Therefore we have α cases with x(Th ) ≤ |Th |−2. Let β be the number of tasks ih with xih ,j = 1, j ∈ H; using the above argument there are β tasks such that x(Th ) ≤ |Th | − 2. The remaining γ tasks ih , with γ = m − α − β yield xih ,j = 1, j ∈ Th by the covering and flow conservation constraints. Then, x(δ + (H)) ≥ α+γ. Since x(δ + (H)) = x(δ − (H)) and 2x(H)+x(δ + (H))+x(δ − (H)) = 2|H|, one obtains 2x(H) ≤ 2|H|−2α−2γ and thus x(H) ≤ |H|−α−γ. Pm Pm P P Furthermore h=1 x(Th ) ≤ ¯ i xij = α one may ˜ h=1 |Th | − 2α − 2β − γ and since j∈H\T i∈H Pm P P Pm conclude that x(H) + h=1 x(Th ) + i∈H˜ j∈H\T ¯ i xij ≤ |H| + h=1 |Th | − 2α − 2β − 2γ which simplifies to expression (3.61). ¤ Example. Consider the sets H = {i1 , i2 }, T1 = {i1 , s1 , j} and T2 = {i2 , s2 , l}. The resulting P P inequality is x(H) + x(T1 ) + x(T2 ) + u∈H\T ¯ 1 xi1 u + ¯ 2 xi2 u ≤ 4 and is illustrated in Figure 3.7. u∈H\T Remark 2. Inequality (3.61) is stronger than the corresponding TSP comb constraint, valid for Pm Pm m ≥ 3 and odd, which is defined as x(H) + h=1 x(Th ) ≤ |H| + h=1 |Th | − (3m + 1)/2. Nevertheless, in the presence of lifted subtour elimination constraints (3.54), these inequalities are
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
52
H
j i1
s1
T1
s2
T2
¯ \ {T1 ∪ T2 } H
i2
l
Figure 3.7: Lifted generalized order constraint with m = 2, Proposition 5 redundant as will be shown in the following proposition. Proposition 6. The following inequality, which is a strengthening of (3.61), is redundant in the presence of inequalities (3.54):
x(H) +
m X
x(Th ) +
X X
xij +
¯ i ˜ j∈H\T i∈H
h=1
X X
xij ≤ |H| +
¯ ˜ j∈H i∈H\H
m X
|Th | − 2m.
(3.62)
h=1
Proof. Inequality (3.62) can be written equivalently as X X i∈H j∈ΩT
xij +
X
X
xij ≤ |H| +
i∈Th \{ih } j∈Th
m X
|Th | − 2m.
h=1
For every subset Th , h = 1, . . . , m, one has x(Th \ {ih }) +
P i∈Th \{ih }
xi,ih ≤ |Th | − 2 because
of inequality (3.54) defined for subset S = Th \ {ih } whose cardinality is |Th | − 1. As a result, P P P P i∈Th \{ih } j∈Th xij ≤ |Th | − 2. In addition, i∈H j∈ΩT xij = |H| by constraints (3.28) and (3.30). The result follows directly from these two observations. ¤
3.5 Branch-and-Cut algorithm Branch-and-cut has been successfully applied to several routing problems (see, e.g., Ascheuer et al. 2001, Naddef and Rinaldi 2002, Laporte et al. 2003). This section describes our branch-and-cut implementation for the QCSP. It uses preprocessing techniques to reduce instance size and separation
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
53
heuristics to identify violated inequalities. After applying the preprocessing steps presented in Section 3.5.1 and generating an initial pool of inequalities, the algorithm first solves the LP relaxation of the problem. If the solution to the LP relaxation is integer, an optimal solution has been identified. Otherwise, an enumeration tree is constructed and violated valid inequalities are identified by means of the separation heuristics described in Section 3.5.4, and incorporated into subproblems. Because all inequalities described in Section 3.4 are valid for the original formulation, the inequalities added at any node of the tree are also valid for all other nodes. Hence, whenever the LP bound is evaluated at a given node of the tree, the linear program incorporates all cuts generated thus far. To control the branch-and-cut process, branching is first performed on the variables yik which reflect the assignment of tasks to cranes. At a given node of the search tree, if the yik variables are all integer but there exists at least one fractional xkij variable, the separation heuristics are executed in the hope of identifying violated valid inequalities. If at least one of the heuristics succeeds in finding one or more violated inequalities, the relaxation is solved with all identified cuts and the heuristics are executed again. The cut generation process at a node terminates when all heuristics fail to find any violated inequality. If the solution to the relaxation is still fractional after the generation of cuts, branching is performed on a fractional yik variable, if there is any, or on a fractional xkij variable, otherwise. The priorities for branching are reported in Section 3.5.2. In addition to the application of the separation heuristics at some nodes of the branch-and-bound tree, a pool of inequalities is checked exhaustively for violations at each node of the tree, including those where not all y variables take integer values. The inequalities that belong to this pool are described in Section 3.5.3.
3.5.1 Variable fixing During the preprocessing phase we use the following variable fixing rules which result from the precedence relationships:
xkji = 0
∀(i, j) ∈ Φ, ∀k ∈ K,
xkij = 0
∀(i, j) ∈ Φ, ∀k ∈ K : ∃ l ∈ Ω, (i, l) ∈ Φ, (l, j) ∈ Φ.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
54
3.5.2 Branching priorities We set the branching priorities, expressed as b(), as follows: b(yik ) = 100, ∀i ∈ Ω, k ∈ K, b(xk0j ) = 10, ∀j ∈ ΩT , k ∈ K, b(xkij ) = 1, ∀i ∈ Ω, j ∈ ΩT , k ∈ K, where higher values correspond to higher priorities.
3.5.3 Initial pool of inequalities The initial pool of inequalities comprises all constraints that are enumerated exhaustively and whose violations are checked individually at every node of the branch-and-bound tree. These inequalities are chosen to ensure that the size of the pool will remain reasonable so as to avoid slowing down the processing of a node. We have included in the initial pool of inequalities subtour elimination constraints (3.53) and (3.54) with |S| = 2.
3.5.4 Separation Heuristics The identification of violated inequalities of the form x(S) ≤ |S| − 1 can be achieved by solving a series of maximum flow problems between any task i and all other tasks j ∈ V \ {i}. However, in addition to being computationally expensive, this approach does not take the possible liftings into account. For these reasons, we resort to a simple tabu search heuristic inspired from the procedures proposed by Augerat et al. (1999) and Cordeau (2003). When all yik variables are integer but there is at least one fractional xkij variable, two heuristics are executed sequentially. The first one checks for violations of (3.53), (3.57) and (3.58). Using the fact that 2x(S) + x(δ(S)) = 2|S| in a feasible integer solution, violations of (3.53) can be identified by finding sets S such that
x(δ(S)) − 2
X
X
¯ j∈S i∈S∩σ(S)
xij − 2
X
X
xij < 2.
(3.63)
¯ j∈S∩σ(S) i∈S\σ(S)
We select the set of tasks i ∈ Ω assigned to a QC k ∈ K. Define this set as Sk . We search for violated inequalities only if |Sk | ≥ 3, since we have already inserted in the initial pool of inequalities all subtour elimination constraints with |S| = 2. The heuristic starts with an empty set S. At each iteration,
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
55
it either adds or removes a task from S so as to minimize the left-hand side of (3.63). Whenever a task is removed from S, its reinsertion is declared tabu for θ iterations. The heuristic runs for a number of iterations equal to τ × |Sk |, where τ is a user-defined parameter. At each iteration, the current set S is also checked for possible violations of inequalities (3.57) and (3.58). Given a task i ∈ S we define P P P P χσ (i) = 2 j∈S\{i} xj,i + l∈S¯ xl,i , if i ∈ σ(S), or χσ (i) = 2 j∈S\{i} xj,i + l∈S∩σ(S) xl,i , otherwise. ¯ The task with the largest value of χσ is labelled as i1 and the other tasks are labelled at random. A similar heuristic is then used to identify violations of inequalities (3.54), (3.59) and (3.60). In the latter P P case, the task with the largest value of χπ (i) is labelled as i1 , where χπ (i) = 2 j∈S\{i} xi,j + l∈S¯ xi,l , P P if i ∈ π(S), or χπ (i) = 2 j∈S\{i} xi,j + l∈S∩π(S) xi,l , otherwise. ¯
3.6 Computational results We first describe our test instances (Section 3.6.1), and then provide results obtained with formulations F 1 and F 2 in Section 3.6.3, and with the branch-and-cut algorithm in Section 3.6.4. We also present some implementation details and sensitivity analyses of our algorithms in Section 3.6.2.
3.6.1 Test instances We have conducted tests on the 37 instances introduced by Kim and Park (2004). These instances are numbered from 13 to 49 and in Table 3.1 we report their size in terms of number of QCs and tasks. It Instance set {13, . . . , 22} {23, . . . , 32} {33, . . . , 42} {43, . . . , 49}
Number of QCs 2 2 3 3
Number of tasks 10 15 20 25
Table 3.1: Description of the instances turns out that the instances belonging to the sets {13, . . . , 22} and {23, . . . , 32} are easily solved with formulation F 2, while the remaining instance sets are more challenging. Therefore, we break up our computational experiments in two parts and, for convenience, we define the instances ranging from 13 to 32 as instance set I1 and the others as instance set I2.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
56
3.6.2 Implementation details Our algorithms were implemented in C++ by using ILOG Concert 1.3 and CPLEX 8.1. They were run on a 2.5 GHz Pentium IV computer with 512MB of memory. The CPLEX parameters affect all algorithms. We let only two parameters vary: the MIP emphasis and the heuristic frequency. The CPLEX MIP emphasis parameter, which in the following is denoted µ, controls the exploration of the branch-and-bound tree. The four options are: • µ = 0, default, balance optimality and feasibility; • µ = 1, emphasis on feasibility; • µ = 2, emphasis on optimality; • µ = 3, emphasis on improving the best bound. The heuristic frequency parameter indicates how often the CPLEX heuristic is applied in the hope of identifying feasible integer solutions. The default value is zero, and the heuristic is activated at an interval chosen automatically by CPLEX. Setting the value to a positive integer fh applies the heuristic at the node interval 0, fh , 2fh , 3fh , etc. A sensitivity analysis of our algorithms to the CPLEX parameters was carried out. The performance of the algorithm on formulations F 1 and F 2 is not very sensitive to µ on instance set I1, except for the fact that setting µ = 3 produces rather poor results. Some more noticeable differences occur when formulation F 2 is tested on the instance set I2. Here the µ = 1 yields the best results. Therefore the µ parameter is set equal to one for formulation F 2 and, for consistency, the same choice is applied to F 1. The CPLEX heuristic frequency fh is set to the default zero value for formulations F 1 and F 2 since other choices produce worse results. For these two algorithms setting µ = 1 (with an emphasis on feasibility) already provides good quality solutions. The branch-and-cut algorithm, instead, uses different settings: µ = 2 and fh = 1. This parameter combination works better since the cutting phase improves the lower bounds but takes additional computation time. The MIP emphasis on optimality exploits the better lower bounds and the CPLEX heuristic finds good solutions by exploring fewer nodes of the branch-and-cut tree. The parameters used in the tabu search procedures are as follows: • θ : tabu duration, equal to 5; • τ : parameter that controls the number of tabu search iterations, equal to 4. We set a two hours time limit for all algorithms.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
57
3.6.3 Results with the formulations F 1 and F 2 We first compare the two formulations F 1 and F 2 on the instance set I1. Here formulation F 2 is always capable of yielding an optimal solution within a short computation time, while formulation F 1 is much slower. The results are reported in Table 3.2 and are consistent with those of Kim and Park (2004) who showed that formulation F 1 could only solve within a reasonable time instances involving up to two QCs and six tasks, smaller than those considered in our experiments. We note that instance 13 is solved to optimality by formulation F 2 with a solution value larger than the upper bound obtained with formulation F 1. This apparently strange result is due to the slight variation in the solution space between the two formulations: formulation F 2 incorporates constraints (3.34) and (3.35) that avoid QC collisions as indicated in Section 3.3.3. However, if we remove these constraints from F 2 the optimal solution of the instance 13 is equal to that found by F 1, but the solution contains a collision. We note that in Kim and Park (2004) the scheduling problem is solved exactly by a dedicated branch-and-bound scheme on a reduced solution space which avoids such cases. In fact the optimal solution on this reduced solution space found on instance 13 by Kim and Park has the same solution value, 453, as ours. However, comparing the optimal solutions found on instance set I1 by our algorithm and that of Kim and Park, we note that our approach (which does not assume solution space reduction) generates some benefits because, for example, on instances 20 and 22 we find better solutions with a 20 and 34% makespan reduction (Table 3.3). We have run additional tests in order to asses the contribution of inequalities (3.45) - (3.51) and (3.52) to the performance of formulation F 2. Denote by F 2a formulation F 2 without constraints (3.45) - (3.51) and (3.52), by F 2b formulation F 2a plus constraints (3.45) - (3.51), and by F 2c formulation F 2a plus constraints (3.52). The results of the corresponding three algorithms over the instance set I1 are reported in Table 3.4. We note that F 2a improves over F 1 (see also Table 3.2). However more significant enhancements are achieved adding constraints (3.45) - (3.51) or (3.52). Constraints (3.52) yield the most important contribution. However, by only combining (3.45) - (3.51) and (3.52) we achieve the best results since F 2 dominates F 2c .
3.6.4 Results with the branch-and-cut algorithm We have tested our branch-and-cut algorithm on instance set I2 where the formulation F 2 does not always converge within the assigned two hours time limit. As reported in Table 3.5, the branch-andcut algorithm proves the optimality of three more instances with respect to F 2 and also improves
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
58
the average computation time and solution quality. We have run some tests to evaluate the merit of two parts of our algorithm, the subtour elimination constraints with |S| = 2 added to the root node, and the tabu search heuristic which seeks violated subtour elimination constraints. Running the algorithm without one of these two components yields slightly worse results. In both cases the average gap on the instance set I2 becomes equal to 1.9% instead of 1.0% with the full branch-and-cut algorithm. Instance code 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Average
Solution 450 555 513 321 459 399 552 402 471 537 708 900 822 792 708 693 1026 999 711 684 635
F1 Time (min.) 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00
Gap (%) 41.33 56.76 58.48 48.60 47.06 55.64 50.54 53.73 63.69 43.58 51.69 63.00 64.60 72.35 62.29 70.13 68.71 65.77 32.91 74.12 57.25
Solution 453 546 513 312 453 375 543 399 465 537 576 666 738 639 657 531 807 891 570 591 563
F2 Time (min.) 7.75 0.01 0.02 0.09 0.04 0.01 1.96 0.04 0.01 0.18 0.06 0.96 0.59 0.14 0.05 0.21 0.15 0.22 85.56 1.12 4.96
Gap (%) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Table 3.2: Comparison between F 1 and F 2 formulations. - The % gap is computed with respect to the value of the linear relaxation as 100 × (upper bound − lower bound)/upper bound.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
Instance code 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
Solution value KP F2 453 453 546 546 513 513 321 312 456 453 375 375 552 543 480 399 465 465 720 537 576 576 669 666 738 738 639 639 657 657 537 531 807 807 891 891 570 570 591 591
59
Gap (%) 0.0 0.0 0.0 2.9 0.7 0.0 1.7 20.3 0.0 34.1 0.0 0.5 0.0 0.0 0.0 1.1 0.0 0.0 0.0 0.0
Table 3.3: Comparison between solutions on instance set I1 reported in Kim and Park (2004) and with the formulation F 2. - The % gap is computed as 100 × (KP − F 2)/F 2.
Instance code 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Average
Solution 453 558 513 312 456 375 543 399 468 537 618 732 819 759 699 588 870 948 621 654 596
F 2a Time (min.) 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00
Gap (%) 41.72 56.99 58.48 47.12 46.71 52.80 49.72 53.38 63.46 43.58 44.66 54.51 64.47 71.15 61.80 64.80 63.10 63.92 23.19 72.94 54.92
Solution 453 546 513 312 453 375 543 399 465 537 585 675 741 657 678 537 810 897 585 600 568
F 2b Time (min.) 24.96 1.89 0.18 4.64 1.41 0.50 20.34 1.18 0.36 1.99 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 120.00 62.87
Gap (%) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 3.08 3.11 1.62 4.11 4.87 3.35 2.59 0.67 6.67 3.00 1.65
Solution 453 546 513 312 453 375 543 399 465 537 576 666 738 639 657 531 807 891 570 591 563
F 2c Time (min.) 7.33 0.03 0.02 0.15 0.04 0.04 1.19 0.39 0.01 0.20 2.11 26.11 6.31 3.25 0.14 0.78 2.08 3.02 120.00 0.26 8.67
Gap (%) 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.53 0.00 0.03
Table 3.4: Comparison between three variants of formulation F 2 on instance set I1. - The % gap is computed with respect to the value of the linear relaxation as 100 × (upper bound − lower bound)/upper bound.
CHAPTER 3. THE QUAY CRANE SCHEDULING PROBLEM
Instance code 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 Average
Solution 603 717 684 678 510 618 546 564 588 570 939 858 846 870 792 762 1101 720
F2 Time (min.) 32.8 31.1 53.0 120.0 112.7 120.0 120.0 120.0 120.0 120.0 120.0 120.0 120.0 120.0 56.0 120.0 120.0 101.5
Gap (%) 0.0 0.0 0.0 0.6 0.0 2.0 8.2 1.2 1.2 2.1 8.9 5.7 3.3 21.9 0.0 18.3 20.4 5.5
Solution 603 717 684 678 510 618 513 564 588 570 897 822 840 690 792 645 927 686
60
B&C Time (min.) 10.6 14.9 42.0 86.1 21.2 120.0 120.0 67.1 120.0 120.0 120.0 120.0 120.0 90.4 27.0 120.0 120.0 84.7
Gap (%) 0.0 0.0 0.0 0.0 0.0 0.7 0.9 0.0 0.5 1.7 4.2 0.2 1.8 0.0 0.0 2.5 5.1 1.0
Table 3.5: Results of the branch-and-cut algorithm on instance set I2 compared to formulation F 2. - The % gap is computed with respect to the value of the linear relaxation as 100 × (upper bound − lower bound)/upper bound.
Chapter 4
The Generalized Quadratic Assignment Problem 4.1 Overview of the Generalized Quadratic Assignment Problem In the Generalized Quadratic Assignment Problem (GQAP) we are given n weighted facilities, m capacitated sites, a traffic intensity matrix between facilities, a distance matrix between sites, unit traffic costs, and assignment costs of facilities to sites. The aim is to determine an assignment of facilities to sites in such a way that the sum of assignment and traffic costs is minimized and the total weight of all facilities assigned to the same site does not exceed the site capacity. The GQAP was introduced by Lee and Ma (2003). It generalizes the Quadratic Assignment Problem (QAP) in which n = m and exactly one facility must be assigned to each site, and it is therefore NP-hard (Garey and Johnson (1979)). We have studied the GQAP because it arises in the management of container yards where the yard is partitioned into storage areas, corresponding to sites, and groups of containers correspond to facilities (Chapter 5). Another application described by Lee and Ma (2003) relates to an equipment location problem in a Canadian based manufacturing company. Sets of equipments must be assigned to manufacturing sites and intermediate parts move between these sites. Transportation is carried out by an outside firm paid on the basis of travel and waiting time. Because the overall transportation cost is high, the company wishes to optimally locate its equipments in its different manufacturing sites.
61
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
62
4.2 Literature review The scientific literature on the GQAP is rather limited. We are aware of only one scientific article (Lee and Ma (2003)) on this problem. It provides Integer Linear Programming (ILP) formulations of the problem together with a branch-and-bound algorithm consisting of two phases. In a first phase, a feasible solution is constructed by means of a greedy algorithm that operates on the GQAP objective function and considers three initial orderings for sites and four initial orderings for facilities, yielding a total of 12 combinations. A second version of the greedy algorithm works with assignment costs only. The best solution value found by all versions of the greedy algorithm is used as an initial upper bound in a second phase where facilities are gradually assigned to sites in a branch-and-bound fashion. At each node of the search tree a lower bound on the objective function value is computed by taking into account the costs associated with the sets of already assigned and yet unassigned facilities. This enumeration algorithm was capable of optimally solving instances including up to 16 facilities and seven sites. The QAP literature is also relevant to the study of the GQAP. The QAP was introduced by Koopmans and Beckmann (1957) and remains to this day a very difficult combinatorial optimization problem. Several benchmark instances of size n = 36 introduced by Steinberg (1961), and instances of size n = 30 defined by Nugent et al. (1968), have only recently been solved to optimality. For recent articles on exact algorithms for the QAP, see Burkard et al. (1998), Rendl (2002), and Anstreicher (2003). A large number of heuristic methods have been also proposed for the QAP. The most successful are simulated annealing (Connoly (1990)), tabu search (Taillard (1991)), hybrid genetic-tabu search (Fleurent and Ferland (1994)), GRASP (Li et al. (1994)), ant colonies (Gambardella et al. (1999)) and, more recently, a hybrid genetic proposed by Drezner (2002) and Drezner (2003) which combines a new genetic merging procedure followed by a post-optimization phase based on variable neighborhood search (Mladenovi´c and Hansen (1997)). Apart from the greedy heuristic of Lee and Ma (2003), we are aware of no other approximate algorithm for the GQAP. Our aim is to devise an accurate and fast memetic heuristic for this problem. The GQAP is formulated in Section 4.3 as a Quadratic Integer Program which is then linearized. The memetic heuristic is introduced in Section 4.4, followed by parameter setting in Section 4.5. Computational results showing the efficacy of the heuristic are reported in Section 4.6.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
63
4.3 Mathematical model The following sets and variables are used to formulate the GQAP: • N = {1, ..., n}, a set of facilities; • M = {1, ..., m}, a set of sites; • xik ∈ {0, 1}, facility i ∈ N is assigned to site k ∈ M if and only if xik = 1. The input data for the problem are: • tij , the traffic intensity between facilities i ∈ N and j ∈ N ; • dhk , the distance between sites h ∈ M and k ∈ M ; we assume that distances are symmetric, i.e., dhk = dkh ∀h, k; • aik , the cost of assigning facility i ∈ N to site k ∈ M ; • v, the unit traffic cost; • qi , the weight of facility i ∈ N ; • Qk , the capacity of site k ∈ M. The formulation of the GQAP is then:
minimize
XX
aik xik + v
i∈N k∈M
XX X X
tij dhk xih xjk
(4.1)
i∈N j∈N h∈M k∈M
subject to X
xik = 1
∀i ∈ N,
(4.2)
∀k ∈ M,
(4.3)
∀i ∈ N, ∀k ∈ M.
(4.4)
k∈M
X
qi xik ≤ Qk
i∈N
xik ∈ {0, 1}
In this formulation the objective function (5.1) minimizes the sum of assignment and traffic costs. Constraints (5.2) impose that every facility is assigned to one and only one site, and constraints (5.3) ensure the capacity of each site is not exceeded.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
64
Lee and Ma (2003) have introduced the following linearization for the GQAP, based on QAP linearizations proposed by Frieze and Yadegar (1983) and by Padberg and Rijal (1996). This linearization, refereed to as LGQAP, will be used to assess the quality of our heuristic on small size instances, where optimality is obtained within acceptable computation time; we also use the best solution provided by a branch-and-bound resolution of LGQAP to compute an upper bound on the optimal value of medium size instances. LGQAP uses additional sets and variables: • N (i) = {j ∈ N : j > i}; • zikjh : equal to 1 if and only if facility i is assigned to site k and facility j is assigned to site h. The linearization is as follows:
minimize
XX
X
aik xik + v
i∈N k∈M
X X X
(tij + tji )dhk zikjh
(4.5)
i∈N \{n} k∈M j∈N (i) h∈M
subject to
X
xik = 1
∀i ∈ N,
(4.6)
qi xik ≤ Qk
∀k ∈ M,
(4.7)
zikjh = xik
∀i ∈ N \ {n}, ∀k ∈ M, ∀j ∈ N (i),
(4.8)
zikjh = xjh
∀i ∈ N \ {n}, ∀j ∈ N (i), ∀h ∈ M,
(4.9)
k∈M
X i∈N
X
h∈M
X
k∈M
xik ∈ {0, 1} 0 ≤ zikjh ≤ 1
∀i ∈ N, ∀k ∈ M,
(4.10)
∀i ∈ N \ {n}, ∀k ∈ M, ∀j ∈ N (i), ∀h ∈ M.
(4.11)
In the computational experiments carried out by Lee and Ma (2003) a comparison was made between three linearizations of the GQAP implemented in CPLEX, and a new specialized branch-andbound algorithm. These experiments showed that no approach dominated the others. We decided to use the LGQAP formulation as a benchmark because it yielded shorter average computational times in the Lee and Ma experiments.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
65
4.4 Memetic heuristic We now describe the components of our heuristic which combines genetic search (Holland (1992)) and tabu search (Glover (1986)). The integration of these two meta-heuristics is sometimes referred to as a memetic algorithm (Moscato and Cotta (2003)). The algorithm randomly generates an initial population P of feasible solutions. A cycle of genetic iterations is then applied to P . At each iteration a merging procedure creates an offspring which is then improved trough at most η iterations of tabu search. If the resulting improved offspring is better than the worst member of the population and does not already belong to P , it then replaces the worst solution; otherwise the offspring is discarded. To enhance the exploration of different areas of the solution space, a multi-start approach is also used, meaning that the algorithm is started ξ times and the best solution is retained. We now present the components of the heuristic in more detail.
4.4.1 Initial population Denote by S the set of solutions satisfying constraints (5.2), (5.3), and (5.4). A first solution s ∈ S is randomly generated by assigning facilities to sites while attempting to respect the capacity constraints. Reaching feasibility is not always possible, particularly in the case of tightly constrained instances. If s is infeasible, an attempt to reach feasibility is made through the application of the TABUFIX search procedure described in Section 4.4.4. If TABUFIX fails, new solutions are generated until a desired population size |P | is reached.
4.4.2 Genetic procedure The genetic procedure attempts to improve the population set P by merging, at each iteration ω, two solutions to create an offspring. The merging rule used is inspired by the work of Drezner (2003) for the QAP. Our problem is different from that of Drezner since it contains capacity constraints. As a result the merging procedure we have developed for the GQAP is new. For each site k ∈ M the median value of the distances between the site k and the other m − 1 sites is first computed. Sites whose distance from k is less than the median value are called cohesive with respect to k. All sites that are at the same distance as the median value are called neutral, and the remaining sites are called non-cohesive. For each site k it is then possible to partition M into a subset M1k of cohesive sites, a subset M2k of neutral sites, and a subset M3k of non-cohesive sites. Site
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
66
k is considered as belonging to M1k . A site k selected to partition M into subsets is called a pivot. The construction of the partitions of M for each pivot is performed only once at the beginning of the algorithm. In Figure 4.1 we provide a simple example with eight sites equally spaced along a line. The three corresponding subsets for four sites chosen as pivots are illustrated using different shades. Pivot site Cohesive sites
Neutral site
Non−cohesive sites
Figure 4.1: Example of partition construction induced by different pivot choices. The merging procedure randomly selects two solutions of the population pool called parents. The parent A1 having the smaller solution value is called first parent and the other parent A2 is called second parent. Ties are broken arbitrarily. Like all elements of P , these two solutions satisfy the capacity constraints. The merging procedure operates as a cycle of iterations applied to all sites k ∈ M . Each iteration attempts to generate a new solution sk . In sk a site h belonging to the cohesive subset M1k is assigned all the facilities previously assigned to that site h in the first parent A1 . Similarly a site in the non-cohesive subset M3k is assigned all facilities from the second parent A2 , if these facilities are not already assigned to the cohesive subset. After this phase some facilities may still be unassigned. An attempt to assign them randomly to sites, while preserving feasibility, is then made. If no feasible assignment can be reached the solution is discarded. If a feasible solution sk is obtained, it is then compared to the best known solution s∗ω found at iteration ω among those corresponding to all pivot sites; if sk improves upon s∗ω , it then replaces it. Merging two parents can be unsuccessful if no feasible solution is encountered during the m iter-
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
67
ations. In this case another couple is randomly selected and the process is repeated until an offspring is generated. After every successful or unsuccessful merging, the two parents are labeled as forbidden, and no other merging is attempted with them. This feature is not really necessary when the maximum number $ of genetic iterations is small compared to population size since the probability of a repeated merger is small. However, when $ is large and the merging success rate is low, then this feature yields a noticeable improvement in the performance of the merging procedure. The number of forbidden couples is updated during the search. When this number reaches its maximum possible value of |P | × (|P | − 1)/2, the genetic cycle is stopped. We now illustrate one iteration of the merging cycle using the graph of Figure 4.1. Eleven facilities must be assigned to eight sites equally spaced along a line. The weight qi of facility i ∈ {1, ..., 11} is equal to one if i is odd and equal to two if i is even. The capacity Qk of each site k is equal to two. Figure 4.2 shows, from top to bottom, the site partition induced by the choice of the pivot site k = 1, the assignment corresponding to the first parent, the partial assignment representing the offspring, and the assignment corresponding to the second parent. The offspring is obtained by first taking from the first parent the assignments of the cohesive set M11 and then the yet unassigned facilities belonging to the non-cohesive set of the second parent. The three facilities 4, 6 and 8 are unassigned at this stage. Because any attempt to assign these to the unsaturated sites 5, 6, 7 and 8 will fail, no feasible solution exists. Therefore the offspring generated with the pivot site k = 1 is discarded. Note that in this example the capacity constraints P P are tight since k Qk = i qi . After the merging procedure a post-optimization tabu search heuristic (POTS) is called to improve the best offspring s∗ω . The resulting solution is compared with the worst solution in P and is discarded if it does not improve upon it. Otherwise the improved offspring is compared with the other solutions in P . If the offspring is not original, meaning that the same solution already exists in P , it is discarded; otherwise, it is inserted in the population P to replace the worst solution. The information about the forbidden coupling are therefore updated. At the end of an iteration the genetic iteration counter ω is incremented and another iteration is performed until a limit $ is reached. The genetic cycle may terminate prematurely if the number of forbidden couples reaches the maximum value of |P | × (|P | − 1)/2. When this event occurs the population P becomes exhausted, no coupling is possible, and a new random population is required. Whenever ω > $ or the premature termination occurs the genetic procedure gives the control to the multi-start cycle which compares the best solution found during the current genetic cycle with the preceding ones, if any.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
68
Pivot site Cohesive sites
3
First parent
2
10
3
2
10
4
3
10
8
Non−cohesive sites
11
8
6
5
9
Unassigned facilities
7
1
Second parent
9 7
1
Offspring
Neutral site
4
6
9
11
5
11
7
1
5
4
6
8
2
Figure 4.2: Example of one iteration of the merging cycle. The genetic procedure can be summarized as follows: • for ω = 1, ..., $ { /* genetic cycle */ – Do { ∗ randomly select a non-forbidden couple A1 and A2 in P ∗ for k = 1, ..., m { /* merging cycle */ · merge A1 and A2 using k as pivot and obtain sk , if feasible · compare sk to the best known offspring s∗ω , if any} – } until an offspring is generated – Apply POTS to the offspring s∗ω which eventually is improved – Compare s∗ω with the worst and the best solutions in P – If s∗ω is better than the worst and not better than the best solution, check whether it is original – Replace the worst solution with s∗ω if it is original and better than the worst solution – Update the information about forbidden couples and eventually decide to terminate the genetic cycle}
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
69
4.4.3 Post-optimization tabu search The POTS procedure allows temporary violations of the capacity constraints. Denote by S A the set of solutions satisfying the assignment constraints (5.2) and (5.4) but possibly violating the capacity constraints (5.3). Let c(s) denote the cost of solution s ∈ S A , and let w(s) be the total violation of capacity constraints. Solutions are then evaluated by means of a penalized cost function f (s) = c(s) + αw(s), where α is a positive parameter. By dynamically adjusting the value of this parameter the relaxation mechanism facilitates the exploration of the search space and is particularly useful to escape local minima. Parameter α is updated at each iteration as follows: if the new current solution s is feasible with respect to the capacity constraints (5.3), then α is divided by a factor 1 + δ, where δ is a positive parameter; otherwise α is multiplied by 1 + δ. The heuristic explores the solution space by moving at each iteration from the current solution s ∈ S A to the best solution in its neighborhood N (s). The tabu search method is based on the definition of attributes used to characterize the solutions of S A . These attributes are also used to control tabu tenures. With each solution s ∈ S A is associated an attribute set B(s) = {(i, k): facility i is assigned to site k}. The neighborhood N (s) of a solution s is defined by applying a simple operator that removes an attribute (i, k) from B(s) and replaces it with another attribute (i, k 0 ), where k6=k 0 . When facility i is removed from site k, its reassignment to k is declared forbidden for the next θ iterations by assigning a tabu status to attribute (i, k). An aspiration criterion allows the revocation of the tabu status of an attribute if that would allow the search process to reach a solution of smaller cost than that of the best solution identified possessing that attribute. No diversification scheme has been implemented since the use of POTS is limited to a quick search in our memetic heuristic. This choice will be validated in the Section 4.5. Every time an improved feasible solution is reached a counter ζ ∗ is set to ζ, the number of the current iteration. When the difference ζ − ζ ∗ becomes larger than a preset value µ, POTS terminates and the current best solution is returned to the genetic cycle. The accelerated termination rule, before ζ = η, has proved very effective in reducing the computational time on some instances.
4.4.4 Recovering feasibility: procedure TABUFIX TABUFIX is an auxiliary procedure called by the population procedure when a feasible solution cannot be reached. It starts from an infeasible solution s with positive violation w(s) of the capacity constraints. The cost function f (s) = c(s) + αw(s) is replaced with f (s) = w(s) and thus the penaliza-
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
70
tion mechanism is no longer necessary. The tabu tenure parameter, θf , can be different from θ used by POTS. The neighborhood structure and all the other tabu search mechanisms are the same as those of POTS, but TABUFIX employs also a diversification scheme. A solution s ∈ N (s) such that f (s) ≥ f (s) is penalized by a factor proportional to the addition frequency of its distinguishing attribute, and by a scaling factor. More precisely, let ρik be the number of times attribute (i, k) has been added to the solution during the process and let ζ be the number of the current iteration. If attribute (i, k) is added √ to s to obtain s, a penalty p(s) = λ nm c(s)ρik /ζ is added to f (s), where p(s) = 0 if f (s) < f (s). The scaling factor c(s) introduces a correction to adjust the penalties with respect to the total solution cost. √ The use of nm as a scaling factor was first suggested in the context of the VRP by Taillard (1993) after extensive computational experiments. It can be explained as follows: since there are O(nm) possible attributes, the frequency of addition of a given attribute into the solution is inversely related √ to problem size. Using the factor nm seems to adequately compensate for problem size. Finally, a parameter λ is used to control the intensity of the diversification. These penalties have the effect of driving the search process toward less explored regions of the search space. However TABUFIX ends as soon as a feasible solution is reached, meaning that w(s) = 0. The maximum number of iterations allowed is set equal to ηf .
4.5 Parameter setting and sensitivity analyses The methodology followed to test and set the heuristic parameters is inspired by some of the guidelines stated by Barr et al. (1995). First, parameters are determined by using instances different from the main set of test problems. Second, parameters remain the same in all tests, i.e., they are not tuned for each instance. Parameter values are determined by using a sequential process. At each step the heuristic is run by varying a single parameter within an interval. Sensitivity data are reported in terms of solution quality and computational time. The memetic heuristic was coded in ANSI C. Computational experiments were performed on a SUN workstation (1.2 GHz).
4.5.1 Test instances We have created two sets of ten randomly generated instances. In the first one, T1, all instances present tight capacity constraints. This set is used to test the TABUFIX parameters. The second one, T2, presents a wider range of tightness for the capacity constraints and is used to test all remaining
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
71
parameters. We note that only two instances of the set T2 require a substantial intervention of TABUFIX; therefore testing the TABUFIX parameters with the set T2 would not have been satisfactory. The instances are labeled with three letters: n, m, and a parameter f ∈ {1, ..., 100} which controls the tightness of the capacity constraints. For given n, m and f , the input data were generated as follows: • dij and tij were generated according to a discrete uniform distribution in [1, ..., 100]; we generated symmetric instances: in practice dij is always equal to dji ; the traffic matrix is not usually symmetric but since the objective function defined by (5.24) depends on symmetric coefficients tij + tji the assumption of symmetry is not restrictive; • aik was generated according to a discrete uniform distribution in [1, ..., 104 n] ; • v was generated according to a discrete uniform distribution in [1, ..., 5]; • qi was generated according to a discrete uniform distribution in [1, ..., 100]; • Qk was generated according to a discrete uniform distribution in [1, ...,
P i∈N
qi /(f m)].
In the instance set T1, f belongs to the interval [90, ..., 99], while in the instance set T2 to the interval [50, ..., 90]. In Table 4.1 we report the codes for these two instance sets. Set T1 20-05-99 20-10-96 30-10-98 30-20-93 40-20-95 40-30-90 50-10-99 50-20-95 50-30-90 50-35-90
Set T2 15-05-50 15-05-90 25-10-50 25-10-90 35-20-50 35-20-90 45-25-35 45-25-75 55-30-50 55-30-90
Table 4.1: Instance codes of the sets T1 and T2.
4.5.2 TABUFIX parameters The TABUFIX parameters are set as follows: • θf : tabu duration, equal to 128; • λ : diversification intensity parameter, equal to 1; • ηf : maximum number of iterations, equal to 3200.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
72
We will show that this set of values is stable. The part of the heuristic that we test is the procedure creating an initial population. The objective is to find 150 feasible solutions for each instance of the set T1. Here we are only interested in the time needed to obtain feasible solutions. Parameter values yielding shorter computational times are preferred. Parameter θf Having fixed the value of the other parameters listed above, we then ran tests using a set {4, 8, 16, 32, 64, 128, 512} of seven different values for θf . Shorter computational times are obtained in the interval {32, ..., 512}, and the minimum is reached at θf = 128 (Table 4.2). The test results clearly show that in order to quickly obtain a feasible solution a long tabu tenure is required. θf Average CPU time (min.)
4 7.3
8 4.8
16 3.1
32 2.5
64 2.1
128 0.5
256 0.9
Table 4.2: TABUFIX sensitivity to parameter θf .
Parameter λ Having set θf equal to 128, we then let the parameter λ vary in the set {0, 0.001, 0.01, 0.1, 1, 10}. The choice λ = 0 in fact disables the diversification scheme. The worst results are obtained with λ = 0 proving the usefulness of this mechanism. The computational time is stable in the interval {0.001, ..., 1} and is slightly higher for λ = 10 (Table 4.3). The test shows that a diversification mechanism is worth considering, but the parameter choice is not critical in a wide interval. λ Average CPU time (min.)
0 0.7
0.001 0.5
0.01 0.5
0.1 0.5
1 0.5
10 0.6
Table 4.3: TABUFIX sensitivity to parameter λ.
Parameter ηf We let ηf vary in the set {0, 100, 200, 400, 800, 1600, 3200, 6400}. Setting ηf = 0 disables the TABUFIX procedure and feasible solutions are randomly obtained. In the case ηf = 0 the time limit of 10 hours was often reached and this limit was then used in the average computational time of Table 4.4. The test shows that it is better to let TABUFIX search for feasibility than use a random process. The computational time decreases as ηf increases until ηf = 3200. Then, for ηf = 6400 we again have
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
73
an increase, but a modest one. In our tests the minimum is obtained for ηf = 3200, and this result validates our parameter choice. ηf Average CPU time (min.)
0 > 207
100 3.7
200 1.8
400 0.9
800 0.6
1600 0.6
3200 0.5
6400 0.6
Table 4.4: TABUFIX sensitivity to parameter ηf .
4.5.3 Other memetic parameters Having set the TABUFIX parameters according to the previous experiments, we now ran tests on the other heuristic parameters using the instance set T2. We were interested in computation times and solution quality. When we observed a tradeoff between them, i.e., when the best solutions were obtained with a longer computation time for a given parameter value, we ran additional experiments by making use of the multi-start mechanism. In fact, a parameter choice producing a faster algorithm has to be tested against other choices given a similar computation time. This was accomplished by varying the parameter ξ. Therefore, unless otherwise indicated, the multi-start mechanism is disabled, i.e. ξ = 1. Again we proceeded in a sequential manner. The parameters were set as follows: • |P |: population size, equal to 150; • $: maximum number of genetic iterations, equal to 8000; • θ: POTS tabu duration, equal to 64; • µ: limit when POTS is terminated prematurely, equal to 20; • δ : POTS penalty adjustment parameter, equal to 1; • η: maximum number of POTS iterations, equal to 1000. To evaluate solution quality for each parameter we computed a normalized average value. Let be c∗i the minimum solution value obtained for a given instance i over all runs for a given parameter, and let cpi be the solution value of instance i with the evaluated parameter set equal to p. The average of the values 100 × cpi /c∗i is our solution quality index for the choice of the value p. Parameter |P | We ran the algorithm with five different population sizes {50, 100, 150, 200, 300}. As expected, computation times increase with |P |; solution quality improves until |P | = 150 and then deteriorates.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
74
Small populations do not provide sufficient diversification, while larger ones lack in intensification. However, while a medium size population (|P | = 150) dominates a larger ones in terms of solution quality and computational time, further test are required to investigate the effects of smaller population sizes on solution quality. To match the computation time obtained with |P | = 150 we used the multi-start mechanism with the smaller populations. A population of size 50 was iterated ten times and a population of size 100 three times. The results reported in Table 4.5 indicate that in terms of computation time and solution quality the medium size population remains the best option. |P | - ξ Average CPU time (min.) Solution quality
50 - 1 0.2 102.3
100 - 1 0.6 102.2
150 - 1 1.7 100.7
200 - 1 2.1 101.3
300 - 1 2.3 101.3
50 - 10 1.6 100.8
100 - 3 2.3 100.7
Table 4.5: Sensitivity of the memetic algorithm to population size.
Parameter $ We then let $ vary in the set {1000, 2000, 4000, 8000, 16000}. Computation times increase with $, and solution quality also improves (Table 4.6). However, from $ = 8000 upwards there are no significant improvements. To test different parameter choices we again used the multi-start mechanism. The results are reported in Table 4.7. We observe that for small values of ξ, i.e. short computational times, $ = 2000 is the best choice since changing populations via the multi-start mechanism is more effective than fully exploiting a given population as is done when setting $ = 8000. However, for larger values of ξ, i.e. when we can allow longer computational times, $ = 8000 is a slightly better option. These results validate the choice made for $ and also provide indications for the implementation of our heuristic when short computation times are mandatory. $ Average CPU time (min.) Solution quality
1000 0.5 100.7
2000 0.7 100.3
4000 1.1 100.1
8000 1.7 100.0
16000 2.4 100.0
Table 4.6: Sensitivity of the memetic algorithm to $ with ξ = 1.
Parameter θ The POTS tenure duration was tested on the set {4, 8, 16, 32, 64, 128} and no significant variations on the computation times were observed. The best solution quality is obtained in the interval {32, ..., 128}, and here the results are stable (Table 4.8). We therefore set θ = 64.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM Average CPU time (min.) 1.8 2.0 1.7 3.3 3.2 3.2 25.9 26.3 51.7 51.6
$-ξ 1000 - 4 2000 - 3 8000 - 1 2000 - 5 4000 - 3 8000 - 2 2000 - 39 8000 - 16 2000 - 78 8000 - 32
75
Solution quality 100.9 100.7 101.0 100.7 100.9 100.8 100.1 100.1 100.1 100.0
Table 4.7: Sensitivity of the memetic algorithm to $ with similar computation times. θ Average CPU time (min.) Solution quality
4 1.5 100.6
8 1.5 100.8
16 1.7 100.7
32 1.7 100.2
64 1.7 100.2
128 1.7 100.2
Table 4.8: Sensitivity of the memetic algorithm to θ. Parameter µ The parameter µ was set equal to five different values in the set {0, 10, 20, 40, 80}. Choosing µ = 0 almost disables POTS, since only one iteration is allowed. We considered this option to evaluate the usefulness of POTS. Increasing µ corresponds to increasing computation times. However, solution quality improves only until µ = 20 and then starts to decline. Making too much use of POTS seems to counter the genetic diversification. Disabling POTS produces a considerably faster algorithm but with worse solution quality. Since the choice µ = 20 dominates others having a larger value, we were interested in assessing solution quality for µ = 0 and µ = 10 using the same computation time as for µ = 20. The results shows that µ = 20 is the best option (Table 4.9). µ-ξ Average CPU time (min.) Solution quality
0-1 0.4 105.7
10 - 1 1.0 100.7
20 - 1 1.7 100.3
40 - 1 2.8 100.4
80 - 1 5.2 100.8
0-6 2.5 102.0
10 - 2 2.0 100.3
Table 4.9: Sensitivity of the memetic algorithm to µ.
Parameter δ We let δ vary in the set {0.001, 0.01, 0.1, 1, 10}. The choice corresponding to the minimum computation time and the best solution quality is δ = 1. The computation time shows little sensitivity to this parameter (Table 4.10).
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM δ Average CPU time (min.) Solution quality
0.001 2.2 102.2
0.01 2.2 101.7
0.1 2.2 100.8
1 1.7 100.5
76
10 1.7 101.4
Table 4.10: Sensitivity of the memetic algorithm to δ. Parameter η Since the advanced termination of POTS is controlled by µ, the parameter η is not critical. Letting it vary in the set {125, 250, 500, 1000, 2000} shows no impact on the computation time and, for η ≥ 250, solution quality is constant (Table 4.11). Anyhow, for the purpose of this test a high value was required in order to not interfere with the evaluation of larger values of µ. η Average CPU time (min.) Solution quality
125 1.7 100.4
250 1.7 100.0
500 1.7 100.0
1000 1.7 100.0
2000 1.7 100.0
Table 4.11: Sensitivity of the memetic algorithm to η.
Other experiments We have evaluated the opportunity of using a diversification scheme in POTS as was done in TABUFIX. Computational experiments showed no improvement under the current heuristic design and we have therefore omitted it. We also conducted a sensitivity analysis on the two main heuristic components, the genetic and the POTS, considered alone, i.e. we disabled alternatively POTS and the genetic cycle. The two resulting algorithms behave differently from the memetic algorithm. The genetic heuristic yields better results with larger population sizes (|P | in the interval [200, 300]), and the tabu search algorithm works better with a shorter tabu tenure (θ = 8). Furthermore, the tabu search is more sensitive to its other parameters (δ, η) and a diversification scheme turns out to be useful under this condition. We can conclude that another advantage of the memetic integration is a reduced sensitivity to parameter setting. Observations about heuristic robustness to parameter setting are also reported in Section 4.6.3.
4.6 Computational results We first describe our test instances, and we then provide results obtained with the memetic heuristic compared with those obtained with the LGQAP.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
77
4.6.1 Test instances We have conducted tests on two set of instances, I1 and I2. The set I1 is made up of the 26 instances used by Lee and Ma (2003). These instances are labeled with a code consisting of four parts: n, m, and two letters defined as follow: • E, if the facilities have a wide range of space requirements; • F, if the facilities have roughly the same space requirements; • G, if the sites have a wide range of capacities; • H, if the sites have roughly the same capacities. The traffic intensities, distances, assignment and travel costs are the same for each combination of E, F, G, H for a given instance of size n and m. It turns out that these instances are not very challenging for our heuristic. We have therefore designed a new set of 21 larger and more difficult instances, called I2. They were randomly generated as described in Section 4.5.1.
4.6.2 Implementation details and results The memetic parameters were set as described in the Section 4.5. We only let vary the multi-start parameter ξ. For the I1 instances ξ = 1. The LGQAP formulation was implemented in CPLEX 8.1. For the I1 instances the CPLEX MIP parameter is set equal to one, which emphasizes feasibility in the branch-and-bound tree exploration. This choice yields the shorter computation times out of the four options, which are: • MIP = 0, default, balance optimality and feasibility; • MIP = 1, emphasis on feasibility; • MIP = 2, emphasis on optimality; • MIP = 3, best bound. The instances of set I1 were easily solved by CPLEX and by the heuristic, which was always able to reach the optimum. Table 4.12 provides the computation times of CPLEX and the heuristic. The more challenging instances are those of subset I2. Here CPLEX could not reach an optimal solution within the prescribed time limit except on one instance (30-08-55). We have therefore used
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
78
a truncated branch-and-bound which stops with the best feasible solution identified after two hours. Here the choice of the CPLEX MIP parameter has a noticeable impact as illustrated in Table 4.13. On average the best solutions were obtained with MIP = 2. However, a different choice of the MIP parameter yields better results on some instances. On two instances (30-20-95 and 35-15-95) CPLEX was not able to find a feasible solution within the time limit. In Table 4.14 we report results produced by the heuristic with four different ξ values in the set {8, 16, 32, 64}. The heuristic exhibits a stable behavior since the quality of the solutions does not improve significantly when longer computational times are allowed. Table 4.15 provides a comparison between CPLEX and the heuristic. The best solution values out of the four runs of CPLEX are chosen as reference. The best and the worst values out of the four runs of the heuristic are also reported. The advantages of the heuristic are clear. It yields a feasible solution on instances where CPLEX fails, and the worst solutions produced by the heuristic dominate the CPLEX solutions. The worst heuristic solutions correspond to shorter computation times. Given slightly longer computation times the heuristic is able to find new better solutions.
4.6.3 Robustness analysis In our early version of the memetic heuristic we had a complete different parameter setting and also a slight different heuristic design. We will refer to this heuristic, including the parameters choice, as MEM0, and to the one described in this Chapter as M-GQAP. In MEM0 TABUFIX was also integrated in POTS and we used a different advanced termination criterion for the genetic cycle. Nevertheless, on the instance set I1, MEM0 and M-GQAP exhibits the same behavior. Both algorithms always find the optimal solutions in a very short average computation time (MEM0 3.5 seconds, M-GQAP 3.4 sec.). On the instance set I2, given a moderate computation time, again both algorithms yields similar solution quality (Table 4.16). Nevertheless, M-GQAP is able to obtain quicker than MEM0 the previously best know solutions for the instance set I2 and to discover a new better solution for instance 35-15-95. These results justify our adaption of the current version of the algorithm while ensuring that the main heuristic components can yield stable results.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
Instance code 10X5-E-G 10X5-E-H 10X5-F-G 10X5-F-H 12X3-E-G 12X3-E-H 12X3-F-G 12X3-F-H 12X4-E-G 12X4-E-H 12X4-F-G 12X4-F-H 12X5-E-G 12X5-E-H 12X6-E-G 12X8-E-G 14X6-E-G 14X7-E-G 14X8-E-G 14X9-E-G 15X6-E-G 15X7-E-G 15X8-E-G 16X6-E-G 16X7-E-G 5X24-E-G 5X30-E-G Average
CPLEX (sec.) 3 7 4 7 1 2 2 3 3 13 16 43 13 17 30 41 23 91 65 199 76 75 244 112 1020 1 2 78
Heuristic (sec.) 2 1 2 2 1 1 2 2 1 2 2 2 2 2 3 2 3 4 6 8 4 7 7 5 7 6 6 3
Table 4.12: Computational results for instance set I1.
79
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM Instance code 20-15-35 20-15-55 20-15-75 30-06-95 30-07-75 30-08-55 30-10-65 30-20-35 30-20-55 30-20-75 30-20-95 35-15-35 35-15-55 35-15-75 35-15-95 40-07-75 40-09-95 40-10-65 50-10-65 50-10-75 50-10-95 Average
MIP = 0 1614656 1802162 1989271 5268356 4395470 3501695 3675880 3852509 3915632 4680398 n.a. 4825595 4850270 7065340 n.a. 7783862 8184249 9482857 10817535 12073994 15820477 6084221
MIP = 1 1500497 1781889 1970971 5217536 4417834 3501695 3675880 4224378 4238537 4657075 n.a. 4561029 5183585 7387542 n.a. 7783862 8184249 9482857 11073198 13100779 15820477 6198098
MIP = 2 1548575 1770270 2028124 5235841 4383923 3501695 3662738 3852509 3915632 4680398 n.a. 4825595 4850270 7065340 n.a. 7683214 8184249 9482857 10785572 12073994 15820477 6071120
MIP = 3 1716379 1869404 2031770 5399200 4572073 3501695 4213402 3855306 3954509 4324822 n.a. 4829500 4920750 7181838 n.a. 7783862 9389262 9482857 11316983 12717638 16013278 6267080
80 Minimum 1500497 1770270 1970971 5217536 4383923 3501695 3662738 3852509 3915632 4324822 n.a. 4561029 4850270 7065340 n.a. 7683214 8184249 9482857 10785572 12073994 15820477 6031979
Table 4.13: Computational results for CPLEX on instance set I2 with different values of the MIP parameter. - Bold entries correspond to the minimum solution value for each row.
Instance code 20-15-35 20-15-55 20-15-75 30-06-95 30-07-75 30-08-55 30-10-65 30-20-35 30-20-55 30-20-75 30-20-95 35-15-35 35-15-55 35-15-75 35-15-95 40-07-75 40-09-95 40-10-65 50-10-65 50-10-75 50-10-95 Average CPU time Solution quality
ξ=8 Solution Time (min.) 1471896 1.6 1723638 1.7 1953188 1.7 5160920 1.9 4383923 2.6 3501695 1.6 3620959 3.5 3379359 9.4 3593105 7.7 4050938 8.7 5726530 44.2 4456670 7.6 4639128 6.4 6301723 6.6 6738678 7.0 7405793 3.0 7717099 4.6 7265559 4.0 10513029 8.4 11217503 10.1 12897476 11.3 7.3 100.11
ξ = 16 Solution Time (min.) 1471896 2.7 1723638 3.3 1953188 3.5 5160920 3.7 4383923 5.1 3501695 3.1 3620959 6.9 3379359 17.3 3593105 16.5 4050938 17.1 5710645 87.2 4456670 14.7 4639128 13.9 6301723 13.1 6670264 14.4 7405793 5.5 7717099 9.1 7265559 7.8 10513029 17.0 11217503 19.8 12845598 20.9 14.4 100.03
ξ = 32 Solution Time (min.) 1471896 5.4 1723638 6.6 1953188 7.1 5160920 7.4 4383923 10.3 3501695 6.0 3620959 14.3 3379359 36.3 3593105 33.1 4050938 34.2 5710645 176.7 4456670 29.3 4639128 26.1 6301723 25.7 6670264 30.3 7405793 10.7 7667719 19.0 7265559 15.5 10513029 34.6 11217503 39.9 12845598 42.0 29.1 100.00
ξ = 64 Solution Time (min.) 1471896 10.2 1723638 13.1 1953188 14.1 5160920 14.3 4383923 20.1 3501695 12.0 3620959 28.7 3379359 72.3 3593105 66.7 4050938 67.6 5710645 352.1 4456670 57.3 4639128 51.2 6301723 49.7 6670264 60.2 7405793 21.8 7667719 38.8 7265559 30.4 10513029 69.2 11217503 80.8 12845598 86.4 57.9 100.00
Table 4.14: Computational results for the memetic heuristic on instance set I2. - Bold entries correspond to the minimum solution value for each row.
CHAPTER 4. THE GENERALIZED QUADRATIC ASSIGNMENT PROBLEM
Instance code 20-15-35 20-15-55 20-15-75 30-06-95 30-07-75 30-08-55 30-10-65 30-20-35 30-20-55 30-20-75 30-20-95 35-15-35 35-15-55 35-15-75 35-15-95 40-07-75 40-09-95 40-10-65 50-10-65 50-10-75 50-10-95 Average
Best CPLEX 1500497 1770270 1970971 5217536 4383923 3501695 3662738 3852509 3915632 4324822 n.a. 4561029 4850270 7065340 n.a. 7683214 8184249 9482857 10785572 12073994 15820477 6031979
Best Memetic 1471896 1723638 1953188 5160920 4383923 3501695 3620959 3379359 3593105 4050938 5710645 4456670 4639128 6301723 6670264 7405793 7667719 7265559 10513029 11217503 12845598 5534334
100(C-M)/M 1.9% 2.7% 0.9% 1.1% 0.0% 0.0% 1.2% 14.0% 9.0% 6.8% n.a. 2.3% 4.6% 12.1% n.a. 3.7% 6.7% 30.5% 2.6% 7.6% 23.2% 6.9%
Worst Memetic 1471896 1723638 1953188 5160920 4383923 3501695 3620959 3379359 3593105 4050938 5726530 4456670 4639128 6301723 6738678 7405793 7717099 7265559 10513029 11217503 12897476 5539663
81
100(C-M)/M 1.9% 2.7% 0.9% 1.1% 0.0% 0.0% 1.2% 14.0% 9.0% 6.8% n.a. 2.3% 4.6% 12.1% n.a. 3.7% 6.1% 30.5% 2.6% 7.6% 22.7% 6.8%
Table 4.15: Comparison between the solution values of the memetic heuristic (M) and the CPLEX (C) branch-and-bound algorithm. - Bold entries correspond to the minimum solution value for each row.
Instance code 20-15-35 20-15-55 20-15-75 30-06-95 30-07-75 30-08-55 30-10-65 30-20-35 30-20-55 30-20-75 30-20-95 35-15-35 35-15-55 35-15-75 35-15-95 40-07-75 40-09-95 40-10-65 50-10-65 50-10-75 50-10-95 Average CPU time (min.) Solution quality
Short CPU time M-GQAP MEM0 1471896 1471896 1723638 1723638 1953188 1953188 5160920 5160920 4383923 4383923 3501695 3501695 3620959 3620959 3379359 3379359 3593105 3593105 4050938 4050938 5726530 5726530 4456670 4456670 4639128 4639128 6301723 6301723 6738678 6773876 7405793 7405793 7717099 7736126 7265559 7265559 10513029 10513029 11217503 11254069 12897476 12918462 7.3 8.3 100.11 100.17
Long CPU time M-GQAP MEM0 1471896 1471896 1723638 1723638 1953188 1953188 5160920 5160920 4383923 4383923 3501695 3501695 3620959 3620959 3379359 3379359 3593105 3593105 4050938 4050938 5710645 5710645 4456670 4456670 4639128 4639128 6301723 6301723 6670264 6689421 7405793 7405793 7667719 7667719 7265559 7265559 10513029 10513029 11217503 11217503 12845598 12845598 14.4 70.3 100.00 100.01
Table 4.16: Comparison between the solution values of the memetic heuristic (M-GQAP) and of a previous version (MEM0) with a complete different parameter setting.
Chapter 5
The Service Allocation Problem 5.1 Overview of the Service Allocation Problem In a modern container terminal the most important problem is the coordination between the storage of the containers into the yard, the loading and unloading of the vessels, and the transfer from and to the gates for land transportation (e.g., by rail and truck). Most operations have their origin or destination in the yard. Yard management is a complex process involving several decisional areas like berth allocation for the vessels, operator roster scheduling, and container transfer. In the latter case the problem is to manage an heterogeneous fleet of vehicles to transfer containers between the quay, the gates and the yard, and to perform relocations inside the yard. The yard layout and technology are strategic decisions that affect the nature of the management problems. Container terminals in the Asia-Pacific region rely on the "Indirect Transfer System" (ITS) in which the containers are stacked in compact sections and a dedicated gantry crane, called transtainer, moves them from and to the vehicles which link the yard with the quay and the gates. The ITS minimizes yard surface requirement. European and North-American container terminals are based upon the "Direct Transfer System" (DTS) in which the vehicles that transfer the containers between the yard, the quay and the gates are also able to move the containers from and to the slots assigned into the yard. The DTS requires a larger surface because dedicated lanes in the yard are necessary for the vehicles in order to have access to the slot positions. In our study we consider the DTS in use at the port of Gioia Tauro, located in southern Italy. The objective of this study is to solve a tactical yard management problem called the Service Alloca-
82
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
83
tion Problem (SAP) (Gaudioso et al. (1999) and Gaudioso et al. (2001)). A service, also called port route, is the sequence of ports visited by a vessel. A shipping company will usually request that specific areas of the yard and the quay be dedicated to its services. These are called favorite areas for a given set of services. Service allocation decisions are made over a three-month horizon. A container arriving with a service is stored in the favorite area of this service, and is transferred to the favorite area of the outgoing service one day before departure. This procedure speeds up the loading operations, but it does not always occur in practice. In order to avoid traffic congestion a ship may be assigned to an area along the quay, different from its favorite area. The same principle applies to the storage area of the services in the yard. Terminal managers want to minimize handling operations resulting from yard to yard container transfer, also called housekeeping, occurring when the area of the incoming and outgoing services differ. We refer to Section 1.2 for an overview of Gioia Tauro yard and the terminology that we use in the following. Only areas A and B are relevant to the SAP at Gioia Tauro. The combined capacity of these two areas is 30,000 TEUs. When deciding where a service should be allocated in the yard, only the position of the bay along the quay (indicated in Figure 1.2 by the numbers one to 16) is relevant. The allocation of a container to either area A or area B is determined at the operational level according to the container dwelling times. Therefore two bays with the same position with respect to the quay are considered for the SAP as a single one. In the following we consider a bay as the union of a bay of area A and the corresponding bay of area B. Some services require that two adjacent bays be assigned to them. These services correspond to vessels with a length exceeding 250 meters. In fact, since the distance between adjacent bays is 150 meters, the berthing of one of these vessels prevents the use of at least two bays by other vessels. Furthermore, these long vessels generate substantial loading and unloading operations and require an average of three quay cranes. Using two bays facilitates the vehicle flow from the quay cranes to the container slots in the yard. A service with this double requirement is treated by the SAP as a pair of split services. The Gioia Tauro quay can be approximated with a line showing a discontinuity in the middle, between bays 8 and 9 (Figure 5.1), which creates an additional constraint for the SAP relative to split services: a pair of split services requiring two bays cannot be allocated to bays 8 and 9. Assigning a set of services to a bay generates loading and unloading operations (called moves) for the quay cranes operating in front of this bay. The yard space requirement and the quay crane moves associated with a given service are not correlated because of the differences in the container dwelling
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
Bay 6
Bay 7
Bay 8
84
Bay 9
Bay 10
Berth discontinuity Split vessel
Figure 5.1: Central part of the Gioia Tauro layout illustrating the berthing constraint for split services at bays 8 and 9 times between services. Given two services with similar container traffic expressed in TEUs, the one with a lower dwelling time has a lower space requirement in the yard, but similar requirements in terms of moves. Therefore a double capacity constraint is needed. The assignment of services to a bay must respect the space capacity constraint and the crane moves constraint, expressed in time units. The desired operational load is set to less than the largest possible feasible value in the hope of uniformly spreading the expected crane load operations along the quay length, thus increasing berth availability and therefore reducing expected vessel waiting time. In fact, reducing housekeeping and vessel waiting time are two conflicting objectives. Another SAP constraint derives from the multidraft channel configuration. Every service has an expected draft value which depends on its vessels characteristics, and some bays are not feasible for some services. An assignment of services to bays generates housekeeping traffic that can be estimated by multiplying the traffic intensity between services with the distance between the corresponding bays. Given the linear layout and the grid structure of the road network, these distances are computed with the L1 norm between the centers of the bays. The number of services operating at Gioia Tauro is 62. Currently the SAP is solved by experienced planners without optimization tools. The 62 services are aggregated into 18 families of services and one of the 16 positions is assigned to each family, after which the assignment is revaluated to consider splits. The SAP can be regarded as a constrained version of the Generalized Quadratic Assignment Problem (GQAP). As discussed in Chapter 4, in the GQAP we are given n weighted facilities, m capacitated
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
85
sites, a traffic intensity matrix between facilities, a distance matrix between sites, unit traffic costs, and assignment costs of facilities to sites. The aim is to determine an assignment of facilities to sites in such a way that the sum of assignment and traffic costs is minimized and the total weight of all facilities assigned to the same site does not exceed the site capacity. Our aim is to devise a good quality heuristic for the SAP. We first model the problem with a quadratic programming formulation and we then present two linearization approaches (Section 5.2). Since only small size instances can be solved optimally within a reasonable time, an evolutionary heuristic is introduced in Section 5.3, followed by computational results in Section 5.4.
5.2 Mathematical model We present in Section 5.2.1 an integer quadratic programming formulation for the SAP and we then introduce in Section 5.2.2 a linearization that exploits the linear layout of the Gioia Tauro yard. A more general case with a two-dimensional grid yard is considered in Section 5.2.3. For comparison purposes a second formulation for our problem is introduced in Section 5.2.4. It is an adaptation of the linearization for the GQAP introduced by Lee and Ma (2003) and is based on the Quadratic Assignment Problem (QAP) linearizations proposed by Frieze and Yadegar (1983) and by Padberg and Rijal (1996).
5.2.1 Quadratic SAP formulation ˜ = {1, ..., n ˜ the To model the SAP we denote by N ˜ } the set of services, and by D = {1, ..., nd } ⊂ N 0
subset of services requiring a double assignment. A set D = {˜ n + 1, ..., n ˜ + nd } is introduced to represent the split services associated with D, where n ˜ + i is the split service associated with i ∈ D. ˜ ∪D , where |N | = n = n The SAP is therefore defined on a set N = N ˜ +nd . For notational convenience 0
define N + (i) = {j ∈ N : j > i}. The set of bays is defined by M , with |M | = m. Binary decision variables xik are equal to 1 if and only if service i ∈ N is assigned to bay k ∈ M . The other input data for the SAP are: • tij , , the traffic intensity between services i ∈ N and j ∈ N + (i), expressed in average number of containers per day; the value of tij is in fact the sum of the outgoing containers from i to j and from j to i; • qi , the space requirement of service i ∈ N , expressed in average number of TEUs per day;
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
86
• Qk , the space available at bay k ∈ M , expressed in average number of TEUs per day; • ci , the average number of crane moves required for service i ∈ N per day; • Ck , the average number of crane moves allowed at bay k ∈ M per day; • M (i), a subset of M representing the feasible bay assignments for service i resulting from the draft constraint. Given the linear layout of the Gioia Tauro yard, each bay can be identified by one position coordinate and the distances between bays is calculated as difference between these coordinates. Thus define: • ak , the position coordinate of bay k ∈ M , • dhk = |ah − ak | , the distance between bays h ∈ M and k ∈ M . A straightforward integer quadratic programming formulation of the SAP is given by:
minimize
X
X
X X
tij dhk xih xjk
(5.1)
i∈N \{n} j∈N + (i) h∈M k∈M
subject to
X
xik = 1
∀i ∈ N,
(5.2)
qi xik ≤ Qk
∀k ∈ M,
(5.3)
ci xik ≤ Ck
∀k ∈ M,
(5.4)
∀i ∈ D, ∀k ∈ M (i) \ {1},
(5.5)
∀i ∈ D,
(5.6)
∀i ∈ N, ∀k ∈ M.
(5.7)
k∈M (i)
X i∈N
X
i∈N
xik = xn˜ +i,k−1 xi9 = 0 xik ∈ {0, 1}
The objective function to minimize is the sum of traffic intensities between services weighted by the distances resulting from the assignment decisions. Constraints (5.2) state that each service must be assigned to one and only one bay and this bay must belong to the feasible set of the service. Constraints (5.3) and (5.4) ensure that the total space and the total crane moves required by the services
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
87
assigned to a bay do not exceed its availability. Constraints (5.5) force the split pair (i, n ˜ + i) to be assigned to positions k and k − 1, with k ∈ M (i) \ {1}, and constraints (5.6) forbid the assignment of a split pair to bays 8 and 9 which present a discontinuity.
5.2.2 Linearization of the SAP formulation To take advantage of the linear layout of the Gioia Tauro yard (see Figure 5.2) we introduce a position variable, yi , i ∈ N, equal to ak whenever xik = 1. A formulation of the SAP using yi variables but still with a non-linear objective function follows: d13 = |a1 − a3|
a1
16 bays
1
a2
2
a3
a14
3
14
a15
15
a16
y axis
16
n services
Figure 5.2: Linear disposition of the bays modelled by the SAP
minimize
X
X
tij |yi − yj |
(5.8)
ak xik
∀i ∈ N,
(5.9)
yi ≥ 0
∀i ∈ N.
(5.10)
i∈N \{n} j∈N + (i)
subject to (5.2) - (5.7) and
yi =
X k∈M (i)
Position variables yi are consistent with the assignment variables xik because of constraints (5.9). This formulation can easily be linearized through the introduction of continuous non-negative variables φij and ψij and additional constraints, yielding the L1 SAP formulation:
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
X
minimize
X
tij (φij + ψij )
88
(5.11)
i∈N \{n} j∈N + (i)
subject to (5.2) - (5.7), (5.9) - (5.10) and
yi − yj ≤ φij
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.12)
yj − yi ≤ ψij
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.13)
φij ≥ 0
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.14)
ψij ≥ 0
∀i ∈ N \ {n}, ∀j ∈ N + (i).
(5.15)
Because the objective function is minimized, it follows by constraints (5.12) and (5.14) that φij = yi − yj whenever yi − yj ≥ 0. Similarly, by constraints (5.13) and (5.15), ψij = yj − yi whenever yi − yj ≤ 0. If the inter-bay distance is a constant, as it is in our case, we can, through the yi variables, formulate the adjacency of the split services with only nd constraints instead of nd (m − 1) as in (5.5):
yi − yn˜ +i = 1
∀i ∈ D.
(5.16)
In Section 5.4 we will discuss the opportunity of integrating constraints (5.16) in the L1 SAP formulation, along with constraint (5.17) which, while redundant, strengthens the relaxation:
X i∈N
yi =
XX
ak xik .
(5.17)
i∈N k∈M
5.2.3 Extension of the linearized model to a two dimensional grid The L1 SAP formulation, which exploits the L1 norm used to compute distances between the bays, can be extended to handle the case of a two-dimensional grid. Let a generic bay k ∈ M be identified by a pair (ak , bk ), and let wi , i ∈ N, be a position variable equal to bk whenever xik = 1 (see Figure 5.3). The model of Section 5.2.2 then becomes:
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
89
w axis k
wi = bk
service i
h
wj = bh
service j
yi = ak
yj = ah
y axis
Figure 5.3: Two-dimensional case with L1 norm
X
minimize
X
tij (φij + ψij + βij + γij )
(5.18)
i∈N \{n} j∈N + (i)
subject to (5.2) - (5.7), (5.9) - (5.10), (5.12) - (5.15) and X
∀i ∈ N,
(5.19)
wi − wj ≤ βij
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.20)
wj − wi ≤ γij
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.21)
βij ≥ 0
∀i ∈ N \ {n}, ∀j ∈ N + (i),
(5.22)
γij ≥ 0
∀i ∈ N \ {n}, ∀j ∈ N + (i).
(5.23)
wi =
bk xik
k∈M
A similar approach can be used for a problem with the L∞ norm, but since it is straightforward and not relevant for our problem we omit it.
5.2.4 Linearization of the GQAP Lee and Ma (2003) have introduced a linearization for the GQAP, based on QAP linearizations proposed by Frieze and Yadegar (1983) and by Padberg and Rijal (1996). Adapting this formulation to
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
90
the our problem is simple. The formulation, called LGQAP, is as follows:
minimize
X
X
X X
tij dhk zikjh
(5.24)
zikjh = xik
∀i ∈ N \ {n}, ∀k ∈ M, ∀j ∈ N + (i),
(5.25)
zikjh = xjh
∀i ∈ N \ {n}, ∀j ∈ N + (i), ∀h ∈ M,
(5.26)
∀i ∈ N \ {n}, ∀k ∈ M, ∀j ∈ N + (i), ∀h ∈ M.
(5.27)
i∈N \{n} j∈N + (i) k∈M h∈M
subject to (5.2) - (5.7) and
X h∈M
X
k∈M
0 ≤ zikjh ≤ 1
LGQAP uses additional variables zikjh equal to 1 if and only if service i is assigned to bay k and service j is assigned to bay h. In Section 5.4 we will present comparative computational results obtained with the L1 SAP and LGQAP formulations.
5.3 M-SAP, a memetic heuristic for the SAP We now present a memetic heuristic called M-SAP, based on a previously developed heuristic for the GQAP (Chapter 4) refereed to as M-GQAP. While M-GQAP considers only one set of capacity constraints, M-SAP must be capable of handling two sets of capacity constraints, as well as dedicated constraints for split pairs of services, specific berth characteristics like the berth discontinuity, and infeasible assignments resulting from the draft constraint. We will describe the components of MSAP and highlight its differences with respect to M-GQAP. The algorithm randomly generates an initial population P of feasible solutions, and a cycle of genetic iterations is then applied to P . At each iteration a merging procedure creates an offspring which is then improved trough at most η iterations of tabu search. If the resulting improved offspring is better than the worst member of the population and does not already belong to P , it then replaces the worst solution; otherwise the offspring is discarded. To enhance the exploration of different areas of the solution space, a multi-start approach is also used, meaning that the algorithm is started ξ times and the best solution is retained. We now present the components of the heuristic in more detail.
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
91
5.3.1 Initial population Denote by S the set of solutions satisfying constraints (5.2) - (5.7) and by S˜ the set of solutions satisfying (5.2) - (5.4) and (5.7). A first solution s ∈ S˜ is randomly generated by assigning services to bays while attempting to respect the capacity constraints (5.3) and (5.4). Reaching feasibility with respect to these constraints is not always possible, particularly in the case of tightly constrained instances. Furthermore, because constraints (5.5) and (5.6) are not explicitly considered during the random assignment, these are seldom satisfied in the initial solution. Therefore, an attempt to reach feasibility is made through the application of the TABUFIX2 search procedure described in Section 5.3.4. If TABUFIX2 fails, or if the solution thus produced is already in P , a new solution is generated until a desired population size |P | is reached.
5.3.2 Genetic procedure The genetic procedure attempts to improve the population P by merging, at each iteration ω, two solutions to create an offspring. The basic merging rule used is inspired by the work of Drezner (2003) for the QAP. A modified merging procedure that considers capacity constraints was developed for the GQAP (Chapter 4). Because the SAP contains additional constraints with respect to the GQAP, the merging procedure we have developed for the SAP is new. For each bay k ∈ M the median value of the distances between bay k and the other m − 1 bays is first computed. Bays whose distance from k is less than the median value are called cohesive with respect to k. All bays that are at the same distance as the median value are called neutral, and the remaining bays are called non-cohesive. For each bay k it is then possible to partition M into a subset M1k of cohesive bays, a subset M2k of neutral bays, and a subset M3k of non-cohesive bays. Bay k is considered as belonging to M1k . A bay k selected to partition M into subsets is called a pivot. The construction of the partitions of M for each pivot is performed only once at the beginning of the algorithm. The merging procedure randomly selects two solutions of the population pool called parents. The parent A1 having the smaller solution value is called first parent and the other parent A2 is called second parent. Ties are broken arbitrarily. Like all elements of P , these two solutions satisfy constraints (5.2) - (5.7). The merging procedure operates as a cycle of iterations applied to all bays k ∈ M . Each iteration attempts to generate a new solution sk ∈ S˜ which, as we have mentioned, is feasible with respect to constraints (5.2) - (5.4) and (5.7). Therefore the merging procedure relaxes constraints (5.5) -
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
92
(5.6) related to the adjacency requirement for split pairs and to the berth discontinuity. We denote by p1 (sk ) the amount of violation of constraints (5.5) - (5.6) in solution sk and we compute it as follows: P p1 (sk ) = n + i)| − 1| + xi9 }, where ν(i) is the assigned bays for services i ∈ N , i∈D {||ν(i) − ν(˜ and p1 (sk ) = 0 if sk ∈ S. In the merging cycle the solutions generated are compared by means of a penalized cost function f (sk ) = c(sk )(1 + p1 (sk ) × m × ζ), where c(sk ) is the cost function as stated in (5.1). In this expression the factor m is used to penalize more heavily the violation p1 (sk ) when the instance becomes larger and hence more difficult. The factor ζ was set equal to 0.1 to reduce the impact of m. In sk a bay h belonging to the cohesive subset M1k is assigned all services previously assigned to that bay h in the first parent A1 . Similarly a bay in the non-cohesive subset M3k is assigned all services from the second parent A2 , if these services are not already assigned to the cohesive subset. After this phase some services may still be unassigned. An attempt is then made to randomly assign these to bays while preserving feasibility on capacity constraints (5.4) - (5.5), but if no feasible assignment can be reached the solution is then discarded. If a solution sk ∈ S˜ is obtained, it is then compared, using f (), to the best known solution s∗ω found at iteration ω among those corresponding to all pivot bays; if sk improves upon s∗ω , it then replaces it. As a result of this merging cycle we can obtain a solution s∗ω ∈ S˜ that will not necessarily satisfy constraints (5.5) and (5.6). In this case the TABUFIX2 search procedure is called to reach feasibility. Merging two parents can be unsuccessful if no solution s∗ω ∈ S˜ is encountered during the m iterations or if TABUFIX2 fails to restore feasibility. In this case another set of parents is randomly selected and the process is repeated until a feasible offspring is generated. After every successful or unsuccessful merging, the two parents are labelled as forbidden, and no other merging is attempted with them. The number of forbidden couples is updated during the search. When this number reaches its maximum possible value of |P | × (|P | − 1)/2, the genetic cycle is stopped. We refer to the Section 4.4 for an example illustrating the merging process only with capacity constraints as for the GQAP. After the merging procedure a post-optimization tabu search heuristic (POTS2) is called to improve the best offspring s∗ω ∈ S. The resulting solution is compared with the worst solution in P and is discarded if it does not improve upon it. Otherwise the improved offspring is compared with the other solutions in P . If the offspring is not original, meaning that the same solution already exists in P , it is discarded; otherwise, it is inserted in the population P to replace the worst solution. The information about the forbidden coupling are therefore updated.
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
93
At the end of an iteration the genetic iteration counter ω is incremented and another iteration is performed until a limit $ is reached. The genetic cycle may terminate prematurely if the number of forbidden couples reaches the maximum value of |P | × (|P | − 1)/2. When this event occurs the population P becomes exhausted, no coupling is possible, and a new random population is required. Whenever ω > $ or premature termination occurs, the genetic procedure gives the control to the multi-start cycle which compares the best solution found during the current genetic cycle with the preceding ones, if any. The genetic procedure can be summarized as follows: • for ω = 1, ..., $ { /* genetic cycle */ – Do { ∗ randomly select a non-forbidden couple (A1 , A2 ) in P ∗ for k = 1, ..., m { /* merging cycle */ ˜ if any · merge (A1 , A2 ) using k as pivot and obtain sk ∈ S, · using the penalized cost function f (), compare sk to the best known offspring s∗ω , if any} ∗ if s∗ω ∈ / S call TABUFIX2 – } until an offspring is generated – Apply POTS2 to the offspring s∗ω which eventually is improved – Compare s∗ω with the worst and the best solutions in P – If s∗ω is better than the worst and not better than the best solution, check whether it is original – Replace the worst solution with s∗ω if it is original and better than the worst solution – Update the information about forbidden couples and eventually decide to terminate the genetic cycle}
5.3.3 Post-optimization tabu search: POTS2 The POTS2 procedure allows temporary violations of the capacity constraints (5.3) - (5.4) and of the adjacency and berth discontinuity constraints (5.5) - (5.6). Denote by S A the set of solutions satisfying the assignment constraints (5.2) and (5.7). As before, let c(s) denote the cost of a solution s ∈ S A . Let
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
94
also p2 (s) be the violation of the yard capacity constraints (5.3) and p3 (s) be the violation of the crane moves capacity constraints (5.4). Solutions are then evaluated by means of a penalized cost function g(s) = c(s) + [1 + (p2 (s) + p3 (s))/m]α1 p1 (s) + α2 p2 (s) + α3 p3 (s), where αl , l ∈ {1, 2, 3} are positive parameters. Since usually p1 (s) 0, l ∈ {1, 2, 3}. The cost function g(s) is replaced with g(s) = [1 + (p2 (s) + p3 (s))/m]p1 (s) + p2 (s) + p3 (s) and thus the penalization mechanism driven by the parameters αl is no longer necessary. The value of the tabu tenure parameter, θf , can be different from that of θ used by POTS2. The neighborhood structure and all the other tabu search mechanisms are the same as those of POTS2, but TABUFIX2 employs also a diversification scheme. A solution s ∈ N (s) such that
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
95
f (s) ≥ f (s) is penalized by a factor proportional to the addition frequency of its distinguishing attribute, and by a scaling factor. More precisely, let ρik be the number of times attribute (i, k) has been added to the solution during the process and let ζ be the number of the current iteration. If attribute √ (i, k) is added to s to obtain s, a penalty p(s) = λ nm c(s)ρik /ζ is added to f (s), where p(s) = 0 if f (s) < f (s). The scaling factor c(s) introduces a correction to adjust the penalties with respect to the √ total solution cost. The use of nm as a scaling factor was first suggested in the context of the VRP by Taillard (1993) after extensive computational experiments. It can be explained as follows: since there are O(nm) possible attributes, the frequency of addition of a given attribute into the solution is √ inversely related to problem size. Using the factor nm seems to adequately compensate for problem size. Finally, a parameter λ is used to control the intensity of the diversification. These penalties have the effect of driving the search process toward less explored regions of the search space. TABUFIX2 P3 ends as soon as a feasible solution is reached, meaning that l=1 pl (s) = 0. The maximum number of iterations allowed is set equal to ηf .
5.3.5 Differences between M-SAP and M-GQAP With respect to what is done in M-GQAP, the penalized cost function used in POTS2 was modified to accommodate violations of new constraints present in SAP, namely: the adjacency requirement for split pairs, the berth discontinuity, and capacity constraints relative to quay crane moves. The neighborhood structure H(s) must also consider feasibility for the draft requirement. The major impact of the SAP structure is on the genetic procedure, where the merging cycle alone infrequently generates a feasible offspring. Therefore an appropriate relaxation was developed for the merging phase and the procedure TABUFIX2 was also used in this context. Other differences between the SAP and the GQAP, like the absence of installation costs in the objective function and use of an L1 norm, have led to other smaller variations between the two heuristics.
5.4 Computational results We first describe how test instances were generated, and then provide results obtained with our heuristic compared with those obtained with the two exact formulations of Sections 5.2.2 and 5.2.4.
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
96
5.4.1 Test instances Sixty-two services are listed in the Gioia Tauro port operation database. Ordering the services according to their expected yard space requirement qi shows that the first 33 contribute to 95% of the total space requirement. This situation is illustrated in Figure 5.4.
100% 6 90 80 70 60 %
Pj
i=1 qi /
P62
i=1 qi
50 40 30 20 10 0
10 20 30 40 50 60
j
Services ordered by decreasing qi , i ∈ {1, ..., 62}
Figure 5.4: Relative importance of the Gioia Tauro’s services A similar observation can be made by ordering the services according to the ci values. Among these 33 services, six require a double assignment, i.e., nd = 6 and n = 39. Therefore the full SAP problem contains 39 services to be assigned to 16 bays. The yard space and crane moves required by each service and the interactions between services are derived by a statistical assessment of the terminal database. The instance thus defined is called "39-16". As we will show, this instance is too large to be solved by applying CPLEX to an exact formulation. To test the heuristic versus an exact formulation we have therefore created some easier instances. An instance called "20-8" is obtained from the original "39-16" data, by selecting a subset of services which are assigned, under the current rules at Gioia Tauro, to the bay set {9, ..., 16}. Furthermore, we have designed a new set R of ten randomly generated instances. These are labelled with three letters: n, m, and a parameter f ∈ {1, ..., 100} which controls the tightness of the capacity constraints. For given n, m and f , the input data were generated as follows:
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
97
• tij was generated according to a discrete uniform distribution in [1, ..., 100], • qi and ci were generated according to a discrete uniform distribution in [1, ..., 100], • Ck was generated according to a discrete uniform distribution in [1, ..., • Qk was generated according to a discrete uniform distribution in [1, ...,
P i∈N
P i∈N
ci /(f m)], qi /(f m)].
Given a service i ∈ N , each k ∈ M belongs to M (i) with probability 90%. The number of split pairs nd was taken equal to b0.2nc and, after randomly selecting nd pairs in N , their data were adjusted according to the description given for this set of services (a split pair (i, n ˜ + i) must have the same draft requirement, and tij = tn˜ +i,j ∀i ∈ D and ∀j ∈ N ).
5.4.2 Implementation details and results The M-SAP procedures were coded in ANSI C and the two exact formulations were implemented in CPLEX 8.1. Computational experiments were performed on a SUN workstation (1.2 GHz). For the L1 SAP formulation, let LB1 be the linear relaxation value with constraints (5.16) and (5.17), and let LB2 be the linear relaxation value without these. Figure 5.5 plots the lower bounds LB1 and LB2 at various levels of the branch-and-bound enumeration tree for the "20-08" instance. Similar patterns can be observed on other instances. Constraints (5.16) and (5.17) are therefore effective in improving the linear relaxation. In the following the CPLEX implementation of L1 SAP refers to the one with constraints (5.16) and (5.17). The parameters used in the various M-SAP procedures are as follows: • θf : tabu duration, equal to 128; • λ : diversification intensity parameter, equal to 1; • ηf : maximum number of iterations, equal to 3200; • |P |: population size, equal to 150; • $: maximum number of genetic iterations, equal to 8000; • θ: POTS2 tabu duration, equal to 64; • µ: limit when POTS2 is terminated prematurely, equal to 20; • δ : POTS2 penalty adjustment parameter, equal to 1;
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
98
160000 LB1 LB2 140000
Lower Bound
120000
100000
80000
60000
40000
0
5000
10000
15000
20000
25000 30000 B&B nodes
35000
40000
45000
50000
Figure 5.5: Lower Bounds of two implementations of L1 SAP . • η: maximum number of POTS2 iterations, equal to 1000. These parameter values are the same as those used for the M-GQAP heuristic, i.e. we did not attempt specific parameter settings for the instances of this study. The computation time of the heuristic is influenced by the parameter ξ (the number of times the algorithm is started) and this is the only parameter that we will allow to vary during our computational experiments for the SAP. Table 5.1 reports the results of the heuristic and the two exact formulations implemented in CPLEX on the real data instances. Here the multi-start mechanism was disabled, i.e. ξ = 1. The small instance "20-08" is easily solved to optimality by all three algorithms, but LGQAP is the slowest one. On the large instance "39-16" we set a 60 hour time limit on the two CPLEX implementations. M-SAP obtains a better solution in far less computational time than these truncated branch-and-bound algorithms. Table 5.2 illustrates how solution quality improves with the number of M-SAP iterations for instance "39-16". However, from ξ = 80 upwards there are no additional improvements. The corresponding CPU time of 463 minutes is still far less than the time limit allowed to CPLEX in the tests reported above.
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
Instance code 20-08 39-16
M-SAP - ξ = 1 Solution Time (min.) 159994 0.2 377606 5.2
99
L1 SAP -CPLEX Solution Gapa Time (%) (min.) 159994 0.0 4.6 379846 74.7% 3600.0
LGQAP-CPLEX Solution Gapa Time (%) (min.) 159994 0.0 129.1 559858 83.7% 3600.1
Table 5.1: Computational results for real data instances. a - The gap is computed with respect to the value of the linear relaxation as (upper bound - lower bound)/upper bound. - Best values in bold.
ξ 1 377606 105.8 5.2
Solution value 100 × solution value / best solution CPU time (min.)
10 372346 104.3 59.9
20 365110 102.3 118.6
40 359232 100.6 233.4
80 357018 100.0 463.0
160 357018 100.0 926.4
Table 5.2: M-SAP on instance "39-16" varying ξ. - Best values in bold.
Table 5.3 provides the computation results for the instance set R. The first three instances were easily solved by all the three algorithms. The fourth instance, while solved to optimality by L1 SAP , proved to be difficult for LGQAP, and reached the imposed time limit of two hours before fully exploring the branch-and-bound tree. M-SAP with ξ = 10 always obtains the optimum when L1 SAP does, but requires shorter average computational times and yields better results on the instances where an optimal solution was not found. Instance code 15-10-75 20-05-65 20-10-65 20-10-75 22-11-85 25-15-60 25-15-70 25-15-80 25-15-90 30-15-70 Average
M-SAP - ξ = 10 Solution Time (min.) 14688 1.1 7812 1.2 18804 3.0 19476 2.8 33456 4.1 36782 6.0 43182 5.9 49480 6.8 62438 11.3 63178 8.6 5.1
L1 SAP -CPLEX Solution Time Gapa (min.) (%) 14688 0.6 0.0 7812 1.2 0.0 18804 8.4 0.0 19476 61.2 0.0 34764 120.0 36.0 40834 120.0 75.9 45250 120.0 69.3 52432 120.0 74.2 63644 120.0 54.0 69940 120.0 82.7 79.2
LGQAP-CPLEX Solution Time Gapa (min.) (%) 14688 19.1 0.0 7812 4.5 0.0 18804 46.9 0.0 21034 120.0 26.0 38254 120.0 32.1 49728 120.2 83.8 49600 120.2 74.7 59842 120.2 75.0 78232 120.2 69.4 91470 120.3 88.9 91.1
Table 5.3: Random generated instances. a - The gap is computed with respect to the value of the linear relaxation as (upper bound - lower bound)/upper bound. - Best values in bold.
In Table 5.4 we report results produced by the heuristic with five different ξ values in the set Ξ = {10, 20, 40, 80, 160}. The heuristic exhibits a stable behavior since the quality of the solutions does not improve significantly when longer computational times are allowed. The solution quality index was computed as follows: let be c∗i the minimum solution value obtained for a given instance
CHAPTER 5. THE SERVICE ALLOCATION PROBLEM
100
i over all runs for ξ ∈ Ξ, and let cχi be the solution value of instance i with ξ = χ; the average of the values 100 × cχi /c∗i is our solution quality index for the choice ξ = χ. ξ Instance code 15-10-75 20-05-65 20-10-65 20-10-75 22-11-85 25-15-60 25-15-70 25-15-80 25-15-90 30-15-70 Average CPU time (min.) Solution quality
10 14688 7812 18804 19476 33456 36782 43182 49480 62438 63178 5.1 100.78
20 14688 7812 18804 19476 33456 36782 43012 49276 61886 63178 10.1 100.61
40 14688 7812 18804 19476 33456 36568 41876 49276 61886 61646 20.2 100.03
80 14688 7812 18804 19476 33456 36568 41876 49276 61886 61646 40.0 100.03
Table 5.4: M-SAP sensitivity to ξ on instance set R. - Best values in bold.
160 14688 7812 18804 19476 33456 36568 41876 49276 61886 61442 79.9 100.00
Chapter 6
Conclusions and future developments We have analyzed and solved four optimization models arising in the management of maritime container terminals. In Chapter 2 we have provided two formulations for the discrete version of the BAP and we have developed two heuristics, one for the discrete case and one for the continuous case. The solution values provided by the first were compared on small instances to the optimal values produced by the exact DBAP formulation. On these instances our heuristic for the discrete case (T 2 S) always yields optimal solutions. On larger instances it always outperforms the truncated CPLEX algorithm applied to the DBAP. Since the discrete model does not always satisfy the spatial constraints, we have developed another heuristic (T S)2 for the continuous case. Comparisons were made with the discrete case and with a simple constructive procedure. Both heuristics are capable of solving more realistic instances than those previously considered by other authors. Our two heuristics can handle the various features of real-life problems, including time windows, favorite and acceptable berthing areas, etc. The objective function can easily accommodate average container loading and unloading times which are dependent on the berthing position, leading to a bicriterion optimization problem. The integration of the berthing and quay cranes assignment problems by means of largescale decomposition methods will be the object of a further study. In Chapter 3 we have formulated and solved the quay crane scheduling problem encountered in the daily operation of maritime container terminals. We have developed an improved formulation of the QCSP capable of solving small and medium size instances. A branch-and-cut algorithm, which exploits the precedence relationships of the problem, further improves these results. Further studies are necessary to develop a fast heuristic capable of maintaining the optimal solutions found by the
101
CHAPTER 6. CONCLUSIONS AND FUTURE DEVELOPMENTS
102
branch-and-cut algorithm on medium size instances, and, also, capable of finding good solutions on very large instances which arise when the QCSP considers the scheduling of multiple vessels. In Chapter 4 we have developed a memetic heuristic for the GQAP. To test the heuristic a linearization of the GQAP was implemented in CPLEX. The solution values provided by the heuristic were compared on small instances to the optimal values generated by the exact GQAP formulation. On these instances our heuristic always yields optimal solutions. On larger instances it always outperforms the truncated CPLEX branch-and-bound algorithm applied to the GQAP. In Chapter 5 we have described, formulated and solved the Service Allocation Problem, a difficult combinatorial problem arising in the tactical management of container ports. We have developed a memetic heuristic for the problem. To test the heuristic two linearizations of the SAP were implemented in CPLEX. The solution values provided by the heuristic were compared on small instances to the optimal values generated by the exact formulations. On these instances our heuristic always yields optimal solutions. On larger instances it always outperforms the truncated CPLEX branchand-bound algorithm applied to the two exact formulations. In this thesis we have considered only a few of the many tactical and operational problems arising in port management. Several other interesting research issues should retain our attention in the near future. These include the development and application of a classification method to assign containers to yard bays based on their attributes (origin, destination, expected dwelling time), the integration of ship schedule periodicity into quay assignment decisions, and the optimization of train loading and unloading operations in container transshipment terminals.
Acknowledgements My first thanks go to Prof. Manlio Gaudioso who encouraged me to pursue a doctoral program and supervised this thesis. Prof. Gilbert Laporte and Prof. Jean-François Cordeau proved to be an excellent advisory team while I was in Montréal. The first helped me with broad methodological issues and with reviewing, while the second provided sharp algorithmic insights. I am grateful to all my friends in Montréal for being so supportive during the two years I stayed there, and to my friends in Italy who, in spite of the distance, kept the affection alive. This work was supported by the Università della Calabria, by the Canada Research Chair in Distribution Management, by the HEC Centre for International Business Studies, and by the CN Chair in Transport Economics and Intermodality.
103
Bibliography Anstreicher, K. M.: 2003, Recent advances in the solution of quadratic assignment problems, Mathematical Programming 97, 27–42. Ascheuer, N.: 1996, Hamiltonian Path Problems in the On-line Optimization of Flexible Manufacturing Systems, PhD thesis, Konrad Zuse Zentrum für Informationstechnik Berlin. Ascheuer, N., Fischetti, M. and Grötschel, M.: 2001, Solving the asymmetric travelling salesman problem with time windows by branch-and-cut, Mathematical Programming 90, 475–506. Ascheuer, N., Jünger, M. and Reinelt, G.: 2000, A branch & cut algorithm for the asymmetric traveling salesman problem with precedence constraints, Computational Optimization and Applications 17, 61– 84. Augerat, P., Belenguer, J., Benavent, E., Corberán, A. and Naddef, D.: 1999, Separating capacity inequalities in the CVRP using tabu search, European Journal of Operational Research 106, 546–557. Balas, E., Fischetti, M. and Pulleyblank, W.: 1995, The precedence-constrained asymmetric traveling salesman polytope, Mathematical Programming 68, 241–265. Barr, R. S., Golden, B. L., Kelly, J. P., Resende, M. G. C. and Stewart, Jr, W. R.: 1995, Designing and reporting on computational experiments with heuristic methods, Journal of Heuristics 1, 9–32. Burkard, R. E., Çela, E., Pardalos, P. M. and Pitsoulis, L. S.: 1998, The quadratic assignment problem, in D.-Z. Du and P. M. Pardalos (eds), Handbook of Combinatorial Optimization, Kluwer, Boston, pp. 241– 337. Christiansen, M., Fagerholt, K. and Ronen, D.: 2004, Ship routing and scheduling: Status and perspectives, Transportation Science 38, 1–18.
104
BIBLIOGRAPHY
105
Connoly, D. T.: 1990, An improved annealing scheme for the qap, European Journal of Operations Research 46, 93–100. Cordeau, J.-F.: 2003, A branch-and-cut algorithm for the dial-a-ride problem, Technical Report CRT2003-24, Centre for Research on Transportation, Montréal. Cordeau, J.-F., Gendreau, M. and Laporte, G.: 1997, A tabu search heuristic for periodic and multidepot vehicle routing problems, Networks 30, 105–119. Cordeau, J.-F., Laporte, G. and Mercier, A.: 2001, A unified tabu search heuristic for vehicle routing problems with time windows, Journal of the Operational Research Society 52, 928–936. Daganzo, C. F.: 1990, The productivity of multipurpose seaport terminals, Transportation Science 24, 205–216. De Castilho, B. and Daganzo, C. F.: 1993, Handling strategies for import containers at marine terminals, Transportation Research 27B, 151–166. Drezner, Z.: 2002, Heuristic algorithms for the solution of the quadratic assignment problem, Journal of Applied Mathematics and Decision Sciences 6, 163–173. Drezner, Z.: 2003, A new genetic algorithm for the quadratic assignment problem, INFORMS Journal on Computing 15, 320–330. Fleurent, C. and Ferland, J. A.: 1994, Genetic hybrids for the quadratic assignment problem, DIMACS Series in Mathematics and Theoretical Computer Science 16, 190–206. Frieze, A. and Yadegar, J.: 1983, On the quadratic assignment problem, Discrete Applied Mathematics 5, 89–98. Gambardella, L. M., Taillard, E. D. and Dorigo, M.: 1999, Ant colonies for the quadratic assignment problem, Journal of the Operational Research Society 50, 167–176. Garey, M. R. and Johnson, D. S.: 1979, Computers and Intractability: A Guide to the Theory of NPCompleteness, Freeman, San Francisco. Gaudioso, M., Chiodo, A. and Paese, D.: 2001, Un modello per la gestione degli spazi di piazzale per il terminale marittimo container di Gioia Tauro, Technical Report 1, Laboratorio di Logistica, Università della Calabria, Italy.
BIBLIOGRAPHY
106
Gaudioso, M., Matteo, R. and Morrone, G.: 1999, Sviluppo di un sistema per l’analisi e la clusterizzazione dei servizi: SACS, Technical Report 3, Laboratorio di Logistica, Università della Calabria, Italy. Glover, F.: 1986, Future paths for integer programming and links to artificial intelligence, Computers & Operations Research 13, 533–549. Grötschel, M. and Padberg, M.: 1985, Polyhedral theory, in E. L. Lawler, J. K. Lenstra, A. H. G. Rinnooy Kan and D. B. Shmoys (eds), The Traveling Salesman Problem, Wiley, New York, pp. 251–305. Holland, J.: 1992, Adaptation in Natural and Artificial Systems, The MIT Press. Imai, A., Nagaiwa, K. and Chan, W. T.: 1997, Efficient planning of berth allocation for container terminals in Asia, Journal of Advanced Transportation 31, 75–94. Imai, A., Nishimura, E. and Papadimitriou, S.: 2001, The dynamic berth allocation problem for a container port, Transportation Research 35B, 401–417. Imai, A., Nishimura, E. and Papadimitriou, S.: 2003, Berth allocation with service priority, Transportation Research 37B, 437–457. Kim, K. H. and Moon, K. C.: 2003, Berth scheduling by simulated annealing, Transportation Research 37B, 541–569. Kim, K. H. and Park, Y. M.: 2004, A crane scheduling method for port container terminals, European Journal of Operational Research 156, 752–768. Koopmans, T. C. and Beckmann, M. J.: 1957, Assignment problems and the location of economics activities, Econometrica 25, 53–76. Laporte, G., Riera Ledesma, J. and Salazar González, J. J.: 2003, A branch-and-cut algorithm for the undirected traveling purchaser problem, Operations Research 51, 940–951. Lee, C. and Ma, Z.: 2003, The generalized quadratic assignment problem, Technical report, Department of Mechanical and Industrial Engineering, University of Toronto. Legato, P., Monaco, F. and Sammarra, M.: 2002, Il problema del berth allocation, Technical report 2, Laboratorio di Logistica, Università della Calabria, Italy.
BIBLIOGRAPHY
107
Legato, P., Monaco, F. and Tigani, N.: 2001, Berth planning at Gioia Tauro’s maritime terminal by logistic distribution models, Annual Conference, Cagliari, Italy, AIRO. Li, Y., Pardalos, P. M. and Resende, M. G. C.: 1994, A greedy randomized adaptive search procedure for the quadratic assignment problem, DIMACS Series in Mathematics and Theoretical Computer Science 16, 237–261. Lim, A.: 1998, The berth planning problem, Operations Research Letters 22, 105–110. Lim, A., Rodrigues, B., Xiao, F. and Zhu, Y.: 2004, Crane scheduling with spatial constraints, Naval Research Logistics 51, 386–406. Mladenovi´c, N. and Hansen, P.: 1997, Variable neighborhood search, Computers & Operations Research 24, 1097–1100. Moscato, P. and Cotta, C.: 2003, A gentle introduction to memetic algorithms, in F. Glover and G. A. Kochenberger (eds), Handbook of Metaheuristics, Kluwer, Boston, pp. 105–144. Naddef, D. and Rinaldi, G.: 2002, Branch-and-cut algorithms for the capacitated VRP, in P. Toth and D. Vigo (eds), The Vehicle Routing Problem, SIAM Monographs on Discrete Mathematics and Applications, Philadelphia, pp. 53–84. Nishimura, E., Imai, A. and Papadimitriou, S.: 2001, Berth allocation planning in the public berth system by genetic algorithms, European Journal of Operational Research 131, 282–292. Nugent, E., Vollman, T. E. and Ruml, J.: 1968, An experimental comparison of techniques for the assignment of facilities to locations, Operations Research 16, 150–173. Padberg, M. W. and Rijal, M. P.: 1996, Location, Scheduling, Design and Integer Programming, Kluwer, Boston. Papadimitriou, C. H. and Steiglitz, K.: 1982, Combinatorial Optimization: Algorithms and Complexity, Prentice-Hall, Englewood Cliffs, NJ. Park, Y. M. and Kim, K. H.: 2003, A scheduling method for berth and quay cranes, OR Spectrum 25, 1–23. Peterkofsky, R. and Daganzo, C. F.: 1990, A branch and bound solution method for the crane scheduling problem, Transportation Research 24B, 159–172.
BIBLIOGRAPHY
108
Pinedo, M.: 1995, Scheduling: Theory, Algorithms and Systems, Prentice-Hall, Englewood Cliffs, NJ. Rendl, F.: 2002, The quadratic assignment problem, in Z. Drezner and H. W. Hamacher (eds), Facility Location: Applications and Theory, Springer-Verlag, Berlin, pp. 439–457. Steenken, D., Voss, S. and Stahlbock, R.: 2004, Container terminal operation and operations research - a classification and literature review, OR Spectrum 26, 3–49. Steinberg, L.: 1961, The backboard wiring problem: A placement algorithm, SIAM Review 3, 37–50. Taillard, E. D.: 1991, Robust taboo search for the quadratic assignment problem, Parallel Computing 17, 443–455. Taillard, E. D.: 1993, Parallel iterative search methods for vehicle routing problems, Networks 23, 661– 673. Taleb-Ibrahimi, M., Castilho, B. D. and Daganzo, C. F.: 1993, Storage space versus handling work in container terminals, Transportation Research 27B, 13–32. UNCTAD: 2003, Review of maritime transport, Technical report, United Nations, New York and Geneva. Vis, I. F. A. and Koster, R. D.: 2003, Transshipment of containers at a container terminal: An overview, European Journal of Operational Research 147, 1–16.