Minimization of Delay and Travel Time of Yard Trucks in Container Terminals Using an Improved GA with Guidance Search

Yard truck scheduling and storage allocation problems (YTS-SAP) are two important issues that influence the efficiency of a container terminal. These two problems aim to determine the routing of trucks and proper storage locations for discharging containers from incoming vessels. This paper integrates YTS and SAP as a whole and tries to minimize the weighted summation of total delay and total yard trucks travel time. A genetic algorithm (GA) is proposed to deal with the problem. In the proposed GA, guidance mutation approach and exhaustive heuristic for local searching are used in order to force the GA to converge faster and be steadier. To test the performance of the proposed GA, both small scale and large scale cases are studied. The results of these cases are compared with CPLEX for the small scale cases. Since this problem is an NP-hard problem, which CPLEX cannot solve, a simple GA is studied for comparison in large scale cases. The comparison demonstrates that the proposed GA can obtain near optimal solutions in much shorter computational time for small scale cases. In addition, the proposed GA can obtain better results than other methods in reasonable time for large scale cases.


Introduction
Container terminal plays a crucial role in logistics networks under the rapid development of globalization trade, transporting goods from one country to another. Efficiency of a terminal determines its competitiveness in the terminal industries. Accordingly, terminals have been devoting much effort in shortening the vessel staying time, meanwhile increasing the turnaround time by developing various decision support systems [1]. Terminal operations are usually classified into quay operations, (e.g., berth allocation, quay crane scheduling) and yard operations (e.g., yard truck scheduling, yard crane scheduling, and storage allocation) [2]. The objective of this paper is to study yard truck scheduling and storage allocation problems (YTS-SAP).
YTS refers to the scheduling of yard trucks to serve the transportation of export/import containers between the quay side and the yard side, and the corresponding route adoption. Meanwhile SAP refers to the allocation of storage locations for the import containers, which are discharged from incoming vessels. These two problems are known to be one of the most critical terminal operations as they directly influence the efficiency of the terminals [3]. For example, any delay of transporting an export container from the yard side to the quay side for the uploading operation definitely may cause delay of vessel departure. Thus, this must be avoided. Similarly, an inadequate storage plan will induce long transportation time, overload certain yard crane while idling others, and so forth [4,5].
From the literature, it is known that YTS and SAP are highly interrelated. Back to 2008, Lee et al. [6] firstly proposed an integrated model simultaneously dealing with the YTS and SAP. However, in that model, loading operations from yard side to quay side are not being considered. Later on, Lee et al. [2] further improved the integrated model, by proposing a two-step approach, in which the first step deals with the truck-job assignment by using a hybrid insertion algorithm, while the second step deals with the storage allocation 2 Mathematical Problems in Engineering problem. In this model, it is assumed that the number of import containers must be equal to the reserved storage location. However, this assumption may limit the practical applications. Therefore, in this paper, we will further enhance the model by bringing in the consideration of all available storage locations in the terminals. In other words, the number of storage locations can be larger than the number of import containers. This modified model will be more complicated than the previous one as the number of possible solution combinations increased dramatically.
YTS is proved to be NP-hard by Bish et al. [7]. Thus, the integrated problem is also an NP-hard problem. Accordingly, this paper proposed a new hybrid genetic algorithm (GA) to deal with the new integrated model, which can enable us to handle up to 300 containers with a reasonable computational time, greatly improved from the 20 containers in Lee et al. 's [2] model. The paper is organized as follows. Section 2 gives a literature review. Section 3 provides a mathematical model and problem description. Section 4 presents the proposed hybrid GA. Section 5 presents the computational experiments results and Section 6 concludes the paper.

Literature Review
Operation research in the area of storage allocation has been studied by many researchers. In the field of storage allocation of containers, K. H. Kim and H. B. Kim [8] addressed the problem of allocating storage space for import containers and a segregation policy was considered, in which the author analysed cyclic and dynamic arrival rates. The objective of this problem was to minimize the expected number of rehandled cases. K. H. Kim and H. B. Kim [9] discussed a method in which the optimal number of storage space and yard cranes for handling import containers could be determined. The authors proposed a cost model for decision making. A deterministic model and a stochastic model were proposed for the solution. Zhang et al. [10] studied the storage allocation problem. To solve the problem, a rollinghorizon approach was proposed in which the problem was decomposed into two levels. The first level aimed to balance two types of workloads among the blocks, while the second level focused on minimizing the total distance to transport the containers between their storage blocks and the vessel berthing locations. Lee et al. [11] studied the integration of terminal and yard allocation problem. The objective was to minimize the handling cost of transhipment containers in multiterminal systems. A two-level heuristic algorithm was proposed to deal with the problem.
In the area of scheduling problems in the yard side, Kim and Bae [12] discussed how to dispatch automated guided vehicles (AGVs) by utilizing information on locations and times of future delivery tasks. A mixed-integer programming model was proposed and the problem was solved by a heuristic algorithm. Ng et al. [3] considered the problem of scheduling a fleet of trucks in a container terminal to minimize the makespan. The loading and discharging jobs had sequence-dependent processing times and different ready times. The problem was formulated as a mixed integer program (MIP) and solved by using a GA. Nguyen and Kim [13] discussed the problem of dispatching automated lifting vehicles (ALV), and the problem was formulated in an MIP model, similar to multiple travelling salesman problems with precedence constraints and time windows. The problem was solved by a heuristic algorithm. Hu et al. [14] studied the performance of three types of transporting machines which are ground trolleys (GTs), transfer platforms (TPs), and frame trolleys (FTs). Zhao and Goodchild [15] explored the truck travel time reliability and the predictability. The truck routing choices were analysed by examining the relationship between the routing choice and route attributes. Yan et al. [16] investigated a knowledge-based system for yard crane scheduling problem. The proposed system was capable of making off-line planning and real-time scheduling. Javanshir and Seyedalizadeh Ganji [17] studied the problem of yard crane scheduling with noninterference constraints for single blocks. The problem was formulated as a mathematical model and solved by GA. Javanshir et al. [18] studied the problem of yard crane scheduling of multiple blocks in multiple planning periods. The problem was formulated as MIP model and solved by Lingo. He et al. [19] proposed a model to solve the yard crane scheduling problem based on the rolling-horizon technique. A hybrid parallel GA was proposed to solve the problem. Cao et al. [20] studied the integrated model for yard truck and yard crane scheduling problems. The handling sequence of outbound containers was determined in this model. The model was formulated as a MIP programming. Homayouni and Tang [21] investigated the coordination of crane scheduling and vehicle routing. A genetic algorithm is proposed for solving the mathematical model.
The yard truck scheduling problem and the storage allocation problem were studied separately in the past. Bish et al. [7] firstly studied the two problems but solved each problem separately. Bish et al. [7] considered the assumptions for each container with a number of potential locations in the yard where it could be stored and the container was moved from the vessel to the yard by using a fleet of vehicles, each of which could carry one container at a time. The problem was solved in two steps. The first step was to determine the location assignments by ignoring the vehicle schedule and the second step determined the vehicle schedule for the location arrangements obtained from the first step. The problem was solved by using a heuristic algorithm. Bish [22] further studied the problem of determining a storage location for each discharging container, dispatching vehicles to the containers, and scheduling the unloading and loading operations on each quay crane. The objective was to minimize the maximum turnaround time of a set of vessels. Bish et al. [23] developed easily implementable heuristic algorithms for solving the problem studied in 2005. Han et al. [24] studied the yard truck scheduling and storage allocation problems as a whole in transhipment terminals. A mathematical model was proposed and the model was solved by dedicated heuristic algorithms. Lee et al. [6] proposed an integer programming model to deal with the problem of yard truck scheduling and storage allocation. This paper considered the two problems as a whole instead of solving each aspect separately. The objective is to reduce congestion and idling time of the yard trucks in order to decrease the   makespan of the discharging containers. Later on, Lee et al. [2] further extended the previous study and proposed another integrated model for the yard truck scheduling and storage allocation problem. A hybrid insertion algorithm was proposed for the solution and 20 containers are considered in the computational experiments.
From the literature reviews we can clearly know that little work has been done on YTS-SAP considering all empty storage locations in the yard side and no literature study YTS-SAP for large scale instances.

Problem Description and Formulation
In this paper, the problem is how to schedule a fleet of trucks to load or discharge all the containers and determine the storage location for the discharging containers. First of all, we define the movement of a container from its origin to its destination as a request, denoted by and . There are two types of requests considered in this study: loading requests and discharging requests. For loading request, the origin is the location where a container is loaded onto a truck by a yard crane from a storage block in the yard side, while the destination is the location of the quay crane by which a container is loaded onto the vessel. For discharging request, the origin is the location of the quay crane by which a container is unloaded from a vessel, while the destination is the location where a container is unloaded from a truck to a storage block by a yard crane in the yard side as in Figure 1.
In terminal practice, a soft time window for each request [ , ) is already predetermined by the terminal operator as a given data for YTS. The soft time window is a period of time which consists of the earliest possible time and the due time . A container can only be served after the earliest possible time and can be viewed as penalty. We define the processing time (loaded travel time) as the period of time that a truck processes a request from its origin to its destination, and the setup time (empty travel time) is the period of time that a truck spends from the destination of the current request to the origin of next request . We also define the starting time of request as the time when it starts, and the completion time of request is the time when it finishes. The difference between the completion time and of request is the delay of request . Completion time of request is = + . Delay of request is = max{0, − }. If request is the successive request of request served by the same truck, the starting time of request is = max { + + , }.
The following assumptions are made in this study.
(1) There are limited numbers of trucks and one truck serves only one route. We use dummy requests and to represent the initial and finial status of each route.
(2) The trucks travel between any pair of locations along the shortest and same path, so the travel times are symmetric. For example, in Figure 1, the truck travels from location (a) to location (b) and location (b) to location (a) along the same and shortest travel path.
(3) The number of storage locations is more than or equal to the number of discharging containers.
(4) The yard crane and quay crane can serve the yard truck once the yard truck arrives at the yard crane or quay crane. This means that the yard crane and quay crane are always available.
(5) Congestions among yard trucks on a guide route are not considered.
The following notations are used to describe the problem studied in this paper.
: Index of route.
, : Index of location.
: Index of storage location.

Problem Data
, : The travel time between each pair of locations ( , ).
: The origin of request .
: The destination of request .
: The location of storage location . 1 : The weight of total delay of requests. : The set of routes, | | = .
: The set of locations of the loading containers.
: The set of locations of the discharging containers.
: The set of the storage locations.
: The union set of the locations of the loading containers, the locations of the discharging containers, and the storage locations. = ∪ ∪ .

Decision Variables
= 1, if container is allocated to storage location .
= 1, if request is connected to request in the same route.
: The starting time of request .
: The completion time of request .
: The delay of request .
: The processing time of the yard trucks from the origin of request to the destination of request . = , , if request is a loading request; = , , if request is a discharging request and allocated to storage location .
: The setup time of the yard trucks from the destination of request to the origin of request . = , , if request is a loading request; = , , if request is a discharging request and allocated to storage location .
The objective is to schedule the yards trucks and allocation of the loading and discharging containers, aiming at minimizing the weighted summation of the total delay and the total yard trucks travel time as model in (1). The problem formulation is modified based on the model provided by Lee et al. [2]. In our model, we consider all the available storage location in the yard side; however, Lee et al. [2] only consider the reserved storage locations for discharging containers, which means storage locations and discharging containers are equal in amount. The revised model is as shown in the following: Min: subject to Mathematical Problems in Engineering 5 , ∈ {0, 1} , ∀ ∈ , ∀ ∈ , ∀ ∈ (13) Constraints (2) ensure that each storage location will be assigned with at most one discharging container. Constraints (3) ensure that each discharging container will be assigned with one storage location. Constraints (4) ensure that = 1 if the yard truck processes request after request . Constraints (5) ensure that = 1 if the yard truck processes request before request . Constraints (6) ensure that requests can only be served after the earliest possible time. Constraints (7) calculate the delay of each request. Constraints (8) give the relationship of the starting time of a request and that of its successor. Constraints (9) calculate the travel time of the loading requests. Constraints (10)  We define one more decision variable to linearize the nonlinear form in the objective, that is, . Then the objective function can be rewritten as Min: We also need to add two more constraints: Then the model can be formulated as a mixed integer linear program as objective (15), subject to constraints (2)- (14) and (16).

Methodology
This paper proposes a hybrid GA to solve the yard truck scheduling and storage allocation problems.

Chromosome Representation.
The chromosome represents a potential solution of the yard truck scheduling and storage allocation problems. A gene represents a request which contains the information of container ID, time window, origin, and destination of the request, as shown in Table 1 and Figure 2. Each chromosome consists of | | + | | genes. Each gene may be a positive number or a negative number. A positive number represents a request and the sequence of the request prioritized from the left to the right. A negative number represents a route number. Moreover, the requests, which are between two successive negative genes, are allocated to the same truck.
A chromosome of the proposed GA can be generated using the following steps.
Step 1. Randomly allocate different storage locations for each discharging request. Then each gene contains information on the origin, destination, and sequence of each request.    Table 3.
Step 2. Randomly allocate all negative number genes into the chromosome and then the number of request in each route can be calculated.
Step 3. Randomly allocate all the requests to all the routes. Then the requests and the requests' sequence in each route can be obtained. Table 3 is an example of a representation of the proposed GA for scheduling two yard trucks (| | = 2) to process ten requests (| | = 10) with a total length of | | + | | of a chromosome. The | | requests are represented by a permutation of the integers from 1 to | |. The | | routes are represented by the integers from −| | to −1. The decoding procedure is in the reverse order of encoding. In the example shown in Table 3, the first yard truck would sequentially process requests 9, 6, 10, 7; the second truck would process requests 3, 2, 8, 5, 1, 4, as shown in Table 4. As the sample data shown in Tables 1 and 2

Generation of Initial Pool.
In this paper, the initial pool (with pool size ) will be generated by heuristic rules and random generation. To increase the quality of the initial pool, one of the chromosomes is generated according to the earliest possible time combining with the nearest storage location. One of the chromosomes will be generated by the earliest due time combining with the nearest storage location. The rest of the chromosomes are randomly generated.

Mating Pool and Elitist
Strategy. The commonly used roulette wheel selection approach is applied for forming a mating pool. Furthermore, an elitist strategy is used to keep the best chromosome(s). The stored best chromosome found during the evolution will replace the chromosome with lowest fitness value.

Fitness Value.
The objective is to minimize the weighted summation of the total delay and the total yard trucks travel time. Thus, the fitness value of a chromosome can be the reciprocal of its objective function value, as shown in (17). In this way, the best chromosome, which corresponds to the scheduling of the trucks and the allocation of the discharging containers with minimum weighted summation of total delay and total travel time, can be found

Crossover Operation.
Many studies (e.g., [25][26][27][28]) have shown that instance-specified information can make the GA searching process more effective. In the YTS-SAP, the instance-specified information is the request's earliest starting time, the request's due time, the request's processing time, and the setup time between the two requests. In the proposed GA, this instance-specified information tries to be inherited with the crossover operation. Consider the crossover operation of two parents 1 and 2 to reproduce two offspring 1 and 2 . The procedure of the proposed crossover operation is shown in the following steps. Table 5 shows an example of crossover and the example uses the data shown in Table 1.
Step 1. Add all the requests in route one of both parent 1 and parent 2 into an empty requests set Ω 1 . Delete the duplicated requests in Ω 1 . Let set Ω 2 be the same as Ω 1 .
Step 2. Rank the requests in Ω 1 in nondecreasing order of their earliest starting time and let set Φ be the ranked set.
Mathematical Problems in Engineering Rank the requests in Ω 2 in nondecreasing order of their due time and let set Ψ be the ranked set.
Step 3. Insert the requests in the corresponding route in 1 according to their order in set Φ and delete the inserted requests from set Ω 1 . Then, insert the requests in the corresponding route in 2 according to their order in set Ψ and delete the inserted requests from set Ω 2 .
Step 4. Add all the requests in the next route for both parent 1 and parent 2 into set Ω 1 . Then, delete the duplicated requests and delete the requests which have been inserted in 1 . Add all the requests in the next route for both parent 1 and parent 2 into set Ω 2 . Then, delete the duplicated requests and delete the requests which have been inserted in 2 .
Step 5. Repeat Steps 2-4 until all the routes are assigned.

Fine Local Searching.
To make the GA converge faster and be steadier, an exhaustive heuristic method [29,30] is adopted. The exhaustive heuristic method is used to reinforce the GA's local searching ability. In one part of a chromosome, a set of continuous genes is selected as a segment and the number of genes formed in the segment is set to be 5, as adopted by Chung et al. [29]. This method is adopted in each chromosome part, such that each chromosome for each of the trucks in the exhaustive searching process will be executed once. Take the chromosome shown in Table 3 for example; the first part of the chromosome contains four genes that are not enough to form a segment and then the local searching will not be employed for the first part of the chromosome. If the genes 2, 8, 5, 1, and 4, which are in the second part of the chromosome, are randomly selected as a segment, all combinations of the containers sequences will be tested and then the one with best fitness value will be recorded.

Mutation Method (1)-Simple Mutation Operation.
Mutation operation can help the GA prevent premature convergence and find the global optimal solution. In order to evaluate the performance of the proposed hybrid GA, a simple GA is used as a comparison. In the proposed simple GA, each chromosome contains three types of information, storage locations of the discharging containers, the sequence of requests in each route, and the amount of requests in each route. Thus, each chromosome can be mutated in three ways. The first way is to randomly choose a discharging request and change the request's storage location into another one which Table 6: An example of mutation of the second way.  is an empty storage location. The second way is to randomly select two positions then swap the requests on these positions, as shown in the example in Table 6. The gene 7 and gene 9 are swapped. The third way is to change the amount of requests in the two routes, which randomly selects a request in a truck and inserts the request in another truck, as shown in an example in Table 7. Gene 7 is inserted between gene 9 and gene 10. Each of the three mutation methods will be applied once during one mutation operation.

Mutation Method (2)-Mutation Ways with Guidance.
In the proposed hybrid GA, new mutation ways with guidance instead of the simple mutation ways will be adopted. During the mutation of the storage location, a discharging request is randomly selected first. Then, all the storage locations at which the request's travel time is within the request's due time are selected as a set, for example, storage locations 1, 2, and 3 as shown in Figure 2. Finally, randomly choose a storage location in the set to replace the origin storage location. For the mutation way of changing two request s' positions, a request is randomly selected in one truck, recording the position of the request. Then, randomly select another request in the range of + to − in another truck, where is a positive integer. Finally, swap these two requests. Figure 3 is an example of this guidance mutation method; request 10 is selected to swap with another request. As request 10 is the third request in the first part of the chromosome, is equal to 3. If is set to be 2, another request is randomly selected between request 3 and request 1. In this paper, is set to be 3.
For the mutation way of changing the amount of request in the two trucks, a request is randomly selected in one truck, recording the position m of the request. Then, insert the request in the range of + to − in another truck, where is a positive integer. Figure 4 is an example of this guidance mutation method; request 10 is selected to swap with anther request. As request 10 is the third request in the first part of the chromosome, is equal to 3. If is set to be 2, request 10 is randomly inserted between request 3 and request 1. In this paper, is set to be 3 in order to avoid large change of chromosomes. The details of the proposed hybrid GA are given as shown in Figure 5.

Computational Experiments
In this section, a series of computational experiments are used to evaluate the performance of the proposed GA. The GA is coded by using Java Language and executed on a PC with Intel Core i7 3.4 GHz and 8 GB RAM. Instances used in the experiments are created based on the following criteria.
(1) Both the origin and destination of the loading containers, the origin of the discharging containers, and the storage locations are generated through a two-dimensional uniform distribution in the square from (0, 0) to (1500, 1500) (unit: meter).
(2) The earliest start time of the requests is randomly generated from a uniform distribution of (0, 1500) (unit: second) and the length of time window of requests is generated from a uniform distribution of (200, 500) (unit: second). (3) The trucks travel at the speed of 11.11 m/s (40 km/h).
We also assume the two weight parameters 1 and 2 have the relation of 1 + 2 = 1 and 1 is equal to 0.6 as described by Lee et al. [2].

Small Scale Problems.
For small scale problems, a simple GA, which is the hybrid GA without exhaustive heuristic and guidance mutation, is used for comparison with the MIP model solved by CPLEX. The parameters of the simple GA are set as population size: 10; crossover rate 0.8; mutation rate 1; and maximum number of generations 2000. The number of routes is set as two. The hybrid GA is also compared with the MIP model solved by CPLEX. The The computational time is longer than 10 hours.   parameters of the hybrid GA are the same as the simple GA except that maximum number of generations is set to 200. As is shown in Table 8, it is evident that the simple GA can obtain the optimal solution in reasonable time in the first four cases. Due to the interacting of yard truck scheduling problem and storage allocation problem, CPLEX requires hours to solve each single instance, but the simple GA, as a comparison, only uses a few seconds to solve the problem. For the last six instances, the simple GA can obtain the near optimal solution and the average gap between the simple GA and the optimal solution obtained by Branch and Bound coded in CPLEX is computed at about 4.35%. With the instances size becoming larger, the gap also becomes larger. The simple GA performs poorly with the increasing of instance size. However, the performance of the simple GA is acceptable from the practical point of view. On the other hand, the hybrid GA can always obtain optimal solutions because of guidance mutation and exhaustive heuristic for local searching. As the maximum number of generations is smaller than the simple GA, the hybrid GA is faster than the simple GA in the first six instances. However, the hybrid GA needs more time than the simple GA when the instance scale becomes larger.

Large Scale Problems.
To evaluate the performance of the proposed hybrid GA in large scale problems, the simple GA is applied as a comparison for the hybrid GA. Four different kinds of distribution combinations of the earliest possible time and the due time are applied as the criteria of generating instances to increase the variety of the instances. We will also change the number of available trucks. The number of trucks is set as 3 at first, and then the number of trucks is set as 6 for the fifth kind of criteria. Three different kinds of instances with different sizes are formed by using each of the five criteria. The criteria of the instances are created as shown in Tables 9 and 10. The parameters of the proposed hybrid GA for large scale are set as population size 10, crossover rate 0.8, and mutation rate 0.9. Table 10 also shows the number of generations, which is long enough to attain a steady solution, and the computational time of the GA.
As shown in Tables 11 and 12, the proposed hybrid GA can obtain the best results and the computational time is a little longer than the simple GA. The lowest gaps between the simple GA and the new hybrid GA are 1%, 1%, and 3%, respectively, for 100 containers, 200 containers, and 300 containers. The highest gaps between the simple GA and the new hybrid GA are 35%, 44%, and 17%, respectively, for 100 containers, 200 containers, and 300 containers. The average gaps between the simple GA and the hybrid GA are 11%, 11%, and 7%, respectively, for 100 containers, 200 containers, and 300 containers. Since the hybrid GA has stronger local search ability and the mutation operation will not be totally random, the results of the hybrid GA are better than the simple one. However, the exhaustive heuristic is time consuming and it will take the hybrid genetic more time to find a solution.

Conclusions and Future Work
Yard truck scheduling and storage allocation are two important problems for container terminals to enhance their operation efficiency. In recent year, Lee et al. [6] proposed an integrated model simultaneously solving the two problems, and later on they further enhanced the model in Lee et al. [6]. We base on the model in Lee et al. [6] and further improve the model by considering the situation that the number of available storage locations is not equal to the number of import containers. Such improvement can make the model more practical. As the problem complexity increases dramatically, a new hybrid GA with exhaustive heuristic and guidance mutation is proposed. The crossover operation of proposed GA is based on the information of a request's ready time and due time. The mutation operator combines three new ways of mutation approach. To evaluate and demonstrate the quality of the proposed hybrid GA, both a simple GA and the hybrid GA are compared with the MIP model solved by CPLEX in small scale problems, and then the proposed hybrid genetic is compared with the simple GA by using large scale instances. It is proven that the simple GA and the hybrid GA can obtain near optimal solutions in reasonable time by using a series of computational experiments in small size problems. For large scale problems, 100, 200, and 300 containers with different numbers of storage locations and trucks are studied. The results demonstrated that the proposed hybrid GA can obtain the best solutions compared to the simple GA method.
In this paper, the number of vehicles and storage locations are assumed to be given. Given this information, yard truck routing and storage location for discharging containers are determined. However, in practical situation, the number of trucks can be flexible and the number of storage locations may dynamically change throughout the operating horizon. Therefore, the amount of trucks and storage locations can be considered as variables in the future work. Another potential further research topic is to incorporate multilayer container storage in yard side. Combined with the current model, these are expected to give a more realistic description of container terminal operations.