Housekeeping: Foresightful container repositioning

Housekeeping: Foresightful container repositioning

Int. J. Production Economics 179 (2016) 203–211 Contents lists available at ScienceDirect Int. J. Production Economics journal homepage: www.elsevie...

951KB Sizes 1 Downloads 111 Views

Int. J. Production Economics 179 (2016) 203–211

Contents lists available at ScienceDirect

Int. J. Production Economics journal homepage: www.elsevier.com/locate/ijpe

Housekeeping: Foresightful container repositioning$ Anne Ehleiter n, Florian Jaehn University of Augsburg, Sustainable Operations and Logistics, Universitaetsstr. 16, D-86159 Augsburg, Germany

art ic l e i nf o

a b s t r a c t

Article history: Received 9 January 2015 Received in revised form 1 February 2016 Accepted 7 June 2016 Available online 10 June 2016

This paper deals with crane scheduling in a block of a container terminal equipped with twin cranes when repositioning moves turn out necessary. While one crane is working on a given schedule we aim to anticipate as many repositioning jobs as possible using the second crane without disturbing the first crane. In seaport operations, this situation is commonly called housekeeping. We formulate this problem as a MIP and show that it is strongly 57 -hard. Further, we provide an exact procedure based on dynamic programming and a Greedy heuristic procedure to solve it. A comparison of both algorithms with CPLEX concludes this paper. & 2016 Elsevier B.V. All rights reserved.

Keywords: Container terminal Seaport storage area Twin cranes

1. Introduction Using containers makes the transshipment of cargo fast and cost-efficient at the same time. For this reason the container flow has been increasing over the past years (e.g. see Chatman et al., 2013, pp. 22–25). Especially at seaports, where a great flow of containers is coming in and going out, a well thought-out storage system is essential. Here we presume a storage system mainly characterized by a high degree of automation. The stacking area in these ports often has a layout like the HHLA Container Terminal Altenwerder in Fig. 1. As Fig. 2 shows, the containers arrive at one side of the terminal either by train, by truck or by vessel. Then, they are unloaded by a crane and put on automated guided vehicles (AGVs), which take the containers to the stacking area. This area is made up of separate blocks each consisting of many rows of stacks. Each stack can be several containers high. The blocks are arranged perpendicular to the quay as in Fig. 1. Here the containers are stored until they are loaded to an AGV again and taken to either side of the terminal for further transport. There are several means for transporting the containers like straddle carriers or quay cranes, which are for example described by Steenken et al. (2004) and Stahlbock and Voß (2008). Here we assume that each block is assigned one or more automated stacking cranes (ASCs), which take the container from the AGVs and handle the container transport within the block. Although ☆ This work has been supported by the German Science Foundation (DFG) through the grant “Scheduling mechanisms for rail mounted gantries with respect to crane interdependencies” (JA 2311/2-1). n Corresponding author. E-mail addresses: [email protected] (A. Ehleiter), fl[email protected] (F. Jaehn).

http://dx.doi.org/10.1016/j.ijpe.2016.06.009 0925-5273/& 2016 Elsevier B.V. All rights reserved.

ASCs are currently only used in few (mostly European) container terminals, there has been some research on this topic, lately, as described in the survey paper by Carlo et al. (2014). Considering the scheduling problem for single stacking cranes, several methods have already been developed by Kim and Kim (1999), Kim et al. (2003), Lee et al. (2007), Narasimhan and Palekar (2002), and Ng and Mak (2005a,b). When working on the scheduling of multi-gantry cranes it is important to consider interference. The first approaches on this topic mostly simplify interferences, for example by setting up movement ranges for the gantries. This method is also used in Froyland et al. (2008) and Saanen and van Valkengoed (2006), and the solution procedure in Ng (2005). Restricted areas for each crane might make sense if the handover area is on the long side of the block, but seem to restrict opportunities if it is on the short side as in Fig. 2. Another technique used quite often in this context is mixed integer programming as in Ng (2005), Li et al. (2009), Park et al. (2010), Vis and Carlo (2010) for instance. Dorndorf and Schneider (2010) discuss a scheduling algorithm for triple cross-over stacking cranes. They explicitly pay attention to crane interference by using a heuristic to decide on priority in cases of conflicts. Then a branch and bound algorithm is used. The subproblem of deciding priority is also considered in Briskorn et al. (2016) for two crane settings – either twin cranes or crossover cranes. Another heuristic approach is introduced by Wu et al. (2015). So far these three papers are to the best of our knowledge the only ones that take crane interferences and waiting times into account and still provide exact solutions. Nevertheless, according to Speer et al. (2011) interference times add a good share to cranes' driving times. Another quite time consuming task are repositioning activities. They are necessary or reasonable whenever a container is to be taken to the handover area but it is not on top of its stack or it

204

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

Fig. 1. Layout of the HHLA Container Terminal Altenwerder, taken from HHLA (2014).

Fig. 2. Process flow at HHLA Container Terminal Altenwerder, taken from HHLA (2014).

cannot be reached by the responsible crane, yet. Pure repositioning is for example considered in Kim and Hong (2006), where the authors determine new storage positions for containers, which have to be repositioned. For the repositioning problem with a single crane see also Lee and Hsu (2007), Lee and Chao (2009) and, more recently, Hakan Akyüz and Lee (2014). We have a quite different situation if the schedule for one of the cranes has already been developed on another stage of planning. This crane could for example be occupied with taking outbound containers to its handover area. As the second crane cannot directly take part in this process it can be used for housekeeping, i.e. for repositioning activities, which are not necessary right now, but which speed up processes at a later point in time. We assume that there are no additional storage or retrieval requests at the second crane's handover area within our planning horizon. Basically, any one of the two cranes can be the one with

the fixed schedule. If there is no vessel to be served by the seaside crane at the moment, but the landside crane is working on a fixed schedule for loading or unloading a train for example, then the seaside crane has time to do repositioning in order to save time during an upcoming high seaside workload caused by a newly arrived vessel. As there are no containers arriving from the seaside, if there is no vessel berthed, the seaside crane can fully concentrate on housekeeping moves. If the seaside crane is serving a vessel and the landside crane is idle, the workload is split reversely. As we only consider a single block for a fixed time window, any storage request could easily be assigned to a different block, while retrieval requests would be handled before or after the specific time window, so this is not a strong limitation. Of course we have to make sure that the unloading crane is

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

never disturbed, because loading and unloading is usually of higher priority than repositioning. In the meantime we try to anticipate as many repositionings as possible by the second crane in order to save time by making the relevant containers available in advance. In the following sections we will concentrate on this specific problem called container repositioning problem (CRP). First, it is described in detail and by a mathematical model in Section 2. Then we have a look at the problem's complexity in Section 3. In the next section we propose an exact two-step algorithm based on dynamic programming and a Greedy heuristic for solving the CRP. In Section 5 these procedures are compared to solving the problem with CPLEX. Finally, Section 6 concludes and gives an outlook on which future research could be interesting.

2. Problem description From now on we regard a single block in the stacking yard. Its handover areas are on the short side of the line of stacks, i.e. in Fig. 2 the AGV handover area is on the seaside of the block, and the truck handover area is on the landside of the block, close to the rail terminal. Accordingly, we call the side along which the cranes' tracks run, the long side. Further, the storage block is equipped with a pair of identical automated stacking cranes, which cannot pass each other and which have to keep a certain safety distance of d slots to each other. For defining our container repositioning problem (CRP) we assume that the stacks of containers are arranged in a single line. In reality there are usually several rows per bay. Here we neglect this fact due to the following reasons: the cranes can move at the same time, as they move their trolleys, and the access points of each block are at the short side of the block. Consequently, in most of the cases, the crane itself takes much longer to move to the desired bay than it takes for the trolley to move to the desired row. Thus, in our program we simply consider a set of slots, which represent the different bays. Without loss of generality, we assume that the slots are increasingly numbered from 1 to S, lower numbers being on the side crane 1 works on. If this was not the case, renumbering of the slots could be applied without loss of information. Further, we assume that we already know the schedule of one of the two cranes, here referred to as crane 1, and therefore its position xt ∈ {1, … , S − 1} at any point of time t. For the other crane, here called crane 2 accordingly, we only know its position y0 ≥ x0 + d at the beginning of the planning horizon. As we know the schedule of crane 1 we also know the starting time, here set to t ¼0, as well as its completion time T. Consequently, there is a specific time window in which we operate. For our model we define the time a crane needs to move from one slot to an adjacent one as one time unit, similar to the approach used by Briskorn et al. (2016). In practice, the cranes do not have a constant speed as they need some time for acceleration and slow down. But this time is quite short and can therefore be included in the time necessary for container pick up or set down. Further, we assume that the time a crane needs to pick up or set down any container is a multiple p of one time unit, as it is described in Boysen et al. (2016) and includes the additional time caused by crane acceleration or slow down. Within the given time horizon T we aim at completing as many jobs out of a set R of n equally important reshuffles as possible using the so far idle crane 2. Each job r ∈ R is characterized by two values. The first value is the job's original slot or and the second value its destination slot dr. That means that in order to execute job r we have to go to slot or, pick up the top container in one of the rows, carry it to slot dr and set it down there. This transport

205

has to be done without preemption, which means whichever container is picked up by crane 2 in its original position has to be set down at its destination without being set down at anywhere meanwhile. Consequently, there may never be more than one job started at any point of time. It is possible that two jobs q and r not only have the same original slot j = oq = or but are also positioned in the same row within this slot. Then it is important to know which of the two jobs refers to the container on top and therefore has to be executed first. For this reason we introduce the precedence parameter precq, r , which ensures that these orders can be considered correctly. Now, if job q shall be executed prior to job r we simply set precq, r = 1. If in another case precq′, r′ = 0 then we know that r′ can be started even if q′ has not been completed, yet. Obviously, there are more situations in which precedence constraints make sense. In general we can model all relevant precedence constraints by this parameter precq, r ∈ {0, 1}. In order to characterize our solutions we further introduce two binary decision variables. The first one called sr , t is set to 1 if job r is started in t. The second one called cr , t is set to 1 if job r has already been completed in t. Additionally, there is a third decision variable, which describes the position of crane 2 at any point of time t = 1, … , T . We call this variable yt, according to the initial position of crane 2 y0 mentioned above. So far several implicit and explicit assumptions have been made, which are summarized below:

 We have a given planning horizon T.  We know the prioritized crane's schedule, and especially the        

position xt of crane 1 at every point of time t = 0, … , T . We know the initial position y0 of crane 2 and y0 ≥ x0 + d . Crane 2 cannot pass or hinder crane 1 at any point of time. Crane 2 has to keep a safety distance of at least d slots to crane 1. We have a single line of container slots. Crane 2 can move at most one slot per time unit with or without carrying a container. All repositioning jobs are known in t ¼0 and all relevant containers are available in t¼0. No preemption is allowed, which means whichever job has been started has to be completed before another one can be started. There are no cycles in the precedence constraints (e.g. preca, b = precb, c = precc, a = 1 is not allowed).

The following mathematical model describes the CRP using the notation in Table 1. It consists of the objective function (1) and restrictions (2)–(14). Note that not all restrictions are presented in linear form to keep the model short, but they can easily be linearized. Maximize

∑ cr, T

(1)

r∈R

subject to

xt + d ≤ yt ≤ S

∀ t = 1, …, T

yt − 1 − 1 ≤ yt ≤ yt − 1 + 1

∀ t = 1, …, T

∑ cr, t ≤ ∑ ∑ sr, τ ≤ ∑ cr, t + 1 r∈R

r∈ R τ≤ t

cr, t ≤ cr, t + 1

(2)

∀ t = 1, …, T

r∈R

∀ r ∈ R, ∀ t = 0, …, T − 1

precq, r − cq, t + sr, t ≤ 1

(3)

∀ q ≠ r ∈ R, ∀ t = 1, …, T

(4)

(5) (6)

206

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

Table 1 Notation: parameters and variables. S

T xt y0 d p M

Number of slots (enumerated increasingly from the side crane 1 works on) Set of repositioning jobs; R = {1, …, n} Original slot of repositioning job r ∈ R Destination slot of repositioning job r ∈ R Binary parameter: 1 if q has to be completed before r can be started and 0 otherwise Planning horizon ( t = 0, …, T ) Position of crane 1 at time t Initial position of crane 2 Minimum safety distance between the two cranes Number of time units needed to pick up or set down a container Big integer

yt sr , t cr , t

Position of crane 2 at time t = 1, …, T Binary variables: 1, if r is started at time t Binary variables: 1, if r has already been completed at time t

R or dr precq, r

∑ r ′∈ R, r ≠ r ′

⎛ t−1 ⎞ ⎜ ∑ sr ′, t ′ ⎟ − cr ′, t ≤ M × (1 − sr, t ) ⎜ ⎟ ⎝ t ′= 1 ⎠

∀ r ∈ R,

∀ t = 0, …, T − p

(7)

t+p

∑ |yτ

− or | ≤ M × (1 − sr, t )

∀ r ∈ R, ∀ t = 0, …, T − p

τ= t

∑ cr ′, t − ∑ cr ′, t + p ≤ M × (1 − sr, t ) r ′∈ R

3. Complexity

(8)

∀ r ∈ R,

r ′∈ R

∀ t = 0, …, T − p cr, t = 0

(9)

∀ r ∈ R, ∀ t = 0, …, 2p − 1

(10)

t − 2p

1−



sr, t ′ ≤ M × (1 + cr, t − 1 − cr, t )

∀ r ∈ R , ∀ t = 2p , … , T

t ′= 0

(11)

t



|yτ − dr | ≤ M × (1 + cr, t − 1 − cr, t )

∀ r ∈ R,

τ= t − p

∀ t = 2p , … , T

number of the completed ones. Eq. (8) forces crane 2 to stay in slot or for the next p time units for picking up the container there. By (9) we make it impossible to pick up one container while setting down another. Therefore, the amount of completed jobs when picking up is started is compared to the amount of completed jobs when picking up is finished. So job r may actually be started in t if the following three conditions are satisfied: no other job is being executed in t, crane 2 stays in slot or for p time units and no other job is being completed within these p time units. Restrictions (10)–(12) aim at the appropriate setting of the completion variables cr , t . In (10) all initial variables are set to 0 meaning that no job is completed at the beginning of our planning period. Otherwise we would not even have to consider this particular job. The first possible point of time for completing a job is in t = 2p , as 2p time units are necessary for picking up and setting down one container, even if no transporting at all is done. Inequalities (11) make sure that job r can only get completed after having been started at least 2p time units earlier and (12) requires crane 2 to be in the right position for setting down its container in dr for the last p time units. Finally, constraints (13) and (14) make the decision variables sr , t and cr , t binary.

(12)

cr, t ∈ {0, 1}

∀ r ∈ R, ∀ t = 1, …, T

(13)

sr, t ∈ {0, 1}

∀ r ∈ R, ∀ t = 0, …, T

(14)

Objective function (1) maximizes the number of repositioning jobs, which are completed at the end of the planning horizon. Inequalities (2) and (3) monitor the position of crane 2. Eq. (2) makes sure crane 2 cannot cross or hinder crane 1, as it may not get any closer than d slots from crane 1, and cannot move out of the given line of slots, while (3) restricts the movement of crane 2 to one slot per time unit. Inequalities (4)–(9) mainly concern the correctness of the variables sr , t . Eqs. (4) and (5) ensure that there is at most one job started at any point of time. Therefore, (5) does not allow setting a job once completed back to not completed and according to (4) there has been at most one more job started than completed. Constraints (6) meanwhile guarantee that a job can only be started if all preceding jobs (according to the precedence constraints) have been completed. Thus, the precedence constraints are properly respected. Inequalities (7)–(9) are important for several facts. Eq. (7) makes sure that no other job r′ is being executed when starting job r by checking whether the number of started jobs equals the

In this section we want to have a close look at the complexity of the CRP. Note that the ideas of the proof to come are based on the proof of Theorem 2 by Boysen et al. (2015). Theorem 1. CRP is strongly 57 -hard. Proof. For proving the NP-hardness of CRP, we consider the decision version of it asking whether or not there is a solution, which completes a given number of jobs. In the following we will use the reduction of 3-PARTITION to CRP knowing that 3-PARTITION is strongly 57 -hard (Garey and Johnson, 1979). For this reason we restate the problem. 3m 3-PARTITION: Given 3m integers a1, … , a3m with ∑i = 1 ai = mB B B and 4 < ai < 2 ∀ i = 1, … , 3m . Does a partition of set {1, … , 3m} into m subsets A1, … , Am such that ∑i ∈ A ai = B ∀ l = 1, … , m exist? l Here we use a special case of 3-PARTITION where B is even. By multiplying each number by 2 we can reduce the original 3-PARTITION problem to this special case and thereby show that it is strongly 57 -hard itself. Given an instance 0 of 3-PARTITION where B is even we will construct an instance 0′ of CRP as follows:

S=B+2 n = 3m o r = B + 2 − ar dr = B + 2

∀ r = 1, …, 3m

∀r∈R

T = 2mB xt : crane 1 constantly moves back and forth between slot B + 1 and slot 1; that means x0 = B + 1, xB ¼1, x2B = B + 1, x3B = 1, …, x(2m − 1) B = 1, x2mB = B + 1

y0 = B + 2 d=1 p=0 precq, r = 0

∀ q, r ∈ R

We now need to show that 0 is a YES-Instance if and only if all 3m jobs in 0′ can be completed within the planning horizon T = 2mB .

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

207

approach is used. In the second step we set the decision variables yt , sr , t and cr , t , according to the sequence found in step one. Dividing a complex problem into several smaller problems called stages is characteristic of dynamic programming. Here the division criterion is the number of completed jobs. Each stage i contains several states, which are characterized by the set of jobs J that are executed, the position of crane 2 after completing those jobs denoted by y and the earliest point of time z when the last job can be completed. Thus, each state can be described by a triple (J , y, z ), where |J | corresponds to the stage this state belongs to. The first stage is stage 0, which contains only a single state (J , y, z ) = (∅ , y0 , 0). From this initial state we generate the states on stage 1. There are at most n different states as there are still n jobs that have not been completed, yet. From all these jobs we only consider those, which do not have any precedence constraints at all. Then we determine the earliest point of time z˜ when each of these jobs j could be completed. This time is made up of several components:

 The current time z.  The time crane 2 needs to move to slot oj plus possibly addiFig. 3. Schematic schedule structure.

We can easily conclude from the positions of crane 1 that the position of crane 2 is fixed on slot B + 2 any time crane 1 gets as far as to slot B + 1. For that reason we know yt = B + 2 for t = 2Bk where k = 0, … , m. That means as in Fig. 3 the schedule of crane 1 divides the given time horizon into m time windows of a length of 2B time units each. At the beginning and at the end of each time window crane 2 has to be positioned in slot B + 2. Further, we know that crane 2 cannot have any waiting times in-between its jobs if all of them are to be completed because of the length of the given time horizon. As crane 2 starts in slot B + 2 and is in that slot again after completing any job we have a closer look at how long it takes from being positioned in slot B + 2 to complete one job. In order to get to slot or = B + 2 − ar to pick up the top container there, crane 2 needs at least ar time units. Then it spends another ar time units to take the container to its destination slot dr = B + 2. Thus, crane 2 needs at least 2ar time units for executing any job r ∈ {1, … , 3m}. As all time windows have a length of 2B time units each, crane 2 has to complete a set of three jobs in-between any two consecutive stops of crane 1 in slot B + 1 in order to succeed in completing all jobs. This partition of jobs 1, … , 3m into subsets of three constitutes a YES-certificate of 0 . Vice versa, it is easy to see that a YES-certificate for 0 implies a schedule for 0′. This schedule has the structure characterized above as well as shown in Fig. 3 and completes all 3m jobs. □

4. Solution algorithms In this section we introduce two algorithms for solving the CRP as it is described in (1)–(14). One is an exact method based on dynamic programming, while the other one is of the so-called Greedy heuristic type. 4.1. Dynamic programming We begin with an exact two step algorithm, which first determines an optimal sequence of jobs that can be executed within the given time horizon. For this step a dynamic programming

  

tional waiting or detour time if it cannot pick up the container there right away because of being disturbed by crane 1. p time units for picking up the relevant container. The time crane 2 needs to move to slot dj plus possibly additional waiting or detour time if it cannot set down the container there right away because of being disturbed by crane 1. Another p time units for setting down the relevant container.

If this completion time z˜ is still within our planning horizon T we create a new state ({j}, dj , z˜ ), which is placed on stage 1. For each new state we also note the state which it was determined from. We call this a state's predecessor. Clearly the predecessor of all states on stage 1 is the initial state (∅ , y0 , 0). With the information of the predecessor we can easily find an optimal sequence of jobs later. After determining all states on one stage we do the same for the next stages. That means that for each state (J , y, z ) of stage i we calculate all feasible states on stage i + 1 by first determining all jobs a that are available after all jobs out of J have already been completed. Then we calculate for each available job the earliest completion time z˜ . If this completion time z˜ is within the planning horizon we add state (J ∪ a, da, z˜ ) to the next stage i + 1. Before moving on to the next stage we check whether there are two or more states on the current stage with the same set of completed jobs J and the same position y of crane 2. If that is the case we delete all of these states except for one with minimum z. We stop if there are no more states to be calculated and pick one of the states on the highest stage k as an optimal solution (J⁎ , y⁎ , z⁎). Then we determine the sequence of jobs that corresponds to this optimal solution. In the second phase of the algorithm we determine the decision variables yt , sr , t and cr , t according to the optimal sequence of jobs. Algorithm 1. Dynamic programming. 1. Initialization set stage 0 ¼ {(∅ , y0 , 0)} and stage 1 ¼∅; set current stage¼ stage 0 and next stage¼stage 1; 2. Determine optimal states foreach state ( J , y, z ) on the current stage do determine the set A of available jobs; foreach job a ∈ A do find the earliest possible completion time z˜ of a considering the current state; if ( z˜ ≤ T ) then add state ({J ∪ a}, da, z˜ ) to the next stage and note (J , y, z ) as its predecessor;

208

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

and executing job a; Set ca, τ = 1 for τ = z, … , T , remove a from A and add a to C; Update A: set A = A⧹{a} ∪ {r ∈ R⧹{C ∪ A} | precq, r = 0 ∀ q ∉ C};

look for states on the next stage with identical (J,y) and delete all of these states but the one with minimum z; if (next stage¼ ∅) then set current stage¼next stage, set next stage¼∅ and go to step 2; else pick a state in the current stage as optimal state (J⁎ , y⁎ , z⁎), determine an optimal sequence that leads to (J⁎ , y⁎ , z⁎) by using the predecessor and set the decision variables yt , sr , t and cr , t accordingly;

Set t ¼z and go to step 2;

5. Computational study To be able to deal with bigger instances, we also use a heuristic variant of the Dynamic programming, which is called Beam Search. Here we do not consider all states of a stage, but only a limited number. We call the maximum number of states per stage the beamwidth bw. If there are more than bw states on a stage, we only consider the bw states with the smallest value for z. Ties are broken arbitrarily.

In order to get an impression of the heuristics' performance and to find out up to which size instances could be satisfyingly solved by an exact procedure, we did some tests on a PC with an Intel Core i7-4610M 3.0 GHz CPU and 16 GB of RAM. We implemented all procedures in Java and the model defined in (1)–(14) in ILOG using CPLEX 12.6. 5.1. Instance generation

4.2. Greedy heuristic Knowing that CRP is 57 -hard we also know that it will probably not be possible to solve instances of realistic size by an exact procedure in acceptable time. For this reason it is appropriate to use a heuristic, which will not necessarily find an optimal solution, but at least a reasonable one in acceptable time. Here we introduce a so-called Greedy heuristic. Applying the procedure described below, we first determine the set of jobs A which are available at the beginning of the planning horizon. Job r is called available now if there is no other job q which has to be completed first but has not been completed so far. Further, we have a set C, which will later contain all jobs that have already been completed. Throughout the algorithm we keep these two sets updated. Before looking for the next job to be executed we check whether there is any job available at all and whether we are still within the given time limit T. In order to pick the next job we calculate the earliest completion time possible for each available job a like in the dynamic approach. As one can easily conclude from the name, the heuristic is greedy and picks job a ∈ A with minimal completion time to execute it next. Having come to this decision, there are some more decision variables to be determined. Of course we need to set the position of crane 2 for the time by which job a is completed, as well as sa, t has to be set to 1 for t being the point of time when job a has really been started. And finally, when completing a we have to set ca, t = 1 for all t beginning at the completion time and update the sets A and C. After having completed a job and having set all corresponding decision variables, we start all over by checking the stop criterion and picking the next job. Algorithm 2. Greedy. 1. Initialization Set cr , t = sr , t = 0 ∀ r ∈ R, ∀ t = 0, … , T ; Set A = {r ∈ R | precq, r = 0 ∀ q ∈ R} (available jobs); Set C = ∅ (completed jobs); Set t ¼0; 2. Stop criterion If t > T or no job available, then stop; 3. Next job Determine job a ∈ A which has the earliest completion time z; If z ≤ T then Set decision variables yτ , sa, τ for τ = t + 1, … , z for starting

We tested our algorithms on several different scenarios where each scenario is basically characterized by the four parameters T, p, n and μ. Each parameter takes a few different values, as it is shown in Table 2. According to Saanen and van Valkengoed (2006) a block is usually about S¼ 40 slots for twenty foot equivalent units (TEU) sized containers long. We assume that the crane goes the same speed independent of being loaded or not and suppose an average speed of about 3 m/s as proposed in Boysen et al. (2016). Therefore, the crane needs about 2 s to pass one slot of 20 foot length, which means one time unit in our model is equivalent to roundly 2 s in real time. The average time to pick up or set down a container is about 40 s (p ¼20) according to Boysen et al. (2016) and 20 s (p ¼10) according to Saanen and van Valkengoed (2006). Further, we set the safety distance d ¼4 slots corresponding to the safety distance of 25 m proposed by Dorndorf and Schneider (2010). Especially for the exact procedures it is necessary to start with a fairly short planning horizon, which is why we chose to set T = 100, 300, 700. Of course it is also important to vary the number of jobs that are provided, which we did by using n ¼10, 25 and 50. We assume that the jobs' original and destination slots are uniformly distributed among slots 1–40. As not all of these jobs are necessarily available from the beginning due to precedence constraints, we also set three different intensities for this factor we call μ. When μ is low we expect that 0% of the jobs have to mind precedence constraints, while μ being middle means we expect that 30% of all jobs have to mind precedence and μ being high assumes a precedence probability of 60%, respectively. By combining the three characteristics T, n and μ we get a set of 33 = 27 scenarios. For each scenario 20 instances were generated and saved in a project named CRP2015 with the instance generator described in Briskorn et al. (2016). Thus, all instances are publicly available on http://www.instances.de/dfg using project name CRP2015. Still there are some more parameters to be set, which are the Table 2 Parameters for instance generation. Symbol

Description

Values

T p n μ

Planning horizon Time to pick up/set down a container Number of jobs Intensity of precedence constraints

100, 300, 700 10, 20 10, 25, 50 low, middle, high

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

position of crane 1 at any time and the initial position of crane 2. For each instance two schedules x for crane 1 are created, one with p ¼10 and another one with p ¼20. Crane 1 always starts in slot 1 and then moves to a randomly chosen slot to stay there for p time units. Afterwards it moves back to slot 1 to stay there for another p time units and so on. For crane 2 we only need to determine its initial slot, which is chosen randomly from [x0 + d, … , S ]. So all in all we have a set of 27*2*20 = 1080 instances for testing our solution algorithms. 5.2. Results Overall we solved all 1080 instances using the Greedy heuristic. 708 of them could also be solved exactly using the dynamic approach and 346 were solved by CPLEX. For computing the exact solutions we set a time limit of five minutes per instance where T ¼100 and 10 min per instance where T > 100. For those instances, which could not be solved exactly, we applied the Beam Search heuristic with a beamwidth of 15,000 for T ¼300 and beamwidth of 8000 for T¼ 700. In the following we compare the solutions with respect to their objective function's value and their computing time. Obviously, as both are exact procedures, the objective values found by CPLEX and by the dynamic approach are the same, if the procedures terminate within the time limit. Still one can easily see that CPLEX is a lot more time consuming than the dynamic approach. As a measure of quality for a procedure we use the so-called relative gap, which is defined as

relative gap (procedure)≔ ∑ (objective valuesbest procedure ) − ∑ (objective valuesprocedure ) ∑ (objective valuesbest procedure ) where we call the procedure with maximum sum of objective values the best procedure. For the smallest setting where n ¼10 and T¼ 100 all 120 instances could be solved exactly. As we can see in the first part of Table 3, CPLEX already needs more than 45 s on average to solve those small instances for p ¼10. Three of the instances where n ¼10, T ¼100, p ¼10 and μ = low could not be solved by CPLEX within the five minutes time limit. In contrast the other two procedures work very fast. Further, only seven out of 120 instances' Greedy solutions were not optimal ones as well. Regarding the different settings of μ no significant difference could be observed. Out of the remaining 240 instances with few jobs (n ¼ 10) in Table 3, only 77 were optimally solved by CPLEX within the ten minutes time limit. For those instances, which could not be optimally solved, CPLEX returned the best solution found within the time limit, is reflected by the big relative gap of up to 55%. When comparing the Greedy heuristic and the Dynamic procedure, we find that both run in practically no time and that the heuristic solutions' quality is quite good, as the relative gap is far below 10% for all scenarios with few jobs. The biggest gap appears in the setting where T ¼300 and p ¼ 10, where using the crane schedule of the exact solution on average completes 0.4 jobs more than in the heuristic solution. In Table 4 we regard the setting with some more repositioning jobs, i.e. n ¼25. Here, the exact procedures can only properly solve instances with a short planning horizon of T¼ 100 within the timelimit. The dynamic programming approach returns an exact solution for all 120 instances, whereas CPLEX is stopped in 30 cases, which all have p ¼10. Compared to the exact results the heuristic schedules do very well in this setting as only 6 out of 120 greedy heuristic solutions were not optimal ones as well.

209

Table 3 Small instances: n¼10. Procedure p

T

Objective sum

Avg completed Rel. Gap jobs (%)

Avg CPU sec/ instance

CPLEX Dynamic Greedy

10 10 10

100 100 100

131 131 127

2.2 2.2 2.1

0.0 0.0 3.1

47.33 0.00 0.00

CPLEX Dynamic Greedy

20 100 20 100 20 100

71 71 68

1.2 1.2 1.1

0.0 0.0 4.2

4.33 0.00 0.00

CPLEX Dynamic Greedy

10 10 10

300 281 300 356 300 327

4.7 5.9 5.5

21.1 0.0 8.1

511.33 0.00 0.00

CPLEX Dynamic Greedy CPLEX Dynamic Greedy

20 20 20 10 10 10

300 300 300 700 700 700

209 228 218 206 457 455

3.5 3.8 3.6 3.4 7.6 7.6

8.3 0.0 4.4 54.9 0.0 0.4

440.00 0.00 0.00 561.00 0.67 0.00

CPLEX Dynamic Greedy

20 700 213 20 700 237 20 700 324

3.6 5.6 5.4

36.8 0.0 3.9

521.67 0.00 0.00

Table 4 Middle instances: n¼ 25. Procedure

p

T

Objective sum Avg completed jobs

Rel. Gap (%)

Avg CPU sec/instance

CPLEX Dynamic Greedy

10 10 10

100 100 100

150 163 159

2.5 2.7 2.7

8.0 0.0 2.5

203 0 0

CPLEX Dynamic Greedy

20 100 20 100 20 100

83 83 81

1.4 1.4 1.4

0.0 0.0 2.5

26 0 0

300 463 300 500 300 463

7.7 8.3 7.7

7.4 0.0 7.4

151 36 0

Dynamic 20 300 297 Beam Search 20 300 297 Greedy 20 300 280

5.0 5.0 4.7

0.0 0.0 5.7

21 3 0

Dynamic 10 Beam Search 10 Greedy 10

700 541 700 956 700 886

9.0 15.9 14.8

43.4 0.0 7.3

579 109 0

Dynamic 20 700 528 Beam Search 20 700 644 Greedy 20 700 594

8.8 10.7 9.9

18.0 0.0 7.8

536 34 0

Dynamic 10 Beam Search 10 Greedy 10

For a longer planning horizon CPLEX could not solve any instance and the dynamic procedure also had to be stopped for ten instances with T¼ 300 and for all instances with T ¼700. For this reason we compare the Greedy results with those of a Beam Search (with beamwidth bw¼15,000 for T ¼300 and bw ¼8000 for T¼ 700) and the best result found by the possibly stopped dynamic procedure. We conclude that the Beam Search on average found the best schedules, but needed more time than the Greedy heuristic. The greatest deviation between the Greedy and the Beam Search results appears in the setting of T¼ 700 and p ¼10, where the Beam Search solution on average completes 1.1 jobs more than the Greedy solution. But this is also the setting for which the Beam Search already needs close to two minutes of average runtime, whereas the Greedy heuristic terminates in far less than a second. Here for the first time, we see an effect of the intensity of precedence constraints. Both, Dynamic and Beam Search, are considerably sped up with an increasing μ. More precisely, all ten instances, for which the dynamic procedure had to be stopped,

210

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

Table 5 Big instances: n¼50. Rel. Gap (%)

Avg CPU sec/instance

2.1 3.0 3.0

30.1 0.0 1.1

283 0 0

93 94 93 579 547

1.6 1.6 1.6 9.7 9.1

1.1 0.0 1.1 0.0 5.5

100 0 0 34 0

328 319 1194 1126

5.5 5.3 19.9 18.8

0.0 2.7 0.0 5.7

9 0 70 0

12.3 11.8

0.0 4.1

149 0

Procedure

p

T

Objective sum Avg completed jobs

CPLEX Dynamic Greedy

10 10 10

100 126 100 182 100 180

CPLEX Dynamic Greedy Beam Search Greedy

20 20 20 10 10

100 100 100 300 300

Beam Search Greedy Beam Search Greedy

20 20 10 10

300 300 700 700

Beam Search 20 700 740 Greedy 20 700 710

had hardly any precedence constraints as μ was low. The instances with the most repositioning jobs, i.e. n¼ 50, are considered in Table 5. Both exact procedures could only solve instances for the short planning horizon of T ¼100 and are therefore not included in the table for T > 100. For the short planning horizon the dynamic procedure could solve all instances, whereas CPLEX was stopped in 58 out of 120 cases, which again shows in the high relative gap especially for a short pickup time of p ¼10. In contrast, the Greedy heuristic did really well in both settings for n ¼50 and T ¼100 and missed the optimal solution only in three cases. For the longer planning horizons we compare the results we get from applying the two heuristics Beam Search and Greedy. With an increasing value of T the runtime of the Beam Search also increases up to 2.5 min, whereas the Greedy heuristic still needs less than one second. Considering the objective value, we get better results using the Beam Search heuristic. But nevertheless, the relative gap of the Greedy heuristic with less than 6% is very low. All in all, we can conclude that the exact procedures are only suitable for small instances with few jobs and a short planning horizon. When it comes to bigger instances especially with a longer planning horizon, both suggested heuristic approaches seem adequate. The Greedy heuristic solved even the biggest instances in practically no time and returned schedules, which on average completed at most 1.1 jobs less than the best schedule found. In contrast, the Beam Search's schedules completed more jobs, but also needed a lot longer to terminate. The only effect caused by the varying intensity of precedence constraints μ was the decrease of runtime with increasing intensity of precedence constraints. For this reason, we suggest to use an exact approach or Beam Search for problems with many precedence relations and the Greed heuristic for problems with few or no precedence relations or if the result is needed instantly.

6. Conclusion This paper deals with the container repositioning problem. One of a pair of twin cranes works on a given schedule on a block in the container terminal. The second crane aims to complete as many repositioning jobs in the meantime as possible without disturbing the other crane. We formulated this problem as a mathematical model and showed it to be strongly 57 -hard. Further, we introduced an exact

procedure, a heuristic based on a dynamic programming approach and a Greedy heuristic for solving the problem. Subsequently we tested these procedures along with a CPLEX solver using a set of testing scenarios. We found that the computing time mainly depends on the length of the planning horizon T, the time to pick up or set down a container p and the number n of repositioning jobs provided. While CPLEX could only solve the smaller instances with T¼ 100 and p ¼20 and some of the bigger instances within a time limit of five minutes or ten minutes, respectively, the dynamic approach solved all instances with a short planning horizon of T¼ 100 in less than one second. For T ¼300 at least 230 out of 360 instances could be solved within the time limit of ten minutes as well as all instances with T¼ 700 and n ¼ 10. Unfortunately none of the biggest instances where T ¼700 and n = 25, 50 could be exactly solved within ten minutes. In order to deal with the bigger instances, we used a Beam Search with bw¼ 15,000 for T ¼300 and bw¼8000 for T ¼700. Using this heuristic, we could solve all remaining instances within three minutes. The Greedy procedure solved each instance within less than one second. As a measure of goodness we used the relative gap between a given solution and the best solution found. For most scenarios we had very good solutions by the heuristic, which lead to a gap of less than 8%. Further research could extend the problem treated in this paper by integrating it into a higher level scheduling problem. Not having predetermined destination slots for the given jobs could be one possible extension. Finding a schedule for crane 2 would then have to include the determination of the best possible and feasible destination slot. That would increase the flexibility of crane 2. On the other hand, one could also increase the flexibility of crane 1. By not assuming a fixed schedule for crane 1 but only a set of available jobs, which represent AGVs waiting at the end of the block, the schedule of both cranes could be further optimized with respect to the number of completed repositioning jobs.

References Boysen, N., Briskorn, D., Emde, S., 2016. Cooperative Twin-Crane Scheduling. Disc. Appl. Math. http://dxdoi.org/10.1016/j.dam.2016.04.006, in press Boysen, N., Briskorn, D., Emde, S., 2015. A decomposition heuristic for the twin robots scheduling problem. Naval Res. Logist. 62 (1), 16–22. Briskorn, D., Angeloudis, P., Bell, M., 2016. Scheduling co-operating stacking cranes with predetermined container sequences, submitted for publication. Briskorn, D., Jaehn, F., Wiehl, A., 2016. A Test Suite for Scheduling Algorithms for Cranes in Transshipment Terminals. Working Paper. Carlo, H.J., Vis, I.F., Roodbergen, K.J., 2014. Storage yard operations in container terminals: literature overview, trends, and research directions. Eur. J. Oper. Res. 235 (2), 412–430. Chatman, T., Leptos-Bourgi, S., Vanhoogenhuizen, J.W., 2013. United Nations Conference on trade and Development—Review of Maritime Transport 2013, United Nations. Dorndorf, U., Schneider, F., 2010. Scheduling automated triple cross-over stacking cranes in a container yard. OR Spectr. 32, 617–632. Froyland, G., Koch, T., Megow, N., Duane, E., Wren, H., 2008. Optimizing the landside operation of a container terminal. OR Spectr. 30, 53–75. Garey, M.T., Johnson, D.S., 1979. Computers and Intractability—A Guide to the Theory of NP-Completeness. Freeman & Co, San Francisco. Hakan Akyüz, M., Lee, C.-Y., 2014. A mathematical formulation and efficient heuristics for the dynamic container relocation problem. Naval Res. Logist. 61 (2), 101–118. HHLA, 2014. Hamburger Hafen und Logistik AG. 〈http://www.hhla.de/〉. Kim, K.H., Hong, G.-P., 2006. A heuristic rule for relocating blocks. Comput. Oper. Res. 33 (4), 940–954. Kim, K.H., Kim, H.B., 1999. Segregating space allocation models for container inventories in port container terminals. Int. J. Prod. Econ. 59, 415–423. Kim, K.H., Lee, K.M., Hwang, H., 2003. Sequencing delivery and receiving operations for yard cranes in port container terminals. Int. J. Prod. Econ. 84, 283–292. Lee, D.-H., Cao, Z., Meng, Q., 2007. Scheduling of two-transtainer systems for loading outbound containers in port container terminals with simulated annealing algorithm. Int. J. Prod. Econ. 107, 115–124. Lee, Y., Chao, S.-L., 2009. A neighborhood search heuristic for pre-marshalling export containers. Eur. J. Oper. Res. 196 (2), 468–475.

A. Ehleiter, F. Jaehn / Int. J. Production Economics 179 (2016) 203–211

Lee, Y., Hsu, N.-Y., 2007. An optimization model for the container pre-marshalling problem. Comput. Oper. Res. 34 (11), 3295–3313. Li, W., Wu, Y., Petering, M.E.H., Goh, M., de Souza, R., 2009. Discrete time model and algorithms for container yard crane scheduling. Eur. J. Oper. Res. 198, 165–172. Narasimhan, A., Palekar, U.S., 2002. Analysis and algorithms for the transtainer routing problem in container port operations. Transp. Sci. 36, 63–78. Ng, W.C., 2005. Crane scheduling in container yards with inter-crane interference. Eur. J. Oper. Res. 164, 64–78. Ng, W.C., Mak, K.L., 2005a. An effective heuristic for scheduling a yard crane to handle jobs with different ready times. Eng. Optim. 37, 867–877. Ng, W.C., Mak, K.L., 2005b. Yard crane scheduling in container terminals. Appl. Math. Model. 29, 263–276. Park, T., Choe, R., Choe, R., Ok, S.M., Ryu, K.R., 2010. Real-time scheduling for twin RMGs in an automated container yard. OR Spectr. 32 (3), 593–615. Saanen, Y., van Valkengoed, M., 2006. Comparison of three automated stacking

211

alternatives by means of simulation. In: Kuhl, M.E., Steiger, N.M., Armstrong, F. B., Joines, J.A. (Eds.), Proceedings of the Winter Simulation Conference 2005, pp. 1567–1576. Speer, U., John, G., Fischer, K., 2011. Scheduling yard cranes considering crane interference. In: Computational Logistics. Springer, Berlin. pp. 321–340. Stahlbock, R., Voß, S., 2008. Operations research at container terminals: a literature update. OR Spectr. 30, 1–52. Steenken, D., Voß, S., Stahlbock, R., 2004. Container terminal operations and operations research - a classification and literature review. OR Spectr. 26, 3–49. Vis, I.F.A., Carlo, H.J., 2010. Sequencing two cooperating automated stacking cranes in a container terminal. Transp. Sci. 44, 169–182. Wu, Y., Li, W., Petering, M., Goh, M., de Souza, R., 2015. Scheduling multiple yard cranes with crane interference and safety distance requirement. Transp. Sci. 49 (4), 990–1005.