A method for optimizing the cooperation between a shore crane and a yard crane in a dual-cycle mode
By constructing a collaborative optimization model and a greedy random adaptive search algorithm to optimize the operations of quay cranes and yard cranes, the problem of insufficient coordination between quay cranes and yard cranes under the dual-loop mode was solved, achieving efficient coordination between quay cranes and yard cranes, reducing the number of container turnovers, and improving resource utilization and operational efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DALIAN MARITIME UNIVERSITY
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-09
AI Technical Summary
In the dual-circulation mode, the lack of coordination mechanism between quay crane and yard crane operations makes it difficult to match the quay crane loading and unloading sequence with the yard crane container lifting rhythm, increasing the number of times the yard crane flips containers and the equipment waiting time. Moreover, the existing scheduling model lacks dynamic flexibility and accuracy, making it difficult to achieve a balance between solution quality and efficiency.
A collaborative optimization model for quay crane and yard crane operations under a dual-loop mode is constructed. A greedy stochastic adaptive search algorithm with fused path reconnection is adopted to optimize the quay crane loading and unloading sequence and the allocation of export container positions. Through the setting of objective function and constraints, the collaborative optimization of quay crane and yard crane is achieved.
It significantly reduces the number of times container cranes need to be turned over, improves resource utilization, enhances overall operational efficiency, ensures a balance between solution quality and efficiency, and supports the intelligent upgrading of container terminals.
Smart Images

Figure CN122175075A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of scheduling technology, and in particular to a method for collaborative optimization of quay crane and yard crane operations under a dual-cycle mode. Background Technology
[0002] As the core loading and unloading equipment in container terminals, the operational efficiency of quay cranes directly impacts the terminal's throughput capacity and cargo flow timeliness. Traditional container terminals generally employ a single-cycle operation mode, where the quay crane unloads all containers from the ship before loading export containers, resulting in an empty return trip in each operational cycle and low resource utilization. To improve efficiency, the dual-cycle mode has emerged. This mode allows the quay crane to be heavily loaded with containers during its round trip between the quay and the ship. Through alternating loading and unloading operations, the number of containers transported in each operational cycle is doubled, thereby significantly shortening ship loading and unloading time and reducing energy consumption.
[0003] Despite the significant theoretical advantages of the dual-circulation model and its application in some major ports, its practical implementation still faces a series of technical challenges. First, there is insufficient equipment coordination. Existing technologies often treat quay crane scheduling and yard crane operations as independent processes. Due to the lack of a precise coordination mechanism, quay crane loading and unloading sequences are difficult to effectively match with yard crane container handling rhythms, leading to increased waiting times for quay cranes and increased container handling by yard cranes. This prevents the dual-circulation operation ratio from reaching the theoretically optimal level, limiting overall operational efficiency. Second, the loading scheme lacks dynamic flexibility. Existing scheduling models typically use whole-ship loading and pre-planning as fixed inputs. However, the pre-planning only specifies the category partitioning of export containers, failing to fully utilize the optimization space for specific container allocation within the same category. This results in a disconnect between container allocation and actual scheduling needs, increasing unnecessary container handling burdens for yard cranes. Furthermore, there is a contradiction between modeling accuracy and solution efficiency. Existing research mostly uses "container stacks" as the basic operational unit, making it difficult to accurately characterize the operational priority relationships between individual containers. Simultaneously, for large-scale scheduling problems, traditional heuristic algorithms are prone to getting trapped in local optima and lack elite solution guidance mechanisms, making it difficult to achieve an effective balance between solution quality and efficiency. Summary of the Invention
[0004] This invention discloses a collaborative optimization method for quay crane and yard crane operations under a dual-circulation mode to overcome the above-mentioned technical problems.
[0005] To achieve the above objectives, the technical solution of the present invention is as follows:
[0006] A collaborative optimization method for quay crane and yard crane operations under a dual-circulation mode includes the following steps: S1: Construct a collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode, in order to establish the objective function and constraints of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode; S2: A greedy stochastic adaptive search algorithm with fusion path reconnection is used to solve the objective function of the collaborative optimization model of quay crane and yard crane operations under the dual-loop mode, so as to obtain the final quay crane loading and unloading sequence and the final export container space allocation result, in order to achieve collaborative optimization of quay crane and yard crane operations under the dual-loop mode.
[0007] Beneficial Effects: This invention provides a collaborative optimization method for quay crane and yard crane operations under a dual-circulation mode. By constructing an objective function and constraints based on a collaborative optimization model of quay crane and yard crane operations under the dual-circulation mode, and employing a greedy stochastic adaptive search algorithm that integrates path reconnection, the objective function of the collaborative optimization model under the dual-circulation mode is solved. This yields the final quay crane loading / unloading sequence and the final export container space allocation results, achieving collaborative optimization of quay crane and yard crane operations under the dual-circulation mode. This invention, based on the dual-circulation operation mode, constructs an objective function that significantly reduces the number of container handling operations by yard cranes, improves resource utilization, and enhances overall operational efficiency. The solution method of this invention is less prone to getting trapped in local optima and achieves an effective balance between solution quality and efficiency, playing a positive role in the intelligent upgrading of current container terminals. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart of the collaborative optimization method for quay crane and yard crane operations under the dual-circulation mode of the present invention; Figure 2 This is a schematic diagram of single-cycle and double-cycle operation modes of the quay crane in an embodiment of the present invention; Figure 3 This is a real map decision for a certain beta position in an embodiment of the present invention; Figure 4 This is a schematic diagram of container transshipment operations in a single bay scenario according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the export container yard layout in an embodiment of the present invention; Figure 6 This is a schematic diagram of the quay crane loading and unloading sequence without considering the yard layout in an embodiment of the present invention; Figure 7 This is a schematic diagram of the quay crane loading and unloading sequence considering the yard layout in an embodiment of the present invention. Figure 8 This is a preferred directed graph of an example problem in an embodiment of the present invention; Figure 9 This is a schematic diagram of the optimal loading and unloading sequence for a quay crane, illustrating an example problem in an embodiment of the present invention. Figure 10 The graph shows the upper bound average error value curves under different scenarios in the embodiments of the present invention. Detailed Implementation
[0010] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0011] This embodiment introduces a collaborative optimization method for quay crane and yard crane operations under a dual-circulation mode, including the following steps: Figure 1 As shown: S1: Construct a collaborative optimization model for quay crane and yard crane operations under a dual-circulation mode; Specifically, to construct a collaborative optimization model for quay crane and yard crane operations under a dual-circulation mode, this embodiment proposes the following assumptions: (1) Each import and export container requires only one operation by the quay crane (QC), which prevents the import container from being moved to another location in the ship's hold before final unloading. Overturning a container requires two operations by the quay crane QC, namely one unloading operation and one loading operation.
[0012] In this embodiment, "overturned container" refers to a container whose stacking location obstructs the loading and unloading of the target container (in this embodiment, an imported container). It must be temporarily moved (overturned) and then returned to the ship or moved to a designated location after the target container's operation is completed. Specifically, overturned containers must first be unloaded by the quay crane to a temporary storage area on the shore. After the corresponding imported container is unloaded, it is then reloaded back to the ship's designated location. Therefore, each overturned container requires two quay crane operations (one unloading and one loading). It should be noted that the specific location of the overturned container may differ between the ship's initial stowage state (arrival layout) and the target state after loading (departure layout), but the total number of overturned containers in each stack must remain constant. Imported containers refer to containers unloaded from the ship to the terminal. They only appear in the arrival layout before unloading and will subsequently be delivered to the consignee through yard storage, transportation, and other processes. Exported containers refer to containers loaded from the terminal to the ship. They only appear in the departure layout after loading and are transported to the terminal yard by the cargo owner or freight forwarder for planned loading operations.
[0013] (2) The positions of the overturned containers in the departure and arrival layouts are interchangeable, meaning that each overturned container in the arrival layout can be reloaded into any position reserved for overturned containers in the departure layout, and the number of overturned containers in the corresponding stacks is the same in both layouts. This ensures that after all container unloading operations in the stack are completed, there are enough containers available for subsequent stack loading operations.
[0014] (3) The stability of the vessel is not considered. This is consistent with actual operation because the departure layout already takes the stability of the vessel into account. The arrival and departure layouts are pre-designed for the QC operation planning of the quay crane.
[0015] (4) Consider container ships without hatch covers, where containers below deck and above deck are not separated by hatch covers.
[0016] (5) There are sufficient container trucks to cooperate with yard cranes (YC) to complete loading and unloading operations in a timely manner. Therefore, the service time of the bay depends only on the order of container operations.
[0017] Figure 2 This diagram illustrates single-cycle and double-cycle operation modes for quay cranes. Part a of the diagram shows single-cycle operation, where a single quay crane performs only one operation—unloading or loading—per cycle. After completing a single loading or unloading operation, the spreader must return to its initial position empty, corresponding to the port's segmented "unloading before loading" process, which involves non-productive movement. Part b of the diagram shows double-cycle operation, where the quay crane alternates between unloading and loading operations within a single bay, a simultaneous loading and unloading mode. The trolley travels heavily loaded on both the round trip, thus doubling the number of containers transported by the quay crane in one operation cycle compared to single-cycle operation. Currently, domestic ports such as Shanghai Yangshan Port, Tianjin Port, and Beibu Gulf Container Terminal have piloted this mode with significant results.
[0018] Specifically, in the container ship stowage process, the terminal needs to formulate an actual stowage plan based on the shipping company's pre-stowage plan. The pre-stowage plan is used to macroscopically divide the hold areas for container categories, while the actual stowage plan specifies the exact location of each container. The rationality of the actual stowage plan directly affects the container handling rate in the yard and the efficiency of quay crane operations.
[0019] Figure 3 Taking a specific bay as an example, this illustrates the optimization decision-making process for actual container loading plans: 'a' represents the shipping company's pre-loading plan, which only divides the hold areas for four container categories: A, B, C, and D; 'c' shows the yard storage layout for export containers at this bay, presenting a layered stacking of each type of container. Since adjusting the loading and unloading sequence of containers within the same category does not affect vessel stability, the terminal can optimize the loading sequence within each category, prioritizing upper-level containers in the yard to minimize container overturning by yard cranes. 'b' represents the unoptimized actual loading plan. Figure 1If the container allocation does not match the yard order, for example, if D3 is located below D2 but is loaded first, it will cause the yard crane to overturn the container; d is the optimized actual allocation. Figure 2 By adjusting the loading order within the same category, both container flipping operations were avoided and the efficiency of quay crane operations were ensured, which intuitively demonstrates the role of actual layout optimization in improving terminal operation efficiency.
[0020] Preferably, the objective function of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode is expressed as follows: (1) In the formula: The objective function value comprehensively reflects the optimization results of the number of double-cycle operations of the quay crane and the number of container overturning operations of the yard crane. The larger the value, the better the scheme. The number of times the quay crane loads and unloads (i.e., double cycle). The side chain number of the vessel to which the container to be loaded belongs; The container loading task is assigned a sequential number within the side chain of its respective vessel; a higher number indicates a later position in the loading sequence. For the set of all container loading tasks, where, , This is a set of export container tasks in the outbound layout. This is a set of tasks involving overturning containers during the initial setup. The side chain number of the vessel to which the container to be unloaded belongs; The container unloading task is assigned a sequential number within the side chain of its respective vessel; a larger number indicates a later step in the task sequence. This is the set of all container tasks awaiting unloading. ,in, To reach the set of imported container tasks in the layout, To reach the set of tasks involving overturning containers in the layout; For use in determining the first The first ship side chain The task of loading containers and the first The first ship side chain A 0-1 decision variable regarding whether there is a successor process relationship for each container unloading task. The first ship side chain One container task awaiting loading and the first The first ship side chain If a set of containers to be unloaded constitutes a valid double-cycle operation (i.e., both round trips of the quay crane are heavily loaded), then the value is 1; otherwise, it is 0. This is the penalty coefficient for the number of times the box is searched; Let the 0-1 decision variable be used to determine whether the yard crane performs a container turning operation due to container pressure when retrieving export containers. If the ... The first ship side chain The yard location for the pending container loading task is located in the export container task area. Below the same stack, and Must precede If the extraction causes the yard bridge to flip over, the value is 1; otherwise, it is 0. Specifically, the objective function is to minimize the total number of operations of the quay crane and the yard crane, which is expressed as the maximum number of times the quay crane loads and unloads (i.e., double loop) minus the number of times the yard crane flips containers with a penalty coefficient. Preferably, the constraints of the objective function of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode include: vessel space allocation constraints for export containers, buffer zone space constraints for container overturning, task uniqueness constraints, quay crane operation sequence constraints, container overturning count calculation constraints, loading and unloading task constraints, container pressing constraints, and variable domain constraints.
[0022] The constraints on vessel space allocation for export containers are expressed as follows: (2) (3) In the formula: The chain number to which the ship-side export container task or container overturning task belongs; The sequential number of the ship-side export container task or container overturning task within its chain; For ships Set of export container tasks; Let the 0-1 decision variable representing the allocation relationship between yard or buffer zone container positions and ship-side container tasks be used. Ship-side export container task Or the buffer box position Assigned to the task of overturning containers If the value is 1, then the value is 1; otherwise, the value is 0. This refers to the yard station number to which the container slot or buffer zone slot on the yard side of the exit is located; This refers to the sequential numbering of the container slots or buffer zone slots on the yard side of the container terminal within its respective yard. q The smaller the value, the higher the storage location. For storage yard Set of export container tasks; This is the category number for export containers.
[0023] The container space constraints for the overturned container allocation buffer zone are represented as follows: (4) (5) In the formula: This is a set of tasks involving overturning containers during the initial setup. This is the set of buffer bins.
[0024] The task uniqueness constraint is expressed as follows: (6) (7) In the formula: This is the set of all container loading and unloading tasks required in both the arrival and departure layouts. ; To reach the set of imported container tasks in the layout, To reach the set of tasks involving overturning containers in the layout; This is a set of export container tasks in the outbound layout. The set of tasks for overturning containers in the initial layout.
[0025] Specifically, the uniqueness constraint of a task means that each task has at most one preceding task and one succeeding task.
[0026] Preferably, the quay crane operation sequence constraint is expressed as follows: (8) (9) In the formula: Used to represent tasks to be uninstalled The quay crane loading and unloading sequence number is an integer variable, with smaller numbers indicating earlier loading and unloading; To represent the task to be loaded The quay crane loading and unloading sequence number is an integer variable, with smaller numbers indicating earlier loading and unloading; For use in determining the first The first ship side chain The task of loading containers and the first The first ship side chain A 0-1 decision variable indicating whether a container unloading task has a successor process relationship; In this embodiment, the number is a sufficiently large positive number. M Greater than 10 4 ; The side chain number of the vessel to which the container to be loaded belongs; The sequential numbering of the container loading task within its respective ship's side chain; This is the set of all container loading and unloading tasks that need to be performed in the arrival and departure layouts. The side chain number of the vessel to which the container to be unloaded belongs; The sequential numbering of the container unloading task within the side chain of its respective vessel; The chain number to which the ship-side export container task or container overturning task belongs; The sequential number of the ship-side export container task or container overturning task within its chain; For use in representing arbitrary container tasks An integer variable representing the loading and unloading sequence number of the quay crane; Specifically, formula (8) describes the relationship between the integer variable of the quay crane loading / unloading sequence number and the 0-1 decision variable indicating whether there is a successor process relationship for the container unloading task, showing that when When equal to 1, the task The quay crane loading / unloading sequence number must be greater than the task number. The loading and unloading sequence number; Formula (9) is the quay crane operation sequence constraint, that is, the quay crane operation sequence satisfies that the upper part of the same stack of ships should be unloaded first, the lower part of the same stack should be loaded first, and the containers of each stack should be unloaded first and then loaded.
[0027] Preferably, the constraint for calculating the number of box turnings is expressed as follows: (10) -1- (11) (12) In the formula: Used to represent tasks to be uninstalled An integer variable representing the loading and unloading sequence number of the quay crane; To represent the task to be loaded An integer variable representing the loading and unloading sequence number of the quay crane; It is a sufficiently large positive number; To indicate the task Is it prior to The loaded 0-1 variable, if Prior to If loaded, the value is 1; otherwise, it is 0. This is the set of export container tasks in the departure layout; Specifically, formulas (10) and (11) describe the integer variables of the quay crane loading / unloading sequence number and the task. Is it prior to The relationship between the loaded 0-1 variables, when the task The loading / unloading sequence number is less than the task number. When using the loading and unloading sequence number, ,on the contrary Formula (12) describes whether there is a container holding relationship between two export containers in the yard, when the export container task The location of the storage yard is located Below the same stack, and Must precede During extraction, Will to When the pressure chamber is formed, at this time It equals 1.
[0028] Specifically, the loading and unloading task constraints are as follows: (13) (14) (15) (16) In the formula: for R The absolute value of; Specifically, formula (13) ensures that all loading and unloading tasks are completed; formula (14) ensures that the quay crane loading and unloading sequence numbers of different tasks are different; formula (15) ensures that two identical tasks do not become each other's immediate predecessor or successor tasks; formula (16) ensures that there is no box-over-box relationship between two identical tasks to be exported.
[0029] Specifically, the pressure box constraint is expressed as follows: + (17) Specifically, formula (17) ensures that there is at most one boxing relationship between two export tasks.
[0030] Specifically, the variable domain constraint is expressed as follows: (18) (19) (20) (twenty one) (twenty two) In the formula: For the set of buffer bins; This is used to indicate whether to allocate yard-side container slots (p1, q1) to ship-side export container missions. The 0-1 decision variables, if the container positions (p1, q1) on the yard side are assigned to the export container tasks on the ship side. If the value is 1, then the value is 1; otherwise, the value is 0. To determine whether to allocate yard-side container slots (p2, q2) to ship-side export container missions. The 0-1 decision variables, if the container positions (p2, q2) on the yard side are assigned to the export container tasks on the ship side. If the value is 1, then the value is 1; otherwise, the value is 0. This is a collection of tasks for export containers awaiting loading at the yard; The yard station number to which the yard-side container space belongs to the first category of export container missions; The sequential number of the yard-side container location corresponding to the first category of export container task within its respective yard station; The yard station number to which the yard-side container space belongs for the second category of export container tasks; The sequential number of the yard-side container location corresponding to the export container task of the second category within its respective yard station; Specifically, formulas (18)-(22) are constraints on the variable domain, which define the values of the decision variables used in this embodiment.
[0031] Specifically, such as Figure 4 This example focuses on container transshipment operations in a single bay scenario. The aim is to maximize the number of double-cycle operations and effectively control the number of container turnovers by coordinating and optimizing the quay crane (QC) loading / unloading sequence and export container bay allocation, thereby reducing the total operating cost of terminal equipment. The key parameters of the quay crane and yard crane operation coordinating optimization model in this example under the double-cycle mode are set as follows: the number of ship stacks is 4, with a maximum of 3 layers; the number of yard stacks is 3, with a maximum of 2 layers; the operation tasks are divided into an import container task set {1,2,3,4,5,6}, a type 1 export container task set {10,11,12}, a type 2 export container task set {13,14,15}, and a container turnover set {7,8,9}; the penalty coefficient for the number of container turnovers is 0.5.
[0032] In the Container Stowage Problem (CSP) of dual-circuit quay crane operations, the vessel's arrival layout needs to be converted to a departure layout through transshipment operations. The arrival layout is the initial stowage state before unloading, while the departure layout is the target stowage state after loading. Containers are classified into four categories: import, export, fixed, and overturned. Imported containers only exist in the arrival layout, export containers only in the departure layout, fixed containers remain in their original positions, and overturned containers must be unloaded to a buffer zone before being reloaded. Figure 4The CSP instance shown is used as an example to illustrate the problem: the left side represents the arrival layout, corresponding to the stowage state before unloading; the right side represents the departure layout, corresponding to the pre-planning state after loading; the quay crane in the middle is the equipment that performs transshipment operations and must follow stacking rules to complete the conversion between the two layouts. In this case, 6 import containers, 3 overturned containers, and a total of 6 export containers of two types must be transshipped. The containers at positions (1,1) and (2,1) are fixed containers and are not affected by the transshipment process.
[0033] To solve this example problem, this embodiment employs the GRASP-PR algorithm for iterative optimization. During the construction phase, imported container 7 (the overturned container) is randomly selected as the first unloading task, based on the "unloading..." The initial operation sequence is generated using the alternating loading principle, and container slots are allocated to export containers based on the yard layout, yielding an initial solution (6 double cycles and 2 container turnovers). During the local search phase, the number of container turnovers is reduced to 1 by swapping the task order within the movable window (e.g., adjusting the loading order of export containers 14 and 15) and optimizing container slot allocation. In the path reconnection phase, an elite solution (7 double cycles) is introduced as guidance, and the loading and unloading sequences are gradually adjusted to form the final solution: unloading order {2,7,3,8,9,4,5,6,1}, and loading order {10,11,12,13,16,17,18,14,15}, achieving 7 double cycles and 1 container turnover. This result is completely consistent with the optimal solution obtained by the Gurobi solver within 5 seconds, verifying the effectiveness of the model and algorithm.
[0034] Figure 4 The example problem can be solved in under 5 seconds using the commercial solver Gurobi (temporarily). Subsequent experiments The values will be analyzed further. The optimal solution is represented by the following non-zero decision variables: , , , , , , , , , , , , , , , , , , , , , , , , , .
[0035] Considering the allocation of container slots among different types of export containers, an optimal quay crane loading and unloading sequence is obtained by maximizing the number of double-cycle operations of quay cranes and effectively reducing the number of container repositioning operations of yard cranes, such as... Figure 9 As shown, a double cycle was performed on the subsequence (2, 10, 7, 11, 3, 12, 8, 13, 9, 16, 4, 17, 5, 18, 6, 14), for a total of 10 cycles and 7 double cycle operations. The yard crane generated 1 container flipping operation, which significantly improved the operational efficiency of the quay crane and the yard crane.
[0036] To analyze the impact of export container yard storage locations on quay crane (QC) loading and unloading operations, it is necessary to first examine the yard layout: Figure 5 The display shows the storage situation of export containers in the yard. In bay 2, export containers of types E1 and E2 are stacked in layers, and their storage position determines the order in which the containers are picked up.
[0037] Figure 6 based on Figure 4 The example shown presents a feasible quay crane loading and unloading operation sequence without considering yard layout constraints. This sequence completes 6 double-loop operations, but because it does not match the yard storage order (the storage order of export containers is not considered), the yard crane needs to perform 2 container turning operations when retrieving containers, adding extra operations: Six double-cycle operations: [16,1]-[17,2]-[10,3]-[11,4]-[12,5]-[13,6]; Two container reversing operations: Container 11 is an E2 category export container. If this container is loaded first, the two E1 boxes on the E2 category container need to be moved, resulting in two container reversing operations.
[0038] Figure 7 This is an improved sequence that takes into account the impact of container repositioning by the yard crane: it still completes 6 double-cycle operations, but by matching the storage order in the yard, it avoids container repositioning by the yard crane and reduces ineffective operations. Container 12 belongs to the E1 category of export containers. In the yard layout diagram, E1 containers can be loaded first to avoid container repositioning, and then E1 containers 12 and 13 can be loaded in sequence.
[0039] To clearly represent the priority relationship of container loading and unloading, the study uses a priority directed graph to recode container tasks. Containers in the same stack are linked together by "chains". Arrows indicate that "tail tasks are loaded and unloaded before the tasks they point to". (i,j) represents the j-th loading and unloading task in the i-th chain. The larger the value of j, the later the operation order. The priority relationship of each chain cannot be violated because loading and unloading operations must be carried out strictly according to the arrival and departure layouts and no container overturning can occur on the ship.
[0040] Figure 8 The example problem demonstrates the priority relationships of the tasks, comprising five chains: chains 1 to 4 correspond to the ship stack, and chain 5 corresponds to the yard stack. Different colored nodes distinguish container types. By using a priority-directed graph, container tasks located in the same stack for both arrival and departure layouts are linked together by a chain. This indexing method clearly defines the priority relationships of containers. Within the ship stack, containers above are unloaded first, followed by containers below. Furthermore, imported containers and overturned containers that obstruct unloading must be unloaded first, before loading exported containers and overturned containers in the temporary storage buffer. Within the yard stack, the chain number is greater than that of the ship stack, and a smaller j value indicates that the container is located on the upper level of the yard. Priority relationships are also reflected through chains.
[0041] S2: A greedy stochastic adaptive search algorithm with fusion path reconnection is used to solve the objective function of the collaborative optimization model of quay crane and yard crane operations under the dual-loop mode, so as to obtain the final quay crane loading and unloading sequence and the final export container space allocation result.
[0042] Specifically, the quay crane scheduling problem has been proven to be a typical combinatorial optimization problem. Although the proposed mixed-integer programming model can solve small-scale examples using a solver, as the problem size increases, the solver cannot find the optimal solution in a finite time. Therefore, it is necessary to design a heuristic algorithm to solve this problem.
[0043] To address the collaborative optimization problem of quay crane (QC) and yard crane (YC) operations under a dual-loop model, this embodiment designs a Greedy Random Adaptive Search Algorithm (GRASP-PR) that integrates path reconnection (PR). This algorithm overcomes the limitations of the traditional Greedy Random Adaptive Search Algorithm GRASP, which only includes a construction phase and a local search phase, by adding a path reconnection phase. It improves the quality and efficiency of the solution through a three-stage iterative approach of "construction—local search—path reconnection." Its core framework is as follows: (1) Initialization Initialize the elite solution set to empty, set the algorithm termination conditions (maximum number of iterations, maximum number of iterations without improvement), and set the candidate value set and initial weights for the path reconnection frequency and greediness parameter.
[0044] (2) Each iteration First, the greed parameter is dynamically selected based on historical performance (such as roulette wheel), and a complete initial solution (quay crane sequence + container allocation) is generated through the construction phase.
[0045] (3) Perform a local search on the initial solution. Under the constraint of a movable window, the solution is iteratively improved through neighborhood operations such as task swapping, insertion, and bin swapping to obtain a local optimum.
[0046] (4) Path reconnection If the elite set is not empty and the path reconnection trigger condition is met, then the following sub-procedure is executed: ① Randomly select a guiding solution from the elite set; ② Starting from the current solution and ending at the guiding solution, perform path reconnection, generate a series of intermediate solutions through sequence movement and allocation adjustment, and return the intermediate solution with the highest objective function value on the entire path as the best improved solution; ③ Return the best improved solution to the main loop.
[0047] (5) Unlocking updates and maintaining elite groups The main loop receives the local search solution and the optimal improved solution for path reconnection.
[0048] ①If the best improved solution for path reconnection is better than the current solution, then replace the current solution; ② Try to add the local search solution and the optimal improved solution of path reconnection to the elite set according to the criteria of quality and diversity; ③ If the current solution is better than the global optimal solution, then update the global optimal solution and its corresponding quay crane loading and unloading sequence, double loop count, and export container space allocation scheme, and update the weight of the greedy parameter according to the quality of the solution.
[0049] (6) Termination and Output Repeat steps (2) to (5) until the termination condition is met, and output the global optimal solution and its corresponding quay crane loading and unloading sequence, double loop count and export container space allocation scheme.
[0050] S21: Obtain the initial quay crane loading and unloading sequence to obtain the initial solution for the quay crane loading and unloading sequence; Specifically, the construction phase requires the simultaneous determination of the quay crane loading and unloading sequence and the allocation of container slots for export vessels to generate initial solutions for these two parts. The specific process is as follows: Specifically, the operational efficiency of quay cranes has a decisive impact on the service time of container terminals, so the operational sequence of quay cranes should be determined first. The constructor starts with an empty quay crane loading and unloading sequence, and iteratively expands the sequence by repeating three steps: (1) establishing a candidate task set; (2) selecting tasks from the candidate task set; (3) updating the sequence; S211: Establish a candidate task set: The tasks in the candidate task set include the tasks at the top of the actual storage location in the ship stack or yard stack; The initial candidate task set includes two categories: unloading tasks and loading tasks. It contains all immediately operable top-level tasks targeting the actual storage location on the ship's stack or yard stack, such as imported containers awaiting unloading at the top of the ship's stack, overturned containers needing temporary unloading to the buffer zone, and export containers available for loading in empty stacks. Upon completion of each task, the tasks directly below it in the same chain are unlocked and added to the candidate task set, ensuring priority constraints for stack operations. "Tasks directly below in the same chain" refers to the task corresponding to the container directly below the currently completed task in a task chain within the same ship or yard stack, linked according to the logic of "processing the upper layer first, processing the lower layer later." For example, in the task chain of ship stack A→B→C, after completing the unloading task of A, the task directly below in the same chain is the unloading task of B; in the task chain of yard stack E1→E2, after completing the loading task of E1, the task directly below in the same chain is the loading task of E2. The initial candidate set only contains top-level tasks that can be directly manipulated. Lower-level tasks are "locked" because they are "pressed down" by upper-level containers. Only after the upper-level tasks are completed and the operational obstacles are removed can the lower-level tasks be "unlocked" and added to the candidate set. This rule enforces the priority constraint of stack operations—unloading starts with unloading the upper-level tasks before unloading the lower-level tasks, and loading starts with loading the lower-level tasks before loading the upper-level tasks. Lower-level tasks cannot be unlocked until the upper-level tasks are completed, thus preventing violations of the order of operations and ensuring the rationality of the operation logic.
[0051] In this embodiment, the overturning task is not treated as a separate task, but rather split into two stages: unloading and loading, each categorized into a corresponding task type to ensure the continuity of the workflow and the fulfillment of constraints. The unloading task encompasses two types: first, imported containers awaiting unloading from the top of the ship's stack to the yard; and second, overturned containers obstructing the unloading of imported containers and requiring temporary relocation to the buffer zone. Both are operations involving transfer from the ship to the shore, initially included in the candidate set, and unlocked for subsequent tasks in the same chain upon completion. The loading task refers to export containers that can be directly loaded from an empty ship's stack. The initial candidate task set only includes loading tasks corresponding to empty stacks. Loading tasks for other stacks are only unlocked and added to the candidate set after all unloading tasks (imported containers + overturned containers) for that stack are completed, conforming to the "unload first, load later" operational rule. Reloading overturned containers from the buffer zone onto the ship is also a loading task, and must be unlocked and added to the candidate set after the corresponding ship's container space becomes available.
[0052] S212: Randomly select one unloading task from the candidate task set and add it to the quay crane loading and unloading sequence, and remove the selected unloading task from the candidate task set; since this is the first iteration, there are no tasks in the sequence at this time, so there is no need to specify the insertion position, and directly append the task to the end of the sequence, that is, the last task (the number of double loops is initially 0); to avoid the logical contradiction of loading the ship with unloaded containers in the stack; thereafter, the task type to be selected this time needs to be determined according to the previous task type selection.
[0053] S213: Update the candidate task set and obtain the updated candidate task set; Specifically, in each iteration, the currently selected task is directly appended to the end of the loading and unloading sequence, and then the task is removed from the candidate task set. The subsequent tasks that meet the priority constraints are unlocked according to the operation progress of the stack in which it is located to update the candidate task set. At the same time, the cumulative number of double loops is updated according to the rule of "loading only → unloading is counted as double loop". The above process is repeated until the candidate task set is empty, that is, all container loading and unloading tasks have been completed, and the initial solution of the quay crane loading and unloading sequence is generated.
[0054] S214: Based on the nth task in the quay crane loading and unloading sequence, determine the (n+1)th task in the quay crane loading and unloading sequence, as follows: If the nth task in the quay crane loading / unloading sequence is an unloading task, select a loading task from the updated candidate task set as the (n+1)th task in the quay crane loading / unloading sequence (the number of loops remains unchanged because the "loading → unloading" alternation condition is not met). If there is no loading task in the updated candidate task set, select an unloading task that has not completed its unloading stack as the (n+1)th task in the quay crane loading / unloading sequence (the number of loops remains unchanged), and remove the selected task from the updated candidate task set; then execute S215. This is because stack loading cannot begin before unloading is complete, and frequent alternation between different stacks would hinder the job process.
[0055] Conversely, if the nth task in the quay crane loading / unloading sequence is a loading task, select an unloading task from the updated candidate task set as the (n+1)th task in the quay crane loading / unloading sequence, and give higher priority to unfinished unloading stack tasks (double loop count + 1), for the same reason as above; otherwise, randomly select a task from the updated candidate task set to add to the quay crane loading / unloading sequence as the (n+1)th task in the quay crane loading / unloading sequence (double loop count remains unchanged), and remove the selected unloading task from the updated candidate task set, then execute S215.
[0056] S215: Execute S213. If the updated candidate task set is not empty, then execute S214. Otherwise, obtain the initial solution for the quay crane loading and unloading sequence as a sequence formed by the (n+1)th task, the nth task, ..., the 1st task. S22: Based on the initial solution of the quay crane loading and unloading sequence, obtain the initial export container space allocation result to obtain the initial solution of export container space allocation; Specifically, given the known loading and unloading sequences of the quay cranes, including the loading and unloading order of all containers (imported, exported, and repositioned), the loading order of all exported containers is also known. The following allocation of container slots is based on the loading order of exported containers. It should be noted that during the construction phase, the generation of the quay crane loading and unloading sequence and the allocation of export container slots are not parallel decisions, but rather employ a step-by-step construction strategy: First, a feasible quay crane loading and unloading sequence is generated based on a heuristic rule that maximizes the number of double loops. Then, using the loading order of exported containers in this sequence as input, and under the premise of satisfying the pre-map category constraints, each exported container is allocated the available slot with the lowest current repositioning cost according to a greedy principle, thus forming the initial solution for export container slot allocation.
[0057] The allocation of container slots on container ships employs a classification constraint and dynamic adjustment heuristic strategy: (1) According to the pre-allocation plan requirements, the export containers are divided into different categories. Each category can only be allocated to the corresponding ship container area. In this embodiment, the export containers are divided into two categories, L1 and L2, according to the preset rules. Each category can only be allocated the resources of the corresponding yard container set (S1 or S2).
[0058] Specifically, the classification of export containers is primarily based on pre-deployment plan requirements, mainly according to: ① Destination Port: Based on the order of vessel calls at ports, a "destination port exclusive area" is pre-determined on the map. Containers destined for the same port are stacked together to facilitate rapid unloading at subsequent ports and avoid cross-port container handling.
[0059] ② Physical attributes: Classified by container size / type (e.g., 20ft, 40ft). Pre-allocation plans will reserve dedicated space for different sizes to avoid wasted space or loading conflicts.
[0060] ③ Special requirements: Classified according to the special attributes of the goods (such as weight, temperature, and hazard). For example, dangerous goods containers, refrigerated containers, and overweight containers need to be assigned to corresponding isolation areas, power supply areas, or bottom load-bearing areas.
[0061] ④ Discharge Port Priority: Based on the unloading order (first port of call, intermediate ports, last port of call). Pre-shipment plans will allocate container slots according to priority, for example, containers from the first port of call will be placed in the outer deck, and containers from the last port of call will be placed in the inner deck, to optimize unloading efficiency. For example, export containers from the first port of call (such as Ningbo Port) are classified as "high priority" and allocated to the outer deck; export containers from the last port of call (such as Haikou Port) are classified as "low priority" and allocated to the inner deck. These two categories cannot be cross-allocated.
[0062] (2) Use of symbols This indicates the task of exporting goods from the storage yard side. Assigned to ship export tasks During the allocation process, for each pending export container task, the system will iterate through all available container slots within its class and calculate the number of container flips for each candidate slot. (Right now The number of containers above the yard is used to generate a candidate list sorted in ascending order of cost. To balance optimality and diversity, a restricted candidate list mechanism is adopted. ): Before selection A proportion of low-cost container slots constitute the candidate pool. The parameter is between 0 and 1. Randomly select an allocation scheme and the task Assigned to task After allocation, From the set , , Remove items from the list and accumulate the number of times items are searched. Continue assigning and deleting tasks until... There are no elements in it.
[0063] Specifically, in order to determine the rules for constructing the initial solution (The greedy parameters generated by the quay crane loading and unloading sequence) and The value of the RCL (Representative Container Load) ratio parameter for export container space allocation was tested experimentally. and Combinations of values. Found when... When the value is 0, that is, when the solution is completely greedy, the quality of the solution is the best. This proves, on the one hand, that the proposed method for constructing the quay crane loading and unloading sequence in this embodiment is effective. The rules for the initial solution are very rigorous, meaning that the next task selected through these rules is almost optimal for the current sequence. On the other hand, it also proves that when studying the double-loop operation mode using a single container as the basic operational unit, the operational priority relationship between containers significantly influences the range of choices. Therefore, it can be seen from the S21-S22 construction phase that this embodiment does not set... Yes. And for During the algorithm's iteration process, the following settings were configured: Select from the set {0.1, 0.2, 0.3, 0.4}. The larger the value, the more random the selection will be. The probability of the best container task allocation being selected each time is lower, which can ensure the diversity of new solutions generated during the algorithm's solution process.
[0064] At the beginning of each iteration of the algorithm The algorithm selects from {0.1, 0.2, 0.3, 0.4} using a roulette wheel. Initially, all values have the same weight, and the weight of each value is updated at the end of each iteration. If a high-quality solution is obtained, the weight of the corresponding value is increased; otherwise, the weight of the corresponding value is decreased. This rule increases the adaptability of the algorithm, selecting an appropriate value for each computational example. value.
[0065] S23: A greedy random adaptive search algorithm with fused path reconnection is used to obtain the final quay crane loading and unloading sequence and export container space allocation results.
[0066] For the initial solution generated during the construction phase, this embodiment adopts three improvement strategies in sequence to iteratively improve the initial solution: exchanging the quay crane loading and unloading sequence, inserting the quay crane loading and unloading sequence, and exchanging container positions.
[0067] Since the quay crane loading and unloading sequence obtained during the construction phase ensures the priority relationship of container operations by continuously unlocking tasks, arbitrarily changing the position of tasks during the improvement phase would violate this priority relationship and lead to unreasonable results. Therefore, this embodiment introduces the concept of a movable task window, where each task can move freely within its own movable task window without compromising the feasibility of the solution.
[0068] Determining the movable window: Priority relationships only exist between tasks on the same chain; tasks on different chains do not have this relationship. The value indicates whether a task is processed first or later in this chain. Therefore, the task... The movable window is defined in the quay crane loading and unloading sequence, in the task and All positions between. If the task... Not in the set In the middle, the task The movable window expands into a task All previous positions; if the task Not in the set In the middle, the task The movable window expands into a task All subsequent positions.
[0069] Once the movable window for each task is clearly defined, improvements to the loading and unloading sequence of the quay crane can be implemented. The specific strategy is as follows: S231: Randomly select the m1-th task and the m2-th task in the quay crane loading and unloading sequence, and obtain the movable windows of the m1-th task and the m2-th task respectively. If the m1-th task is within the movable window of the m2-th task and the m2-th task is within the movable window of the m1-th task, then swap the m1-th task and the m2-th task to obtain the quay crane loading and unloading sequence after the swap. If the number of double loops in the quay crane loading and unloading sequence after the swap does not decrease, and if the value of the objective function of the quay crane loading and unloading sequence after the swap is greater than the value of the objective function of the quay crane loading and unloading sequence, then execute S232 based on the quay crane loading and unloading sequence after the swap. Otherwise, directly execute S232 based on the quay crane loading and unloading sequence. Specifically, the quay crane loading / unloading sequence is swapped: This involves attempting to swap the positions of two tasks to obtain more double-loop operations. First, two tasks in the quay crane loading / unloading sequence are randomly selected, and their movable windows are obtained, representing the possible positions of the two tasks. Then, it is checked whether the other task is within either movable window; if so, the two tasks can be swapped. If the number of double loops remains unchanged or increases, the swap is accepted, and the objective function is recalculated. If the objective function value increases, the optimal solution is updated. In this embodiment, when two tasks have no direct job priority constraints and swapping their positions does not violate the task order rules of their respective chains, it indicates that the two tasks are within each other's movable windows. The objective function value is calculated based on the objective function of the quay crane and yard crane operation collaborative optimization model under the double-loop mode of this embodiment. The calculation of the number of double loops is a conventional technique for those skilled in the art and will not be described in detail here.
[0070] S232: Randomly select the m1th task in the quay crane loading and unloading sequence after the task exchange, obtain the movable window of the m1th task, and update the position of the m1th task to any position within the movable window of the m1th task. Obtain the quay crane loading and unloading sequence with the updated task position. If the number of double loops of the quay crane loading and unloading sequence with the updated task position does not decrease, and if the value of the objective function of the quay crane loading and unloading sequence with the updated task position is greater than the value of the objective function of the quay crane loading and unloading sequence without the updated task position, then execute S233 based on the quay crane loading and unloading sequence with the updated task position; otherwise, execute S233 directly. Specifically, regarding the insertion of tasks in the quay crane loading / unloading sequence: Attempt to insert tasks into new positions to build more double-loop operations. This is done by randomly selecting a task in the quay crane loading / unloading sequence, obtaining the task's movable window, randomly selecting a new position within the movable window, inserting the task into that new position, and updating the subsequent task indices. If the number of double loops remains unchanged or increases, the insertion is accepted, and a new objective function value is calculated. If the objective function value improves, the optimal solution is updated.
[0071] S233: Randomly select the allocation positions of the n1th and n2th export containers from the initial export container allocation results and swap them to obtain the objective function value after the swap. If the objective function value after the swap is greater than the objective function value before the swap, then S231 is re-executed based on the objective function value after the swap until the iterative convergence condition is met, and then S234 is executed. Otherwise, S231 is re-executed directly until the iterative convergence condition is met, and then S234 is executed. Among them, the n1st export container and the n2nd export container are of the same category; Specifically, container slot swapping: This involves attempting to swap the positions of two export containers on the ship to reduce the number of times the yard crane needs to handle containers during pickup. Due to vessel pre-stack constraints, export containers can only swap slots within the same category of export containers; therefore, two tasks of the same type are selected for swapping. Changing container allocation will alter the number of containers held in place during pickup for each container, requiring a recalculation of the number of times each container needs to be handled. The objective function value is then updated. If the objective function value increases, the optimal solution is updated. In this embodiment, the method used to calculate the number of box flips is a conventional method in the field, and will not be described in detail here.
[0072] S234: Obtain the final quay crane loading / unloading sequence and export container space allocation results.
[0073] In the local search phase, the iterative convergence condition in this embodiment is based on a combination of the maximum number of iterations and the number of times no improvement has been found, providing a more flexible and effective control mechanism for the algorithm's execution. The maximum number of iterations globally limits the algorithm's running time, ensuring that the algorithm does not run indefinitely; the number of times no improvement has been found locally determines whether the algorithm has converged, preventing the algorithm from continuing ineffective iterations when no better solution can be found. This combined approach ensures that the algorithm has sufficient opportunities to find a better solution while avoiding excessive consumption of computational resources, thus achieving a better balance between computation time and solution quality.
[0074] Specifically, in the path reconnection phase of this embodiment: by connecting the superior features of the current solution and the elite solution, local optima are broken: 1. Elite set construction: Based on the differences in the sequence of solutions and bin allocation schemes, high-quality and diverse solutions are selected from historical iterations to form an elite set.
[0075] 2. Solution matching and adjustment: Select the solution after local search as the "current solution", and randomly select 1 solution from the elite set as the "guide solution"; Execution sequence movement: Gradually adjust the loading and unloading task sequence of the current solution to move closer to the guiding solution and create more opportunities for double-cycle operation; by optimizing the quay crane loading and unloading sequence, the quay cranes can achieve "unloading-loading" alternation more frequently, maximizing the utilization rate of quay cranes without increasing equipment investment, and ultimately improving the overall operational efficiency of the terminal.
[0076] The essence of dual-cycle operation is the alternating "unloading-loading" operation of the quay crane (both round trips are heavily loaded). Each additional dual-cycle operation means that the quay crane reduces one empty return trip, and the number of containers handled in the same amount of time increases (theoretically doubling compared to single-cycle operation).
[0077] Execute allocation adjustment: Compare the container allocation of the two solutions, prioritize modifying the task with the largest difference in the number of container turnovers, and refer to the container allocation scheme of the guiding solution; In this embodiment, a container slot for a task in the current solution is directly changed to the corresponding container slot in the elite solution. This is contingent upon the target container slot being unoccupied and meeting load allocation constraints. If the container slot is already occupied, it is necessary to continue searching for an available slot for the task, which may require a container slot swap operation, or the current task may be deemed unfeasible and the modification abandoned.
[0078] 3. Pairing and swapping Find task A in the current solution that needs optimization, whose ideal bin slot in the elite solution is currently occupied by task B. Directly swap the bin allocations of task A and task B. For the task with the largest difference in bin flipping count, prioritize "direct replacement" to optimize bin allocation; if the target bin slot is occupied, and the task occupying the bin slot has a smaller impact from bin flipping, then perform "pair swap"; if neither method satisfies the constraints, temporarily store the task and process the next task with a large difference in bin allocation.
[0079] 4. Termination condition: Stop when the difference between the two solutions is small enough or the maximum number of adjustment steps is reached. Output the optimal solution on the path, add it to the elite set and update the global optimal solution.
[0080] In this embodiment, the difference between the two solutions is mainly calculated from two dimensions: task sequence and bin allocation. 1. Sequence difference (task distance): Sequence difference reflects the difference between the two solutions in the container loading and unloading sequence of the quay crane.
[0081] Computational logic: By comparing the task sequences of two solutions, we can find the differences in the positions of the same task in the sequence.
[0082] Extraction method: The algorithm constructs a "movement candidate set," recording the indices of all tasks whose positions in the initial solution are inconsistent with those in the guiding solution. Each step closer to the guiding solution is equivalent to selecting a task from the candidate set and adjusting its position in the initial solution to match that of the guiding solution.
[0083] 2. Differences in allocation schemes: Differences in allocation reflect the different ways in which export containers are allocated in the yard (yard crane operation area).
[0084] Calculation logic: Compare the specific yard locations (stack index or level) to which the same export containers are assigned in the two solutions.
[0085] Extraction method: The algorithm constructs an "assignment candidate set" to record all tasks with inconsistent assignment positions.
[0086] The total difference is composed of these two dimensions. In the algorithm implementation, it is reflected in the total number of elements to be adjusted in the "movement candidate set" and the "allocation candidate set".
[0087] Specifically, the improved GRASP-PR algorithm in this embodiment includes a maximum iteration limit and an early stopping mechanism. The algorithm terminates when the maximum number of iterations is reached or the optimal target value has not improved within a certain number of consecutive iterations. These criteria ensure that the algorithm converges effectively within a reasonable timeframe.
[0088] Preferably, after S2, the method further includes: obtaining the upper bound of the objective function, and simultaneously obtaining the number of double cycles based on the final quay crane loading / unloading sequence and the final export container space allocation result; so as to evaluate the final quay crane loading / unloading sequence and the final export container space allocation result based on the number of double cycles and the upper bound of the objective function.
[0089] Specifically, this embodiment proposes an upper bound formula for the container sorting problem in double-cycle operations. This formula is mainly used to define the maximum number of double-cycle operations in quay crane theory, providing a benchmark for measuring the algorithm's solution performance.
[0090] The core of the upper bound formula is that the calculated value is the theoretical maximum number of double-cycle operations of the quay crane under the scenario, which is determined by the dual constraints of "theoretical limit constraints" and "actual operation constraints". It can be used to judge the degree of approximation between the actual number of double cycles obtained by the algorithm and the optimal target.
[0091] The objective function in this embodiment consists of two parts: the number of double cycles of QC on the quay crane minus the number of box-turning cycles on the yard crane (YC) with a certain penalty cost. Therefore, the upper bound is... The upper bound of the number of double cycles for QC of the quay crane is calculated. The lower bound of the number of times the YC (Yard Bridge) flips boxes. Multiply by the penalty coefficient for the number of times the box is searched .Right now
[0092] Among them, the upper bound of the number of double loops :
[0093] In the formula: This is the upper bound of the objective function; This is the upper bound of the number of double cycles for the quay crane; This is the lower bound of the number of times the yard bridge can be flipped. (1) Upper bound of the number of double loops
[0094] In this embodiment, the double-loop count is defined as the number of alternating loading and unloading operations performed by the quay crane. Ideally, all tasks can form a continuous chain, with a theoretical maximum chain length of [missing information]. However, in practice, constraints exist. Because containers within a stack must be processed in a specific order, container ship loading and unloading operations always begin with unloading a container stack and end with loading a container stack. The containers unloaded first and loaded last form continuous sub-chains, and these sub-chains cannot form double loops. Therefore, the number of containers in these stacks needs to be subtracted from the theoretical upper bound. To ensure the maximum value characteristic of the upper bound, the minimum number of containers unloaded from the stack is subtracted here. and minimum number of containers in the loading stack Furthermore, since only loading before unloading is counted as one double cycle, it needs to be divided by 2. Additionally, during loading and unloading operations, loading begins when all containers in a particular stack on the ship have been unloaded, while a double cycle operation should begin with the first container loaded. Therefore, the first container in the smallest loading stack may form a double cycle with containers in other stacks, requiring compensation by adding 1 to the above. Beyond this, the essence of a double cycle is the number of times the quay crane performs loading before unloading. Due to the constraint of the number of task types, the number of double cycles cannot exceed the number of fewer task types.
[0095] (2) Lower bound of the number of times the yard bridge can be flipped : The order of YC operations is influenced by the order of QC operations, making it difficult to derive the lower bound of the number of YC box flips independently. Furthermore, in subsequent example experiments, this embodiment demonstrates that both the model and algorithm can effectively reduce the number of YC box flips, reducing it to 0 or 1 flips. Therefore, Set to 0.
[0096] In summary, the formula for the upper bound of the problem is expressed as follows:
[0097] In the formula: This is the upper bound of the objective function; This is the upper bound of the number of double cycles for the quay crane; The number of containers to be unloaded from the ship's warehouse; The number of containers to be loaded in the ship's warehouse; For the ship stack index; Specifically, the upper bound formula is the theoretical optimal benchmark for measuring the algorithm's solution performance. It is used to define the maximum value that the objective function can achieve. In this case, it refers to the theoretical maximum number of double-loop operations that can be performed under a given ship loading condition. It is derived based on problem constraints and reflects the optimal possible result under ideal conditions (no additional interference, constraints fully satisfied). It is used to judge the gap between the algorithm's actual solution and the theoretical optimal result.
[0098] The upper bound formula is derived by combining the upper bound of the number of double cycles and the lower bound of the number of YC container flips. The upper bound of the number of double cycles provides the core positive part of the upper bound formula, which is the maximum number of double cycles that the quay crane can achieve and is the main component of the upper bound formula. The lower bound of the number of YC container flips provides the correction part of the upper bound formula. Since container flipping will penalize the objective function, the theoretical optimum needs to be calculated using the minimum possible number of container flips (set to 0 in this embodiment) to avoid underestimating the upper bound.
[0099] Specifically, after the algorithm calculates the actual number of double loops, it compares the solution with the upper bound to determine the optimization potential. If the relative error is ≤2%, it indicates that the solution is excellent.
[0100] A specific embodiment of the present invention is as follows: Setting the penalty coefficient: To balance the two objectives of maximizing the number of double cycles of the quay crane (QC) and minimizing the number of container turnovers of the yard crane (YC), this embodiment sets a penalty coefficient θ in the objective function to penalize the number of container turnovers. This embodiment sets... Used for subsequent experiments. In actual operation, The value can also be dynamically adjusted according to the specific operational situation of the terminal: if the terminal yard is highly congested, it can be appropriately increased. Value (e.g.) This allows for stricter restrictions on box-turning operations; conversely, if QC resources are sufficient, the restrictions can be appropriately reduced. Value (e.g.) (This is to focus on improving overall throughput).
[0101] In this embodiment, a penalty coefficient (θ=0.5) for the number of times the container is turned over is added to the objective function, and the optimal solution is obtained within 5 seconds using the Gurobi solver; the final optimal loading and unloading sequence for the quay crane is as follows: Figure 9 As shown, seven double-cycle operations were completed within 10 cycles, with only one container re-tumbling operation (the container retrieval step corresponding to "18" in the loading column, which occurred because the storage order in the yard did not completely match the retrieval order). This maximized the number of quay crane operations, reduced invalid container re-tumbling operations, and improved the overall operational efficiency of the terminal.
[0102] Analysis of algorithm results under different scales and scenarios: To comprehensively evaluate the algorithm's performance, this embodiment constructs a test case set covering different scales and operational scenarios. The test case sizes are divided into small-scale, medium-scale, and large-scale cases based on different bit sizes, with varying stack counts (…). ) and number of layers ( ) respectively set as = =5, 10, and 15. Regarding operational scenarios, to examine the impact of different loading and unloading tasks on the QC dual-cycle efficiency of the quay crane, referring to the high stowage, low inbound, and low outbound scenarios defined by Meisel and Wichmann, and drawing on the research ideas of Liu et al., this embodiment adds a low stowage scenario. These scenarios are distinguished by setting the proportions of various types of containers (inbound, outbound, overturned, and fixed) in the ship's arrival and departure layout. Specific parameter settings are shown in Table 1. Furthermore, for each scenario, the proportion of overturned containers ( Tests were conducted at two levels, 10% and 20%.
[0103] Table 1. Job Scenario Settings
[0104] Table 2 lists the test results for large-scale examples. The average solution time for both algorithms is approximately 300 seconds. In 16 examples of this scale, the GRASP-PR algorithm outperformed the GRASP algorithm in 14 examples (87.5%). This indicates that the advantage of the GRASP-PR algorithm becomes more significant as the problem size increases. Regarding the number of YC container turnovers, the GRASP-PR algorithm reduced the average number of turnovers by 2.8 compared to the GRASP algorithm. This means that in practical applications, the GRASP-PR algorithm can more effectively reduce the number of container turnovers at the yard crane, thus reducing non-productive operations within the yard.
[0105] Table 2. Solution results for large-scale examples
[0106] To further evaluate the effectiveness of the upper bound formula, the relative error between the average objective function value obtained by the GRASP-PR algorithm and the corresponding average upper bound value was calculated for each scenario. The calculation formula is: . Figure 10 The calculation results for small-scale, medium-scale, and large-scale examples are presented respectively. It can be seen that, under the four operational scenarios, high and low load configurations... The value is significantly lower than that of low imports and low exports. The value indicates that the proposed upper bound formula is more effective for scenarios with relatively balanced loading and unloading, such as high and low load distribution. Furthermore, the effectiveness of the upper bound formula becomes more significant as the scale of the examples increases, particularly for medium- and large-scale high and low load distribution scenarios. The values are all below 2%.
[0107] The collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode proposed in this invention, along with the GRASP-PR algorithm, has the following significant advantages compared to existing technologies: 1. The work units are refined, and the scheduling schemes are more in line with reality. Existing research often uses container stacks as the basic operational unit, making it difficult to accurately capture the operational priority relationships of individual containers. This invention uses individual containers as the operational unit and re-encodes container tasks through a priority-oriented graph, such as... Figure 8 This clarifies the loading and unloading priorities of containers in ship stacks and yard stacks, enabling the generation of more detailed quay crane loading and unloading sequences and export container space allocation schemes. This significantly improves the practicality and adaptability of the scheduling scheme and solves the problem that traditional stack-level scheduling cannot take into account container-level operation constraints.
[0108] 2. Collaborative optimization of dual devices significantly improves overall efficiency. Traditional research often optimizes quay crane or yard crane operations in isolation, which can lead to a contradiction: improved quay crane dual-cycle efficiency but a surge in yard crane container handling frequency. This invention constructs a collaborative optimization model for quay cranes (QC) and yard cranes (YC). The objective function balances maximizing the number of quay crane dual-cycle operations with minimizing the number of yard crane container handling operations. Dynamic adjustment via pre-maps achieves matching between container allocation and yard storage sequence. Experiments show that this model can maintain a stable quay crane dual-cycle operation rate exceeding 80% while controlling the number of yard crane container handling operations to 0-1 times, significantly reducing non-productive yard operations and achieving optimal global efficiency for core terminal equipment.
[0109] 3. The algorithm has superior performance, achieving a balance between efficiency and quality in solving the problem. To address the shortcomings of traditional GRASP algorithms, such as susceptibility to local optima and insufficient solution stability, this invention introduces a path reconnection (PR) mechanism and designs a GRASP-PR hybrid algorithm. This algorithm achieves feature fusion of high-quality solutions by constructing an elite set, expanding the solution space based on local search. Comparative experiments show that the GRASP-PR algorithm outperforms the traditional GRASP algorithm in solution quality across different scales of computational examples. Especially in large-scale examples, the average number of bridge flips is reduced by 2.8 compared to the traditional algorithm, and the solution time remains controllable (average solution time for large-scale examples is approximately 300 seconds), thus solving the pain point of traditional heuristic algorithms struggling to balance solution quality and efficiency in large-scale problems.
[0110] 4. The upper bound formula provides a quantitative benchmark, facilitating scheme evaluation. Existing technologies lack an effective definition of the theoretical upper limit of quay crane dual-cycle operations, making it difficult to measure the optimization potential of scheduling schemes. The upper bound formula proposed in this invention can accurately calculate the theoretical maximum number of dual-cycle operations for quay cranes, and has better adaptability to balanced loading and unloading scenarios such as high and low load conditions (the average error of the upper bound is less than 2% in medium-to-large-scale scenarios). It provides a unified quantitative standard for evaluating the merits of scheduling schemes, filling the gap in performance evaluation benchmarks in this field.
[0111] 5. Parameters can be dynamically adjusted to adapt to different dock scenarios. The container turnover penalty coefficient θ introduced in the model can be flexibly adjusted according to the actual working conditions of the terminal: when the yard is congested, θ can be increased to strictly limit container turnover, and when the quay crane resources are sufficient, θ can be decreased to focus on improving throughput. Compared with the traditional fixed parameter model, it has stronger scenario adaptability and can meet the differentiated scheduling needs of different terminals.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode, characterized in that, Includes the following steps: S1: Construct a collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode, in order to establish the objective function and constraints of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode; S2: A greedy stochastic adaptive search algorithm with fusion path reconnection is used to solve the objective function of the collaborative optimization model of quay crane and yard crane operations under the dual-loop mode, so as to obtain the final quay crane loading and unloading sequence and the final export container space allocation result, in order to achieve collaborative optimization of quay crane and yard crane operations under the dual-loop mode.
2. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 1, characterized in that, The objective function of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode is expressed as follows: In the formula: The objective function value; The side chain number of the vessel to which the container to be loaded belongs; The sequential numbering of the container loading task within its respective ship's side chain; For the set of all container loading tasks, where, , This is a set of export container tasks in the outbound layout. This is a set of tasks involving overturning containers during the initial setup. The side chain number of the vessel to which the container to be unloaded belongs; The sequential numbering of the container unloading task within the side chain of its respective vessel; This is the set of all container tasks awaiting unloading. ,in, To reach the set of imported container tasks in the layout, To reach the set of tasks involving overturning containers in the layout; For use in determining the first The first ship side chain The task of loading containers and the first The first ship side chain A 0-1 decision variable indicating whether a container unloading task has a successor process relationship; This is the penalty coefficient for the number of times the box is searched; The variable is a 0-1 decision variable used to determine whether a yard crane will perform a container flipping operation due to container compression when retrieving export containers.
3. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 1, characterized in that, The constraints of the objective function of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode include: vessel space allocation constraints for export containers, buffer space allocation constraints for overturned containers, task uniqueness constraints, operation sequence constraints, calculation constraints for the number of overturned containers, loading and unloading task constraints, container pressing constraints, and variable domain constraints.
4. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 3, characterized in that, The job sequence constraint is expressed as follows: In the formula: Used to represent tasks to be uninstalled An integer variable representing the loading and unloading sequence number of the quay crane; To represent the task to be loaded An integer variable representing the loading and unloading sequence number of the quay crane; For use in determining the first The first ship side chain The task of loading containers and the first The first ship side chain A 0-1 decision variable indicating whether a container unloading task has a successor process relationship; It is a sufficiently large positive number; The side chain number of the vessel to which the container to be loaded belongs; The sequential numbering of the container loading task within its respective ship's side chain; This is the set of all container loading and unloading tasks that need to be performed in the arrival and departure layouts. The side chain number of the vessel to which the container to be unloaded belongs; The sequential numbering of the container unloading task within the side chain of its respective vessel; The chain number to which the ship-side export container task or container overturning task belongs; The sequential number of the ship-side export container task or container overturning task within its chain; Let be an integer variable used to represent the quay crane loading / unloading sequence number of any container task (i,j).
5. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 3, characterized in that, The constraint for calculating the number of times the box needs to be turned over is expressed as follows: -1- In the formula: Used to represent tasks to be uninstalled An integer variable representing the loading and unloading sequence number of the quay crane; To represent the task to be loaded An integer variable representing the loading and unloading sequence number of the quay crane; It is a sufficiently large positive number; To indicate the task Is it prior to The loaded 0-1 variable, if Prior to If loaded, the value is 1; otherwise, it is 0. This is the set of export container tasks in the departure layout; The side chain number of the vessel to which the container to be loaded belongs; The sequential numbering of the container loading task within its respective ship's side chain; The side chain number of the vessel to which the container to be unloaded belongs; The sequential numbering of the container unloading task within the side chain of its respective vessel; The variable is a 0-1 decision variable used to determine whether the yard crane will perform a container flipping operation due to container compression when picking up export containers; Used to indicate whether to place the container on the yard side. Ship-side export container task 0-1 decision variables; To determine whether to place the container on the yard side ( ) Assigned to the ship's side export container task 0-1 decision variables; The yard station number to which the yard-side container space belongs to the first category of export container missions; The sequential number of the yard-side container location corresponding to the first category of export container task within its respective yard station; The yard station number to which the yard-side container space belongs for the second category of export container tasks; The sequential number of the yard-side container location corresponding to the export container task of the second category within its respective yard station.
6. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 1, characterized in that, The method for solving the objective function of the collaborative optimization model for quay crane and yard crane operations under the dual-circulation mode is as follows: S21: Obtain the initial quay crane loading and unloading sequence to obtain the initial solution for the quay crane loading and unloading sequence; S22: Based on the initial solution of the quay crane loading and unloading sequence, obtain the initial export container space allocation result to obtain the initial solution of export container space allocation; S23: A greedy random adaptive search algorithm with fused path reconnection is used to obtain the final quay crane loading and unloading sequence and export container space allocation results.
7. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 6, characterized in that, S21 includes: S211: Establish a candidate task set: The tasks in the candidate task set include the tasks at the top of the actual storage location in the ship stack or yard stack; S212: Randomly select one unloading task from the candidate task set and add it to the quay crane loading and unloading sequence, and remove the selected unloading task from the candidate task set; S213: Update the candidate task set and obtain the updated candidate task set; S214: Based on the nth task in the quay crane loading and unloading sequence, determine the (n+1)th task in the quay crane loading and unloading sequence, as follows: If the nth task in the quay crane loading and unloading sequence is an unloading task, select a loading task from the updated candidate task set as the (n+1)th task in the quay crane loading and unloading sequence. If there is no loading task in the updated candidate task set, select an unloading task that has not completed the unloading stack as the (n+1)th task in the quay crane loading and unloading sequence, and remove the selected task from the updated candidate task set; execute S215. If the nth task in the quay crane loading and unloading sequence is a loading task, select an unloading task from the updated candidate task set as the (n+1)th task in the quay crane loading and unloading sequence. Otherwise, randomly select a task from the updated candidate task set and add it to the quay crane loading and unloading sequence as the (n+1)th task in the quay crane loading and unloading sequence. Remove the selected unloading task from the updated candidate task set and execute S215. S215: Execute S213. If the updated candidate task set is not empty, then execute S214. Otherwise, obtain the initial solution for the quay crane loading and unloading sequence as a sequence formed by the (n+1)th task, the nth task, ..., the 1st task.
8. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 7, characterized in that, S23 includes: S231: Randomly select the m1-th task and the m2-th task in the quay crane loading and unloading sequence, and obtain the movable windows of the m1-th task and the m2-th task respectively. If the m1-th task is within the movable window of the m2-th task and the m2-th task is within the movable window of the m1-th task, then swap the m1-th task and the m2-th task to obtain the quay crane loading and unloading sequence after the swap. If the number of double loops in the quay crane loading and unloading sequence after the swap does not decrease, and if the value of the objective function of the quay crane loading and unloading sequence after the swap is greater than the value of the objective function of the quay crane loading and unloading sequence, then execute S232 based on the quay crane loading and unloading sequence after the swap. Otherwise, directly execute S232 based on the quay crane loading and unloading sequence. S232: Randomly select the m1th task in the quay crane loading and unloading sequence after the task exchange, obtain the movable window of the m1th task, and update the position of the m1th task to any position within the movable window of the m1th task. Obtain the quay crane loading and unloading sequence with the updated task position. If the number of double loops of the quay crane loading and unloading sequence with the updated task position does not decrease, and if the value of the objective function of the quay crane loading and unloading sequence with the updated task position is greater than the value of the objective function of the quay crane loading and unloading sequence without the updated task position, then execute S233 based on the quay crane loading and unloading sequence with the updated task position; otherwise, execute S233 directly. S233: Randomly select the allocation positions of the n1th and n2th export containers from the initial export container allocation results and swap them to obtain the objective function value after the swap. If the objective function value after the swap is greater than the objective function value before the swap, then S231 is re-executed based on the objective function value after the swap until the iterative convergence condition is met, and then S234 is executed. Otherwise, S231 is re-executed directly until the iterative convergence condition is met, and then S234 is executed. Among them, the n1st export container and the n2nd export container are of the same category; S234: Obtain the final quay crane loading / unloading sequence and export container space allocation results.
9. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 1, characterized in that, Following S2, the method further includes: obtaining the upper bound of the objective function, and simultaneously obtaining the number of double cycles based on the final quay crane loading / unloading sequence and the final export container space allocation result; and evaluating the final quay crane loading / unloading sequence and the final export container space allocation result based on the number of double cycles and the upper bound of the objective function.
10. The method for collaborative optimization of quay crane and yard crane operations under a dual-circulation mode according to claim 9, characterized in that, The formula used to obtain the upper bound of the objective function is as follows: In the formula: This is the upper bound of the objective function; This is the upper bound of the number of double cycles for the quay crane; The number of containers to be unloaded from the ship's warehouse; The number of containers to be loaded in the ship's warehouse; For the ship stack index; This is the set of all container loading and unloading tasks that need to be performed in the arrival and departure layouts. This is a set of all container loading tasks. This is the set of all container tasks awaiting unloading.