Container stowage method and system based on multi-stage optimization algorithm
By decomposing the container loading and stowage process through a multi-stage optimization algorithm and employing mixed integer programming and neighborhood search strategies, the problem of low stowage efficiency on large container ships was solved, resulting in a more efficient and stable loading scheme and promoting the intelligentization and systematization of port logistics.
Patent Information
- Application Number
- CN202511476899.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-16
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-10-16
AI Technical Summary
Existing container loading and stowage methods have limitations in balancing multiple constraints and multi-objective optimization, making it difficult to achieve a qualitative improvement in loading efficiency. They are particularly inefficient and prone to errors when stowing large container ships.
A multi-stage optimization algorithm is adopted to decompose the complex loading process into four tightly coupled sub-problems: container sorting, bay allocation, bay weight optimization, and bay container space optimization. Through a mixed integer programming model and heuristic algorithm, the final container loading plan is generated by combining neighborhood search strategy.
It has significantly improved the efficiency and stability of container loading, reduced the rate of container turnover and conflict, enhanced the adaptability and systematization of terminal operations, and promoted the intelligent development of port logistics.
Smart Images

Figure CN120952677B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of operations research and port logistics technology, specifically to a container loading and stowage method and system based on a multi-stage optimization algorithm. Background Technology
[0002] In the shipping logistics sector, container stowage is a crucial link connecting terminal yard operations and maritime transport. Its core task is to rationally allocate containers from specific locations in the terminal yard to their corresponding positions on the ship, while meeting the ship's stability, strength, and safety regulations. This ensures the efficient operation of machinery during loading operations and guarantees the ship's stability and safety during navigation. Therefore, effective stowage is not only vital for terminal operational efficiency but also plays a key role in ship loading safety. The quality of the stowage plan directly affects the satisfaction of both the terminal and the shipping company with the loading results, as well as the overall time efficiency of the loading process.
[0003] Traditional practices rely on manual experience. When the volume of containers is small, terminals can still manually schedule loading by experienced loading personnel. However, as container ships become larger, when the number of containers to be loaded reaches thousands, manual loading often takes several hours and is prone to errors, making it difficult to meet the needs of efficient operations.
[0004] To address the bottleneck of scale, the industry utilizes computer programs for automated loading. Currently, existing solutions primarily employ a "rule matching + greedy algorithm" framework: first, a penalty function is established based on constraints such as the attributes of the storage yard and the ship's container, and weight distribution; then, a greedy algorithm is used to progressively select the configuration with the minimum penalty at each step, forming a feasible solution. While this type of automated loading method can achieve basic loading in most cases, it has limitations in balancing multiple constraints and multi-objective optimization, easily getting trapped in local optima and failing to achieve a qualitative improvement in loading efficiency.
[0005] Therefore, a new container loading and stowage scheme is needed. Summary of the Invention
[0006] In view of this, the embodiments of this specification provide a container loading and stowage method and system based on a multi-stage optimization algorithm, which aims to improve the problems caused by the reliance on rules in traditional stowage planning, such as low efficiency of mechanical operations, unbalanced loading, excessive number of heavy containers pressing light containers, scattered sources of container supply in the yard, and excessively high container turnover rate, thereby optimizing the stowage process when loading cargo at the terminal.
[0007] The embodiments in this specification provide the following technical solutions:
[0008] This specification provides an embodiment of a container loading and stowage method based on a multi-stage optimization algorithm, including:
[0009] During the small container sorting stage, based on the ship's pre-allocation data and the on-site container data, 20-foot containers that meet the ship's foot pad container requirements are first pre-allocated to the corresponding container positions. Then, the remaining 20-foot containers are classified according to the target position's load-bearing level and then a pairwise splicing operation is performed to generate pre-allocation data equivalent to 40-foot containers. The first dataset is output, which includes the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data.
[0010] In the bay allocation stage, using the first dataset and the original 40-foot or 45-foot container data as input, a first mixed-integer programming model is constructed. The objective function is to minimize the number of container area-ship bay connections and the hierarchical deviation. Combined with a heuristic algorithm, containers are allocated to target bays and hold areas according to weight priority, and a second dataset is output. The hold areas include: the hold area or the deck area. The second dataset includes: the target bay information for each container, and the hold area information of the container in the target bay.
[0011] In the weight optimization stage, the second dataset is used as input to construct a second mixed integer programming model for each target bay location. The objective function is to minimize the weight violation, weight class deviation and lateral imbalance in the vertical direction. The model determines the position of the container in the target bay and outputs a third dataset, which includes the position of each container in the target bay.
[0012] In the container location optimization stage, based on the neighborhood search algorithm, combined with the yard distribution optimization model and the container turnover rate optimization model, the container positions are exchanged within the target bay to generate the final container loading plan.
[0013] The embodiments of this specification also provide a container loading and stowage system based on a multi-stage optimization algorithm. The container loading and stowage system includes: a small container sorting module, a bay space allocation module, a bay weight optimization module, and a bay space optimization module.
[0014] The small container sorting module is used to first pre-allocate 20-foot containers that meet the requirements of ship footrest containers to the corresponding container positions based on the ship's pre-allocation data and on-site container data. Then, after classifying the remaining 20-foot containers according to the target position load-bearing level, it performs a pairwise splicing operation to generate pre-allocation data equivalent to 40-foot containers and outputs the first dataset. The first dataset includes: the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data.
[0015] The container bay allocation module is used to construct a first mixed-integer programming model with the first dataset and the original 40-foot or 45-foot container data as input, and to allocate containers to target bays and hold areas in a hierarchical manner according to weight priority using a heuristic algorithm with the objective function of minimizing the number of container area-ship bay connections and hierarchical deviation. The output is a second dataset, wherein the hold area includes: the hold area or the deck area; the second dataset includes: the target bay information of each container, and the hold area information of the container in the target bay.
[0016] The container weight optimization module is used to construct a second mixed integer programming model for each target container location, taking the second dataset as input, with the objective function being to minimize weight violations, weight class deviations and lateral imbalances in the vertical direction, to determine the position of the container within the target container, and to output a third dataset, which includes the position of each container within the target container.
[0017] The container location optimization module is used to exchange container positions within the target bay based on a neighborhood search algorithm, combined with a yard distribution optimization model and a container turnover rate optimization model, to generate the final container loading plan.
[0018] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least:
[0019] This application uses a four-stage mixed integer programming method to decompose the complex loading process into multiple optimization stages. First, 20-foot containers are spliced into 40-foot equivalent containers to quickly lock the hold positions with the goal of minimizing the number of container area-ship bay connections and weight deviation. Then, vertical overweight and lateral imbalance are eliminated layer by layer. Finally, container positions are fine-tuned through local neighborhood search to reduce the container turnover rate and improve scheduling efficiency. This achieves higher efficiency, lower conflict rate and better process matching in container allocation. While ensuring the safety of the ship structure, it significantly improves the adaptability and efficiency of actual terminal operations and promotes the intelligent, systematic and efficient development of port operation systems. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a flowchart of a container loading and stowage method based on a multi-stage optimization algorithm in this application;
[0022] Figure 2This is a flowchart of the container sorting stage of a container loading and stowage method based on a multi-stage optimization algorithm in this application;
[0023] Figure 3 This is a flowchart of the bay allocation stage of a container loading and stowage method based on a multi-stage optimization algorithm in this application;
[0024] Figure 4 This is a flowchart of the internal weight optimization stage of a container loading and stowage method based on a multi-stage optimization algorithm in this application;
[0025] Figure 5 This is a flowchart of the container space optimization stage of a container loading and stowage method based on a multi-stage optimization algorithm in this application;
[0026] Figure 6 This is a schematic diagram of the container loading and stowage method based on a multi-stage optimization algorithm in this application, which establishes a container turning diagram model. Detailed Implementation
[0027] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0028] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number and aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0030] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. The drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0031] Additionally, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that practice can be carried out without these specific details.
[0032] In the shipping logistics sector, container loading and stowage is a core link connecting terminal yards and maritime transport. The quality of the stowage plan directly affects the satisfaction of terminals and shipping companies, as well as the time efficiency of the entire loading process. Therefore, the stowage process needs to comprehensively consider several key factors, such as the size of the cargo and the port of destination, the structure and loading capacity of the ship, and indicators such as the "turnover rate" and operation time during the loading process.
[0033] Currently, traditional manual stowage methods are inefficient, especially when the number of containers reaches thousands, often taking several hours. Existing automated stowage methods typically employ rule-based matching, focusing on adapting to constraints such as the attributes and weight distribution of the container yard and the ship's container hull, and prioritizing reducing container turnover rates. These methods usually first construct a penalty function, then use a greedy algorithm to select the local configuration with the minimum penalty value at each step, ultimately generating a feasible solution.
[0034] In view of this, the inventors discovered through research and improvement that existing traditional container loading and stowage methods cannot fully take into account various constraints, are prone to getting stuck in local optima, and are difficult to achieve a qualitative improvement in loading efficiency.
[0035] Based on this, the embodiments of this specification propose a container loading and stowage method based on a multi-stage optimization algorithm. The overall idea is as follows: decompose the complex stowage process into four tightly coupled sub-problems and optimize them step by step: In the first stage, the problem scale is significantly reduced by splicing 20-foot containers in pairs to form equivalent 40-foot containers; in the second stage, a mixed integer programming model is used to determine which container is placed in which bay, and the "container area-ship bay distance" and "weight grade deviation" are simultaneously included in the objective function, pre-embedding stability factors into the global solution, and subsequent stages only make local fine adjustments; in the third stage, a small-scale mixed integer programming is performed within each bay to optimize the weight distribution of each compartment inside the ship; in the fourth stage, after the overall stowage solution is initially formed, a neighborhood search strategy is introduced to solve detailed problems such as container turnover rate control, container position scheduling optimization, and adaptation to special operation requirements, ultimately achieving higher efficiency, lower conflict rate, and better process matching in container position allocation.
[0036] The technical solutions provided by the various embodiments of this application are described below with reference to the accompanying drawings.
[0037] like Figure 1 As shown in the embodiments of this specification, a container loading and stowage method based on a multi-stage optimization algorithm is provided, including:
[0038] Step S1, Small Container Arrangement Stage: Based on the ship's pre-allocation data and on-site container data, 20-foot containers that meet the ship's footrest container requirements are first pre-allocated to the corresponding container positions. Then, the remaining 20-foot containers are classified according to the target position's load-bearing level and then paired up to generate pre-allocation data equivalent to 40-foot containers. The first dataset is output, which includes the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data.
[0039] Specifically, the system prioritizes allocating "footing box" positions on the ship, locking 20-foot boxes that meet the "footing box" requirements into these positions to ensure they are physically paired and placed on the same level. This ensures that the gantry crane can simultaneously lift two small boxes during operation, reducing the number of cycles per box. After the pre-allocation of footing box positions, the remaining 20-foot boxes are classified according to the load-bearing capacity of the target position. Combining a heuristic splicing strategy for small boxes, the weight distribution of small boxes in each position is reasonably arranged. Pairs are spliced to generate an equivalent 40-foot box. Finally, the first dataset is output, which includes: pre-allocated data and the corresponding pair of 20-foot box data. This data is used in subsequent allocation processes to treat the pair of 20-foot boxes as 40-foot boxes, thereby simplifying computational complexity, improving efficiency, and ensuring structural safety.
[0040] Step S2, the bay allocation stage, uses the first dataset and the original 40-foot or 45-foot container data as input to construct a first mixed integer programming model. The objective function is to minimize the number of container area-ship bay connections and the hierarchical deviation. Combined with a heuristic algorithm, the containers are allocated to target bays and hold areas according to weight priority. The output is a second dataset, wherein the hold area includes: the hold area or the deck area; the second dataset includes: the target bay information of each container, and the hold area information of the container in the target bay.
[0041] In implementation, the first dataset and the original 40-foot or 45-foot container data are used as inputs to construct a first mixed integer programming model to model and optimize the layout of container exit points. In this stage, based on the total stowage plan of the ship, an optimization method based on the mixed integer programming model (MIP) is constructed for the allocation of containers from the yard to specific ships.
[0042] First, the system ensures that each container meets the attribute requirements of its assigned bay. Second, the model controls the distribution of container supply areas to avoid either over-concentration or over-dispersion of supply areas within a single ship bay. The objective function formula for the mixed-integer programming model is as follows:
[0043]
[0044] Where B represents the ship and shell set; I represents the storage yard block set; This indicates that if block i supplies bit b, then the value is 1; , Indicates the penalty weight for violations of the supply source (default is 20, 10). This indicates the penalty for exceeding a threshold in the number of supply sources.
[0045] The model's objective function mainly consists of two parts: minimizing the number of container-ship / barrel connections and a hierarchical deviation penalty term. It encourages the concentration of connections between container areas and ships / barrels to improve operational efficiency; and it uses a "cumulative penalty for exceeding a threshold" mechanism to penalize uneven allocation at a cost.
[0046] Subsequently, using heuristic algorithms, the containers are initially allocated from a global perspective to ensure that the initial weight distribution of each compartment meets the shipping company's stability and load requirements, thereby improving the stability and rationality of the overall loading scheme.
[0047] This stage integrates the double 20-foot container data and pre-allocation data output from the small container sorting stage with the original 40-foot or 45-foot container data and pre-allocation data as input for this stage. The output of this stage is: the ship bay allocated to each container, and whether the container is allocated inside or outside the hold of that bay.
[0048] Step S3, Inner Bay Weight Optimization Stage: Using the second dataset as input, construct a second mixed integer programming model for each target bay location. With the objective function of minimizing weight violations, weight class deviations, and lateral imbalances in the vertical direction, determine the position of the container within the target bay and output a third dataset, which includes the position of each container within the target bay.
[0049] During implementation, in this phase, the system continues to use a mixed integer programming model, focusing on optimizing the weight distribution of each compartment inside the ship to ensure that the weight distribution in the transverse, longitudinal, and longitudinal profiles meets the various safety regulations for international navigation. This phase particularly emphasizes meeting ship stability standards such as "heavy at the bottom and light at the top," "balanced on both sides," and "high in the middle and low at the sides," thereby ensuring navigation safety and operational feasibility.
[0050] Specifically, based on the loading rules and actual operating conditions, a second mixed-integer programming model (MIP) is constructed. Its goal is to precisely define the specific location of each container, achieving optimal layout while satisfying attribute constraints and weight balance limitations. The objective function is as follows:
[0051]
[0052] in, , , Indicates the penalty weight; This indicates a vertical violation of the deck height in the stacking hierarchy r; This indicates a vertical violation of the hatch height in the stacking level r; This indicates the lateral imbalance at position t of deck level l.
[0053] The objective function mainly consists of three parts: minimizing weight violations in the vertical direction to ensure that heavy containers are at the bottom and light containers are at the top; minimizing violations of non-compliance with container weight class requirements; and minimizing weight imbalance in the lateral direction of a single layer to ensure a balanced weight distribution in each layer, especially the deck layer, and finally outputting the third dataset.
[0054] Step S4, the container location optimization stage, is based on the neighborhood search algorithm, combined with the yard distribution optimization model and the container turnover rate optimization model, to exchange the container locations within the target bay and generate the final container loading plan.
[0055] Specifically, after the global loading plan is initially formed, the system enters the final stage of refinement and optimization. Through optimization strategies such as local neighborhood search, containers are partially exchanged. The system focuses on solving a series of detailed issues such as container turnover rate control, container space scheduling optimization, and adaptation to special operational requirements. This achieves higher efficiency, lower conflict rate, and better process matching in container space allocation. The input of this stage is the preliminary loading plan optimized in the previous stage, and the output is the final loading plan after container space exchange and further optimization.
[0056] This application employs a progressive modeling and integrated solution using a four-stage mixed integer programming model. This not only fully meets the structural safety requirements of ships but also demonstrates stronger adaptability and efficiency in actual terminal operation scenarios. Specific benefits include: reducing container turnover rate, minimizing overlapping operations, and improving container retrieval and scheduling efficiency. This promotes the intelligent, systematic, and efficient development of port operation systems, demonstrating promising application prospects and significant potential for wider adoption.
[0057] In some embodiments, during the small box sorting stage, the remaining 20-foot boxes are spliced in pairs, including:
[0058] Based on the pre-allocated weight requirements on board the ship, the 20-foot container space is divided into light double container space and other double container space; wherein, the light double container space includes: the positions at the bow, stern or high deck where light containers need to be placed;
[0059] For light double-container spaces, an incremental tonnage heuristic algorithm is used, including: sorting eligible 20-foot containers by weight from low to high, prioritizing the splicing of containers from the same or adjacent yard areas, and minimizing the weight difference between the two containers.
[0060] For other double-container locations, a tonnage-decreasing heuristic algorithm is used, including: prioritizing the selection of heavier containers for splicing, and prioritizing the selection of containers from the same or adjacent container yard areas for splicing.
[0061] The determination criteria for adjacent container yard areas shall satisfy at least one of the following:
[0062] The physical distance between the two container areas is less than the preset value; the difference in the numbering between the two container areas is within the preset range.
[0063] During implementation, such as Figure 2 As shown, the input data includes 20-foot container information from the field container data and pre-allocation data. The final output is the spliced double 20-foot container data and its corresponding pre-allocation data, which is used to treat the double 20-foot containers as 40-foot containers in the subsequent allocation process, thereby simplifying the calculation complexity and improving efficiency.
[0064] The remaining 20-foot containers are classified into two categories based on the load-bearing capacity of the target location: light double-box containers and other double-box containers.
[0065] It should be noted that the "light container space" mentioned in this application refers to the weight requirements on the ship, the location where light containers need to be placed, such as the bow, stern and upper deck. It is generally determined according to the shipping company's pre-allocated weight. If the shipping company does not provide it, it is determined according to the ship's default container space rules.
[0066] For light double-sided containers, the system employs an "increasing tonnage" strategy for consolidation. This involves arranging eligible 20-foot containers in ascending weight sequence, then dividing this sequence into several layers. The weight range of each layer is pre-defined, creating a multi-layered structure from low to high. When consolidating containers in pairs, the selection begins with the lightest layer. If no suitable pair can be found in that layer, the selection expands upwards layer by layer. Within the same layer, containers from the same or adjacent container areas are prioritized, ensuring that weight requirements are met while minimizing weight differences and selecting containers from the nearest available location.
[0067] For non-lightweight double-container locations, a "decreasing tonnage" strategy is adopted. This means that when splicing two containers, containers are selected starting from the heaviest layer, prioritizing heavier 20-foot containers for splicing. Similarly, within the same layer, containers from the same or adjacent areas are prioritized, thus reducing the number of container transfers and improving overall operational efficiency. If a 20-foot container cannot be paired, "redundant container space restoration" is performed. Finally, the spliced container data and pre-allocation data are output, forming the first dataset.
[0068] It should be noted that the pre-assembled data after splicing includes: the results of the footed box, the splicing results of the light double box, the splicing results of other double boxes, and the restored single 20-foot box.
[0069] In some embodiments, such as Figure 3 As shown, in the bit allocation stage, the constraints of the first mixed-integer programming model include:
[0070] The shortage tolerance constraint ensures that the supply demand for each bay is met, as shown in the formula:
[0071]
[0072]
[0073] Container yard concentration constraints limit the proportion of containers supplied by a single container yard within a particular ship bay to prevent over-utilization of local resources. The formula is as follows:
[0074]
[0075] Logical relationship constraints are established to create a logical relationship between container allocation and the "container area-ship bay" activation variable, ensuring consistency in the correspondence between containers, the container areas from which the containers originate, and the bay locations. The formula is as follows:
[0076]
[0077] Where B represents the set of ship and shell; I represents the set of yard blocks; and A represents the set of container attributes. This indicates the supply of attribute a in block i; This indicates the demand for attribute a in ship shell b; This indicates the allowable shortage tolerance. ; , representing the number of containers of attribute a from block i to bay b; This indicates that if block i supplies bit b, then it is 1.
[0078] In some embodiments, the constraints of the first mixed-integer programming model further include:
[0079] For large bays with a limit of more than 15 pre-shipped containers, the proportion of a single container area within that bay is determined to improve allocation flexibility and risk resistance. The formula is as follows:
[0080]
[0081] A "large M penalty term" strategy is used to impose soft constraints on the container supply behavior in the container area, where M represents a sufficiently large number (default M=100), and the formula is:
[0082]
[0083]
[0084] in, Indicates the maximum supply ratio of ship shells to a single block (default: 8, 4); Indicates the penalty weight for supply source violations (default: 20, 10).
[0085] Based on the above embodiments, the terminal operator can set the following parameters according to management preferences: container shortage tolerance level. (Tolerance level), diversity ratio of container source distribution (Supply concentration control), penalty threshold setting and (Used to balance resource integration and operational feasibility).
[0086] In some embodiments, during the bay allocation phase, containers are allocated to target bays and cargo areas in a weight-priority stratified manner using a heuristic algorithm, including:
[0087] Solving the first mixed-integer programming model yields a preliminary container stowage plan;
[0088] Based on the preliminary container stowage plan, heuristic reallocation is performed according to preset priorities, including:
[0089] First, containers that meet the preset constraints are allocated to special bays, which include at least one of the following: bays requiring a specific weight class; bays requiring a special support structure; and priority loading bays designated by the shipping company.
[0090] Containers are allocated to the deck area in ascending order of weight class;
[0091] Containers are allocated to the hold area in descending order of weight class.
[0092] In implementation, after obtaining the preliminary ship bay allocation scheme by solving the MIP model, a heuristic algorithm is used to allocate containers one by one according to a hierarchical approach based on priority and weight class. The specific strategy is as follows:
[0093] First, priority is given to bays with special requirements, such as special container areas requiring specific weight classes or support structures. Second, deck containers are allocated according to weight class: from low to high, ensuring that the upper deck is primarily composed of lighter containers. Third, in-hold containers are allocated according to weight class: from high to low, ensuring that the in-hold is primarily composed of heavier containers. This strategy aims to ensure that the container sourcing plans for each container area meet actual operational needs, while also guaranteeing a balanced weight distribution and even operation within the in-hold.
[0094] In some embodiments, after performing the heuristic reallocation, cross-bay optimization is performed, including:
[0095] Identify yard rows that are not fully matched to the same target bay, the yard rows comprising: groups of containers arranged continuously along the length of the yard;
[0096] Based on the neighborhood search algorithm, cross-bay adjustment is performed on the stockpile rows that are not fully matched to the same target bay. The cross-bay adjustment includes: redistributing stockpile rows of the same or similar weight class to the same target bay.
[0097] Specifically, by using a local neighborhood search algorithm, cross-shell adjustments are made to stockpile stacks that have not yet been fully matched with the same ship's shells, in an effort to uniformly allocate stockpile stacks of the same or similar tonnage to the same ship's shell, thereby improving the shell cleaning rate and optimizing the overall operational efficiency.
[0098] In some embodiments, during the Bennet weight optimization phase, the constraints of the second mixed-integer programming model include:
[0099] A unique location allocation constraint is applied to ensure that each container is assigned to a unique location within the target container yard, and that each container is fully allocated, avoiding duplicates or omissions. The formula is as follows:
[0100]
[0101]
[0102]
[0103]
[0104] Attribute matching constraints require that the attributes of the container match the attributes of the target location. These attributes include container type and port of destination, ensuring that the container's attributes (such as port of destination and container type) match the target location. The formula is as follows:
[0105]
[0106] Zoned weight boundary constraints define weight safety thresholds for both cabin and deck areas to ensure weight safety requirements are met at specific locations. The formula is as follows:
[0107]
[0108]
[0109] An adaptive weight limit constraint is applied, stipulating that the weight of a lower container in the same column must not be less than the weight of an upper container. This involves modeling the "heavy weight on light weight" rule separately for deck and hold, establishing an adaptive weight limit for each location, as shown in the formula:
[0110]
[0111]
[0112] Lateral balance constraints in the deck area ensure that the weight distribution deviation at the lateral position of the same deck layer does not exceed a preset threshold, as shown in the formula:
[0113]
[0114] Where C represents container ( P represents the stacking position (); R represents ship stacking (indexed from left to right); L represents ship level (indexed from bottom to top). Indicates the deck position at stack r (natural index); Indicates the deck position at level l (indexed from center to both sides): ); Indicates the hatch position at stack r (natural index); Indicates the weight of container i; This indicates the weight range of position j based on quantile analysis; A vector of attributes (type / destination) representing container i; The attributes required to represent position j; , These represent the deck / hatch cushioning weight (500 / 5000 kg). , , This represents the penalty weight (vertical = 30, horizontal = 20, weight = 10); M represents the large M constant (100). ; indicates that if container i is assigned to location j, then it is 1; This represents the weight deviation at position j.
[0115] In some embodiments, such as Figure 4As shown, when solving the second mixed-integer programming model, if the solution time exceeds a preset threshold, then:
[0116] The target sub-bit is split into multiple sub-bits by horizontal columns or vertical layers. A mixed integer programming model is independently constructed for each sub-bit and solved in parallel. The solutions of the sub-bits are merged to generate a third dataset.
[0117] Specifically, in order to efficiently solve the MIP model, the system uses solver software (such as the open-source solver SCIP) for numerical solution.
[0118] For ship shells with many complex attributes, the solution process is truncated within a set time limit due to the long solution time, and the current best solution is used as the benchmark. Subsequently, the system divides the ship shell into sub-shells and solves it in parallel as multiple sub-problems. This achieves a balance between solution efficiency and solution quality, significantly reduces the difficulty of solving models for large-volume or complex problems, and improves solution efficiency.
[0119] In some embodiments, during the Bennet container location optimization stage, the yard distribution optimization model is quantified using a weighted objective function:
[0120] The degree of concentration of containers from the same container yard area and the same container bay within the same ship bay
[0121] The degree of concentration of containers from the same container area within the same row or layer on the ship.
[0122] like Figure 5 As shown, to reduce the operational movement path of yard cranes and improve container retrieval efficiency, containers from the same yard should be arranged in the same bay and distributed in a concentrated manner whenever possible. This allows the quay crane to complete operations at one bay before moving on to the next, thus avoiding frequent back-and-forth movement between multiple bays, reducing container handling operations, and improving container loading efficiency and stability.
[0123] In addition, since in actual operations, containers in a certain container area may not be able to be shipped out in a timely manner due to equipment failure or container congestion, in order to ensure the feasibility and stability of the operation plan, containers in the same row / layer on the ship should come from the same container area as much as possible, so as to reduce the risk of the entire row of operations being suspended due to the unavailability of a certain container area.
[0124] Specifically, the system defines a function with the objective of optimizing the stockpile distribution. The formula is:
[0125]
[0126] in, Indicates container index; This indicates the container yard area for container i; This indicates the yard location of container i; Indicates the shipboard level of container i; Indicates the column number of container i on the ship; This represents an exponential function, which is 1 if the condition is true, and 0 otherwise.
[0127] Its objective value is the sum of two weighted sub-functions: Sub-function 1: Yard Area-Shipper Concentration Index, which calculates the concentration of containers from the same yard area and the same bay within the same ship bay; Sub-function 2: Yard Area-Shipper Row / Layer Concentration Index, which calculates the concentration of containers from the same area within the same row or layer on the ship. This weighted objective function guides neighborhood search to select the optimal solution among different exchange schemes, thereby improving concentration, reducing equipment path interference, and enhancing overall operational continuity.
[0128] By optimizing the layout and distribution of containers inside the ship's bay, the mechanical efficiency and overall smoothness of terminal operations can be improved.
[0129] In some embodiments, the box turnover rate optimization model is constructed in the following manner:
[0130] Establish directed graphs with yard location constraints and loading sequence constraints respectively; where nodes represent containers and edges represent container turning constraints.
[0131] Overlay two directed graphs and check if there are loops in the overlay graph. If a loop exists, it is marked as a potential box-flipping operation.
[0132] Based on a neighborhood search algorithm, the container positions are swapped within the target bay by minimizing the number of container flipping operations.
[0133] Specifically, the container turnover rate optimization model mainly involves the relationship between the hierarchical distribution of containers in the yard and the loading sequence of ship positions. The algorithm needs to focus on reducing the following two common container turnover scenarios when optimizing container positions:
[0134] First, if a container in the hold is located at the bottom of a row in the yard, while containers on the deck of the same hold are located on the upper level of that row, it is impossible to load the deck containers before the hatch is closed, thus inevitably leading to container reversal and reduced operational efficiency. Therefore, the model should adjust the container distribution to give priority to containers in the hold in the loading sequence, thereby avoiding container reversal in such situations.
[0135] Secondly, the loading order directly affects the box-flipping relationship. Whether loading is done by layer, by column, or in a mixed parallel manner, new sequential constraints will be created between boxes. The system uses a neighborhood search algorithm to identify and avoid box-flipping operations caused by sequential conflicts, ensuring that under a given loading strategy, the model minimizes the box-flipping rate without violating stability and operational constraints.
[0136] In practice, to more efficiently identify and eliminate complex box-flipping structures, such as Figure 6 As shown, a graph-based method for detecting container turnover relationships is introduced. Containers are used as nodes, and directed edges are established based on the rule that "movement is required to access the next container." Each node represents a container. If a container needs to be moved (i.e., "turned over") to access or manipulate another container, a directed edge is established between the two containers. In the yard diagram, any container above adds an edge to all containers directly below it; in the ship diagram, any container loaded first adds an edge to all containers loaded later. After overlaying and merging the two graphs (yard diagram and ship diagram), if a cycle appears in the graph, it indicates that at least one container turnover operation will occur. By detecting and identifying these cycles, the loading order of containers can be rearranged to reduce or avoid turnover operations.
[0137] Container turnover relationships can be modeled by constructing an adjacency matrix. In addition, matrix exponentiation can be used to speed up the calculation and analyze which container turnover relationships are direct or indirect, thereby identifying multi-level container turnover problems with hierarchical relationships and comprehensively evaluating the overall impact of optimization strategies on container turnover.
[0138] Based on this, two neighborhood search steps are used:
[0139] Step 1: Prioritize containers within the hold, and partially exchange and rearrange containers in the same row and column within the hold and on the deck to completely eliminate the first type of container overturning risk;
[0140] Step 2: Within the remaining feasible region, with loading order as a constraint, the graph loop detection is used to guide the movement of neighboring regions, further reducing the number of container flipping caused by sequence conflicts, thereby outputting the final loading result. Under the premise of ensuring ship stability and operation sequence conforming to the actual port situation, the overall container layout is optimized.
[0141] This application addresses the loading problem from a holistic perspective, comprehensively considering the entire terminal operation process. This results in optimized configuration effects in terms of overall weight distribution, container unloading efficiency, and container turnover rate, exhibiting higher adaptability and operational coordination. Secondly, this invention integrates heuristic algorithms and mixed-integer programming models to effectively address the common challenges of long loading times and high scheme complexity in large vessel loading. The system uses intelligent algorithms for rapid solutions, significantly shortening loading calculation time and improving the accuracy of loading results while ensuring scheme accuracy. Simultaneously, this invention successfully introduces operations research optimization techniques into the terminal loading system, achieving a deep integration of theoretical methods and practical operational needs, providing solid technical support for the intelligent development of ports.
[0142] Based on the same inventive concept, this application also provides a container loading and stowage system based on a multi-stage optimization algorithm, the container loading and stowage system including: a small container sorting module, a bay space allocation module, a bay weight optimization module and a bay space optimization module;
[0143] The small container sorting module is used to first pre-allocate 20-foot containers that meet the requirements of ship footrest containers to the corresponding container positions based on the ship's pre-allocation data and on-site container data. Then, after classifying the remaining 20-foot containers according to the target position load-bearing level, it performs a pairwise splicing operation to generate pre-allocation data equivalent to 40-foot containers and outputs the first dataset. The first dataset includes: the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data.
[0144] The container bay allocation module is used to construct a first mixed-integer programming model with the first dataset and the original 40-foot or 45-foot container data as input, and to allocate containers to target bays and hold areas in a hierarchical manner according to weight priority using a heuristic algorithm with the objective function of minimizing the number of container area-ship bay connections and hierarchical deviation. The output is a second dataset, wherein the hold area includes: the hold area or the deck area; the second dataset includes: the target bay information of each container, and the hold area information of the container in the target bay.
[0145] The container weight optimization module is used to construct a second mixed integer programming model for each target container location, taking the second dataset as input, with the objective function being to minimize weight violations, weight class deviations and lateral imbalances in the vertical direction, to determine the position of the container within the target container, and to output a third dataset, which includes the position of each container within the target container.
[0146] The container location optimization module is used to exchange container positions within the target bay based on a neighborhood search algorithm, combined with a yard distribution optimization model and a container turnover rate optimization model, to generate the final container loading plan.
[0147] The method proposed in this invention aims to systematically formulate loading plans from a "global perspective," comprehensively considering key factors such as terminal yard layout, task distribution, machinery and equipment status, and ship stability. Based on data such as pre-loading ship diagrams, ship operation restrictions, and terminal operation specifications, it achieves intelligent matching and optimal container allocation for export containers. This results in a more rational weight distribution, higher container unloading efficiency, and lower container turnover rate while ensuring loading safety. This method possesses higher scientific rigor, adaptability, and rationality at the research level, and ultimately holds the promise of breaking through the bottleneck of terminal operation efficiency, providing strong support for the automation and intelligent development of ports.
[0148] In this specification, the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the descriptions of the embodiments described later are relatively simple, and relevant parts can be referred to the descriptions of the foregoing embodiments.
[0149] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A container loading and stowage method based on a multi-stage optimization algorithm, characterized in that, include: During the small container sorting stage, based on the ship's pre-allocation data and the on-site container data, 20-foot containers that meet the ship's foot pad container requirements are first pre-allocated to the corresponding container positions. Then, the remaining 20-foot containers are classified according to the target position's load-bearing level and then a pairwise splicing operation is performed to generate pre-allocation data equivalent to 40-foot containers. The first dataset is output, which includes the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data. In the bay allocation stage, using the first dataset and the original 40-foot or 45-foot container data as input, a first mixed-integer programming model is constructed. The objective function is to minimize the number of container area-ship bay connections and the hierarchical deviation. Combined with a heuristic algorithm, containers are allocated to target bays and hold areas according to weight priority, and a second dataset is output. The hold areas include: the hold area or the deck area. The second dataset includes: the target bay information for each container, and the hold area information of the container in the target bay. In the weight optimization stage, the second dataset is used as input to construct a second mixed integer programming model for each target bay location. The objective function is to minimize the weight violation, weight class deviation and lateral imbalance in the vertical direction. The model determines the position of the container in the target bay and outputs a third dataset, which includes the position of each container in the target bay. In the container location optimization stage, the third dataset is used as input. Based on the neighborhood search algorithm, combined with the yard distribution optimization model and the container turnover rate optimization model, the container positions are exchanged within the target bay, and the final container loading plan is output. The stockpile distribution optimization model is constructed in the following manner: Construct a function with the objective of optimizing the stockpile distribution. The objective value of this function is the sum of two weighted sub-functions: Quantify the degree of concentration of containers from the same yard area and the same yard multiple within the same ship multiple; And to quantify the degree of concentration of containers from the same container area in the same row or layer on the ship; Based on a neighborhood search algorithm, container positions are swapped within the target bay to maximize the concentration of the distribution; The box turnover rate optimization model is constructed in the following way: Establish directed graphs with yard location constraints and loading sequence constraints respectively; where nodes represent containers and edges represent container turning constraints. Overlay two directed graphs and check if there are loops in the overlay graph. If a loop exists, it is marked as a potential box-flipping operation. Based on a neighborhood search algorithm, the container positions are swapped within the target bay by minimizing the number of container flipping operations.
2. The container loading and stowage method according to claim 1, characterized in that, During the small box sorting stage, the remaining 20-foot boxes are spliced in pairs, including: Based on the pre-allocated weight requirements on board the ship, the 20-foot container space is divided into light double container space and other double container space; wherein, the light double container space includes: the positions at the bow, stern or high deck where light containers need to be placed; For light double-container spaces, an incremental tonnage heuristic algorithm is used, including: sorting eligible 20-foot containers by weight from low to high, prioritizing the splicing of containers from the same or adjacent yard areas, and minimizing the weight difference between the two containers. For other double-container locations, a tonnage-decreasing heuristic algorithm is used, including: prioritizing the selection of heavier containers for splicing, and prioritizing the selection of containers from the same or adjacent container yard areas for splicing. The determination criteria for adjacent container yard areas shall satisfy at least one of the following: The physical distance between the two container areas is less than the preset value; the difference in the numbering between the two container areas is within the preset range.
3. The container loading and stowage method according to claim 1, characterized in that, In the bit allocation phase, the constraints of the first mixed-integer programming model include: The shortage tolerance constraint ensures that the supply demand for each bay is met, as shown in the formula: The container yard concentration constraint limits the proportion of containers supplied from a single container yard within a particular ship bay. The formula is as follows: Logical relationship constraints ensure consistency in the correspondence between containers, the originating container area, and the bay location. The formula is as follows: Where B represents the set of ship and shell; I represents the set of yard blocks; and A represents the set of container attributes. This indicates the supply of attribute a in block i; This indicates the demand for attribute a in ship shell b; This indicates the allowable shortage tolerance. ; , representing the number of containers of attribute a from block i to bay b; This indicates that if block i supplies bit b, then it is 1.
4. The container loading and stowage method according to claim 1, characterized in that, In the bay allocation phase, containers are allocated to target bays and cargo areas based on weight priority using a heuristic algorithm, including: Solving the first mixed-integer programming model yields a preliminary container stowage plan; Based on the preliminary container stowage plan, heuristic reallocation is performed according to preset priorities, including: First, containers that meet the preset constraints are allocated to special bays, which include at least one of the following: bays requiring a specific weight class; bays requiring a special support structure; and priority loading bays designated by the shipping company. Containers are allocated to the deck area in ascending order of weight class; Containers are allocated to the hold area in descending order of weight class.
5. The container loading and stowage method according to claim 4, characterized in that, After performing the heuristic reallocation, perform cross-bay optimization, including: Identify yard rows that are not fully matched to the same target bay, the yard rows comprising: groups of containers arranged continuously along the length of the yard; Based on the neighborhood search algorithm, cross-bay adjustment is performed on the stockpile rows that are not fully matched to the same target bay. The cross-bay adjustment includes: redistributing stockpile rows of the same or similar weight class to the same target bay.
6. The container loading and stowage method according to claim 1, characterized in that, During the Bennet weight optimization phase, the constraints of the second mixed-integer programming model include: A unique location allocation constraint is applied to ensure that each container is assigned to a unique location within the target bay. Attribute matching constraints require that the attributes of the container be consistent with the attributes of the target location, including: container type and port of destination; Zoned weight boundary constraints define the weight safety thresholds for the cabin area and the deck area, respectively. Adaptive weight limit constraint: the weight of a lower container in the same column must not be less than the weight of the upper container. Lateral balance constraints in the deck area ensure that the weight distribution deviation at the lateral position of the same deck layer does not exceed a preset threshold.
7. The container loading and stowage method according to claim 6, characterized in that, If the solution time exceeds a preset threshold when solving the second mixed-integer programming model, then: The target sub-bit is split into multiple sub-bits by horizontal columns or vertical layers. A mixed integer programming model is independently constructed for each sub-bit and solved in parallel. The solutions of the sub-bits are merged to generate a third dataset.
8. The container loading and stowage method according to claim 1, characterized in that, In the Bennet container location optimization stage, the yard distribution optimization model is quantified through a weighted objective function: The degree of concentration of containers from the same yard area and the same yard bay within the same ship bay; The degree of concentration of containers from the same container area within the same row or layer on the ship.
9. A container loading and stowage system based on a multi-stage optimization algorithm, characterized in that, The container loading and stowage system includes: a container sorting module, a bay space allocation module, a bay weight optimization module, and a bay container space optimization module. The small container sorting module is used to first pre-allocate 20-foot containers that meet the requirements of ship footrest containers to the corresponding container positions based on the ship's pre-allocation data and on-site container data. Then, after classifying the remaining 20-foot containers according to the target position load-bearing level, it performs a pairwise splicing operation to generate pre-allocation data equivalent to 40-foot containers and outputs the first dataset. The first dataset includes: the pre-allocation data and the double 20-foot container data corresponding to the pre-allocation data. The container bay allocation module is used to construct a first mixed-integer programming model with the first dataset and the original 40-foot or 45-foot container data as input, and to allocate containers to target bays and hold areas in a hierarchical manner according to weight priority using a heuristic algorithm with the objective function of minimizing the number of container area-ship bay connections and hierarchical deviation. The output is a second dataset, wherein the hold area includes: the hold area or the deck area; the second dataset includes: the target bay information of each container, and the hold area information of the container in the target bay. The container weight optimization module is used to construct a second mixed integer programming model for each target container location, taking the second dataset as input, with the objective function being to minimize weight violations, weight class deviations and lateral imbalances in the vertical direction, to determine the position of the container within the target container, and to output a third dataset, which includes the position of each container within the target container. The container location optimization module is used to take the third dataset as input, and based on the neighborhood search algorithm, combined with the yard distribution optimization model and the container turnover rate optimization model, to exchange the container positions within the target bay and output the final container loading plan. The stockpile distribution optimization model is constructed in the following manner: Construct a function with the objective of optimizing the stockpile distribution. The objective value of this function is the sum of two weighted sub-functions: Quantify the degree of concentration of containers from the same yard area and the same yard multiple within the same ship multiple; And to quantify the degree of concentration of containers from the same container area in the same row or layer on the ship; Based on a neighborhood search algorithm, container positions are swapped within the target bay to maximize the concentration of the distribution; The box turnover rate optimization model is constructed in the following way: Establish directed graphs with yard location constraints and loading sequence constraints respectively; where nodes represent containers and edges represent container turning constraints. Overlay two directed graphs and check if there are loops in the overlay graph. If a loop exists, it is marked as a potential box-flipping operation. Based on a neighborhood search algorithm, the container positions are swapped within the target bay by minimizing the number of container flipping operations.
Citation Information
Patent Citations
Container ship stowage optimization method based on improved cuckoo algorithm
CN114626579A
Intelligent in-cabin stowage method and system based on container ship and computer medium
CN115936323A