A trapezoidal bearing area intelligent loading optimization method
Patent Information
- Application Number
- CN202611309467.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-09-25
AI Technical Summary
一方面,传统装载方法依赖人工经验,主要通过试错法进行装载;另一方面,现有智能装载算法多聚焦于矩形区域,主流算法虽能通过建模求解最优解,但其承载区域模型假设多为矩形边界,未充分考虑梯形承载区域的斜边约束对货物装载位置的严格限制
(1)显著提升梯形承载区域的空间利用率,减少装载死角:通过建立参数化的梯形承载区域模型,并设计第一次基于边界约束的定向平移布置与第二次基于边界约束的定向平移布置,使货物能够沿梯形斜边方向自适应平移、靠拢底边中点并整体沿边界滑动;这有效避免了传统人工试错或矩形区域算法在梯形斜边附近产生难以填充的死角或空隙,尤其针对条形货物(如管材、型材)装载时,能够实现货物与梯形边界的紧密贴合,最大化利用梯形区域的实际装载空间;
Smart Images

Figure CN122820103A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics and supply chain loading optimization technology, and in particular to an intelligent loading optimization method for trapezoidal load-bearing areas. Background Technology
[0002] Load optimization is the process of improving cargo loading efficiency through algorithms and software tools, and it is crucial in the logistics and transportation industry. With the rapid development of logistics, the loading area has become irregular due to the design requirements of transportation vehicles and warehousing facilities. Among them, trapezoidal loading areas are a typical irregular area and are widely present in loading scenarios, such as trapezoidal spaces reserved in the corners of warehouses due to building structures, and trapezoidal projection cabins formed by ship design.
[0003] The unique characteristic of trapezoidal loading areas lies in their linearly sloping boundaries. Compared to regular rectangular areas, their loading efficiency is more difficult to improve—if goods are not placed properly, "dead corners" or "gaps" that are difficult to fill can easily form near the sloping sides. This is especially true in loading scenarios for strip-shaped goods (such as pipes, profiles, and long, narrow packaging boxes), where the length-to-width ratio of the goods is large, requiring consideration of both vertical arrangement and horizontal interweaving, further exacerbating the loading difficulty.
[0004] Current research on loading optimization for trapezoidal load-bearing areas is significantly insufficient. On the one hand, traditional loading methods rely on human experience and are mainly carried out through trial and error. On the other hand, existing intelligent loading algorithms mostly focus on rectangular areas. Although mainstream algorithms can solve for the optimal solution through modeling, their load-bearing area models mostly assume rectangular boundaries and do not fully consider the strict constraints imposed by the hypotenuse of the trapezoidal load-bearing area on the loading position of the goods. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent loading optimization method for trapezoidal load-bearing areas, which solves the existing problems of optimizing trapezoidal area loading in warehouse loading, transportation vehicle loading, and automated equipment loading, and improves the loading rate of trapezoidal areas.
[0006] To achieve the above objectives, the present invention provides an intelligent loading optimization method for a trapezoidal load-bearing area, comprising the following steps: S1. Establish a planar coordinate system and parameterize the trapezoidal load-bearing area and cargo information; S2. Based on parameterized cargo information, set the size of the loading scheme set, and determine the cargo arrangement sequence and the initial position of the cargo arrangement. S3. Based on the initial position of the goods, perform the first directional translation arrangement based on boundary constraints; S4. After completing the first directional translation arrangement based on boundary constraints, perform the second directional translation arrangement based on boundary constraints. S5. After completing the first and second boundary-constrained directional translation arrangements, if there are still goods that have not been successfully arranged, then supplementary goods arrangement shall be carried out. S6. After completing the replenishment and arrangement of goods, construct the fitness function to determine the optimal loading scheme; S7, Output the optimal loading scheme.
[0007] Among them, directional translation based on boundary constraints refers to translating the cargo in a direction determined by the hypotenuse or base of the trapezoid without changing the cargo arrangement direction and envelope size, until the cargo reaches the limit feasible position in that direction; the limit feasible position refers to the position where the cargo satisfies the boundary constraints and non-interference constraints, but if it continues to move any positive distance along the original translation direction, it will violate at least one of the above constraints.
[0008] Preferably, the specific process of establishing a planar coordinate system and parameterizing the trapezoidal load-bearing area and cargo information in S1 is as follows: S11. Establish a planar coordinate system, including the x-axis and y-axis, with the x-axis and y-axis perpendicular to each other, and the intersection of the x-axis and y-axis as the origin; S12, Parametric trapezoidal load-bearing area information; Read the data of the trapezoidal bearing area and establish a trapezoidal bearing area model in a plane coordinate system, making the two parallel sides of the trapezoidal bearing area parallel to the x-axis. The parallel side located at the top and longer is called the top side, and the parallel side located at the bottom and shorter is called the bottom side. Determine the coordinates of the upper left, upper right, lower left, and lower right endpoints of the trapezoidal bearing area. The line segment between the upper left and upper right endpoints is called the top side, the line segment between the lower left and lower right endpoints is called the bottom side, the line segment between the upper left and lower left endpoints is called the left hypotenuse, and the line segment between the upper right and lower right endpoints is called the right hypotenuse. S13. Parameterize cargo information; read the cargo's unique number, length, and width, and establish a two-dimensional envelope rectangle for the cargo; define the cargo's long side parallel to the y-axis as the 0° direction, and the cargo's long side parallel to the x-axis as the 90° direction; in the 0° direction, the cargo's envelope dimensions in the x-axis and y-axis directions are the cargo's width and length, respectively, while in the 90° direction, they are the cargo's length and width, respectively; the 0° and 90° directions are the only two orthogonal placement orientations for the cargo, and the four sides of the cargo are always parallel to the coordinate axes; The lower left, lower right, upper left, and upper right endpoints of the cargo's two-dimensional envelope rectangle are the endpoints with coordinates of minimum x and minimum y, maximum x and minimum y, minimum x and maximum y, and maximum x and maximum y, respectively, within the two-dimensional envelope rectangle under the current arrangement direction.
[0009] Preferably, the specific process of setting the loading scheme set size and determining the cargo arrangement sequence and initial cargo arrangement position in S2 is as follows: S21. Set the size of the loading scheme set and generate the initial coding group; All loading schemes in each generation constitute a loading scheme set, and the number of loading schemes in the loading scheme set is called the size of the loading scheme set. The unique numbers of the goods are randomly sorted to generate codes. These codes are used to indicate the order of goods arrangement. All codes constitute an initial code group, and the number of codes in the initial code group is the same as the number of loading schemes. S22, Select the first code group from the initial coding group The encoding is used as the first... The cargo arrangement sequence of each loading scheme. Indicates the index of the encoding. Index representing the load scheme, The initial value is 1; S23. Set the current arrangement direction of the goods to be arranged to 0°, and determine the initial position of the goods arrangement based on the two-dimensional envelope rectangle of the goods in the 0° direction. The initial position of the goods arrangement includes the left initial position and the right initial position. When the lower left end point of the two-dimensional envelope rectangle of the goods coincides with the upper left end point of the trapezoidal bearing area, the goods are located at the left initial position. When the lower right end point of the two-dimensional envelope rectangle of the goods coincides with the upper right end point of the trapezoidal bearing area, the goods are located at the right initial position.
[0010] Preferably, the specific process of the first directional translation arrangement based on boundary constraints in S3 is as follows: S31. Translate the goods from their initial position: When the goods are in the left initial position, translate along a direction parallel to the left hypotenuse of the trapezoidal bearing area, pointing from the upper left endpoint to the lower left endpoint; when the goods are in the right initial position, translate along a direction parallel to the right hypotenuse of the trapezoidal bearing area, pointing from the upper right endpoint to the lower right endpoint; until the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, or the goods make their first contact with the already placed goods; when the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, execute S32; when the goods make their first contact with the already placed goods, execute S33. S32. Move the goods to be placed along the bottom edge of the trapezoidal bearing area towards the midpoint of the bottom edge until the endpoint of the goods near the midpoint of the bottom edge coincides with the midpoint of the bottom edge of the trapezoidal bearing area, or until the goods make first contact with the goods that have already been placed. Then execute S33. S33. Determine whether the position of the goods to be placed after the translation stops meets the geometric constraints of the goods loading; if it does, record the placement position of the goods and mark the goods as placed goods; if it does not meet the constraints, cancel the current placement of the goods and mark the goods as unplaced goods in this stage; then execute S34. S34. Determine whether all goods in the current goods sequence have completed one placement attempt; if yes, end the first directional translation placement based on boundary constraints and execute S4; if no, select the next goods according to the goods placement order, switch the initial placement position of the next goods to the other side, and return to S31.
[0011] Preferably, the cargo loading geometric constraints in S33 include orthogonal constraints, non-interference constraints, boundary constraints, and height constraints, specifically: Orthogonal constraint: Each item placement is orthogonal to the coordinate axes, meaning that after placement, the edges of the items are parallel to the coordinate axes. The expression is: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; and They represent the first Width and length of the two-dimensional envelope rectangle of a piece of cargo; Non-interference constraint: The arranged goods do not interfere with each other, expressed as: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; Boundary constraints: The goods are arranged within the boundary of the trapezoidal load-bearing area, expressed as: ; In the formula, and These represent the y-axis coordinates of the bottom edge and the top edge of the trapezoidal bearing area, respectively. , , and These represent the x-coordinates of the lower left, lower right, upper right, and upper left endpoints of the trapezoidal load-bearing area, respectively. Height constraint: The height of the arranged goods shall not exceed the height limit of the trapezoidal load-bearing area, expressed as: ; In the formula, Indicates the first Height of each item; Indicates a goods index; This indicates the height limit of the trapezoidal load-bearing area.
[0012] Preferably, the specific process of performing the second directional translation arrangement based on boundary constraints in S4 is as follows: S41. Keeping the 0° direction of the already placed goods unchanged, select the left-end goods with the smallest x-axis coordinate on the left boundary of the two-dimensional envelope rectangle and the right-end goods with the largest x-axis coordinate on the right boundary; simulate translation of the two goods to the extreme feasible position along the bottom-up direction parallel to the corresponding hypotenuse, and use the difference in x-axis coordinate between the new position and the original position as the corresponding extreme horizontal distance; S42. Determine the direction of the second directional translation based on boundary constraints according to the limit horizontal distance; compare the absolute values of the limit horizontal distances between the left and right cargoes, and determine the direction corresponding to the smaller absolute value as the direction of the second directional translation based on boundary constraints; when the absolute values of the two are equal and not 0, determine the direction to the left according to the preset direction priority; when the absolute values of the two are both 0, skip S43 and execute S44. S43. Move the arranged goods sequentially to the most feasible position along the direction determined by S42; when moving to the left, move in ascending order according to the x-coordinate of the left boundary of the envelope rectangle, and when moving to the right, move in descending order according to the x-coordinate of the right boundary. After completion, execute S44. S44. Starting from the opposite side of the second directional translation direction, keep the remaining goods at 0° and execute S31-S33 one by one according to the order of the remaining goods in the order of goods arrangement determined in S22; after all the remaining goods have completed one attempt, execute S5.
[0013] Preferably, the specific process for replenishing and arranging goods in S5 is as follows: S51. Establish and update the corner point set: Scan the boundaries of all placed goods within the current trapezoidal bearing area, extract the upper left endpoint of the two-dimensional envelope rectangle of the placed goods, and use it as the corner point of the goods placement; and sort the corner points in ascending order of y-axis coordinates to generate a corner point set. S52. Begin a round of supplementary arrangement. According to the order of goods arrangement, select the unarranged goods at the beginning of this round of supplementary arrangement. At each corner point, make the lower left endpoint of the two-dimensional envelope rectangle of the goods in the current arrangement direction coincide with the corner point. First, try the arrangement in the 0° direction. If the 0° direction is not feasible, try the arrangement in the 90° direction. After changing the arrangement direction, redetermine the size and endpoint coordinates of the two-dimensional envelope rectangle of the goods. S53. Based on the geometric constraints of cargo loading, determine whether there is a feasible combination of corner points and arrangement directions for the current cargo. If so, select the first feasible combination in the order of increasing y-axis coordinates, increasing x-axis coordinates, and prioritizing 0° direction over 90° direction. Record the arrangement position of the cargo and update the corner point set. If not, mark the cargo as a failed arrangement in this round. Then select the next unarranged cargo in this round to continue trying until all unarranged cargo at the beginning of this round has completed one arrangement attempt. S54. Determine if any goods were successfully placed in this round; if so, based on the updated corner point set, restart the next round of supplementary placement for all currently unplaced goods and return to S52; if no goods were successfully placed in the entire round, end the supplementary placement and execute S55. S55. Based on the size of the loading scheme set, determine whether the generation of all loading schemes for the current generation has been completed. If yes, proceed to the next step; otherwise, set... Increment by 1 and return to S22.
[0014] Preferably, the specific process of constructing the fitness function and determining the optimal loading scheme in S6 is as follows: S61. Construct the fitness function, the expression of which is: ; In the formula, This indicates the area utilization rate of the trapezoidal load-bearing area; Indicates the first Projected area of each piece of cargo; Indicates the area of the trapezoidal bearing capacity; Indicates the total quantity of goods; S62. Evaluate the fitness of the current generation of loading schemes; S63. Determine and update the optimal loading scheme for each generation; select the loading scheme with the highest utilization rate of the trapezoidal bearing area and its corresponding code from the current generation loading scheme set, compare it with the recorded optimal loading schemes for each generation, and record the one with higher fitness as the updated optimal loading scheme for each generation; if the current generation is the last generation specified, then execute S7, otherwise execute S64. S64. Establish parent coding groups; sort the current generation loading schemes from high to low fitness, and select the codes corresponding to the top 50% of loading schemes to form parent coding groups. S65. Generate child codes; based on the fitness of the parent codes, use roulette wheel selection to select two parent codes with replacement from the parent code group, randomly select two intersection points and swap the code segments between the two parent codes at the intersection points, forming two child codes to be repaired; delete duplicate item numbers in each child code to be repaired, and fill in the missing item numbers in the corresponding empty positions according to the order of the missing item numbers in the other parent code, so that each child code contains all item numbers and each item number appears only once; repeat the parent selection, crossover and repair process until N-1 child codes are obtained; when the number of child codes exceeds N-1 due to the last crossover, discard the excess part; S66. Mutate the child code; for each child code, randomly select two positions with a 20% probability and swap the corresponding cargo numbers; S67. Merge the code with the highest fitness in the current generation with N-1 mutated offspring codes to form a next generation code group of N; S68. Complete one population iteration counting, take the next generation coding group formed in S67 as the new current generation coding group, and return to S22 to arrange the loading scheme and evaluate the fitness of the next generation coding group.
[0015] Preferably, the optimal loading scheme is output in S7, which includes the cargo layout and the utilization rate of the trapezoidal load-bearing area.
[0016] Therefore, the present invention employs the above-mentioned intelligent loading optimization method for trapezoidal load-bearing areas, which has the following beneficial effects: (1) Significantly improve the space utilization of the trapezoidal load-bearing area and reduce loading dead corners: By establishing a parameterized trapezoidal load-bearing area model and designing the first directional translation arrangement based on boundary constraints and the second directional translation arrangement based on boundary constraints, the goods can be adaptively translated along the direction of the trapezoidal hypotenuse, approach the midpoint of the bottom edge and slide along the boundary as a whole; This effectively avoids the dead corners or gaps that are difficult to fill near the trapezoidal hypotenuse generated by traditional manual trial and error or rectangular area algorithms. Especially for the loading of strip goods (such as pipes and profiles), it can achieve close contact between the goods and the trapezoidal boundary and maximize the utilization of the actual loading space of the trapezoidal area; (2) Achieve intelligent optimization of loading schemes and reduce reliance on human experience: Combining the genetic algorithm framework, the loading scheme set size is set by encoding the cargo arrangement order, constructing a fitness function (with the trapezoidal carrying area area utilization rate as the goal), and using roulette wheel selection, crossover, mutation and other operations to perform multi-generation iterative optimization, and finally automatically output the optimal loading scheme; This process transforms loading optimization from the traditional trial and error method or experience-dependent method to data-driven intelligent search, which can stably and efficiently solve the optimal cargo layout in complex trapezoidal scenarios, and significantly improve the scientificity and efficiency of loading decisions; (3) It has good geometric constraint adaptability and versatility: The geometric constraints of cargo loading (orthogonal constraints, non-interference constraints, boundary constraints, height constraints) are clearly defined, and the remaining cargo is filled by supplementing the cargo arrangement using the upper left corner of the already arranged cargo, further tapping the space potential; this is not only applicable to strip cargo of different sizes and aspect ratios, but also can be flexibly adapted to various trapezoidal storage areas (such as trapezoidal empty spaces in warehouse corners, trapezoidal projection cabins on ships, etc.), and has strong scalability and engineering practical value.
[0017] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0018] Figure 1 This is an overall flowchart of the intelligent loading optimization method for a trapezoidal load-bearing area according to the present invention; Figure 2 This is a model diagram of the trapezoidal bearing area in a planar coordinate system according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the intelligent optimization process for the trapezoidal load-bearing area loading scheme of the present invention. Figure 4 The diagram shows the first directional translation arrangement result based on boundary constraints for some loading schemes in the embodiments of the present invention; where (a) is loading scheme 16, (b) is loading scheme 23, (c) is loading scheme 37, and (d) is loading scheme 44. Figure 5 The diagram shows the second directional translation arrangement result based on boundary constraints for some loading schemes in the embodiments of the present invention; where (a) is loading scheme 16, (b) is loading scheme 23, (c) is loading scheme 37, and (d) is loading scheme 44. Figure 6 The following is a supplementary arrangement result diagram of some loading schemes in the embodiments of the present invention; wherein (a) is loading scheme 16, (b) is loading scheme 23, (c) is loading scheme 37, and (d) is loading scheme 44; Figure 7 This is a diagram showing the optimal loading scheme of an embodiment of the present invention. Detailed Implementation
[0019] The following detailed description of embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0020] Please see Figures 1-7 This embodiment provides an intelligent loading optimization method for a trapezoidal load-bearing area. In this embodiment, directional translation based on boundary constraints refers to translating the cargo in a direction determined by the hypotenuse or base of the trapezoid without changing the cargo arrangement direction and envelope size, until the cargo reaches the limit feasible position in that direction. The limit feasible position refers to a position where the cargo satisfies the boundary constraints and non-interference constraints, but moving any positive distance along the original translation direction would violate at least one of the above constraints.
[0021] The intelligent loading optimization method for the trapezoidal load-bearing area includes the following steps: S1. Parametric Modeling: Establish a planar coordinate system and parametrically model the trapezoidal load-bearing area and cargo information; S11. Establish a planar coordinate system, including the x-axis and y-axis, with the x-axis and y-axis perpendicular to each other, and the intersection of the x-axis and y-axis as the origin; S12, Parametric trapezoidal load-bearing area information; Read the data of the trapezoidal load-bearing area and establish a trapezoidal load-bearing area model in a plane coordinate system, making the two parallel sides of the trapezoidal load-bearing area parallel to the x-axis. The parallel side located at the top and longer is called the top side, and the parallel side located at the bottom and shorter is called the bottom side. Determine the boundary of the trapezoidal load-bearing area, including the coordinates of the upper left endpoint, upper right endpoint, lower left endpoint, and lower right endpoint. The line segment between the upper left endpoint and the upper right endpoint is called the top side, the line segment between the lower left endpoint and the lower right endpoint is called the bottom side, the line segment between the upper left endpoint and the lower left endpoint is called the left hypotenuse, and the line segment between the upper right endpoint and the lower right endpoint is called the right hypotenuse. S13. Parameterize cargo information and determine cargo size and orientation; read the cargo's unique number, length, and width, and establish a two-dimensional envelope rectangle for the cargo; define the cargo's long side parallel to the y-axis as the 0° direction, and define the cargo's long side parallel to the x-axis as the 90° direction; in the 0° direction, the cargo's envelope dimensions in the x-axis and y-axis directions are the cargo width and length, respectively, while in the 90° direction, they are the cargo length and width, respectively. The lower left, lower right, upper left, and upper right endpoints of the cargo's two-dimensional envelope rectangle are the endpoints with coordinates of minimum x and minimum y, maximum x and minimum y, minimum x and maximum y, and maximum x and maximum y, respectively, within the two-dimensional envelope rectangle under the current arrangement direction.
[0022] The parameterized cargo information is shown in Table 1.
[0023] Table 1: Parametric Cargo Information
[0024] S2-S6 describes the intelligent optimization process for the loading scheme in the trapezoidal load-bearing area. Please refer to [link / reference]. Figure 3 Specifically, it includes: S2. Based on parameterized cargo information, set the size of the loading scheme set, and determine the cargo arrangement sequence and the initial position of the cargo arrangement. S21. Set the size of the loading scheme set and generate the initial coding group; Each generation of all loading schemes constitutes a loading scheme set, and the number of loading schemes in the loading scheme set is called the loading scheme set size; the unique numbers of the goods are randomly sorted to generate codes, which are used to represent the order of goods arrangement. All codes constitute the initial code group, and the number of codes in the initial code group is the same as the number of loading schemes; the loading scheme set size is set to 50, that is, 50 codes are generated. S22, Select the first generation of the coding group. The encoding is used as the first... The cargo arrangement sequence of each loading scheme. Indicates the index of the encoding. Index representing the load scheme, It is a positive integer, and its initial value is 1; S23. Set the current arrangement direction of the goods to be arranged to 0°, and determine the initial position of the goods arrangement based on the two-dimensional envelope rectangle of the goods in the 0° direction. The initial position of the goods arrangement includes the left initial position and the right initial position. When the lower left end point of the two-dimensional envelope rectangle of the goods coincides with the upper left end point of the trapezoidal bearing area, the goods are located at the left initial position. When the lower right end point of the two-dimensional envelope rectangle of the goods coincides with the upper right end point of the trapezoidal bearing area, the goods are located at the right initial position.
[0025] S3. Based on the initial position of the goods, perform the first directional translation arrangement based on boundary constraints; S31. Start translating from the initial position of the goods placement; when the goods are in the left initial position, translate in a direction parallel to the left hypotenuse of the trapezoidal bearing area and from the upper left endpoint to the lower left endpoint; when the goods are in the right initial position, translate in a direction parallel to the right hypotenuse of the trapezoidal bearing area and from the upper right endpoint to the lower right endpoint; until the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, or the goods make their first contact with the placed goods; when the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, execute S32; when the goods make their first contact with the placed goods, execute S33; S32. Move the goods to be placed along the bottom edge of the trapezoidal bearing area towards the midpoint of the bottom edge until the endpoint of the goods near the midpoint of the bottom edge coincides with the midpoint of the bottom edge of the trapezoidal bearing area, or until the goods make first contact with the goods that have already been placed. Then execute S33. S33. Determine whether the position of the goods to be placed after the translation stops meets the geometric constraints of the goods loading. If it does, record the placement position of the goods and mark the goods as placed goods. If it does not meet the constraints, cancel the current placement of the goods and mark the goods as unplaced goods in this stage. Then execute S34.
[0026] Cargo loading geometric constraints include orthogonal constraints, non-interference constraints, boundary constraints, and height constraints; Orthogonal constraint: Each item must be orthogonal to the coordinate axes; that is, after the items are placed, their edges must be parallel to the coordinate axes. The expression is: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; and They represent the first Width and length of the two-dimensional envelope rectangle of a piece of cargo; Non-interference constraint: The arranged goods do not interfere with each other, expressed as: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; Boundary constraints: Goods must be arranged within the boundary of the trapezoidal load-bearing area and cannot exceed the boundary of the trapezoidal load-bearing area. The expression is: ; In the formula, and These represent the y-axis coordinates of the bottom edge and the top edge of the trapezoidal bearing area, respectively. , , and These represent the x-coordinates of the lower left, lower right, upper right, and upper left endpoints of the trapezoidal load-bearing area, respectively. Height constraint: The height of the arranged goods shall not exceed the height limit of the trapezoidal load-bearing area, expressed as: ; In the formula, Indicates the first Height of each item; Indicates a goods index; This indicates a height limitation for the trapezoidal load-bearing area. In this embodiment, the area to be arranged is a cargo compartment of a transport ship, and the depth of the compartment is much greater than the height of the cargo to be arranged, so the height limitation for the trapezoidal load-bearing area is not considered. S34. Determine whether all goods in the current goods sequence have completed one placement attempt; if yes, end the first directional translation placement based on boundary constraints and execute S4; if no, select the next goods according to the goods placement order, switch the initial placement position of the next goods to the other side, and return to S31.
[0027] S4. After completing the first directional translation arrangement based on boundary constraints, perform the second directional translation arrangement based on boundary constraints. S41. Keeping the 0° direction of the already placed goods unchanged, select the left-end goods with the smallest x-axis coordinate on the left boundary of the two-dimensional envelope rectangle and the right-end goods with the largest x-axis coordinate on the right boundary; simulate translation of the two goods to the extreme feasible position along the bottom-up direction parallel to the corresponding hypotenuse, and use the difference in x-axis coordinate between the new position and the original position as the corresponding extreme horizontal distance; S42. Determine the direction of the second directional translation based on boundary constraints according to the limit horizontal distance; compare the absolute values of the limit horizontal distances between the left and right cargoes, and determine the direction corresponding to the smaller absolute value as the direction of the second directional translation based on boundary constraints; when the absolute values of the two are equal and not 0, determine the direction to the left according to the preset direction priority; when the absolute values of the two are both 0, skip S43 and execute S44. S43. Move the arranged goods sequentially to the most feasible position along the direction determined by S42; when moving to the left, move in ascending order according to the x-axis coordinate of the left boundary of the envelope rectangle, and when moving to the right, move in descending order according to the x-axis coordinate of the right boundary. After completion, execute S44. S44. Starting from the opposite side of the second directional translation direction, keep the remaining goods at 0° and execute S31-S33 one by one according to the order of the remaining goods in the order of goods arrangement determined in S22; after all the remaining goods have completed one attempt, execute S5.
[0028] S5. After completing the first and second directional translation arrangements based on boundary constraints, if there are still goods that have not been successfully arranged, then supplementary arrangements of goods shall be carried out. S51. Establish and update the corner point set: Scan the boundaries of all placed goods within the current trapezoidal carrying area, extract the upper left endpoint of the envelope rectangle of the placed goods, and use it as the corner point of the goods placement; and sort the corner points in ascending order of y-axis coordinates to generate a corner point set. S52. Begin a round of supplementary arrangement. According to the order of goods arrangement, select the unarranged goods at the beginning of this round of supplementary arrangement. At each corner point, make the lower left endpoint of the two-dimensional envelope rectangle of the goods in the current arrangement direction coincide with the corner point. First, try the arrangement in the 0° direction. If the 0° direction is not feasible, try the arrangement in the 90° direction. After changing the arrangement direction, redetermine the size and endpoint coordinates of the two-dimensional envelope rectangle of the goods. S53. Based on the geometric constraints of cargo loading, determine whether there is a feasible combination of corner points and arrangement directions for the current cargo. If so, select the first feasible combination in the order of increasing y-axis coordinates, increasing x-axis coordinates, and prioritizing 0° direction over 90° direction. Record the arrangement position of the cargo and update the corner point set. If not, mark the cargo as a failed arrangement in this round. Then select the next unarranged cargo in this round to continue trying until all unarranged cargo at the beginning of this round has completed one arrangement attempt. S54. Determine if any goods were successfully placed in this round; if so, based on the updated corner point set, restart the next round of supplementary placement for all currently unplaced goods and return to S52; if no goods were successfully placed in the entire round, end the supplementary placement and execute S55. S55. Based on the size of the loading scheme set, determine whether the generation of all loading schemes for the current generation has been completed. If yes, proceed to the next step; otherwise, set... Increment by 1 and return to S22.
[0029] S6. After completing the replenishment and arrangement of goods, construct a fitness function and determine the optimal loading scheme through iterative optimization. S61. Construct a fitness function, expressing fitness through the area utilization rate of the trapezoidal bearing area. The expression for the fitness function is: ; In the formula, This indicates the area utilization rate of the trapezoidal load-bearing area, i.e., its adaptability; Indicates the first Projected area of each piece of cargo; This represents the area of the trapezoidal load-bearing region. ; Indicates the total quantity of goods; S62. Evaluate the fitness of the current generation of loading schemes. The fitness of some loading schemes is shown in Table 2. Table 2: Loading scheme adaptability and corresponding number
[0030] S63. Determine and update the optimal loading scheme for each generation; select the loading scheme with the highest utilization rate of the trapezoidal bearing area and its corresponding code from the current generation loading scheme set, compare it with the recorded optimal loading schemes for each generation, and record the one with higher fitness as the updated optimal loading scheme for each generation; if the current generation is the last generation specified, then execute S7, otherwise execute S64. S64. Establish parent coding groups; sort the current generation loading schemes from high to low fitness, and select the codes corresponding to the top 50% of loading schemes to form parent coding groups. S65. Generate child codes; based on the fitness of the parent codes, use roulette wheel selection to select two parent codes with replacement from the parent code group, randomly select two intersection points and swap the code segments between the two parent codes at the intersection points, forming two child codes to be repaired; delete duplicate item numbers in each child code to be repaired, and fill in the missing item numbers in the corresponding empty positions according to the order of the missing item numbers in the other parent code, so that each child code contains all item numbers and each item number appears only once; repeat the parent selection, crossover and repair process until N-1 child codes are obtained; when the number of child codes exceeds N-1 due to the last crossover, discard the excess part; S66. Mutate the child code; for each child code, randomly select two positions with a 20% probability and swap the corresponding cargo numbers; S67. Merge the code with the highest fitness in the current generation with N-1 mutated offspring codes to form a next generation code group of N; S68. Complete one population iteration counting, take the next generation coding group formed in S67 as the new current generation coding group, and return to S22 to arrange the loading scheme and evaluate the fitness of the next generation coding group.
[0031] S7. Output Results: Output the optimal loading plan, which includes the cargo placement and the utilization rate of the trapezoidal load-bearing area. The optimal loading plan is as follows: Figure 7 As shown, its fitness is 0.684.
[0032] Therefore, this invention employs the aforementioned intelligent loading optimization method for trapezoidal load-bearing areas. By parameterizing the trapezoidal region and designing two directional translations and corner point supplementation arrangements based on boundary constraints, the goods can adaptively fit along the hypotenuse of the trapezoid, approach the midpoint of the bottom edge, and slide as a whole, effectively reducing loading dead angles near the hypotenuse and significantly improving the space utilization of the trapezoidal load-bearing area. Simultaneously, by combining the intelligent optimization mechanisms of genetic algorithms, such as encoding, crossover, mutation, and fitness evaluation, this method overcomes the limitations of traditional manual trial and error or rectangular region algorithms, enabling stable and efficient output of the optimal loading scheme and reducing reliance on human experience. Furthermore, this method clarifies geometric constraints such as orthogonality, non-interference, boundaries, and height, allowing for flexible adaptation to strip-shaped goods of different sizes and various trapezoidal storage scenarios (such as warehouse corners and ship cabins), demonstrating good versatility and engineering practical value.
[0033] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for intelligent loading optimization of a trapezoidal load-bearing area, characterized in that, Includes the following steps: S1. Establish a planar coordinate system and parameterize the trapezoidal load-bearing area and cargo information; S2. Based on parameterized cargo information, set the size of the loading scheme set, and determine the cargo arrangement sequence and the initial position of the cargo arrangement. S3. Based on the initial position of the goods, perform the first directional translation arrangement based on boundary constraints; S4. After completing the first directional translation arrangement based on boundary constraints, perform the second directional translation arrangement based on boundary constraints. S5. After completing the first and second directional translation arrangements based on boundary constraints, if there are still goods that have not been successfully arranged, then supplementary arrangements of goods shall be carried out. S6. After completing the replenishment and arrangement of goods, construct the fitness function to determine the optimal loading scheme; S7. Output the optimal loading scheme; Among them, directional translation based on boundary constraints refers to translating the cargo in a direction determined by the hypotenuse or base of the trapezoid without changing the cargo arrangement direction and envelope size, until the cargo reaches the limit feasible position in that direction; the limit feasible position refers to the position where the cargo satisfies the boundary constraints and non-interference constraints, but if it continues to move any positive distance along the original translation direction, it will violate at least one of the above constraints.
2. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 1, characterized in that, The specific process of establishing a planar coordinate system in S1 and parameterizing the trapezoidal load-bearing area and cargo information is as follows: S11. Establish a planar coordinate system, including the x-axis and y-axis, with the x-axis and y-axis perpendicular to each other, and the intersection of the x-axis and y-axis as the origin; S12, Parametric trapezoidal load-bearing area information; Read the data of the trapezoidal bearing area and establish a trapezoidal bearing area model in a plane coordinate system, making the two parallel sides of the trapezoidal bearing area parallel to the x-axis. The parallel side located at the top and longer is called the top side, and the parallel side located at the bottom and shorter is called the bottom side. Determine the coordinates of the upper left, upper right, lower left, and lower right endpoints of the trapezoidal bearing area. The line segment between the upper left and upper right endpoints is called the top side, the line segment between the lower left and lower right endpoints is called the bottom side, the line segment between the upper left and lower left endpoints is called the left hypotenuse, and the line segment between the upper right and lower right endpoints is called the right hypotenuse. S13. Parameterize cargo information; read the cargo's unique number, length, and width, and establish a two-dimensional envelope rectangle for the cargo; define the cargo's long side parallel to the y-axis as the 0° direction, and define the cargo's long side parallel to the x-axis as the 90° direction; in the 0° direction, the cargo's envelope dimensions in the x-axis and y-axis directions are the cargo width and length, respectively, while in the 90° direction they are the cargo length and width, respectively. The lower left, lower right, upper left, and upper right endpoints of the cargo's two-dimensional envelope rectangle are the endpoints with coordinates of minimum x and minimum y, maximum x and minimum y, minimum x and maximum y, and maximum x and maximum y, respectively, within the two-dimensional envelope rectangle under the current arrangement direction.
3. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 2, characterized in that, The specific process of setting the size of the loading scheme set and determining the cargo arrangement sequence and initial cargo arrangement position in S2 is as follows: S21. Set the size of the loading scheme set and generate the initial coding group; All loading schemes in each generation constitute a loading scheme set, and the number of loading schemes in the loading scheme set is called the size of the loading scheme set. The unique numbers of the goods are randomly sorted to generate codes. These codes are used to indicate the order of goods arrangement. All codes constitute an initial code group, and the number of codes in the initial code group is the same as the number of loading schemes. S22, Select the first generation of the coding group. The encoding is used as the first... The cargo arrangement sequence of each loading scheme. Indicates the index of the encoding. Index representing the load scheme, The initial value is 1; S23. Set the current arrangement direction of the goods to be arranged to 0°, and determine the initial position of the goods arrangement based on the two-dimensional envelope rectangle of the goods in the 0° direction. The initial position of the goods arrangement includes the left initial position and the right initial position. When the lower left end point of the two-dimensional envelope rectangle of the goods coincides with the upper left end point of the trapezoidal bearing area, the goods are located at the left initial position. When the lower right end point of the two-dimensional envelope rectangle of the goods coincides with the upper right end point of the trapezoidal bearing area, the goods are located at the right initial position.
4. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 3, characterized in that, The specific process of the first directional translation arrangement based on boundary constraints in S3 is as follows: S31. Translate the goods from their initial position: When the goods are in the left initial position, translate along a direction parallel to the left hypotenuse of the trapezoidal bearing area, pointing from the upper left endpoint to the lower left endpoint; when the goods are in the right initial position, translate along a direction parallel to the right hypotenuse of the trapezoidal bearing area, pointing from the upper right endpoint to the lower right endpoint; until the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, or the goods make their first contact with the already placed goods; when the lower boundary of the two-dimensional envelope rectangle of the goods contacts the bottom edge of the trapezoidal bearing area, execute S32; when the goods make their first contact with the already placed goods, execute S33. S32. Move the goods to be placed along the bottom edge of the trapezoidal bearing area towards the midpoint of the bottom edge until the endpoint of the goods near the midpoint of the bottom edge coincides with the midpoint of the bottom edge of the trapezoidal bearing area, or until the goods make first contact with the goods that have already been placed. Then execute S33. S33. Determine whether the current position of the goods to be placed after the translation stops meets the geometric constraints of the goods loading. If the conditions are met, the placement location of the goods is recorded and the goods are marked as placed goods; if the conditions are not met, the current placement of the goods is cancelled and the goods are marked as unplaced goods in this stage. Then execute S34; S34. Determine whether all goods in the current goods sequence have completed one placement attempt; if yes, end the first directional translation placement based on boundary constraints and execute S4; if no, select the next goods according to the goods placement order, switch the initial placement position of the next goods to the other side, and return to S31.
5. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 4, characterized in that, The cargo loading geometric constraints in S33 include orthogonal constraints, non-interference constraints, boundary constraints, and height constraints, specifically: Orthogonal constraint: Each item placement is orthogonal to the coordinate axes, meaning that after placement, the edges of the items are parallel to the coordinate axes. The expression is: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; and They represent the first Width and length of the two-dimensional envelope rectangle of a piece of cargo; Non-interference constraint: The arranged goods do not interfere with each other, expressed as: ; In the formula, and They represent the first The coordinates of the lower left and upper right endpoints of the cargo in the plane coordinate system; Boundary constraints: The goods are arranged within the boundary of the trapezoidal load-bearing area, expressed as: ; In the formula, and These represent the y-axis coordinates of the bottom edge and the top edge of the trapezoidal bearing area, respectively. , , and These represent the x-coordinates of the lower left, lower right, upper right, and upper left endpoints of the trapezoidal load-bearing area, respectively. Height constraint: The height of the arranged goods shall not exceed the height limit of the trapezoidal load-bearing area, expressed as: ; In the formula, Indicates the first Height of each item; Indicates a goods index; This indicates the height limit of the trapezoidal load-bearing area.
6. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 5, characterized in that, The specific process of the second boundary-constrained directional translation arrangement in S4 is as follows: S41. Keeping the 0° direction of the already placed goods unchanged, select the left-end goods with the smallest x-axis coordinate on the left boundary of the two-dimensional envelope rectangle and the right-end goods with the largest x-axis coordinate on the right boundary; simulate translation of the two goods to the extreme feasible position along the bottom-up direction parallel to the corresponding hypotenuse, and use the difference in x-axis coordinate between the new position and the original position as the corresponding extreme horizontal distance; S42. Determine the direction of the second directional translation based on boundary constraints according to the limit horizontal distance; compare the absolute values of the limit horizontal distances between the left and right cargoes, and determine the direction corresponding to the smaller absolute value as the direction of the second directional translation based on boundary constraints; when the absolute values of the two are equal and not 0, determine the direction to the left according to the preset direction priority; when the absolute values of the two are both 0, skip S43 and execute S44. S43. Move the arranged goods sequentially to the most feasible position along the direction determined by S42; when moving to the left, move in ascending order according to the x-axis coordinate of the left boundary of the two-dimensional envelope rectangle, and when moving to the right, move in descending order according to the x-axis coordinate of the right boundary. After completion, execute S44. S44. Starting from the opposite side of the second directional translation direction, keep the remaining goods at 0° and execute S31-S33 one by one according to the order of the remaining goods in the order of goods arrangement determined in S22; after all the remaining goods have completed one attempt, execute S5.
7. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 6, characterized in that, The specific process for replenishing cargo arrangements in S5 is as follows: S51. Establish and update the corner point set: Scan the boundaries of all placed goods within the current trapezoidal bearing area, extract the upper left endpoint of the two-dimensional envelope rectangle of the placed goods, and use it as the corner point of the goods placement; and sort the corner points in ascending order of y-axis coordinates to generate a corner point set. S52. Begin a round of supplementary arrangement, selecting the unarranged goods from the beginning of this round of supplementary arrangement in the order of goods arrangement. At each corner point, make the lower left endpoint of the two-dimensional envelope rectangle of the goods in the current arrangement direction coincide with the corner point. First, try the arrangement in the 0° direction; if the 0° direction is not feasible, try the arrangement in the 90° direction. After changing the arrangement direction, redetermine the size and endpoint coordinates of the two-dimensional envelope rectangle of the goods. S53. Based on the geometric constraints of cargo loading, determine whether there is a feasible combination of corner points and arrangement directions for the current cargo. If so, select the first feasible combination in the order of increasing y-axis coordinates, increasing x-axis coordinates, and prioritizing 0° direction over 90° direction. Record the arrangement position of the cargo and update the corner point set. If not, mark the cargo as a failed arrangement in this round. Then select the next unarranged cargo in this round to continue trying until all unarranged cargo at the beginning of this round has completed one arrangement attempt. S54. Determine if any goods were successfully placed in this round; if so, based on the updated corner point set, restart the next round of supplementary placement for all currently unplaced goods and return to S52; if no goods were successfully placed in the entire round, end the supplementary placement and execute S55. S55. Based on the size of the loading scheme set, determine whether the generation of all loading schemes for the current generation has been completed. If yes, proceed to the next step; otherwise, set... Increment by 1 and return to S22.
8. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 7, characterized in that, The specific process of constructing the fitness function and determining the optimal loading scheme in S6 is as follows: S61. Construct the fitness function, the expression of which is: ; In the formula, This indicates the area utilization rate of the trapezoidal load-bearing area; Indicates the first Projected area of each piece of cargo; Indicates the area of the trapezoidal bearing capacity; Indicates the total quantity of goods; S62. Evaluate the fitness of the current generation of loading schemes; S63. Determine and update the optimal loading scheme for each generation; select the loading scheme with the highest utilization rate of the trapezoidal bearing area and its corresponding code from the current generation loading scheme set, compare it with the recorded optimal loading schemes for each generation, and record the one with higher fitness as the updated optimal loading scheme for each generation; if the current generation is the last generation specified, then execute S7, otherwise execute S64. S64. Establish parent coding groups; sort the current generation loading schemes from high to low fitness, and select the codes corresponding to the top 50% of loading schemes to form parent coding groups. S65. Generate child codes; based on the fitness of the parent codes, use roulette wheel selection to select two parent codes with replacement from the parent code group, randomly select two intersection points and swap the code segments between the two parent codes at the intersection points, forming two child codes to be repaired; delete duplicate item numbers in each child code to be repaired, and fill in the missing item numbers in the corresponding empty positions according to the order of the missing item numbers in the other parent code, so that each child code contains all item numbers and each item number appears once; repeat the parent selection, crossover and repair process until N-1 child codes are obtained; when the number of child codes exceeds N-1 due to the last crossover, discard the excess part; S66. Mutate the child code; for each child code, randomly select two positions with a 20% probability and swap the corresponding cargo numbers; S67. Merge the code with the highest fitness in the current generation with N-1 mutated offspring codes to form a next generation code group of N; S68. Complete one population iteration counting, take the next generation coding group formed in S67 as the new current generation coding group, and return to S22 to arrange the loading scheme and evaluate the fitness of the next generation coding group.
9. The intelligent loading optimization method for a trapezoidal load-bearing area according to claim 8, characterized in that: S7 outputs the optimal loading plan, which includes the cargo layout and the utilization rate of the trapezoidal load-bearing area.