You are on page 1of 9

ARTICLE IN PRESS

European Journal of Operational Research xxx (2008) xxxxxx

Contents lists available at ScienceDirect

European Journal of Operational Research


journal homepage: www.elsevier.com/locate/ejor

Production, Manufacturing and Logistics

An optimization heuristic for the berth scheduling problem


Yusin Lee a,*, Chuen-Yih Chen b
a b

Department of Civil Engineering, National Cheng Kung University, 1 University Road, Tainan 701, Taiwan Department of Aviation and Maritime Management, Chang Jung Christian University, Tainan, Taiwan

a r t i c l e

i n f o

a b s t r a c t
Berths are among the most important resources in a port. In this research we present an optimizationbased approach for the berth scheduling problem, which is to determine the berthing time and space for each incoming ship. The neighborhood-search based heuristic treats the quay as a continuous space. In additional to basic physical requirements, this model takes several factors important in practice into consideration, including the rst-come-rst-served rule, clearance distance between ships, and possibility of ship shifting. Computational experience is provided. 2008 Elsevier B.V. All rights reserved.

Article history: Received 27 April 2006 Accepted 14 March 2008 Available online xxxx Keywords: Logistics Berthing Threshold accepting Integer programming Optimization

1. Introduction Kaohsiung is the largest port in Taiwan, and is also one of the major container ports in the world. Most container terminals in Kaohsiung are Dedicated Terminals, which are leased by liners and terminal operators on a long term basis. In contrast, the general cargo terminals are mostly operated as Multi-User Terminals, in that incoming ships are dynamically allocated on a rst-comerst-served basis. Among all resources available to a terminal, berths are the most important, and good schedules of berths can lead to higher revenues to both the ship owners and the port (Kim and Moon, 2003). In the Multi-User Terminals at Kaohsiung, the port manager and ship company representatives schedule the usage of berths in a lengthy daily meeting by negotiation and trial-and-error. This paper proposes an optimization-based approach that can serve as the core of a future decision support system that schedules the berth usages automatically. The task of berth usage scheduling determines the berthing time and position of every calling ship. The way ships are assigned to berthing positions can be either discrete or continuous. In the discrete method, the entire quay is partitioned into several berths, and allocations of ships are based on the berths. In the continuous method, the ships berthing is performed in a continuous location space. In this study we address the berth scheduling problem in the continuous sense. Due to practical considerations, ships cannot be assigned to any available quay space. In contrast, each ship has several preferred sections depending on the nature of cargo as well as storage/handling facility. The length of each preferred section is
* Corresponding author. Tel.: +886 6 2757575x63118; fax: +886 6 2358542. E-mail address: yusin@mail.ncku.edu.tw (Y. Lee). 0377-2217/$ - see front matter 2008 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2008.03.021

typically around one to three times the length of the ship, but they can differ from ship to ship and from location to location. Since the cost of loading/unloading, as well as the length of the working time, at different locations can be different, ships have different priorities for their preferred sections. There is also a maximum waiting time for each preferred section of each ship, which is the maximum amount of time the ship is willing to wait for that section. The maximum waiting time for the least preferred section is set to a large number to ensure that every ship can be berthed properly. Since each ship manager denes his own preferred sections independently, those of different ships are not related and frequently overlap with each other. We also assume that each arriving ship has an estimated time of arrival (ETA), which can vary from ship to ship. Many factors affect berth scheduling in practice, including the ETA, the ship length, and required water depth. First-come-rstserved is one of the most important rules. However, in practice this rule is sometimes negotiable if mutual agreement can be reached in the meeting. This typically happens when swapping the berthing order of two ships signicantly benets the later ship at a small cost to the earlier ship. When two ships have very different preferences (and thus there is no competition for berthing space), this rule is not important either. The nature of cargo is also an important factor because it determines the required loading/unloading equipments and the locations of corresponding storage facilities. The physical relationship between a ships berth location and its storage facility, as well as the available equipments at that location, can also affect the ships handling time. When the terminal is busy, the port authority can shift in-port ships to another location to enable another incoming ship to berth. However, as a tradition, shifting cannot happen in the rst or last 4 hours of berthing, nor can a ship be

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
2 Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx

shifted for more than 100 m. Shifting of a ship may or may not increase its berthing time. There are also situations where shifting is impossible, for example, when the ship at berth is connected to pipelines that limit its exibility to shift. It is also required that the same ship cannot be shifted more than once. Finally, a ship cannot be shifted to a location outside its preferred sections. The clearance distance between ships is a very important factor in berth scheduling. According to the rules in Kaohsiung, the minimum clearance distance between two ships depends on the length of the ship that was berthed later of the two. For ships of length 130 m or more, the minimum clearance distance is 10% of the ship length. For ships of length less than 130 m, the minimum clearance distance is 10 m. For example, consider two ships A and B that are berthed next to each other whose lengths are 150 and 200 m, respectively. If A was berthed before B was, the minimum clearance distance between them is 10% of the length of B, which is 20 m. If A was berthed later, the minimum clearance distance is 15 m. Regulations do not allow two neighboring ships to be berthed simultaneously. Under this rule, the berthing order is very important in the task of berth scheduling. For example, if the above mentioned ships are to be berthed between two other ships spaced 400 m apart, they can both t only when the larger one is berthed rst. The same clearance distance rule also has to be observed when a ship is shifted from one location to another. In this case the shifting ship is considered the one that is berthed later. There are not many studies dealing with the berth scheduling problem. Imai et al. (2003), Nishimura et al. (2001), Chen and Hsieh (1999), and Li et al. (1998) studied the static version of the berth scheduling problem, in that they assume all ships have already arrived at the port before the scheduling begins. Imai et al. (2001) proposed a model to solve the dynamic berth allocation problem, which allows the ship to arrive which work is in progress. Park and Kim (2003), Lim (1998), Legato and Mazza (2001), Kim and Moon (2003), Guan et al. (2002), and Imai et al. (2005) studied the continuous berth scheduling problem. These papers also assume that some of the ships have not arrived at the time of planning and will arrive at some later moment during the planning horizon. A few papers allow ships be shifted: Li et al. (1998) and Brown et al. (1997). The study described in this paper includes several aspects that are not seen in previous papers. First, in our problem ships should be assigned to one of their several preferred sections, each of which is a continuous section a few times the length of the ship. Selecting one of its preferred sections for each ship is a discrete problem, but the preferred sections themselves are selected by ship company agents from a continuous space, and allocating the ships within their selected preferred sections is also a continuous problem. Therefore, in some sense, this factor places the current problem somewhere in between the discrete and continuous berth scheduling problem. Second, the clearance distance between ships depends on the order in which they are berthed. Clearance distance is also considered in Lim (1998), but their required distance is xed in that the clearance distance between two ships does not depend on the order in which they are berthed, which is not our case. Since the order in which ships are berthed is unknown a priori, and the clearance distance can sometimes have an important impact on the nal result as explained above, this factor by itself greatly complicates the problem. Third, the model presented in this paper allows for more practical considerations be incorporated into ship shifting. Li et al. (1998) also considered ship shifting but assumes that additional cost or time incurred by shifting are negligible. The paper by Brown et al. (1997) discusses submarine shifting which is very different from commercial ships. The method proposed in this paper is very exible and can be solved very efciently. This paper is divided into four sections. Following this introduction, Section 2 explains the model and solution heuristic in detail.

Section 3 presents computation results, followed by conclusions and a brief discussion of possible future research in the nal section. 2. The model There are two types of ships in the system: in-port ships and arriving ships. In-port ships are the ships that are berthed before the planning horizon starts. They remain in port until their departure time but can be shifted to another location upon request. Berthing locations for arriving ships are assigned according to their ETA and preferred sections. Berthing applications are typically led between 8 to 36 hours before ETA. Under the rst-come-rstserved rule, ETA largely determines the priority of arriving ships while berth scheduling. In their application forms, each ship can select up to ve different preferred sections and assign them with different priority. These preferred sections are typically chosen according to the nature of cargo and ship type. The total length of the quay in the multi-user terminal at Kaohsiung is approximately 9000 m. Most of the calling ships are between 100 and 250 m in length. On a typical day, the multi-user terminals has about 40 in-port ships and handles about 30 berthing applications. For a ship to berth at a certain location, the following three feasibility conditions have to hold: (a) the ship is able and willing to berth at that location, (b) the port authority allows that ship to berth at that location, and (c) the ship is compatible with other ships berthed in the vicinity of that location. Among them, condition (a) depends on the water depth and the ship depth, as well as the compatibility between required and available loading/ unloading/storage equipments. Condition (b) depends on safety concerns and the port authoritys policy to allow or prohibit certain types of ships to use certain berthing locations. Satisfaction of these two conditions can be determined easily before berth allocation work begins. Therefore, hereafter we assume that all ships satisfy conditions (a) and (b) in all their preferred sections, and only consider condition (c) in the model. This nal condition mostly depends on if the available space is sufcient for the ship to berth, and the status of competing ships. In this paper we use a timespace diagram to represent berth schedules as illustrated in Fig. 1. The vertical axis represents the quay positions and the horizontal one is the time axis. The rectangles represent the occupation of berth in time and space by ships. Ship A in the Figure is an in-port ship, and the rest are arriving ships. Ship D is shifted to another location in the middle of its operation to allow ship E to berth between ships C and D. Because it is

Space

Ship B

Ship A Ship D

Ship D

Ship E

Ship C

Time
Fig. 1. Illustration of a timespace diagram.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx 3

shifted, the activity of ship D is represented as a combination of two rectangles in the Figure. The basic concept of our approach is to rst generate a number of different candidate berth allocations (hereafter referred to as candidates) for each ship within each of their preferred sections and within their time bounds (thus they satisfy feasibility conditions (a) and (b)). Each candidate corresponds to one ship, and represents one possible berth location, berth starting and ending times, as well as if the ship will be shifted, and how it is shifted if at all. Each candidate is a rectangle in the timespace diagram if it is not shifted, and can be represented as two rectangle combined if it is shifted once. Since the berth location as well as berthing time of each candidate is known when it is generated, the length of each candidates handling time can be easily adjusted in response to the berth location or even the time-of-day if needed. Because there are an innite number of different berthing possibilities for each ship in general, many different candidates can be generated for each ship. After the candidates are generated, a neighborhood search heuristic selects a good combination from these candidate allocations, and nally a greedy approach further improves the resulting solution. Fig. 2 illustrates the rst two stages with an example of three ships A, B, and C. Fig. 2a shows three candidate berth allocations for each ship. In all, these candidates represent 33 = 27 different combinations of how the ships can be berthed, where each combination is a set of three candidates, one for each ship. Many of these combinations are infeasible due to conicts. Fig. 2b displays one of the feasible combinations. One important advantage of this candidate-based approach is it is very exible in that many factors can be taken into consideration easily. For example, complicating factors like the relationship between ship shifting and total berthing time, or time windows that a ship cannot be shifted, can be considered at the time candidates are generated. For arriving ships, each candidate represents one possibility of how this ship might be berthed. In-port ships are already berthed, therefore each candidate represents one possible way to shift the ship to make way for another ship. Candidate j of ship i will be referred to as Cij hereafter. Upon generation, each candidate can be individually evaluated to determine its utility index uij, which is a function of the ships waiting time, corresponding preferred section, priority, and shifting status as presented in Eq. (1) uij W cho choij W t tij pi W s sij W d dij W loc locij : 1 In Eq. (1), Wcho, Wloc, Wt, Ws, and Wd are weights that are uniform across all ships. These weights are negative numbers whose absolute values represent the relative importance between their corresponding factors as conceived by the planner. The indexes choij, locij, tij, sij, and dij are specic to each candidate, and pi is the priority index of the ship, which is determined based on the priority of ship i

Space Ship C Ship B Ship B Ship C Ship A Ship C Ship A Ship B Ship A Time (a) Candidate berth allocations.

Space Ship C

Ship B

Ship A Time (b) A feasible combination.

Fig. 2. Illustration of the basic concept.

with respect to other ships in the system. To comply with the rstcome-rst-served rule, the values of pi for arriving ships are set according to their ETA, with earlier ships having larger values. For the rst several arriving ships the pi values increase exponentially with priority. For the remaining arriving ships, the pi values increase linearly with priority. The pi values for all in-port ships are the same, set to a value slightly higher than that of the rst arriving ship. The advantage of an exponentially growing priority index is that using one can prevent the heuristic from sacricing one highpriority ship to benet a number of lower-priority ships. But when there are many ships, an exponentially growing priority index will quickly exceed the effective digits that a computer can provide. Therefore we let the rst few ships that are going to arrive soon have exponentially growing priority indexes, and assign the other ships linearly growing priority indexes. Since these later ships are not going to arrive very soon, any less than ideal schedules can still be corrected when the system re-optimizes next time, typically half an hour later. Selection of the preferred section for arriving ships is reected in the index choij. If a candidate Cij is located in the kth most preferred section of ship i, the index choij of this candidate is set to k. The index locij is the distance between the center of the ship according to candidate Cij, and the center of the corresponding preferred section in which this candidate resides. The index tij is the waiting time of the ship if it uses candidate Cij. There are two indexes for the shifting status. If the ship is shifted, sij will be 1, and dij is the shifting distance. Otherwise both sij and dij are 0. If two candidates that correspond to different ships overlap in both time and space, or they do not comply with the minimum clearance distance rule, they conict. Two candidates of different ships that do not conict are compatible. Relationship between candidates of the same ship is not dened. Determining the conict status between various combinations of shifted or non-shifted candidates require slightly different rules, but they are all mathematically simple and can always be done very efciently. If a set of candidates M contain exactly one candidate for each ship, and if all elements of M are mutually compatible with each other, then M represents a feasible berthing plan for all ships and is referred to as a feasible solution. The utility of a feasible solution uM is the summation of utilities of all its elements, plus an adjustment term adjM. This adjustment term reects the penalty when the rst-come-rst-served rule is violated, that is, when a ship with lower priority is berthed earlier than another ship that has higher priority. Strict enforcement of this rule across the entire terminal severely compromises the solution quality, and is not always necessary. For example, when two ships are berthed far apart (and thus do not compete for the same berthing space), the ship that arrives later is often allowed to berth earlier. Thus, in our heuristic adjM is set to 3 whenever two ships berthed within 300 m violate the rst-come-rst-served rule. This same mechanism can also be used to penalize or encourage certain patterns within a feasible solution, if there is such a need in the future. Candidates can be generated in a number of methods. In this research we generate candidates in three ways, introduced below in the order in which they are executed in the solution process. The rst method is to generate exactly one candidate for each ship in a way that these candidates form a feasible solution. When generating this set of candidates, all candidates for in-port ships reect their current position and expected leaving time. The candidates for arriving ships are generated in descending order of their priority, and are all located in each ships preferred sections. When generating the candidate for a ship, the algorithm starts from the ETA of the ship, and searches within the preferred sections in a sequential manner. The rst timespace location discovered that does not conict with other candidates that are already generated will be used. Although this initial feasible solution is unlikely a good

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
4 Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx

one, it guarantees the feasibility of the resulting optimization problem that will be solved after the candidates are generated, and also provides a good estimation of the time and space needed to berth all these ships. This solution is also used as the initial feasible solution in the neighborhood search heuristic. The second method is to randomly generate a number of candidates for each preferred section of each ship in the overall time range as estimated according to the initial feasible solution generated above. The number of candidates generated for each ship with this method is roughly twice of the total number of potential waiting hours in all its preferred sections. Most candidates are generated in the third method as illustrated in Fig. 3. Due to its design, the number of candidates might grow exponentially once this method is applied. Therefore we cap the total number of candidates with a pre-set upper bound. In addition, two parameters p1 and p2 also help in the process. One at a time the heuristic selects candidates from the set of all candidates. With probability p1 the selected candidate is checked against all other candidates in the set. Upon detecting a conict, with probability p2 the heuristic attempts to generate a few new candidates that will be added to the set of all candidates. The process repeats until the total number of candidates is satisfactory. Of the two parameters, p1 introduces randomness into the process, and p2 controls the number of candidates generated. A high p2 value does not prevent the heuristic from working, but the rst few candidates selected to check for conicts might generate so many new candidates that many other candidates do not even have the chance to be examined. Computational experience indicates that p1 = 0.12 and p2 = 0.01 leads to satisfactory results, which we use throughout the paper. Method three generates four types of new candidates; each of them represents a strategy to resolve the conict. Consider two

conicting candidates, and let CA be the candidate that berths earlier, CB be the candidate that berths later. Also let A and B be the ships that correspond to CA and CB, respectively. The rst strategy seeks to resolve the conict by shifting ship A, which is the ship that is berthed earlier among the pair. The new candidate CA1 is identical to CA, except that it is shifted at the berthing time of CB, and shifted by the minimum distance that eliminates conict between CA1 and CB. If CA is already shifted, CA1 will not be generated due to the rule that a ship cannot be shifted twice. It is not generated either if ship A is not allowed to shift, or if the shifting will move ship A out of its preferred sections. The second strategy tries to resolve the conict by delaying ship B. The new candidate CB1 is identical to the candidate CB, except that CB1 berths later than CB by the amount of time overlap between CA and CB. If such a delay for ship B is not allowed due to the limit on the maximum waiting time of the ship at that preferred section, CB1 will not be generated. The third new candidate provides an opportunity to resolve the conict by assigning (not shifting) ship A to another location. The new candidate CA2 is a copy of CA, but differs by the minimum distance in the same preferred section of ship A such that CA2 and CB are compatible. The berthing time of CA2 is the same as that of CA. This new candidate is also not generated if doing so is impossible. This can happen when the length of the preferred section is small as compared to the length of ship A. Since in-port ships cannot be re-assigned because they are already berthed before the planning horizon starts, CA2 will not be generated either if ship A is an inport ship. Finally, the fourth new candidate CB2 is generated in a way similar to how CA2 is generated, except CB2 is generated for ship B instead. Note that while the generation of each of these new candidates provides a potential opportunity to resolve conicts between CA and CB, conicts between the new candidates and other existing candidates are not checked and often exist.

Space CB C
A

Space CB C
A1

Time (a) Two conflicting candidates. Space CB1 CA CA2 Space CB (b) Strategy 1: Shift ship A.

Time

Time (c) Strategy 2: Delay ship B. Space CB2 CA

Time (d) Strategy 3: Move ship A to another location.

Time (e) Move ship B to another location.


Fig. 3. Illustration of the third candidate generating method.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx 5

After all the candidates are generated, the next step is to nd the best feasible solution that maximizes uM. In principle, this task can be represented by the following binary integer program, where S is the set of all ships, C is the set of all candidates of all ships, and C(i) is the set of all candidates for ship i. The parameter uij is the utility of candidate Cij as calculated with Eq. (1), xij is a binary variable which corresponds to the case that Cij is selected for ship i when its value is 1, and 0 for the other case. X uij xij ; 2 Maximize
ij2C

Subject to

X
j2C i

xij 1

8i 2 S ;

3 4 5

xij xpq 6 1 xij 2 f0; 1g

8C ij conflicts with C pq ; 8i; j 2 C :

In the model above, Eq. (2) is the objective function that maximizes the total utility. Eq. (3) states that exactly one candidate has to be chosen for each ship. Eq. (4) ensures that any feasible solution will not contain conicting candidate pairs, and the nal Eq. (5) is the binary constraint. In principle solving this binary integer program will yield the optimal feasible solution (with respect to the candidates in C), but for a real-sized problem there are typically 60 100 ships in the system. If there are 500 candidates for each ship on average, the model will have several tens of thousands of binary variables. Solving integer programs of this scale exceeds the ability

of modern personal computers with commercial software (for example, CPLEX). Moreover, the adjustment term which depends on the combination of candidates instead of individual candidates cannot be included in this model. Therefore, we develop a neighborhood search heuristic that is able to yield a good solution efciently. Starting from the initial feasible solution, the heuristic improves the solution through iterations. Recall that each feasible solution contains a set of mutually compatible candidates, one for each ship. Each iteration generates a new feasible solution by slightly altering the current solution. If the new feasible solution is acceptable, it will replace the current solution. Otherwise, the new solution is abandoned. In either case the heuristic continues to the next iteration until terminating condition is met. The best feasible solution encountered in the entire process is used as the nal output. The details of the heuristic are explained below. To generate a new feasible solution based on the current solution, the heuristic randomly selects one ship and attempts to replace its candidate in the current solution with another candidate of the same ship, also chosen randomly. If the newly selected candidate is compatible with all other candidates in the current solution, a new feasible solution is found. Otherwise the heuristic tries again by selecting another candidate for up to 2000 times. In the rare case that no alternate feasible candidate can be found, the heuristic proceeds to the next iteration. Acceptance of the new feasible solution is determined according to a threshold accepting (Dueck and Scheuer, 1990) rule. In the process there is a threshold T which determines if a new feasi-

T = 20% of the utility of the initial solution Use initial solution as best known solution Randomly select a ship S Replace the candidate of S in the current solution with another candidate of S No Is solution feasible? Yes Accept this solution? No Yes Better than best known solution? No Yes

Failed 2000 times? Replace best known solution Yes

No Yes

No

No improvement for 500 iterations?

T = T*0.99 No

T < 1.0? Yes

Terminate neighborhood search


Fig. 4. Flow chart of the neighborhood search stage.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
6 Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx

ble solution should be accepted. If the utility of the new solution is better than that of the current solution, the new solution will be accepted. If the new solution is worse, but the difference between the two utilities of the two solutions is within T, the new solution is also accepted. Otherwise, it will be rejected. The threshold T decreases by 1% each time the best solution ever discovered is not improved for 500 consecutive iterations. The initial value of T is set to 20% of the utility of the initial solution, and the process terminates when T falls below 1.0. Fig. 4 shows a ow chart of this neighborhood search stage. Computational testing indicates that sometimes this one-at-atime replacement gets stuck in very deep local optimal areas. We illustrate this in the following example. Referring to Fig. 5, there are four ships in the system. Candidates C11 and C21 belong to ships 1 and 2, respectively. They are in-port ships and cannot be shifted. Ships 3 and 4 have two candidates each, and the priority of ship 4 is higher than that of ship 3. Candidates shown in solid lines are the ones chosen in the current feasible solution, and those shown in dashed lines are candidates that are not chosen. In the current solution, ship 3 is berthed earlier than ship 4. Because the priority of ship 3 is lower, this solution can be improved by assigning ship 3 the C32 candidate and ship 4 the C42 candidate, thus swapping the order in which ships 3 and 4 are berthed. However, since only one candidate is replaced at a time, doing so will require rst replacing C31 with C32 in the solution, then replacing C41 with C42. But the rst operation delays ship 3 by a large amount of time and the Threshold Accepting rule is likely to reject the resulting solution. To help the heuristic escape from deep local optimal areas like this one, we let the heuristic accept the rst feasible solution encountered regardless of its quality in 1% of the iterations. Computation testing results indicate that this slight modication can effectively eliminate the local optima effect described above. Since attraction

of local optima is a common issue for virtually all neighborhood search heuristics, similar approaches might be useful for other applications as well. The nal part of the solution process is a greedy improvement, which takes place after the neighborhood search is completed. There are two parts in the greedy improvement process. The rst part examines the ships one by one in descending order of priority, and tries to improve the solution by replacing its candidate in the current solution with another better candidate while maintaining feasibility and keeping all other candidates unchanged. The second part tries to move the candidates upfront in time one by one, also in descending order of ship priorities. These two parts are done alternatively for two rounds. 3. Computational results This section presents some computational experiences. The solution procedure is coded in the C++ programming language and executed on a personal computer equipped with a Pentium CPU running at 3.2 MGz speed. The memory size is 1 GB and the operation system is Microsoft Windows XP. In practice, ship company representatives strongly prefer to avoid ship shifting whenever possible, but once the decision is made that a ship should be shifted, the shifting distance does not really matter. Also, selection among the several preferred sections is much more important than the precise location of the ship within the assigned preferred section. Finally, in many cases they are willing to let their ships wait for a few hours in order to berth at a better preferred section. Based on these observations, we set the parameters as Wcho = 50, Wloc = 0.1, Wt = 10, Ws = 100, and Wd = 1.0 in all examples. For the ith arriving ship (ordered according to ETA), the priority index pi = 48i + 2(a 8) + 1 for i < 8, and pi = 2(a i) + 1 for i P 8, where a is the total number of arriving ships. The rst two examples demonstrate the basic ability of this model. In both examples ships A and B are in-port ships, separated by 300 m. Both ships are 200 m long, and both are not allowed to shift. Example 1 has only one arriving ship C. This ship has two preferred sections: 10001300 (higher priority) and 14001800 (lower priority). Because ship C is 250 m long, it needs a 300-m space and can t between ships A and B as shown in Fig. 6a. Example 2 has an additional ship D which arrives earlier than C does, and wishes to berth between A and B as well. In this case ship C is assigned to choice 2 instead. The solution is shown in Fig. 6b. Example 3 demonstrates the effect of ship shifting. The input data is similar to that of example 1, except ship C is 300 m long, and this ship has only one preferred section ranging from 900 to 1300. Shifting of ships A and B are allowed in this example. Due

Space C11 C41 C32 C21 Time


Fig. 5. Illustration of a deep local optimum solution.

C42 C31

Space 1800 1700 1600 1500 1400 1300 1200 1100 1000 900 800

Space 1800 1700 1600 1500 1400 1300 1200 1100 1000 900 800 Time (a) Solution of example 1

Ship C

Ship B Ship C

Ship B

Ship D Ship A Time (b) Solution of example 2

Ship A

Fig. 6. Solutions to examples 1 and 2.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx 7

Space 1500 1400 1300 1200 1100 1000 900 800 Ship B Ship C Waiting Time Time
Fig. 7. Solution to example 3.

60 50 40 30 20 10 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8

Ship A

to the clearance distance requirement, ship C cannot t into the 300-m spacing between the other two ships. As a result, ship A was shifted by 99.6 m in the nal solution. The solution is displayed in Fig. 7. CPU times taken to solve examples 1 to 3 are all less than 3 seconds. In the following examples we dene an index called coverage rate which is equal to the total requested timespace resource (expressed in m-hours) divided by the total available resource in the rst 24 hours of the planning horizon. For example, if the quay is 1000 m long, and in-port ships occupy 4000 m-hours, then the total available resource is 20,000 m-hours. If the total m-hours requested by arriving ships in the rst 24 hours is 15,000 m-hours, then the coverage rate is 0.75. Under this denition, the coverage rate quanties the crowdedness of the port. Obviously the coverage rate can exceed 1.00. In this case ships will have to wait long hours before being berthed. Example 4 shows the result of an instance whose scale is larger than that of a real problem in the port of Kaohsiung. In this example there are 140 ships in total, among them 115 are arriving ships. The quay length is 12,000 m. The coverage rate is 1.276, indicating the harbor is very busy. Fig. 8 shows the best solution found. The average waiting time for each arriving ship is 29.4 hours. The CPU time taken to solve this example is 141.1 seconds. The model developed in this paper can be used to obtain results that can be important to port authorities. As an example, Fig. 9 illustrates the relationship between the waiting time of arriving ships and the coverage rate. A total of more than 20,000 randomly but systematically generated problems are solved. As expected, average waiting time increases with coverage rate. Note that the waiting time is not zero even when the coverage rate is

Coverage Rate
Fig. 9. Waiting time versus coverage rate.

200 180 160 140

CPU time

120 100 80 60 40 20 0 0 50000 100000 150000 200000 250000

Number of Candidates
Fig. 10. Computation time versus number of candidates.

low, because even when the port is not busy, ships still have to wait if more than one ship competes for a few locations along the quay. Fig. 10 displays the performance of the algorithm. Because the total number of candidates can better represent the computation burden than the total number of ships, the Figure plots the total

Fig. 8. Solution to an example of 140 ships.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
8 Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx

number of candidates against the CPU time used. As expected, the problem took more time to solve when there are more candidates, but the growth rate appears to be less than linear. The following testing provides a guideline for how many candidates should be generated for each ship while solving. Based on data collected from the randomly generated examples presented above, Fig. 11 displays the relationship between the average number of candidates generated for each ship and the resulting average waiting time, which is related to the quality of the solutions. Fig. 11a shows the data for coverage rate greater or equal to 1.0, and Fig. 11b shows the data for coverage rate less than 1.0. Both gures show no obvious correlations between the two quantities. Although it is reasonable to conjecture that more candidates lead to better solutions (and thus shorter waiting times), these testing results indicate that letting each ship have 800 candidates on average is sufcient. Because these problems can be solved in less than 3 minutes, there is no need to investigate the solution quality for the case that each ship has fewer candidates. Finally, we provide more analysis with a smaller example that has 5 in-port ships and 20 arriving ships. The heuristic generated 25, 2609, and 6018 candidates with methods one to three, respectively. Without considering the adjustment term, the best solution found by the neighborhood search heuristic has an objective function value of 19922.04, which was further improved to 19861.55 by the greedy improvement process. The entire process took 6.063 seconds to complete. For comparison, the

corresponding binary integer program (2)(5) was also solved with CPLEX 9.0 in 94.45 seconds. The optimum objective function value is 19822.95, approximately 0.2% better than that of the heuristic.

4. Conclusion In this research we developed a model to solve the berth scheduling problem. This research was motivated by the operation in the port of Kaohsiung, and included a number of practical considerations not seen in previous papers. The problem is dynamic in nature, i.e., demands are known but ships do not all arrive at the beginning of the planning horizon. The berths are assigned in the continuous sense, in that the entire quay is viewed as a continuous space as opposed to discrete berths. At the same time, the ships have to be berthed within one of several preferred sections, which are independently dened by the agents of each ship. Ships are berthed on a rst-come-rst-served basis, but shifting the position of a ship to make space for another is also allowed. The required clearance distance between ships berthed side by side, which depends on the ship lengths as well as the berthing order, is also considered. The proposed solution process solves the problem in three stages. In the rst stage it generates a number of candidate berthing allocations for each ship. In the next stage it uses a neighborhood search heuristic to come up with a good combination of feasible candidates. Finally a greedy approach further improves the solution. Computational experiences indicate that a problem instance larger than the real-world scale can be solved in less than 3 minutes on a personal computer. The solution obtained is of very high quality and is very close to the optimal one, at least for smaller scale problems that can be veried. Moreover, the growth rate of CPU time with respect to problem size appears to be less than linear, indicating the potential to solve much larger problems. The result of this study forms the methodology core of a future automated berth scheduling system for Kaohsiung. Once the system accumulates sufcient historical data in the future, an important direction for further research will be how to extend the algorithm to serve as a decision support tool for improving port management policies as well as port facility upgrading. Acknowledgement This research is partially supported by the National Science Council funds 95-2221-E-006-433 and 93-2211-E-006-046. References
Brown, G., Cormican, K., Lawphongpanich, S., Widdis, D., 1997. Optimizing submarine berthing with a persistence incentive. Naval Research Logistics 44, 301318. Chen, C.-Y., Hsieh, T.-W., 1999. A timespace network model for the berth allocation problem. In: Conference on System Modelling and Optimization. Dueck, G., Scheuer, T., 1990. Threshold accepting: A general purpose optimization algorithm appearing superior to simulated annealing. Journal of Computational Physics 90, 161175. Guan, Y., Xiao, W.-Q., Cheung, R., Li, C.-L., 2002. A multiprocessor task scheduling model for berth allocation: Heuristic and worst-case analysis. Operations Research Letters 30, 343350. Imai, A., Nishimura, E., Papadimitriou, S., 2001. The dynamic berth allocation problem for a container port. Transportation Research B 35, 401417. Imai, A., Nishimura, E., Papadimitriou, S., 2003. Berth allocation with service priority. Transportation Research Part B 37, 437457. Imai, A., Sun, X., Nishimura, E., Papadimitriou, S., 2005. Berth allocation in a container port: Using a continuous location space approach. Transportation Research B 39, 199221. Kim, K., Moon, K., 2003. Berth scheduling by simulated annealing. Transportation Research B 37, 541560.

60 50

AverageWaiting Time

40 30 20 10 0 600

700

800

900

1000 1100 1200 1300 1400 1500 1600

Number of Candidates per Ship (a) Average waiting time versus number of candidates per ship, coverage rate >= 1
30 25

Average Waiting Time

20 15 10 5 0

600

700

800

900

1000 1100 1200 1300 1400 1500 1600

Number of Candidates per Ship (b) Average waiting time versus number of candidates per ship, coverage rate < 1
Fig. 11. Relationship between the number of candidates per ship and average waiting time.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

ARTICLE IN PRESS
Y. Lee, C.-Y. Chen / European Journal of Operational Research xxx (2008) xxxxxx Legato, P., Mazza, R., 2001. Berth planning and resources optimisation at a container terminal via discrete event simulation. European Journal of Operational Research 133, 537547. Li, C.-L., Cai, X., Lee, C.-Y., 1998. Scheduling with multiple-job-on-one-processor pattern. IIE Transactions 30, 433445. Lim, A., 1998. The berth planning problem. Operations Research Letters 22, 105 110. 9

Nishimura, E., Imai, A., Papadimitriou, S., 2001. Berth allocation planning in the public berth system by genetic algorithms. European Journal of Operational Research 131, 282292. Park, Y.-M., Kim, K.-H., 2003. A scheduling method for Berth and Quay cranes. OR Spectrum 25, 123.

Please cite this article in press as: Lee, Y., Chen, C.-Y., An optimization heuristic for the berth scheduling problem, European Journal of Operational Research (2008), doi:10.1016/j.ejor.2008.03.021

You might also like