Abstract

Aiming at the twin automated stacking cranes (ASCs) scheduling problem in a single block of an automated container terminal, resolving conflicts between ASCs is an important point that needs to be considered. To solve this problem, a two-stage adaptive genetic algorithm (AGA) based on a graph theory model is proposed. The first stage of the algorithm reduced conflicts as much as possible by adjusting the order of container operations. In the second stage, when conflicts are unavoidable, conflicts are resolved by transforming conflicts into obstacle diagrams. Solving the completion time is to find the shortest distance in the diagram. The effectiveness of the algorithm is verified by applying the proposed algorithm to different scales of container numbers. Compared with the traditional seaside priority strategy, the graph theory model can shorten the completion time to varying degrees. For the strategy of setting the handshake area to reduce conflicts, the results show that the graph theory model makes ASC more efficient.

1. Introduction and Problem Description

In the past few decades, container ports have developed rapidly and the throughput of each container port has continued to grow rapidly, ships as a transportation unit have rapidly increased in size [1]. To increase the competitiveness of the terminal, terminal operators have made a lot of efforts to realize the automation of container terminals. The yard is an important part of terminal operations, efficient storage operations are required to ensure that ships leave the port on time, and the efficiency of retrieval operations is improved to reduce the waiting time of container trucks. Therefore, choosing an appropriate scheduling method to improve the efficiency of the yard is a hot issue to be solved urgently in the container terminal.

In the European layout mentioned by Carlo [2], the container communicates between the sea side and the land side through quay cranes (QCs), automated guided vehicles (AGVs), and automated stacking cranes (ASCs) as shown in Figure 1. In this typical automated container terminal layout, the yard consists of many blocks, ASCs can only perform handover operations with AGVs or trucks at both ends of the block. Transportation requests arise at the seaside I/O point and landside I/O point and must be handled by the ASC, each request has a clear origin and destination. The considered requests either originate from the yard or end up at the yard. To distinguish these requests, we call them storage tasks and retrieval tasks, respectively. The storage task is executed by the seaside ASC and the retrieval task is executed by the landside ASC. The operation process is shown in Figure 2.

Since the dual ASCs studied in this article cannot pass through each other, ASCs will inevitably interfere during the execution of the task, and interference can be effectively reduced by adjusting the task sequence of ASCs. However, once the number of tasks is large, interference cannot be avoided. As shown in Figure 3, the x-axis is set as the time axis and the y-axis is set as the bay position in the Cartesian coordinate system, and the trajectory of the ASCs can be obtained, once the two ASCs conflict in operation, one of the ASCs needs to wait. From the figure, we can see that different ASCs wait to deal with the conflict, which will affect the makespan. Therefore, choosing a suitable waiting strategy to shorten the completion time is the main research content of this article.

2. Literature Review

The scheduling of terminal equipment directly affected the operation efficiency of the terminal. To improve the production efficiency of these equipment, a lot of research has been carried out. For the scheduling problem of QC, people mainly consider berth allocation [35]. The scheduling problem and path planning problem of AGV have also been widely studied [68]. Of course, there are also more and more scholars studying the integrated scheduling of multiple equipment [9, 10].

Compared with the scheduling of ASCs in the automated container terminal, more research in the past is conducted on the equipment scheduling of the traditional container terminal. Narasimhan et al. [11] proved that the path selection problem of a single crane to support the loading operation of a ship is an NP-Hard problem. Ng et al. [12] proposed a branch and bound algorithm, which is suitable for a single yard crane operation at different preparation times. Aiming at the same problem, Guo et al. [13] proposed two new algorithms using different scheduling rules to effectively calculate the yard crane scheduling sequence. Regarding the problem of multiple yard crane scheduling with interference, Ng et al. [14] first studied the interference constraint problem of two yard cranes in a block, proposed an integer programming model and a heuristic algorithm based on dynamic programming. The interference between cranes is eliminated, but the safety distance requirements are not considered, and storage and retrieval tasks are not distinguished. Li et al. [15] developed an effective yard crane scheduling model that includes safe distance, interference, and simultaneous storage and retrieval, then designed a heuristics and rolling-horizon algorithm to quickly solve the model. Chu et al. [16] studied the situation of three yard cranes in two adjacent container blocks and considered the processing time of each container, designed a fast heuristic algorithm and improved the genetic algorithm to solve.

There is no doubt that configuring two ASCs in a block can improve operation efficiency, but solving the interference between two ASCs is a difficult point in scheduling. Saini et al. [17] constructed a two-level random model to analyze the performance of two cranes. It was found that the interference of the cranes will reduce its work efficiency. Gharehgozli et al. [18] studied the twin ASCs scheduling problem and regarded the problem as a multiasymmetric-generalized traveling salesman problem, constructed a mixed integer model with minimized the makespan, and adopted an adaptive neighborhood search heuristic algorithm to quickly obtain the approximate optimal solution. Carlo et al. [19] proposes some priority rules for interference between ASCs. Hu et al. [20] simplified the control and coordination of ASC and designed an accurate algorithm and genetic algorithm to solve the ASC scheduling scheme with the goal of minimizing the minimum time interval between tasks. Briskorn et al. [21] predefined the ASCs evasion rules when interference occurs, by constructed an obstacle graph, the dual ASC scheduling problem is transformed into a job shop problem and a strong polynomial algorithm is developed to solve the problem. Lu et al. [22] established the interference model of the dual ASC system by analyzing the time overlap between tasks and then considering the impact of AGV transportation time, established a scheduling model with the goal of minimizing job waiting time and makespan. To solve this problem, a particle swarm optimization algorithm is designed.

To reduce the conflict between the twin ASCs, setting the middle handshake area is a more commonly used method. Since the ASCs are unable to pass each other, Han et al. [23] set up a handshake area so that two ASCs can be handed over to work. Four interference modes are proposed, and genetic algorithms are designed to solve large-scale problems. Gharehgozli et al. [24] studied the influence of the handshake area on the operating efficiency of dual ASCs in a block with I/O point on both sides of the seaside and landside. It is concluded that the use of the handshake area is helpful for the decoupling of the land and sea, and still has great application and research value. Jaehn et al. [25] studied the benefits of using the handshake area in the dual ASC system, the study showed that it is beneficial to allow ASCs to cooperate in this way, especially when there are no containers in the block, introduced the lower bound method and heuristic method to study whether this positive effect can be sustained. Kress et al. [26] studied the setting of a handshake area in the dual ASC system, proposed a dynamic programming algorithm, which can quickly and effectively solve this problem.

From previous studies, it was found that the response strategy after interference between ASCs has not been fully explored. Due to the high cost of waiting for ships on the seaside, the ASC on the land side passively caters to the work of the ASC on the seaside. Once operational interference occurs, the ASC on the seaside always has a higher priority. This will lead to unbalanced work on both sides, resulting in a longer makespan.

Therefore, this paper focuses on how to quickly obtain a sequence with less interference under a given task sequence and how to balance the operations of the ASC on both sides to get a shorter makespan when the interference cannot be avoided. Combining previous studies on this problem, this paper adopts a two-stage genetic algorithm based on the graph theory, which uses the genetic algorithm to quickly obtain the task sequence with as few interferences as possible, and then obtains the makespan of the task sequence in the graph theory model.

3. Model Construct

3.1. Mathematical Model

In this section, we consider constraints such as the safety distance between ASCs and construct a 0–1 integer programming model with the goal of minimizing the makespan of ASCs. Generally, our model is based on the following assumptions: (1) The I/O point capacity on both sides is sufficient, ASC does not need to wait for loading and unloading at I/O point. (2) Two ASCs travel at a constant speed, ignore acceleration and deceleration. (3) The picking and dropping of ASC take the same time.

3.1.1. Parameters and Decision Variables
3.1.2. Objective Function and Constraints

Parameter notations have been described in Table 1 above and the twin-ASC scheduling model to minimize the makespan is proposed below.

Equation (1) is the objective function, which means minimizing the makespan of the ASCs, and we do not need to consider the delay time of the job. Constraint (2) ensure ASC1 and ASC2 start to work at the initial position, that is two side of the block. Constraint (3) ensure each job is executed only once by one ASC. Equation (4) calculates the travel time from job to job , job , and job and are continuous jobs executed by the same ASC. Constraint (5) ensures ASC execute the next job after completing the current job thus guarantee the continuity of jobs. Constraint (6) indicates the relationship between the same task start and end times. Constraint (7) shows the relationship between the start time and end time of two consecutive jobs. Equations (8) and (9) ensure that each ASC can only operate one job at a time. Constraint (10) ensures a safe distance between the two ASCs when working.

3.2. Graph Theoretic Model

Briskorn [21] designed a graph theory model for the ASC scheduling problem under the given task sequence. The model is based on the following two assumptions:If there are multiple cranes, we need to decide which crane completes which task and for given the work distribution of the cranes, we need to determine the work order of each crane.

Among the problem discussed in our paper, the task on the seaside is handed over to ASC1, and the task on the landside is handed over to ASC2, so satisfy the first assumption. Moreover, for the second assumption, the task sequence of each ASC is continuously updated by the genetic algorithm. For the resulting task sequence, at some point in time, a conflict is inevitable. In the event of a conflict, we use the graph theory model to determine which ASC has priority.

When the task sequence is determined, the ASC executes the tasks in sequence, and the movement of twin-ASC needs to fulfil in each time period:(1)The position of ASC1 is bay and the position of ASC1 is bay with ;(2)The position of ASC1 is bay and ASC2 is from bay to bay with ;(3)The position of ASC2 is bay and ASC1 is from bay to bay with ;(4)ASC1 is from bay to bay and ASC2 is from bay to bay with and .

Through the proposed graph theoretic theory model, we can convert the twin-ASC scheduling problem under given task sequences into a Job-shop problem, and we develop an obstacle graph to represent the interference between twin ASCs. The problem of seeking the makespan of ASCs translates into finding the shortest path from the lower left corner to the upper right corner in the obstacle graph.

For part of a given task sequence as shown in Figure 4, it shows the position of two ASCs over time. ASC1 starts working from bay 0, and move to bay 5 execute unloading operation, after that back to bay 0 in the time 12. ASC2 starts working from bay 9, and move to bay 3 execute loading operation, after that move to bay 7 in the time 12.

Obviously, there is interference in this operation which will inevitably cause the delay. What we have to do is to minimize the delay time in order to get the minimized makespan. This problem has been solved by a strong polynomial algorithm. In order to understand this problem more deeply, we can refer to the paper of Briskorn and Angeloudis [21].

For the example in Figure 4, we can get the obstacle diagram shown in Figure 5. The horizontal axis and the vertical axis represent the running time of ASC1 and ASC2, respectively, and each unit scale is a unit of time. The obstacle is composed of nine parts, and part C indicates the conflicts of two target bays. Part L represents ASC1 is operating at bay 3 and ASC2 moves closer to the bay 3, the length of the other side of L is the distance between the two ASCs operating bays plus one. Similarly, for ASC1 operating and ASC2 leave the bay 3, we can get the part R. Similarly, for switching ASC1 and 2, we can get the part T and B. By analyzing the conflict caused by the simultaneous movement of ASC1 and ASC2, we can easily get the part TL, TR, BL, and BR.

For the solution of the graph theory model, it is actually the problem of finding the shortest path in the graph and solving it using the strong polynomial algorithm in literature studies [21]. A feasible path can only be composed of horizontal, vertical, and diagonal segments, and cannot pass through obstacles. For a feasible path, we need to calculate the projection length of the diagonal on the horizontal axis, the length of the vertical and horizontal segments, then the makespan corresponding to this feasible path is equal to the sum of these three. As shown in Figure 5, there are two feasible paths, one pass through points (0, 0), (3, 3), (7, 3), and (12, 8), the other passes through points (0, 0), (2, 2), (2, 8), (6,12), and (12, 12). The length of the first path is 16 and the length of the second path is 18. In each path, the diagonal line represents that there is no interference in the operation of ASC1 and ASC2.

In summary, we get the task sequence through genetic algorithm, some task sequences with interference, we adopt the seaside ASC priority strategy and the equal priority strategy to resolve the conflict. Using the graph theory model, the same priority strategy is considered. Then, the makespan is calculated.

4. Modified Adaptive Genetic Algorithm (MAGA)

The twin-ASC scheduling problem is an NP-hard problem, so it is difficult to solve directly. Genetic algorithm has a good global search ability. It uses iteration to find the global optimum by imitating the mechanism of natural selection and heredity and uses it inherent parallelism, convenient distributed computing to speed up the solution speed, and has good adaptability to job scheduling problems. In the iterative process of the genetic algorithm, the probability of chromosome crossover and mutation has a great influence on the result of problem solving. If the two are too large, it is easy to destroy the chromosomal individuals with high fitness in the early stage of the iteration; if the two are too small, it is difficult to generate new individuals in the later stage of the iteration, which makes the algorithm fall into a local optimal solution. Therefore, this paper uses an improved adaptive genetic algorithm to solve the problem and combines the graph theory model. The probability of crossover and mutation is obtained by the following two formulas:where represents the maximum fitness value of the population individual, represents the average fitness value of the population, represents the larger fitness value of the two individuals performing the crossover operation, represents the individual fitness value for mutation operation, and and represent the maximum and minimum crossover probability. and represent the maximum and minimum mutation probability.

4.1. Chromosome Encoding and Decoding

This paper adopts a double-layer real number coding method, where the upper layer is the number of container tasks, the jobs are executed in order of number, and the lower layer is the ASC number. For example, the task group shown in Table 2, where ASC1 performs the job (1, 4, 5, 7), and ASC2 performs the job (2, 3, 6, 8). In the decoding process, the tasks on the corresponding chromosome positions are first assigned to the ASC to which they belong and then sequentially decoded according to the task sequence on the gene segment to obtain the container task sequence corresponding to the ASC. As shown in the chromosome in Figure 6, the task sequence of decoding ASC1 is (1, 4, 5, 7), the task sequence of decoding ASC2 is (2, 3, 6, 8).

4.2. Fitness Evaluation

The fitness function is taken as , where is the minimum value of the current ASC makespan. Considering the priority of the seaside ASC, first calculate the operation time of the seaside ASC to complete the job sequence corresponding to the current chromosome, determine its operation track, and then calculate the time required for the landside ASC to complete its corresponding job sequence under the constraint of maintaining a safe distance. Take the larger value of the time required for the two ASCs to complete their respective jobs as the maximum completion time corresponding to the current chromosome. Considering that two ASCs have the same priority, referring to the graph theory model proposed in Section 3.2, the maximum completion time corresponding to the current chromosome is obtained through the graph theory model through the job sequence corresponding to the current chromosome.

4.3. Selection

We use the classic roulette method to select individuals. Through the different fitness of each individual, the probability of different individuals being selected is calculated. Individuals with high fitness are more likely to be selected, which evolves from generation to generation.

4.4. Crossover

In this paper, the PMX crossover method is used to randomly select two genes at the same position on the two parent chromosomes, and use the middle part as the crossover part, as shown in Figure 7. After the crossover, there may be missing or duplicate task numbers in the offspring chromosomes obtained from the crossover. Therefore, the offspring chromosomes must be repaired. Through the mapping relationship, the conflicting genes are repaired one by one, and the repaired offspring chromosomes are obtained.

4.5. Mutation

If only one gene on the chromosome is selected during the mutation operation, it needs to be repaired after the mutation, and the number of the gene does not change before and after the repair, so a certain gene of the mutated chromosome is meaningless. Therefore, two genes on a chromosome are randomly selected, and whether they are mutated according to the mutation factor. Figure 8 demonstrates the method of mutation, by exchanging the corresponding genes to obtain the offspring chromosomes.

5. Numerical Experiment

5.1. Initial Settings

A certain block in a new ACT contains 41 bays. The seaside I/O point is located at 0 bay and the landside I/O point is located at 41 bay. Thus, we set l = 41. According to Javanshir [27], The ASCs move at a uniform speed  = 8 s/bay and we set the time of ASCs to move one bay need a time unit, picking up or dropping a container takes 240s which is 30 time units. The origin position of the storage task is 0 bay and the destination position generate uniformly by randomly selecting an integer from (1, 40). The destination position of the retrieval task is 41 bay and the origin position generate uniformly by randomly selecting an integer from (1,40). The twin ASCs directly need to maintain a safe distance of one bay.

To ensure the performance of the algorithm and balance the solution speed and the quality of the solution, the maximum number of iterations of the algorithm is finally set to 300 generations, the population size is 200, the maximum mutation probability is 0.1, the minimum mutation probability is 0.01, and the maximum crossover probability is 0.9. The minimum crossover probability is 0.6. Each set of experiments was run ten times and the results were averaged. The described solution method was implemented in Python 3.8 under Windows 10 and was run on an Intel Core i5-10400, 2.9 GHz PC with 16 GB RAM.

5.2. Algorithm Performance

Figure 9 shows the convergence of the three algorithms under the same set of tasks at different scales, all of which can converge quickly, and the final results are slightly different. The upper figure shows the average fitness value under different iteration times, the lower figure shows the minimum fitness value under different iteration times. Figures 1012 are the ASC trajectory diagram corresponding to the solutions obtained by the three methods for the same set of tasks, the x-axis is time, and the y-axis is the bay position of the ASC. It can be found from the figure that the proposed algorithm can maintain the work balance between the two ASCs, thereby shortening the makespan. For setting up the handshake area, some tasks that cross the handshake area will be divided into two, which will increase the loading and unloading time. This reduces interference, but it may increase completion time. Next, we will discuss this in more depth through experiments on different scales.

5.3. Simulation Comparison

In the following sections, (A1), (A2), (A3), and (M) given below represent the adaptive genetic algorithm solution under seaside priority strategy, the adaptive genetic algorithm solution based on graph theory model, the adaptive genetic algorithm solution for setting the middle handshake area, and the equation solution. W is the makespan obtained by the respective algorithm, ASC1 and ASC2 represent the time spent by the seaside and landside ASC to complete their respective tasks.

5.3.1. Comparison with CPLEX Optimizer

To verify the effectiveness of the solution method of adaptive genetic algorithm based on graph theory model designed in this paper, the algorithm program is developed with Python, the mixed integer programming model is solved with CPLEX, and the solution results are compared and analyzed. The first set of experiments is carried out in Table 3, we calculated the results for the instances with n = 4,8,12,16,20.

The gap1 is defined by

It can be found from Table 3 that when the number of tasks is less than 20, (A2) can obtain a solution in a short time, and the error between the obtained function value and the optimal solution obtained by CPLEX is not greater than 2.61%, proved the effectiveness of the algorithm. After the number of tasks exceeds 20, CPLEX cannot find the optimal solution in a limited time, and (A2) shows its fast solution performance for larger-scale tasks.

5.3.2. Comparison with Seaside Priority Strategy

In a further series of tests, we compare the results of our solution method with heuristic proposed by Javanshir [27] for a similar problem setting and expanded the number of tasks. In addition to calculating the makespan, we also obtained the respective completion times of two ASCs.

The Gap2 is defined by

Table 4 shows the completion time of two ASCs for the two algorithms under different mission scales. It can be found that the algorithm we designed can always get better results than that obtained under the seaside priority strategy. However, due to the random nature of the tasks, there will be different effects of shortening the completion time under different tasks.

Figure 13 shows the difference between the completion time of the landside ASC and the seaside ASC of the two algorithms. From Figure 13, we can clearly see that the algorithm we designed effectively shortens the completion time difference between the two ASCs, thereby shortened the makespan. Moreover, with the expansion of the task scale, the effect is better.

For tasks of the same scale, the different proportions of storage tasks and retrieval tasks will also affect the results. Then we set the proportion of storage tasks to increase continuously when the task size N = 100, and record the completion time of the two ASCs in Table 5. We can analyze from the table that the algorithm we designed is only effective when the storage task ratio is 30%, 40%, and 50%.The reason is that when the storage task ratio is too small, by adjusting the task operation sequence, you can always get a set of tasks for the landside ASC to execute without conflict. Moreover, landside missions are more, the makespan of the landside ASC is the total completion time of the task. When the tasks on both sides are relatively balanced, conflict is inevitable, and the algorithm we designed has played a role. When the storage task ratio is greater than 50%, the makespan of the seaside ASC is longer than the makespan of the landside ASC. Once a conflict occurs, both algorithms will choose to let the landside ASC wait, so the same result will be obtained.

The Gap3 is defined by the formula as follows:

5.3.3. Comparison with Setting the Handshake Area

After that, we compared the algorithm with the method in the Han [13] and set the handshake area as the middle position, that is the 20 bay position as the handshake area, regardless of the capacity of the relay area. As is shown in Table 6, the data obtained from the simulation indicate that because the task of crossing the handshake area is divided into two, the loading and unloading time is increased twice, and the makespan is also extended. Relative to setting the handshake area, the algorithm we designed can shorten the completion time by more than 20% under tasks of different scales. However, setting a handshake area can greatly reduce the number of possible conflicts between two ASCs.

The gap4 is defined by the formula as follows:

6. Conclusion

The interference between ASCs is the key to solve the scheduling problem. In this paper, the conflicts between ASCs were abstracted into an obstacle graph, and the conflicts were solved by avoiding obstacles in the graph theory model, a two-stage adaptive genetic algorithm based on graph theory was proposed to minimize the makespan of all tasks. The simulation experiment compared different algorithms to verify the speed and effectiveness of the designed algorithm. Comparative simulations were carried out under different number of containers, different task ratios and whether to set up the handshake area. The results shown that the proposed algorithm can effectively shorten the completion time between two ASCs, thereby shortening the makespan.

The scheduling of two ASCs in a block was considered in the current work. In the future, the impact of the choice of the size and location of the handshake area on scheduling is also a research point. Moreover, it is also possible to consider the scheduling optimization problem of two crossover ASCs in a block by transforming the conflict between the crossover ASCs into the form of an obstacle graph.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors would like to acknowledge the Key Research Project Fund of Shanghai Maritime University: the Shanghai Pujiang Program under Grant 16PJC043.