Method for loading of cargo boxes facing to the same size stacked and electronic device

CN122988916APending Publication Date: 2026-10-27ARMY ENG UNIV OF PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610796108.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-04
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0006]本发明实施例提供了一种面向同尺寸堆叠的货物箱装载方法及电子设备,以解决在满足同尺寸堆叠硬约束的前提下,如何兼顾装箱经济性与操作安全性的问题

Benefits of technology

[0017]本发明实施例中,通过先依据稳定性条件将同类型货物箱形成货物柱的方式,把堆叠稳定性的校验前置到货物柱生成阶段,从根源上满足同尺寸堆叠的硬约束,无需在后续装载优化中再进行复杂的稳定性动态校验,大幅降低了整体计算复杂度,再以货物柱为对象结合多目标优化算法同时优化集装箱数量和类型分散度,既能够减少装载所需的集装箱数量,提升装箱的经济性,又能通过控制类型分散度量化货物类型在集装箱内的分布状态,降低货物清点等操作的复杂度,减少人为操作错误,提升装载操作的安全性,实现了装箱经济性与操作安全性的兼顾,同时适配了货物箱装载的行业强制性安全规范,让装载策略更贴合实际应用需求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122988916A_ABST
    Figure CN122988916A_ABST
Patent Text Reader

Abstract

The application provides a kind of method and electronic equipment for the same size stacked cargo box loading, it is related to logistics transport technical field.The method comprises: obtaining the attribute information of multiple cargo boxes to be loaded, and multiple cargo columns are formed along the height direction according to the stability condition in multiple cargo boxes of the same type cargo box;Determine the initial state loading strategy according to multiple cargo columns;Wherein, the loading strategy includes cargo box loading sequence and initial placement posture;Using multi-objective optimization algorithm, taking multiple cargo columns as the object, establishing the optimization target of minimizing the required container quantity and minimizing the type dispersion, optimizing the initial state loading strategy, obtaining the optimal loading strategy that satisfies the preset constraint condition;Wherein, type dispersion is used to quantify the distribution concentration degree of different types of cargo boxes in the container.The application can improve the economy and operation safety of the container under the premise of meeting the same size stacking hard constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of logistics and transportation technology, and in particular to a method and electronic device for loading cargo boxes of the same size stacked together. Background Technology

[0002] Container shipping has become an important part of modern logistics, widely used in the transshipment of goods in industries such as chemicals, pharmaceuticals, and food. In the transportation of special goods such as hazardous chemicals, precision instruments, and ammunition, stacking stability is one of the key factors ensuring transportation safety. For example, for containers containing chemical reagents, their packaging structure is usually designed with specific load-bearing areas, requiring that the edges of the upper and lower containers be aligned during stacking to maximize the support area and prevent damage to the packaging or tipping over due to excessive localized stress. This industry standard essentially requires that goods of the same size must be stacked in the same layer; that is, only containers of the same size can be placed in the same column.

[0003] Traditional research on the 3D packing problem primarily focuses on improving space utilization by optimizing cargo layout through heuristic or metaheuristic algorithms. However, existing methods often treat stability constraints as soft constraints or optimization objectives, approximating them by setting thresholds for bottom support ratios, thus failing to strictly meet the industry's stringent requirements for stacking goods of the same size. While this approximation may be acceptable in general cargo transportation, it could introduce safety hazards in the highly demanding field of transporting hazardous materials.

[0004] Incorporating the stacking of containers of the same size directly into the optimization model as a hard constraint leads to an extremely sparse feasible solution space, making it difficult for traditional algorithms to converge within a reasonable timeframe. Furthermore, existing research often focuses on techno-economic indicators such as the number of containers and space utilization, neglecting the impact of the concentration of cargo types within the containers on subsequent loading, unloading, inventory, and segregation operations. In practice, excessive mixing of different types of cargo increases loading and unloading error rates, reduces inventory efficiency, and may violate safety regulations for the segregated storage of hazardous materials.

[0005] Therefore, there is an urgent need for a cargo loading optimization method that can balance packing economy and operational safety while meeting the hard constraints of stacking of the same size. Summary of the Invention

[0006] This invention provides a loading method and electronic device for cargo boxes stacked at the same size, in order to solve the problem of how to balance packing economy and operational safety while meeting the hard constraint of stacking at the same size.

[0007] In a first aspect, embodiments of the present invention provide a method for loading cargo boxes stacked at the same size, comprising: Obtain the attribute information of multiple cargo boxes to be loaded, and form multiple cargo columns of the same type along the height direction according to stability conditions; wherein, the attribute information includes at least size, cargo type, weight and category identifier; the stability conditions include at least: stacking height constraint, same size stacking constraint and box strap overlap constraint; The initial loading strategy is determined based on multiple cargo columns; the loading strategy includes the loading sequence of cargo boxes and the initial placement posture. A multi-objective optimization algorithm is adopted, taking the multiple cargo columns as objects, and establishing the optimization objectives of minimizing the required number of containers and minimizing the type dispersion, to optimize the initial state loading strategy and obtain the optimal loading strategy that satisfies the preset constraints. The type dispersion is used to quantify the degree of distribution concentration of different types of cargo boxes in the container. The preset constraints include at least: same-size stacking constraints, weight constraints, volume constraints, size constraints, center of gravity constraints, non-overlapping constraints, and isolation constraints.

[0008] In one possible implementation, forming multiple cargo columns along the height direction from the same type of cargo boxes according to stability conditions includes: The cargo boxes are classified according to cargo type, and the maximum allowable stacking height of each type of cargo box is determined. To minimize the total number of cargo columns and maximize the uniformity of column height, multiple cargo columns are generated. When allocating cargo boxes, the cargo box to be allocated is placed on the cargo column with the smallest current height to generate a set of cargo columns with uniform height distribution.

[0009] In one possible implementation, after stacking similar cargo boxes along the height direction to form multiple cargo columns according to stability conditions, the method further includes: Obtain the original height of a single cargo box, the preset overlap height parameter of the box straps, and the number of stacked cargo boxes; The theoretical total height is calculated based on the original height of a single cargo box and the number of stacked cargo boxes. The actual cargo column height is then obtained based on the theoretical total height and the overlap height parameter of the box straps.

[0010] In one possible implementation, determining the initial state loading strategy based on multiple cargo columns includes: Set the placement order and initial posture of multiple cargo columns, and initialize the loading point set, adding the origin of the container as the first loading point to the loading point set; According to the preset cargo column placement order, each cargo column to be loaded is traversed in turn; For the currently traversed cargo column, each loading point in the loading point set is traversed according to the preset spatial priority order. The corners of the current cargo column are aligned with the current loading point, and it is checked whether the various constraints are met. If they are met, the current cargo column is placed at the current loading point, the current loading point is deleted from the loading point set, and a new loading point is generated in the corresponding direction according to the size of the current cargo column. The newly generated loading point is deduplicated and then added to the loading point set. If the constraints are not met, the traversal continues to the next loading point. If the current cargo column cannot be placed at any loading point, a new container is added, the loading point set is reset, and the attempt to place the current cargo column continues. Repeat the above steps until all cargo columns are placed to obtain the initial loading strategy.

[0011] In one possible implementation, optimizing the initial state loading strategy to obtain an optimal loading strategy that satisfies preset constraints includes: The initial loading strategy is treated as an individual, and a hybrid initialization strategy is used to generate an initial population. Each individual in the initial population is represented by a double-chain real-number encoding, which includes a sequence gene chain and an attitude gene chain. The sequence gene chain is used to represent the loading order of the cargo columns, and the attitude gene chain is used to represent the placement orientation of each cargo column. The hybrid initialization strategy includes type-first initialization, efficiency-first initialization, and completely random initialization. The initial population is iteratively optimized using an improved NSGA-II algorithm, with each iteration including: Decode each individual in the current population, transform it into a specific loading scheme, and calculate the corresponding number and type dispersion of containers; The population is non-dominated and sorted according to the number and type dispersion of containers corresponding to each individual, and the crowding distance of each individual is calculated. A feasibility-driven binary tournament selection strategy is used to select parent individuals from the current population; Crossover operations are performed on the selected parent individuals to generate offspring individuals; a type-preserving crossover operator is used for sequence gene chains, and a two-point crossover operator is used for posture gene chains. Mutation operations are performed on offspring individuals; specifically, a directional mutation operator is used for sequence gene chains, and a random flip mutation operator is used for posture gene chains. The parent and offspring populations are merged, and elites are preserved based on non-dominant ranking and crowding distance to form a new generation population. Repeat the above iterations until the termination condition is met, and output the Pareto optimal solution set as the optimal loading strategy.

[0012] In one possible implementation, the type dispersion is defined based on the complement of the Herfindahl-Hirschman Index (HHI); The calculation of type dispersion includes: The type dispersion of each container is determined based on the sum of the squares of the proportions of each type of cargo box within the container. The global type dispersion is determined by the weighted average of the type dispersion of each container.

[0013] In one possible implementation, the selection of parent individuals from the current population using a feasibility-driven binary tournament selection strategy includes: Two individuals are randomly selected from the current population; If one of the individuals is a feasible solution that satisfies all the preset constraints, and the other is an infeasible solution, then the feasible solution individual is selected. If both individuals are feasible solutions, then compare their non-dominated ordination ranks and select the individual with the lower rank. If both individuals are feasible solutions and have the same non-dominated ranking, then compare their crowding distances and select the individual with the larger crowding distance.

[0014] In one possible implementation, the use of a type-preserving crossover operator for the sequence gene chain includes: Obtain the sequence gene chains of two parent individuals, and convert the sequence gene chains into type sequences according to the cargo column type information; Identify the locations of type changes in the type sequence as type boundaries; Randomly select a position from all type boundaries as the intersection point, and take the intersection point as the boundary. Combine the gene block before the intersection point in the first parent individual with the unused genes in the second parent individual that do not overlap with the type in the gene block in the order to generate the sequence gene chain of the first offspring individual. The gene block before the crossover point in the second parent individual is sequentially combined with genes in the first parent individual that are not used and do not have the same type as those in the gene block to generate the sequence gene chain of the second offspring individual.

[0015] In one possible implementation, the use of a directional mutation operator for the sequence gene chain includes: for the sequence gene chain, randomly swapping the positions of two different types of cargo columns in the sequence with a preset probability; The random flip mutation operator used for the attitude gene chain includes: for the attitude gene chain, randomly flipping the values ​​of several gene positions with a preset mutation probability to change the placement direction of the corresponding cargo column.

[0016] In a second aspect, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.

[0017] In this embodiment of the invention, by first forming cargo columns from similar cargo boxes based on stability conditions, the verification of stacking stability is brought forward to the cargo column generation stage. This fundamentally satisfies the hard constraint of stacking of the same size, eliminating the need for complex dynamic stability verification in subsequent loading optimization, thus significantly reducing the overall computational complexity. Then, by using cargo columns as objects and combining multi-objective optimization algorithms, the number of containers and type dispersion are simultaneously optimized. This not only reduces the number of containers required for loading and improves the economy of loading, but also quantifies the distribution of cargo types within containers by controlling type dispersion, reducing the complexity of cargo counting and other operations, reducing human error, and improving the safety of loading operations. This achieves a balance between loading economy and operational safety, while also conforming to the industry's mandatory safety standards for cargo box loading, making the loading strategy more in line with actual application needs. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the implementation of a loading method for stacked cargo boxes of the same size, according to an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the execution logic of a greedy algorithm for generating cargo columns according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the initialization and generation of a container loading point according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a container loading point de-weighting process provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a double-chain real number encoding structure provided in an embodiment of the present invention; Figure 6 A schematic diagram of the population selection process for an elite retention strategy provided in an embodiment of the present invention; Figure 7 This is a schematic diagram of the operation flow of the type-preserving crossover operator provided in an embodiment of the present invention; Figure 8 This is a schematic diagram illustrating the operational principle of a posture gene chain random flip mutation operator provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of the Pareto optimal solution set distribution for example S1 provided in a specific embodiment of the present invention; Figure 10 A typical container loading visualization diagram of the optimal compromise solution of example S1 provided in a specific embodiment of the present invention; Figure 11 This is a schematic diagram comparing the hypervolume index of the algorithm of the present invention with that of the standard NSGA-II algorithm, provided as a specific embodiment of the present invention. Detailed Implementation

[0019] This invention addresses the container loading problem by rationally loading a group of cargo boxes into a container (such as a standard 20-foot container) to meet the industry's hard constraints on same-size stacking and optimize multiple objectives (such as minimizing the number of containers and minimizing type dispersion). It is particularly applicable to mandatory safety constraints under specific loading requirements of "same-size stacking" and "isolation of loading groups."

[0020] Taking ammunition container loading as an example, the optimization problem of ammunition container loading is characterized by industry-specific hard constraints and multi-objective conflicts. In research on the Three-Dimensional Bin Packing Problem (3D-BPP), many studies treat "stack neatness" as a soft constraint or optimization objective (or relax constraints, such as only requiring a certain bottom support ratio), lacking research on treating it as a hard constraint to meet mandatory industry safety standards. Heuristic and metaheuristic algorithms, due to their computational complexity, set stability as a soft constraint and directly add hard constraints to the search space, resulting in extremely sparse feasible solutions and difficulty in algorithm convergence. Therefore, the necessity and innovation of the "two-stage" decoupling idea in this invention are highlighted. A hybrid heuristic algorithm based on two-stage optimization is proposed, which removes the computational burden from the search process and moves it to the problem modeling stage to improve loading efficiency and ensure compliance with industry-specific hard constraints.

[0021] To address the problem that directly using a composite cuboid for modeling leads to computational infeasibility, this invention proposes the following assumptions: 1) The internal space of the container is treated as a standard cuboid, ignoring internal protrusions and other minor structures to focus on the core optimization problem. 2) After packaging, the cargo boxes can be approximated as cuboids, but the height overlap caused by the straps during stacking must be considered to ensure the model closely approximates reality. 3) Under certain constraints, cargo can be placed in any feasible location within the container, and the acceleration and inertial forces during transportation are within safe thresholds. 4) Stability is guaranteed by the hard constraint of "stacked at the same size," requiring no additional dynamic verification.

[0022] Based on this, a two-stage optimization framework is proposed. The goal of stage one is to stack similar cargo containers into stable cargo columns, providing high-quality "building blocks" for stage two. Stage one generates cargo columns of the same size through the idea of ​​"built-in stability," thus preemptively eliminating the burden of stability verification. Stage two constructs a dual-objective model that minimizes the dispersion of container quantity and type, and solves it using an improved NSGA-II algorithm, providing a decision-making scheme for logistics transportation that balances economy and operational safety. Based on a uniformity-guided hybrid heuristic algorithm, the core idea is to maximize the uniformity of column height while minimizing the number of cargo columns, thereby improving the flexibility of the layout in stage two. In practical applications, the solution provided in this application can not only be used for cargo transshipment in industries such as chemicals, pharmaceuticals, and food, but also for military logistics, meeting the safety transportation requirements of hazardous chemicals, precision instruments, and ammunition.

[0023] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0024] Figure 1 This is a schematic flowchart illustrating a method for loading cargo boxes of the same size stack, as provided in an embodiment of the present invention. Figure 1 As shown, it includes the following steps: The execution subject of each embodiment of this application can be a server, processor, microprocessor, or other device with data processing capabilities. In actual implementation, the specific implementation method of the execution subject can be selected according to actual needs. This embodiment does not impose any special restrictions on this, as long as it is a device with data processing capabilities.

[0025] S101, obtain the attribute information of multiple cargo boxes to be loaded, and form multiple cargo columns of the same type of cargo boxes along the height direction according to the stability conditions; wherein, the attribute information includes at least size, cargo type, quality and category identifier; the stability conditions include at least: stacking height constraint, same size stacking constraint and box strap overlap constraint.

[0026] S102, determine the initial loading strategy based on multiple cargo columns; wherein, the loading strategy includes the loading sequence of cargo boxes and the initial placement posture.

[0027] S103 employs a multi-objective optimization algorithm, taking multiple cargo columns as objects, and establishes an optimization strategy with minimizing the required number of containers and minimizing the type dispersion as optimization objectives to optimize the initial loading strategy and obtain the optimal loading strategy that satisfies the preset constraints; wherein, the type dispersion is used to quantify the degree of distribution concentration of different types of cargo containers within the container.

[0028] In this embodiment, constraints are central to the model's feasibility, including hard constraints and soft constraints. Hard constraints, such as dimensional stacking, are mandatory industry requirements, while soft constraints, such as center of gravity restrictions, can be adjusted through optimization. A specific list of constraints is as follows: (1) Same size stacking constraint: The bottom projection of any upper cargo box must fall completely within the top projection range of the lower box of the same type. This constraint is directly derived from the "strap" structure of the cargo box and is the cornerstone of ensuring stacking stability.

[0029] (2) Weight constraint: The total mass of cargo boxes in a single container shall not exceed the maximum load capacity.

[0030] (3) Volume constraint: The total volume of the cargo box shall not exceed the usable volume of the container.

[0031] (4) Size constraints: The size of the cargo box must be compatible with the internal space of the container.

[0032] (5) Stability constraint: The cargo box must be fully supported. However, this constraint is satisfied in advance during the "column" generation stage through the built-in stability method.

[0033] (6) Center of gravity constraint: The overall center of gravity of the container must be kept within a safe range to prevent overturning during transport.

[0034] (7) Orientation constraint: The cargo box can only be laid flat.

[0035] (8) Non-overlapping constraint: All cargo box spaces do not overlap with each other, and the projection check method is used to ensure independence.

[0036] (9) Segregation constraints: Given the special nature of cargo boxes applicable to dangerous goods or precision instruments, each specific type of cargo box is allocated in sequence, and the "mixing rule" is strictly enforced to ensure that risks are reduced.

[0037] For example, when used for ammunition transport, in accordance with the relevant provisions of the International Technical Guidelines for Ammunition, each specific type of conventional ammunition is allocated according to loading groups, strictly adhering to the "mixing rule" to ensure risk reduction. See the table below for details: Table 1. Packing Group Mixing Rules The "X" indicates that storage is permitted within the same building (i.e., cargo container).

[0038] Traditional 3D packing algorithms require dynamic verification of the support stability and anti-tipping properties of each newly added cargo during the global layout process, resulting in significant computational overhead. To improve efficiency, this invention proposes the concept of "built-in stability," which decouples complex stability assurance measures from the global verification during the layout phase and moves them forward to the cargo column generation stage. Specifically, in the first stage of the algorithm, step S101, multiple cargo boxes are combined into a single "cargo column" using the "same-size stacking" rule. This ensures that stability is "built-in" when the column is generated, so that in the subsequent layout stages S102 and S103, each "column" can be considered a stable and indivisible unit, significantly reducing the computational complexity of subsequent optimizations.

[0039] The stability of this "pillar" stems from two fundamental mechanical principles: maximizing the supporting area and perpendicular force transmission. Let the base area of ​​a single cargo box be... When stacked at the same size, the support area of ​​each layer remains constant. The support rate can reach 100%, avoiding insufficient local support caused by stacking irregularly sized structures. At the same time, gravity is transmitted vertically downward along the column axis, effectively reducing lateral overturning moments. In addition, in the enclosed container environment, the container walls and top provide lateral constraints, creating an "interlocking effect," which is equivalent to enhancing the static friction and boundary constraints of the overall structure, further ensuring the global stability of the stack.

[0040] In step S101, the constraints are as follows: (1) Stacking height constraint: The height of each cargo column shall not exceed the internal height of the container or the safe stacking height limit: in, For cargo columns Size, To meet industry safety height restrictions, The internal height of a standard shipping container This is a collection of cargo columns.

[0041] (2) Same-size stacking constraint: The type of cargo boxes in each cargo column must be consistent: in, For cargo columns type This is a collection of cargo columns.

[0042] (3) Cargo strap overlap treatment (cargo strap overlap constraint): Considering the overlap of the cargo cargo strap structure, the total height of the cargo column needs to be adjusted: in, For cargo columns Size, For cargo columns Number of boxes of goods included. This refers to the overlap height of the cargo boxes.

[0043] In one possible implementation, after stacking multiple cargo boxes of the same type along the height direction to form multiple cargo columns according to stability conditions, the method further includes: Obtain the original height of a single cargo box, the preset overlap height parameter of the box straps, and the number of stacked cargo boxes; The theoretical total height is calculated based on the original height of a single cargo box and the number of stacked cargo boxes. The actual cargo column height is then obtained based on the theoretical total height and the overlap height parameter of the box straps.

[0044] In this embodiment, the handling of the box-tape overlap effect demonstrates the algorithm's attention to engineering details. This is achieved by introducing an overlap height parameter. The algorithm corrects the discrepancy between the ideal geometric model and the actual physical structure, making the height parameters of the cargo pillars more closely match the actual physical structure. This avoids errors in cargo pillar height calculation caused by ignoring the overlap effect of the container straps, which could lead to problems such as container space planning errors and stacking heights exceeding safety limits. It ensures that the actual height of the cargo pillars meets the internal height of the container and industry safety stacking height constraints, thus ensuring the stability of cargo pillar stacking from a parameter perspective. At the same time, the accurate height parameters allow for more accurate space calculations during subsequent container loading, improving space utilization, reducing container waste, and balancing the requirements for loading stability and economic efficiency.

[0045] In step S102, the cargo column is placed as a whole, transforming the three-dimensional packing problem into a two-dimensional packing problem. The available space position is maintained, and the initial state loading strategy is quickly determined, providing a foundation for further optimization of the loading strategy by subsequent heuristic algorithms.

[0046] The main purpose of step S103 is to optimize the loading of each cargo column into standard containers, while minimizing two key performance indicators: the number of containers (economic efficiency) and the type dispersion (operability).

[0047] The preset constraints include at least the following: same-size stacking constraints, weight constraints, volume constraints, size constraints, center of gravity constraints, non-overlapping constraints, and isolation constraints.

[0048] The weight constraint is as follows: ; The volume constraint is: ; The dimensional constraints are: ; The center of gravity constraint is: ; The isolation constraints are: ; The non-overlapping constraint is: ; in, Let the mass of the cargo column s be . Let K be the set of cargo columns in container k. Let s be the total volume of the cargo column. For standard container internal dimensions, Let S be the coordinates of the lower left corner of the cargo column S inside the container. , for The lower and upper limits of the safe zone for the center of gravity in the axial direction. , for The lower and upper limits of the safe zone for the center of gravity in the axial direction. , for The lower and upper limits of the safe zone for the center of gravity in the axial direction. Let 's' be the dimensions of the cargo column 's'. For the loading category of cargo column s, This refers to a collection of goods (the types of goods within a cargo container). Taking the transport of confined ammunition as an example, numbers 1-13 correspond to explosives loading categories AL (excluding I), N, and S. In other areas such as the transport of precision instruments or chemicals, numbers 1-13 can correspond to specific cargo classifications within those areas.

[0049] In this embodiment, by first forming cargo columns from similar cargo boxes based on stability conditions, the verification of stacking stability is brought forward to the cargo column generation stage. This fundamentally satisfies the hard constraint of stacking of the same size, eliminating the need for complex dynamic stability verification in subsequent loading optimization, thus significantly reducing the overall computational complexity. Then, by using cargo columns as objects and combining multi-objective optimization algorithms, the number and type dispersion of containers are simultaneously optimized. This not only reduces the number of containers required for loading and improves the economy of loading, but also quantifies the distribution of cargo types within containers by controlling type dispersion, reducing the complexity of operations such as cargo counting, reducing human error, and improving the safety of loading operations. This achieves a balance between loading economy and operational safety, while also conforming to the industry's mandatory safety standards for cargo box loading, making the loading strategy more in line with actual application needs.

[0050] In one possible implementation, multiple cargo columns are formed along the height direction from multiple cargo boxes of the same type, according to stability conditions, including: The cargo boxes are classified according to cargo type, and the maximum allowable stacking height of each type of cargo box is determined. To minimize the total number of cargo columns and maximize the uniformity of column height, multiple cargo columns are generated. When allocating cargo boxes, the cargo box to be allocated is placed on the cargo column with the smallest current height to generate a set of cargo columns with uniform height distribution.

[0051] Before step S101, the cargo containers are classified by type, and the maximum permissible stacking height for each type of container is calculated. This step not only considers the physical size limitations of the containers but also incorporates the specific requirements for stacking height stipulated by industry safety regulations.

[0052] The determination of the search space is based on theoretical derivation. The minimum number of cargo columns is obtained by summing the ratios of the number of boxes of each type to the maximum stacking number, while the upper limit of the search is ensured by introducing a tolerance parameter to guarantee the completeness of the solution space. This design avoids unnecessary computational consumption while ensuring the existence of the optimal solution.

[0053] like Figure 2 As shown, the cargo column generation strategy employs an improved greedy algorithm. While maintaining the efficiency advantage of the traditional greedy method, this algorithm overcomes the extreme distribution problem that may arise from traditional methods by introducing a height balancing mechanism. Specifically, the algorithm always places the next box to be assigned on the cargo column with the smallest current height. This strategy has been mathematically proven to asymptotically approximate the optimal distribution.

[0054] A weighted comprehensive objective function is used to minimize the number of cargo columns and maximize the uniformity of column height: In the formula: This represents the total number of cargo columns. Representation type The number of cargo columns; The standard deviation of column height measures uniformity. This represents the average column height. , These are the weighting coefficients.

[0055] In this embodiment, cargo columns are first categorized by type and their maximum allowable stacking height is determined. This ensures that the generated cargo columns conform to the physical dimensions of containers and industry safety stacking height requirements, guaranteeing the rationality of the cargo columns from the ground up. Cargo columns are then generated with the goal of minimizing the total number of cargo columns and maximizing column height uniformity. Cargo boxes to be allocated are placed on the cargo columns with the lowest current height. This reduces the overall number of cargo columns, laying the foundation for reducing the number of containers used later and improving packing economy. It also ensures a uniform height distribution of the generated cargo columns, avoiding extreme differences in column height and improving the spatial adaptability and flexibility of subsequent container layout. This allows for a more rational placement of cargo columns within the container, further optimizing space utilization. Simultaneously, uniform column height also ensures a more balanced distribution of weight and space within the container, indirectly improving overall stability after loading and ensuring operational safety.

[0056] In one possible implementation, the initial loading strategy is determined based on multiple cargo columns, including: Set the placement order and initial orientation of multiple cargo columns, and initialize the loading point set, adding the container's origin as the first loading point to the loading point set; According to the preset cargo column placement order, each cargo column to be loaded is traversed in turn; For the currently traversed cargo column, traverse each loading point in the loading point set according to the preset spatial priority order, align each corner of the current cargo column with the current loading point, and check whether the constraints are met. If they are met, place the current cargo column at the current loading point, delete the current loading point from the loading point set, and generate a new loading point in the corresponding direction according to the size of the current cargo column. After deduplication of the newly generated loading point, add it to the loading point set. If the constraints are not met, continue traversing the next loading point. If the current cargo column cannot be placed at any loading point, add a new container, reset the loading point set, and continue trying to place the current cargo column. Repeat the above steps until all cargo columns are placed to obtain the initial loading strategy.

[0057] This invention employs a dynamic boundary loading method, the core of which lies in the generation, deletion, and sorting of loading points. When dealing with large-scale, multi-type cargo, this strategy, based on the generation of cargo columns in stage one, places cargo columns as a whole, essentially transforming the three-dimensional packing problem into a two-dimensional packing problem. It features simple rules and high computational efficiency, providing a foundation for further optimization of packing schemes using subsequent heuristic algorithms.

[0058] In the container loading problem, the loading point is a three-dimensional coordinate point used to locate the cargo. When the container is empty, the origin of the spatial coordinate system is used as the initial loading point. When placing the cargo, its various corners (mainly including...) are... Figure 3As shown, the bottom left and top right corners are aligned with the loading point to ensure that all stability constraints are met. The specific process is as follows: like Figure 3 As shown, the origin is used as the first loading point. The cargo box is loaded into the origin O. When all constraints are met, the origin is deleted, and two new loading points are added. , And store it in the set of loading points. Figure 3 (a) is a three-dimensional loading diagram of the container to be packed. Since the cargo column can be considered as a whole, the z-axis direction is not considered. Therefore, it can be shown as follows: Figure 3 (b) Consideration of loading points and loading methods from a two-dimensional plane.

[0059] After selecting a loading point and loading the cargo column, it's necessary to determine if the newly generated loading point overlaps with an existing loading point when projected onto the coordinate axis. If a overlap is found, the loading point within that projection is removed. For example... Figure 4 As shown, Figure 4 (a) shows that there are duplicate projection points on the x-axis that need to be deleted. Figure 4 (b) shows that there are duplicate projection points on the y-axis that need to be deleted.

[0060] In the set of loading points, after each new loading point is generated, it is sorted according to the principle of "from left to right and from back to front" of the cargo, with priority given to the x and y coordinates, to ensure that the space close to the inner wall of the container is used first, while the lateral offset of the center of gravity is reduced, thus enhancing the stability of the layout.

[0061] The above loading strategy process can be simplified and summarized as follows: 1) Initialization information: Load the basic information of the cargo column to be loaded, and determine the cargo column type, placement order and initial posture.

[0062] 2) Handling Cargo Pillars: Traverse all loading points of the current container and test placement feasibility based on rotation direction. If the constraints are met, place the cargo pillar and reset the loading point set.

[0063] 3) Add a new container; if all loading points cannot accommodate the current cargo column, create a new container and reset the loading point set.

[0064] 4) End loading: After all cargo columns are loaded, output the initial packing strategy.

[0065] In this embodiment, by setting the placement order and initial posture of the cargo columns and initializing the loading points, a clear initial plan for loading the cargo columns is provided. Then, the loading points are traversed according to a preset priority to attempt to place the cargo columns. When the constraints are met, the loading point set is updated. If placement is not possible, a new container is added and the loading point is reset. This can complete the initial loading plan of the cargo columns in a standardized and procedural way, transforming the complex three-dimensional container packing problem into an orderly two-dimensional loading point operation, which greatly improves the generation efficiency of the initial loading strategy. At the same time, prioritizing the use of loading points close to the inner wall of the container can reduce the lateral offset of the container's center of gravity and enhance the initial stability of the loading layout. Furthermore, the deduplication of loading points can avoid invalid placement attempts and reduce computational redundancy. This makes the initial loading strategy not only feasible but also provides a high-quality basic solution for subsequent multi-objective optimization, which is convenient for further optimization of the number and type of containers, taking into account both economy and operational safety.

[0066] In one possible implementation, the initial state loading strategy is optimized to obtain an optimal loading strategy that satisfies preset constraints, including: The initial loading strategy is treated as an individual, and a hybrid initialization strategy is used to generate the initial population. Each individual in the initial population is represented by a double-chain real number code, which includes a sequence gene chain and an attitude gene chain. The sequence gene chain is used to represent the loading order of the cargo columns, and the attitude gene chain is used to represent the placement direction of each cargo column. The hybrid initialization strategy includes type-first initialization, efficiency-first initialization, and completely random initialization. An improved NSGA-II algorithm is used to iteratively optimize the initial population. Each iteration includes: Decode each individual in the current population, transform it into a specific loading scheme, and calculate the corresponding number and type dispersion of containers; The population is non-dominated and sorted according to the number and type dispersion of containers corresponding to each individual, and the crowding distance of each individual is calculated. A feasibility-driven binary tournament selection strategy is used to select parent individuals from the current population; Crossover operations are performed on the selected parent individuals to generate offspring individuals; a type-preserving crossover operator is used for sequence gene chains, and a two-point crossover operator is used for posture gene chains. Mutation operations are performed on offspring individuals; specifically, a directional mutation operator is used for sequence gene chains, and a random flip mutation operator is used for posture gene chains. The parent and offspring populations are merged, and elites are preserved based on non-dominant ranking and crowding distance to form a new generation population. Repeat the above iterations until the termination condition is met, and output the Pareto optimal solution set as the optimal loading strategy.

[0067] This invention addresses the packing problem by considering the influence of cargo type, placement order, and initial placement posture, employing a "double-chain" real-number encoding. For example... Figure 5 As shown, the encoding consists of two chains: a sequence gene chain and a posture gene chain.

[0068] The sequence gene chain represents the loading order of the cargo columns, using real number encoding. The gene values ​​are permutations of cargo column indices, with an index length equal to the total number of cargo columns, n. ,in, And without repetition.

[0069] Attitude gene chain: represents the placement orientation of each cargo column (0: original orientation; 1: rotate 90 degrees), i.e. ,in, .

[0070] The decoding process transforms chromosomes into feasible solutions using a greedy loading strategy based on loading points: it sequentially traverses the sequence gene chain, determines the placement orientation of cargo columns based on posture genes, dynamically maintains the set of loading points, and verifies constraints (such as packing isolation and weight limits). This encoding mechanism ensures the completeness and feasibility of the solution and significantly reduces the probability of generating invalid solutions.

[0071] In the process of generating the initial population using a hybrid initialization strategy, a hybrid initialization strategy is adopted, combining domain knowledge with random generation. The initialization strategies are as follows: Type-first initialization: Group goods by type, with columns of goods of the same type arranged consecutively to promote type concentration.

[0072] Efficiency-first initialization (30%): Sort cargo columns in descending order of volume, prioritizing large-volume cargo columns to improve space utilization.

[0073] Completely random initialization (30%): Randomly generate sequence and posture genes to ensure population diversity.

[0074] In one possible implementation, constraint satisfaction verification is introduced during initialization. By detecting projection overlap and checking the compatibility of the equipment class, obviously infeasible individuals are eliminated, ensuring that the initial solution of the population approximates the feasible region.

[0075] In this embodiment of the invention, the multi-objective optimization algorithm framework employs an improved Non-dominated Sorting Genetic Algorithm II (NSGA-II). As the core component of the improved NSGA-II algorithm, fitness evaluation is fundamental to fast non-dominated sorting and crowding calculation; its accuracy directly affects the convergence and computational efficiency of population evolution. In this invention, fitness evaluation calculates the two objective functions for each population based on the decoding results.

[0076] In the elite retention process based on non-dominated ordination and crowding distance, the elite retention strategy of NSGA-II is adopted. This strategy aims to retain Pareto front solutions to achieve the goal of genetically superior individuals and eliminate inferior ones. This strategy expands the selection range when generating the next generation by mixing parent and offspring individuals to form a mixed population of size 2N. Figure 6 As shown, the specific steps are as follows: parental population and offspring population Merge into a new candidate population Population size is ; For candidate populations Perform a fast nondominated sort to obtain the frontier sequence. Preferred All individuals are selected sequentially, and the non-dominant frontier is added to the next generation of candidate populations. In the middle, until Insufficient to fully integrate the new non-dominated frontier , for the last frontier Individuals within the group are sorted in descending order of crowding, and the top group is selected. Individuals added In the middle, until The population size reached This forms a new generation of parent populations.

[0077] In this embodiment, the initial loading strategy is treated as an individual, and a hybrid initialization strategy is used to generate the initial population. Combining type-priority, efficiency-priority, and completely random initialization methods, the overall quality of the initial population can be improved by leveraging domain knowledge, making the initial solution closer to the feasible region. At the same time, the diversity of the population can be guaranteed, avoiding the algorithm from getting trapped in local optima. The double-chain real number encoding can accurately represent the loading order and placement direction of the cargo columns, reducing the probability of generating invalid solutions. Then, the improved NSGA-II algorithm is used for iterative optimization. Differentiated crossover and mutation operators are designed for different gene chains. Combined with the feasibility-driven selection strategy and the elite retention strategy, the algorithm can always prioritize retaining feasible solutions that meet the constraints during the iteration process. It can efficiently select individuals with better non-dominance levels and larger crowding distances, improve the convergence and search efficiency of the algorithm, and accurately solve the Pareto optimal solution set that simultaneously optimizes the number and type dispersion of containers. This allows the final optimal loading strategy to achieve the optimal balance between loading economy and operational safety while satisfying all preset constraints, adapting to the actual decision-making needs of cargo container loading.

[0078] In one possible implementation, type dispersion is defined based on the complement of the Herfindahl-Hirschman index; The calculation of type dispersion includes: The type dispersion of each container is determined based on the sum of the squares of the proportions of each type of cargo box within the container. The global type dispersion is determined by the weighted average of the type dispersion of each container.

[0079] Type dispersion is the core indicator introduced in this invention, used to quantify the degree of concentration of cargo types within the container, directly mapping operational safety requirements (such as reducing inventory complexity and minimizing human error). Traditional optimization focuses more on technical indicators (such as space utilization), while type dispersion transforms ambiguous operational requirements into optimizable objectives.

[0080] This invention uses the complement of the Herfindahl-Hirschman Index (HHI) as a quantitative tool, primarily for the following reasons: The HHI originates from market concentration measurements in economics; its mathematical form (sum of squares) is highly sensitive to changes in concentration, effectively capturing the dominance of type distributions; it is computationally simple and efficient, with an O(n) complexity suitable for embedding in multi-objective optimization algorithms; furthermore, its complement form can intuitively convert concentration indicators into dispersion indicators, with a standardized value range of [0,1], facilitating optimization. This choice adapts mature economic theory to the logistics scenario, enhancing the interpretability and robustness of the indicator. The specific definition is as follows: For each container Its type dispersion is defined as: In the formula, Indicates container A collection of goods types; Is a type In containers The quantity of goods in the shipment; It is a container The total number of goods in, i.e. ; The objective function for global type dispersion is defined as a weighted average of the dispersion of all containers: In the formula, the weights Determined based on the quantity of goods.

[0081] In the specific implementation process, in order to eliminate dimensional differences and promote the uniform distribution of the Pareto front, the objective function is normalized as follows: In the formula, For the number of containers; This represents the type dispersion.

[0082] In this embodiment, the type dispersion is defined based on the complement of the Herfindahl-Hirschman index. The type dispersion of a single container is calculated first, and then a weighted average is used to obtain the global type dispersion. This leverages the index's high sensitivity to distribution concentration to accurately capture the cargo type distribution within each container and the overall system. This transforms the previously vague operational safety requirements into quantifiable and optimizable indicators, making the type dispersion calculation results more closely aligned with actual operational needs. Furthermore, the weighted average calculation method differentiates weights based on the cargo quantity in each container, allowing the global type dispersion to more accurately reflect the overall cargo type distribution. This provides an accurate and reliable optimization indicator for the multi-objective optimization algorithm, ensuring that the algorithm can effectively reduce cargo type dispersion and improve loading operation safety by optimizing this indicator. Combined with the container quantity indicator, this makes the multi-objective optimization results more valuable for practical reference.

[0083] In one possible implementation, a feasibility-driven binary tournament selection strategy is used to select parent individuals from the current population, including: Two individuals are randomly selected from the current population; If one of the individuals is a feasible solution that satisfies all the preset constraints, and the other is an infeasible solution, then the feasible solution individual is selected. If both individuals are feasible solutions, then compare their non-dominated ordination ranks and select the individual with the lower rank. If both individuals are feasible solutions and have the same non-dominated ranking, then compare their crowding distances and select the individual with the larger crowding distance.

[0084] In this embodiment, a feasibility-driven binary tournament selection strategy is used to select parent individuals. By first distinguishing between feasible and infeasible solutions and prioritizing feasible solutions, it ensures that the population always focuses on individuals that satisfy the preset constraints during the algorithm iteration process, avoiding invalid infeasible solutions from occupying population resources. This ensures that the algorithm's search direction always revolves around the feasible region, improving the algorithm's solution efficiency. Then, the non-dominated sorting level and crowding distance of the two feasible solutions are compared sequentially, and the better individual is selected as the parent. This can accurately screen out individuals that perform better in both the quantity and type dispersion of containers, while ensuring population diversity and preventing the algorithm from converging to local optima. This allows the algorithm to continuously approach a better Pareto front during iteration, ultimately solving for the optimal loading strategy that better meets actual needs and achieving a better balance between loading economy and operational safety.

[0085] In one possible implementation, a type-preserving crossover operator is used for the sequence gene chain, including: Obtain the sequence gene chains of two parent individuals, and convert the sequence gene chains into type sequences according to the cargo column type information; Identify the locations of type changes within a type sequence as type boundaries; Randomly select a position from all type boundaries as the intersection point, and take the intersection point as the boundary. Combine the gene block before the intersection point in the first parent individual with the unused genes in the second parent individual that do not overlap with the type in the gene block in sequence to generate the sequence gene chain of the first offspring individual. The gene block before the crossover point in the second parent individual is combined sequentially with the unused genes in the first parent individual that do not overlap with the type in the gene block to generate the sequence gene chain of the second offspring individual.

[0086] To address the specific requirements of cargo type clustering in the ammunition container loading problem, this invention designs a Type-Preserving Crossover (TPCO) operator, specifically for optimizing sequence gene chains. The core idea of ​​TPCO is to select crossover points at type boundaries, ensuring that the continuity of cargo columns of the same type is not disrupted by random crossovers, such as... Figure 7 As shown, the operation process is as follows: Type Boundary Identification: First, type analysis is performed on the sequence gene chain of the parent individual. The sequence gene chain consists of an arrangement of cargo column indices (e.g., parent 1 sequence: [1,2,3,4,5], where each index corresponds to a cargo column). By querying the global cargo information database (which stores the cargo type corresponding to each index), the sequence is converted into a type sequence (e.g., type sequence: [A,A,B,B,C]). Subsequently, the boundary positions of type changes are identified (e.g., in the above sequence, positions 2→3 and 4→5 are the boundaries).

[0087] Intersection point selection: Randomly select one intersection point from the identified type boundaries (e.g., the boundary between positions 2 and 3). This strategy ensures that the intersection operation only occurs between type blocks, not within type blocks.

[0088] Type block swapping and recombination: First, extract the parent's contribution. Using the intersection point as the boundary, extract the index block before the intersection point from parent 1 (e.g., [1,2]), and extract unused indices from parent 2 in sequence (filtering out indices with the same type as those in the parent 1's contribution block). Then, generate the child generation. Combine the index blocks of parent 1 with the filtered index blocks of parent 2 to generate the child sequence (e.g., child 1: [1,2,...]). During recombination, the uniqueness of the indices must be maintained to avoid duplication.

[0089] In this embodiment, a type-preserving crossover operator is used for the sequence gene chain. First, the sequence gene chain is converted into a type sequence and the type boundaries are identified. Then, crossover points are selected at the type boundaries for gene block exchange and recombination. This ensures that the crossover operation is only performed between gene blocks of different types of cargo columns, avoiding random crossover from disrupting the continuity of the same type of cargo columns in the loading sequence. This allows the same type of cargo columns to be loaded as concentratedly as possible, effectively reducing the dispersion of cargo types within the container and improving the safety of loading operations. At the same time, during recombination, duplicate types of genes are filtered out and the index uniqueness is maintained, ensuring the validity of the generated offspring sequence gene chain and avoiding invalid solutions with duplicate loading of cargo columns. This ensures that the offspring individuals after the crossover operation still have a feasible loading planning basis. Combined with other operations of the algorithm, multi-objective optimization can continuously optimize the number of containers and the dispersion of types while ensuring the feasibility of the solution, taking into account both the economy of loading and operational safety.

[0090] In one possible implementation, a directional mutation operator is used for the sequence gene chain, including: for the sequence gene chain, randomly swapping the positions of two different types of cargo columns in the sequence with a preset probability; A random flip mutation operator is used for the attitude gene chain, including: for the attitude gene chain, the values ​​of several gene positions are randomly flipped with a preset mutation probability to change the placement direction of the corresponding cargo column.

[0091] Specifically, by swapping the positions of different types of cargo columns in the sequence gene chain with a preset probability, the algorithm can break the local optima that may form during the algorithm iteration process with a small probability. This allows the algorithm to explore more loading sequence possibilities and avoids the inability to further optimize the dispersion of container number and type due to the fixed loading sequence. Meanwhile, as... Figure 8 As shown, by randomly flipping gene sites in the attitude gene chain to change the placement direction of cargo columns, different spatial placement methods of cargo columns can be explored, improving the spatial adaptability of cargo columns within containers, further optimizing the space utilization of containers, reducing the number of containers used, and improving the economic efficiency of container loading.

[0092] In this embodiment, the combination of two directional mutation operators can ensure the algorithm's global search capability and make the mutation operation more in line with the actual needs of cargo container loading. This allows the algorithm to continuously optimize the dual objectives during iteration, ultimately obtaining a better loading strategy and achieving a balance between packing economy and operational safety.

[0093] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0094] To verify the effectiveness of the two-stage optimization loading algorithm for hard constraints of stacking of the same size, this invention tests multiple examples and compares them with the standard multi-objective algorithm (NSGA-II).

[0095] This experiment implemented the algorithm using Python programming. The computer configuration was an AMD Ryzen 5 4600 with Radeon Graphics 3.00GHz, 8GB of RAM, and a Windows 11 operating system. The experiment used a 20ft shipping container as the three-dimensional loading container and tested 11 types of cargo containers. Examples S1 to S4 were used in the experiment, and relevant information is shown in the table below.

[0096] Table 2 Cargo Container Parameters and Loading Capacity Before testing the example, set the relevant parameters for the two algorithms: population size = 80, crossover probability, mutation probability, and number of iterations.

[0097] To verify the effectiveness of the two-stage optimization loading algorithm for hard constraints on stacking of the same size, this invention tests multiple examples (S1~S4) and compares them with standard multi-objective algorithms. This section first takes example S1 as an example for detailed analysis, illustrating the characteristics of the Pareto solution set, the selection process of the optimal compromise solution, and the visualization results of the loading scheme; then it expands to a comparison of multiple examples to quantitatively evaluate the algorithm performance.

[0098] Example S1 contains 11 types of cargo boxes, with a large total number (5800 boxes). Its packing categories are widely distributed (see Table 2), making it suitable for testing the algorithm's performance in complex scenarios. After solving using a two-stage algorithm, a Pareto solution set is obtained, distributed as follows: Figure 9 As shown.

[0099] Figure 9 The Pareto fronts in the model exhibit a typical negative correlation distribution, clearly demonstrating the trade-off between the number of containers (economic efficiency) and type dispersion (operability). The two ends of the solution set correspond to extreme solutions: the minimum number of containers solution (number of containers = 34, type dispersion = 0.799) and the minimum type dispersion solution (number of containers = 42, type dispersion = 0.122). The former improves space utilization through mixed loading types but sacrifices operational safety; the latter optimizes operational efficiency through type segregation but increases costs.

[0100] Since extreme solutions lack practicality in real-world decision-making, this invention employs the ideal point method to select the optimal compromise solution. The operational steps are as follows: Step 1: Determine the target area By defining the target range, we can identify the boundary of the Pareto solution set in the target space, providing a benchmark for subsequent normalization. Let the Pareto solution set have n solutions, and be defined as follows: For the first A two-dimensional objective vector for each solution, where... The first objective is to minimize the number of containers. This indicates that the second objective is to minimize type dispersion. The range expression for each objective function is: in This represents the minimum number of containers in the Pareto solution set. This represents the maximum number of containers in the Pareto solution set. This represents the minimum type dispersion value in the Pareto solution set. Let represent the maximum type dispersion value in the Pareto solution set. This represents the ideal point, that is, the optimal value for each objective.

[0101] Step 2: Normalization To eliminate the influence of dimensions, the target value needs to be normalized, mapping target values ​​with different dimensions to... The normalized expression for the interval is: The normalized ideal point is located at the origin of the coordinate system, i.e. .

[0102] Step 3: Select the best compromise solution Calculate the Euclidean distance from each solution to the ideal point. Its calculation expression is: Select The solution with the smallest value is taken as the optimal compromise solution.

[0103] The calculated optimal compromise solution corresponds to 36 containers with a type dispersion of 0.484. This solution maintains economic efficiency while keeping the type dispersion at a low level, demonstrating the algorithm's ability to balance the two objectives. To further verify the rationality of the solution, Table 3 lists some loading schemes based on this solution. Figure 10 The spatial rationality of the solution is further verified by visualizing the loading conditions of four typical types of containers. Figure 10 (a), (b), (c), and (d) show the loading status of containers 1, 15, 24, and 29, respectively.

[0104] To comprehensively evaluate the robustness of the algorithm, Table 3 compares the performance metrics of the algorithm of this invention and NSGA-II under different solutions in the example.

[0105] Table 3 Comparison of Algorithm Solutions under Different Approaches Data shows that, under the optimal compromise solution, the algorithm of this invention has fewer containers than NSGA-II in the examples, and the type dispersion is significantly lower; in the minimum type dispersion solution, the algorithm of this invention can achieve lower dispersion values; as the example size changes (cargo volume decreases), the algorithm of this invention still maintains a stable advantage, especially in type dispersion control. Convergence performance is further verified through hypervolume indices, such as… Figure 11 As shown.

[0106] This invention also provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the above method embodiments. Exemplarily, the electronic device may be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., and is not limited thereto.

[0107] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0108] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for loading cargo boxes of the same size in a stack, characterized in that, include: Obtain the attribute information of multiple cargo boxes to be loaded, and form multiple cargo columns of the same type along the height direction according to stability conditions; wherein, the attribute information includes at least size, cargo type, weight and category identifier; the stability conditions include at least: stacking height constraint, same size stacking constraint and box strap overlap constraint; The initial loading strategy is determined based on multiple cargo columns; the loading strategy includes the loading sequence of cargo boxes and the initial placement posture. A multi-objective optimization algorithm is adopted, taking the multiple cargo columns as objects, and establishing the optimization objectives of minimizing the required number of containers and minimizing the type dispersion, to optimize the initial state loading strategy and obtain the optimal loading strategy that satisfies the preset constraints; wherein, the type dispersion is used to quantify the degree of distribution concentration of different types of cargo containers in the container.

2. The loading method for cargo boxes stacked according to claim 1, characterized in that, The step of forming multiple cargo columns along the height direction from the same type of cargo boxes according to stability conditions includes: The cargo boxes are classified according to cargo type, and the maximum allowable stacking height of each type of cargo box is determined. To minimize the total number of cargo columns and maximize the uniformity of column height, multiple cargo columns are generated. When allocating cargo boxes, the cargo box to be allocated is placed on the cargo column with the smallest current height to generate a set of cargo columns with uniform height distribution.

3. The loading method for cargo boxes stacked according to claim 2, characterized in that, After stacking similar cargo boxes along the height direction to form multiple cargo columns according to stability conditions, the method further includes: Obtain the original height of a single cargo box, the preset overlap height parameter of the box straps, and the number of stacked cargo boxes; The theoretical total height is calculated based on the original height of a single cargo box and the number of stacked cargo boxes. The actual cargo column height is then obtained based on the theoretical total height and the overlap height parameter of the box straps.

4. The loading method for cargo boxes stacked according to claim 1, characterized in that, The method for determining the initial loading strategy based on multiple cargo columns includes: Set the placement order and initial posture of multiple cargo columns, and initialize the loading point set, adding the origin of the container as the first loading point to the loading point set; According to the preset cargo column placement order, each cargo column to be loaded is traversed in turn; For the currently traversed cargo column, each loading point in the loading point set is traversed according to the preset spatial priority order. The corners of the current cargo column are aligned with the current loading point, and it is checked whether the various constraints are met. If they are met, the current cargo column is placed at the current loading point, the current loading point is deleted from the loading point set, and a new loading point is generated in the corresponding direction according to the size of the current cargo column. The newly generated loading point is deduplicated and then added to the loading point set. If the constraints are not met, the traversal continues to the next loading point. If the current cargo column cannot be placed at any loading point, a new container is added, the loading point set is reset, and the attempt to place the current cargo column continues. Repeat the above steps until all cargo columns are placed to obtain the initial loading strategy.

5. The loading method for cargo boxes stacked according to claim 1, characterized in that, The optimization of the initial state loading strategy to obtain the optimal loading strategy that satisfies preset constraints includes: The initial loading strategy is treated as an individual, and a hybrid initialization strategy is used to generate an initial population. Each individual in the initial population is represented by a double-chain real-number encoding, which includes a sequence gene chain and an attitude gene chain. The sequence gene chain is used to represent the loading order of the cargo columns, and the attitude gene chain is used to represent the placement orientation of each cargo column. The hybrid initialization strategy includes type-first initialization, efficiency-first initialization, and completely random initialization. The initial population is iteratively optimized using an improved NSGA-II algorithm, with each iteration including: Decode each individual in the current population, transform it into a specific loading scheme, and calculate the corresponding number and type dispersion of containers; The population is non-dominated and sorted according to the number and type dispersion of containers corresponding to each individual, and the crowding distance of each individual is calculated. A feasibility-driven binary tournament selection strategy is used to select parent individuals from the current population; Crossover operations are performed on the selected parent individuals to generate offspring individuals; a type-preserving crossover operator is used for sequence gene chains, and a two-point crossover operator is used for posture gene chains. Mutation operations are performed on offspring individuals; specifically, a directional mutation operator is used for sequence gene chains, and a random flip mutation operator is used for posture gene chains. The parent and offspring populations are merged, and elites are preserved based on non-dominant ranking and crowding distance to form a new generation population. Repeat the above iterations until the termination condition is met, and output the Pareto optimal solution set as the optimal loading strategy.

6. The loading method for cargo boxes stacked according to claim 5, characterized in that, The type dispersion is defined based on the complement of the Herfindahl-Hirschman index; The calculation of type dispersion includes: The type dispersion of each container is determined based on the sum of the squares of the proportions of each type of cargo box within the container. The global type dispersion is determined by the weighted average of the type dispersion of each container.

7. The loading method for cargo boxes stacked according to claim 5, characterized in that, The feasibility-driven binary tournament selection strategy for selecting parent individuals from the current population includes: Two individuals are randomly selected from the current population; If one of the individuals is a feasible solution that satisfies all the preset constraints, and the other is an infeasible solution, then the feasible solution individual is selected. If both individuals are feasible solutions, then compare their non-dominated ordination ranks and select the individual with the lower rank. If both individuals are feasible solutions and have the same non-dominated ranking, then compare their crowding distances and select the individual with the larger crowding distance.

8. The loading method for cargo boxes stacked according to claim 5, characterized in that, The type-preserving crossover operator used for the sequence gene chain includes: Obtain the sequence gene chains of two parent individuals, and convert the sequence gene chains into type sequences according to the cargo column type information; Identify the locations of type changes in the type sequence as type boundaries; Randomly select a position from all type boundaries as the intersection point, and take the intersection point as the boundary. Combine the gene block before the intersection point in the first parent individual with the unused genes in the second parent individual that do not overlap with the type in the gene block in the order to generate the sequence gene chain of the first offspring individual. The gene block before the crossover point in the second parent individual is sequentially combined with genes in the first parent individual that are not used and do not have the same type as those in the gene block to generate the sequence gene chain of the second offspring individual.

9. The loading method for cargo boxes stacked according to claim 5, characterized in that, The method of using a directional mutation operator for the sequence gene chain includes: for the sequence gene chain, randomly swapping the positions of two different types of cargo columns in the sequence with a preset probability; The random flip mutation operator used for the attitude gene chain includes: for the attitude gene chain, randomly flipping the values ​​of several gene positions with a preset mutation probability to change the placement direction of the corresponding cargo column.

10. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 9.