Relaxation optimization method, electronic device and storage medium for mixed-code single-layer pallet
By constructing the site block diagram and iteratively adjusting the material position, optimizing the mixed-code single-layer palletizing solution, the problems of low space utilization and difficult algorithm performance are solved, and efficient material loading and automated optimization are achieved.
Patent Information
- Application Number
- CN202410895836.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-07-05
AI Technical Summary
The existing mixed-code single-layer palletizing scheme has insufficient space utilization, which is difficult to adapt to materials of different types and specifications, and the algorithm performance and versatility are difficult to harmonize, resulting in a reduction in the available area of the upper layer and a long search time.
By obtaining predicted loading and stacking charts, pallet information and mixed code parameters, a site block diagram is constructed, the material movable area is determined, and the material movement parameters are calculated based on the mixed code parameters, and iteratively adjusts the material position to optimize the loading and stacking chart to maximize utilization Available space.
It improves the loading efficiency of the pallet, ensures as little space as possible, realizes automatic optimization, quickly converges to the optimal solution, and is suitable for stacking scenarios of diversified materials.
Smart Images

Figure CN118446382B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of palletizing technology, and in particular to a relaxation optimization method, electronic equipment and storage medium for mixed-code single-layer palletizing. Background Art
[0002] In traditional logistics management, it is often necessary to stack, store and transport a variety of materials of different types and specifications. The multi-material palletizing strategy is a solution to this complex situation. Therefore, with the continuous development of the logistics industry and the increase in material handling needs, the multi-material palletizing (mixed code) strategy has become a key link in supply chain management.
[0003] With the rapid development of the manufacturing industry and the trend of product diversification, the warehousing and logistics industry is facing increasingly complex challenges. The traditional single material palletizing strategy can no longer meet the handling needs of diversified materials, because different types of materials have different sizes, weights and stacking characteristics. For example, a batch of goods may include boxes of different sizes, bagged materials, and even products of special shapes, which requires a flexible stacking solution to ensure the maximum utilization of warehouse space and the safe storage of materials.
[0004] When mixing codes, giving the upper layer more ample stacking space can create a better decision-making environment for future planning. However, if the search and scoring strategy is used directly, it will be difficult to increase the space on the same layer as much as possible, and increasing the search depth will create a huge search space, so it takes a long time. In addition, if a predefined stacking scheme is used, it is difficult to adapt to non-planar situations, that is, it is impossible to work in the presence of obstacles, and it is difficult to instantly build solutions for a variety of materials. Ordinary search methods are difficult to consider the global optimal situation, which can easily cause the available area of the upper layer to decrease. Therefore, the versatility of the existing stacking method and the performance of the algorithm are difficult to reconcile. Summary of the invention
[0005] The embodiments of the present application provide a relaxation optimization method, an electronic device, and a storage medium for a mixed-code single-layer palletizing type, so as to at least solve the problem of low upper-layer space utilization in existing mixed-code palletizing solutions in the related art.
[0006] In a first aspect, an embodiment of the present application provides a relaxation optimization method for a mixed-code single-layer stacking type, comprising:
[0007] Obtain predicted loading pattern, pallet information, loaded material information and mixed code parameters;
[0008] Constructing a site block diagram according to the loaded material information and the mixed code parameters, wherein the site block diagram includes obstacle information of the site;
[0009] Determine the material movable area according to the predicted loading stack diagram, pallet information and site block diagram;
[0010] Taking the mixed code parameters as constraints, calculating material movement parameters according to the material movable area and the predicted loading stacking diagram;
[0011] The material position in the predicted loading stacking pattern is moved according to the movement parameters to obtain an optimized loading stacking pattern.
[0012] In one embodiment, the code mixing parameter includes a height tolerance parameter; and constructing a site Block diagram according to the loaded material information and the code mixing parameter includes:
[0013] Acquire a reference height, and determine a reference height range according to the height tolerance parameter and the reference height;
[0014] The reference height range is based on comparing the actual heights of all positions of the loaded material information to obtain obstacle information;
[0015] Taking the coordinate system of the predicted loading stack diagram as a reference, marking the positions in the predicted loading stack diagram with obstacle types according to the obstacle information to obtain the site Block diagram;
[0016] Among them, the position smaller than the reference height range is marked as a hole obstacle area, and the position larger than the reference height range is marked as a cliff obstacle area.
[0017] In one embodiment, determining the material movable area according to the predicted loading stacking diagram, pallet information and site block diagram includes:
[0018] Determine a total material placement area according to the pallet information, and determine a material movement boundary according to the total material placement area;
[0019] Determining material locations of all materials to be loaded according to the predicted loading stack pattern diagram;
[0020] Marking the range of the total material placement area that does not belong to the obstacle area and the material position as a first movable area;
[0021] The material movable area is obtained according to the first movable area and the movable boundary.
[0022] In one embodiment, the code mixing parameters further include a maximum material interval; and the material movement parameters are calculated according to the material movable area and the predicted loading stacking diagram, including:
[0023] Obtain the coordinates of the current position, select the iteration direction of the material according to the preset rules, and initialize the gap value of the material; and initialize the maximum single movement distance of the material according to the iteration direction and the maximum interval of the material;
[0024] Determine the obstacle type to which the current position belongs according to the site block map and coordinates, and update the gap value according to the obstacle type;
[0025] Determine whether the current position belongs to the material movable area. If so, increment the gap value according to the preset step size; update the coordinates of the current position according to the iteration direction, re-determine until the current position reaches the movable boundary, and record the gap value at this time;
[0026] The single movement maximum distance and the gap value are used as material movement parameters of the material in the current iteration direction.
[0027] In one embodiment, the movement parameter also includes a maximum movable distance of the material. If the current position does not belong to the movable area of the material, the optimization method further includes:
[0028] If the current position belongs to an obstacle area, assigning the gap value according to the obstacle type;
[0029] If the current position does not belong to an obstacle area and there are materials placed there, the type of material at the current position is determined according to the predicted loading stack pattern diagram;
[0030] Determine whether the material at the current position is the same as the material at the previous position. If so, increment the value of sameunit according to the preset step size and set the gap value to 0; update the coordinates of the current position according to the iteration direction, and re-determine until the edge of the current material is reached. At this time, obtain the current value of the maximum movable distance of the current material, and update the maximum movable distance to the smaller value of sameunit and the current value;
[0031] If the material at the current position is different from the material at the previous position, the value of sameunit will be initialized.
[0032] In one embodiment, if the current position does not belong to an obstacle area and there is material placed, the material movement parameter is calculated according to the material movable area and the predicted loading stacking diagram, and further includes:
[0033] The value of the minimum gap of the material in the iteration direction is updated according to the current value of the gap value and the area where the current position is located; the current value of the gap value is recorded as power, and the current value of the minimum gap of the current material in the iteration direction is recorded as power[i]; wherein,
[0034] When power is less than 0, if power[i] is equal to 0, power is assigned to power[i]; if power[i] is less than, the larger value of power[i] and power is assigned to power[i];
[0035] When power is greater than 0, if power[i] is less than or equal to 0, power is assigned to power[i]; if power[i] is greater than 0, the smaller value between power[i] and power is assigned to power[i];
[0036] When power is equal to 0, it indicates that the material cannot move in the iteration direction.
[0037] In one embodiment, the movement parameter also includes the current movement distance of the material. After traversing an iteration direction and obtaining the minimum gap of the material in the iteration direction, the optimization method further includes:
[0038] If the gap value is less than 0, the minimum gap value of the material in the iteration direction is calculated according to the first calculation rule to obtain the current moving distance;
[0039] If the gap value is greater than or equal to 0, the value of the minimum gap of the material in the iteration direction is calculated according to the second calculation rule to obtain the current moving distance;
[0040] The maximum single movable distance in the current iteration direction is obtained, and it is determined whether the current moving distance is greater than the maximum single movable distance. If so, the current moving distance is updated to the maximum single movable distance.
[0041] In one embodiment, the optimization method further includes:
[0042] When the current moving distance is greater than the maximum material interval and the current number of cycles is greater than a preset threshold, the single maximum movable distance is adjusted to the minimum material interval.
[0043] In a third aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the relaxation optimization method described in the first aspect when executing the computer program.
[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the relaxation optimization method as described in the first aspect above.
[0045] The relaxation optimization method, electronic device and storage medium for mixed-code single-layer stacking provided in the embodiments of the present application have at least the following technical effects.
[0046] By constructing a site block diagram according to the loaded material information and the mixed code parameters, the site block diagram includes the obstacle information of the site; determining the material movable area according to the predicted loading stacking diagram, the pallet information and the site block diagram; taking the mixed code parameters as constraints, calculating the material movement parameters according to the material movable area and the predicted loading stacking diagram; moving the material position in the predicted loading stacking diagram according to the movement parameters, and obtaining an optimized loading stacking diagram. That is, the present application iteratively adjusts the existing box layout so that the boxes fill the entire pallet to increase the placement space on the upper layer and maximize the use of available space; by optimizing the box layout, the algorithm ensures that as little space as possible is wasted, thereby improving the loading efficiency of the pallet.
[0047] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 It is a flow chart of a relaxation optimization method for a mixed-code single-layer stacking type according to an embodiment of the present application;
[0050] Figure 2 This is an optimization effect diagram of the relaxation optimization method of the present application for mixed-code single-layer stacking;
[0051] Figure 3 It is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0053] Obviously, the drawings described below are only some examples or embodiments of the present application. For ordinary technicians in this field, the present application can also be applied to other similar scenarios based on these drawings without creative work. In addition, it can also be understood that although the efforts made in this development process may be complicated and lengthy, for ordinary technicians in this field related to the content disclosed in this application, some changes in design, manufacturing or production based on the technical content disclosed in this application are just conventional technical means, and should not be understood as insufficient content disclosed in this application.
[0054] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0055] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantity limitation, and may indicate the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0056] In the existing material stacking design, the design of various material stacking types needs to take into account the following aspects:
[0057] The first is the diversity of material properties. Different types of materials may have different sizes, weights, stacking restrictions and other characteristics. Therefore, it is necessary to design stacking plans specifically to minimize space waste and ensure the stability and safety of stacking. The second is the safety and stability of stacking. When designing stacking strategies for multiple materials, the stability of the stacking structure and the safety risks in the material stacking process must be fully considered to ensure the safety and reliability of material stacking operations.
[0058] Based on the above situation, the embodiments of the present application provide a relaxation optimization method, electronic device and storage medium for a mixed-code single-layer stacking type.
[0059] First, reference Figure 1 , the embodiment of the present application provides a relaxation optimization method for a mixed-code single-layer stacking type, comprising:
[0060] Step S1, obtain the predicted loading stacking pattern, pallet information, loaded material information and mixed code parameters. Among them, the predicted loading stacking pattern is a palletizing scheme generated according to the existing palletizing algorithm. At this time, there is no gap or the gap is very small between all materials in the predicted loading stacking pattern, and the materials do not cover the entire pallet, resulting in the edge of the pallet being empty, thus resulting in a reduction in the placement space on the upper layer. The pallet information mainly includes the size of the pallet, that is, the length and width of the pallet. The loaded material information is the material information that has been placed on the pallet, including the size of the material and the placement direction. The mixed code parameters refer to the distance that limits the material to move each time, the maximum moving distance, the maximum and minimum gaps between the materials, and the height tolerance parameters (that is, the allowable range of the reference height).
[0061] Step S2: constructing a site block diagram according to the loaded material information and the mixed code parameters, wherein the site block diagram includes obstacle information of the site.
[0062] Specifically, the code mixing parameters include a height tolerance parameter; and constructing a site Block diagram according to the loaded material information and the code mixing parameters includes:
[0063] Obtain the reference height, and determine the reference height range according to the height tolerance parameter and the reference height. In the existing placement site, the placement space is generally not completely flat because of the existence of obstacles (such as placed materials or other items that cannot be moved). Therefore, it is necessary to select a reference height as the plane for placing subsequent materials based on the existing material information on the pallet. The height tolerance parameter can be considered as the error range of the reference height.
[0064] The reference height range is used as a basis to compare the actual heights of all positions of the loaded material information to obtain obstacle information; the coordinate system of the predicted loading stack diagram is used as a reference, and the positions in the predicted loading stack diagram are marked as obstacle types according to the obstacle information to obtain the site Block diagram; wherein positions smaller than the reference height range are marked as hollow obstacle areas, and positions larger than the reference height range are marked as cliff obstacle areas. In this embodiment, the Block diagram can also be a two-dimensional array, which usually corresponds to the size of the pallet, and is used to indicate the occupancy status and obstacle conditions of each cell on the pallet. The present application can directly understand the spatial range where materials can be placed on the pallet through the Block diagram.
[0065] Step S3, determining the material movable area according to the predicted loading stack pattern diagram, pallet information and site block diagram.
[0066] Specifically, determining the material movable area according to the predicted loading stacking diagram, pallet information and site block diagram includes:
[0067] Determine the total material placement area based on the pallet information, and determine the material movement boundary based on the total material placement area, that is, the present application can construct a coordinate system or two-dimensional data based on the pallet, and each coordinate in the coordinate corresponds to the position of the pallet (or divide the pallet into multiple cells, and each element in the two-dimensional array represents a cell of the pallet). Then determine the material positions of all materials to be loaded based on the predicted loading stacking diagram; Figure 2 As shown in the figure, except for the dark blue, white and black areas, other areas of different colors represent materials of different specifications, that is, the material positions of the materials to be loaded. Then, the range of the total material placement area that does not belong to the obstacle area and the material position is marked as the first movable area; the material movable area is obtained according to the first movable area and the movable boundary. Figure 2 In the figure, pure white is a hole-type obstacle, marked as 1, pure blue is a cliff-type obstacle, marked as 2; the black area is an obstacle-free area, marked as 0. In addition, Figure 2 The left side in the middle is a diagram of the material stack to be loaded, and the right side is the effect of optimization using the relaxation algorithm after planning. It can be seen that the area of the bottom surface is used more effectively.
[0068] Step S4, taking the mixed code parameters as constraints, calculating material movement parameters according to the material movable area and the predicted loading stacking diagram.
[0069] Specifically, the coordinates of the current position are obtained, and the iteration direction of the material is selected according to the preset rules (assuming that the coordinate system is constructed with the lower left corner of the pallet as the origin. When the iteration direction is "upward", it means that the value of the horizontal coordinate is increased by the preset step size until the boundary condition is reached), and the gap value of the material is initialized; and the maximum distance of a single movement of the material is initialized according to the iteration direction and the maximum interval of the material. For example, assuming that the iteration direction of the material is to prioritize the upper left edge, the maximum distance of a single movement of the upper left two methods is set to infinity, and the maximum distance of a single movement of the other two methods defaults to the maximum gap of the material in the mixed code parameter. In general, the initial value of the gap value is set to -1.
[0070] Then, the obstacle type of the current position is determined according to the site block map and coordinates, and the gap value is updated according to the obstacle type; for example, if the current position is a hollow obstacle area, the gap value is updated to -1, and if there is no material at the current position, then the current loop is directly exited, the position coordinates are adjusted to restart the analysis; if it is a cliff obstacle area, it is updated to 0, and the current loop is exited, and the position coordinates are adjusted to restart the analysis. If the current position is an obstacle-free area, it is determined whether the current position belongs to the material movable area. If so, the gap value is incremented according to the preset step size; and the coordinates of the current position are updated according to the iteration direction, and the judgment is made again until the current position reaches the moving boundary, and the gap value at this time is recorded. Finally, the current maximum distance of a single movement and the gap value are recorded as the material movement parameters of the material in the current iteration direction.
[0071] The movement parameters also include the maximum movable distance of the material. If the current position does not belong to the movable area of the material, the optimization method also includes:
[0072] If the current position belongs to an obstacle area, assigning the gap value according to the obstacle type;
[0073] If the current position does not belong to an obstacle area and there are materials placed there, the type of material at the current position is determined according to the predicted loading stack pattern diagram;
[0074] Determine whether the material at the current position is the same as the material at the previous position. If so, increment the value of sameunit according to the preset step size and set the gap value to 0; update the coordinates of the current position according to the iteration direction, and re-determine until the edge of the current material is reached. At this time, obtain the current value of the maximum movable distance of the current material, and update the maximum movable distance to the smaller value of sameunit and the current value;
[0075] If the material at the current position is different from the material at the previous position, the value of sameunit will be initialized.
[0076] If the current position does not belong to an obstacle area and there is material placed, the material movement parameters are calculated according to the material movable area and the predicted loading stacking diagram, and further include:
[0077] The value of the minimum gap of the material in the iteration direction is updated according to the current value of the gap value and the area where the current position is located; the current value of the gap value is recorded as power, and the current value of the minimum gap of the current material in the iteration direction is recorded as power[i]; wherein,
[0078] When power is less than 0, if power[i] is equal to 0, power is assigned to power[i]; if power[i] is less than, the larger value of power[i] and power is assigned to power[i];
[0079] When power is greater than 0, if power[i] is less than or equal to 0, power is assigned to power[i]; if power[i] is greater than 0, the smaller value between power[i] and power is assigned to power[i];
[0080] When power is equal to 0, it indicates that the material cannot move in the iteration direction.
[0081] More specifically, if power is less than 0 and the current position is not a corner point of the material, the iteration is terminated; if power is -1 and the current position is a corner point of the material, the current iteration direction is set to be immovable; if power[i] is 0 and the area in front of the iteration direction of the current position is a movable area of the material, the power[i] of the current material is updated to the current power value; if power[i] is less than 0, the power[i] of the current material is updated to the maximum value of power and the current power[i]; if power is 0, the current material is set to be immovable in the current iteration direction; if power[0] is less than or equal to 0, power[0] is updated to the current power value; if power[0] is greater than 0, power[0] is updated to the smaller value of power and the current power[0].
[0082] The movement parameter also includes the current movement distance of the material. After traversing an iteration direction and obtaining the minimum gap of the material in the iteration direction, the optimization method further includes:
[0083] If the gap value is less than 0, indicating a gap with the edge of the tray (i.e., equivalent to the edge of the material can exceed the edge of the tray), the value of the minimum gap of the material in the iteration direction is calculated according to the first operation rule to obtain the current moving distance. For example, the first operation rule is: subtract 1 from the value of the minimum gap to obtain the current moving distance. If the gap value is greater than or equal to 0, the value of the minimum gap of the material in the iteration direction is calculated according to the second operation rule to obtain the current moving distance. For example, the second operation rule is: divide the value of the minimum gap by 2 (i.e., half of the value of the minimum gap) to obtain the current moving distance. Preferably, the first operation rule and the second operation rule can also be adjusted according to user needs.
[0084] The maximum single movable distance in the current iteration direction is obtained, and it is determined whether the current moving distance is greater than the maximum single movable distance. If so, the current moving distance is updated to the maximum single movable distance.
[0085] The optimization method further comprises:
[0086] When the current moving distance is greater than the maximum material interval and the current number of cycles is greater than a preset threshold, the single maximum movable distance is adjusted to the minimum material interval.
[0087] Step S5, moving the material position in the predicted loading stacking diagram according to the minimum gap and the maximum movable distance of the material, to obtain an optimized loading stacking diagram. After obtaining the current moving distance, the material can be moved in the current iteration direction according to the current moving distance, and then the iteration direction is changed, and the current moving distance of the next iteration direction is recalculated according to step S4 until all directions are traversed or the number of iterations reaches the upper limit range.
[0088] In summary, the optimization method provided in the embodiment of the present application achieves the following effects through the relaxation algorithm proposed in the present application:
[0089] First, optimize the available space. The algorithm iteratively adjusts the existing box layout to maximize the use of available space. By optimizing the box layout, the algorithm ensures that as little space as possible is wasted, thereby improving the loading efficiency of the pallet.
[0090] Second, automated optimization, the algorithm can intelligently optimize the existing loading results without manual intervention. It automatically adjusts the position of the boxes through relaxation algorithms and iterative optimization to achieve the best layout effect;
[0091] Third, quickly converge to the optimal solution. Through multiple iterations, the algorithm can quickly converge to the optimal box layout, minimizing space waste and improving pallet loading efficiency.
[0092] In another embodiment of the present application, the detailed process of the relaxation optimization method provided by the present application is shown as follows.
[0093] Step 1: Input the information required by the algorithm, such as information about loaded materials, information about the single-layer stacking pattern to be loaded (i.e., the stacking pattern of the materials to be loaded), pallet size, and mixed code parameters.
[0094] Among them, the loaded material information represents the materials that have been actually stacked and cannot be moved anymore, including the location information and rotation information of the materials. The single-layer stacking information to be loaded is the predicted loading plan and has not been actually placed in the real space. All boxes are prevented from being constrained to a certain height range (determined by the mixed code parameters). The pallet size is the size of the space that can be placed. The mixed code parameters include the maximum material interval, the minimum material interval, the height tolerance parameters, etc.
[0095] Step 2: First, we need to generate a block diagram for subsequent algorithm use. The block diagram is an array representing the current space obstacles. Figure 2 , dark blue is the cliff obstacle area, white is the hollow obstacle area, and the black part represents the place where materials can be placed. The size of the pallet is not shown in the figure. In addition, in this application, zero 0 represents no obstacle, 1 represents hollow obstacle, and 2 represents cliff obstacle. Hole obstacle represents a hollow below the height tolerance range, and cliff obstacle represents an obstacle above the height tolerance range.
[0096] Step 3: Calculate the movement parameters of each box. The following is a detailed explanation of the algorithm.
[0097] 1. The parameters of this embodiment include: power, which represents the gap value without direction restriction; power[i], which represents the minimum gap in the four directions of the box; max[i], which represents the maximum distance that can be moved in one time in the four directions, with the upper left edge being preferred, so the two parameters in the upper left direction are infinite, and the other two parameters default to the maximum gap in the mixed code parameters; can[i], which represents whether the four directions can be moved; maxDistances[i], which represents the maximum distance that can be moved in the four directions, and this distance is limited by the hollow obstacle, and the constraint is that the four corners of the material are not allowed to exceed the hollow obstacle. The parameters power[i], max[i], and maxDistances[i] need to be reinitialized in each iteration.
[0098] 2. Traverse in four directions (i.e., the four directions of the X and Y axes, taking the left -> right, upper -> lower direction as an example) to update the movement parameters. This embodiment takes one of the directions as an example. The following is a detailed explanation of the algorithm.
[0099] 2.1. Maintain a material type map to indicate whether there is material at each location and the type of material. The initial value of power is -1 and the initial value of sameunit is 0.
[0100] 2.2. Check the block value of the current position:
[0101] If block[i, j] is equal to 1, set power to -1. If the map at the current position is not empty, skip the current iteration;
[0102] If block[i, j] is equal to 2, set power to 0 and continue to the next iteration.
[0103] 2.3. If the map at the current position is empty: If power is greater than or equal to 0, the power is increased; otherwise, the power is decreased.
[0104] 2.4. If the material at the current position is not empty:
[0105] If the material at the current position is the same as the previous material, sameunit is incremented and power is set to 0. If the block value at the current position is 1 and it is the edge of the material, the maxdistant[1] of the material is updated to the minimum value of sameunit and the current value.
[0106] If the material at the current position is different from the previous material, reset sameunit to 1, update lastUnit to the current material, and perform different processing according to the value of power:
[0107] (1) If power is less than 0 and the current position is not a corner point of the material, skip the current iteration;
[0108] - (In the opposite direction, there is no need to set can[0] to false) If power is equal to -1, set can[0] and can[1] of the current material to false, indicating that it cannot be moved in both directions;
[0109] - If the power is 0 and there is no obstacle in front of the current position, you can directly stick to the edge and update the power[0] of the current material to the current power value;
[0110] - If power is less than 0, update the power[0] of the current material in unitToPower to the maximum value of power and current power[0].
[0111] (2) If power is greater than 0:
[0112] - If power is 0, set can[0] in unitToPower of the current material to false;
[0113] - If the power[0] of the current material is less than or equal to 0, update it to the current power value;
[0114] - If the current material's power[0] is greater than 0, update it to the minimum value of power and current power[0], indicating that there is an obstacle ahead but it can be moved;
[0115] 3. After the analysis in one iteration direction is completed, reset the power to 0 to prepare for the next iteration. From then on, the parameter maintenance in a single direction is completed, and the parameter maintenance in the next direction continues.
[0116] Step 4. Iterate the box position once according to the previously calculated parameters. Each iteration adjusts only one axis position, such as X, Y, X, and Y in turn. Taking the X axis as an example, the following is a detailed explanation of the algorithm.
[0117] 1. Traverse all the materials to be loaded, and the following dis is recorded as the moving distance this time:
[0118] - If power[i] is less than 0:
[0119] - Define dis as -power[i]-1
[0120] - If can[i] is true:
[0121] - If i is less than 2 (X direction), set can[0] and can[1] to false; / / Otherwise (Y direction), set can[2] and can[3] to false (meaning that this direction cannot be moved anymore)
[0122] - If dis is greater than max[i] at this time, set dis to max[i]
[0123] - Update the location of the material (dis)
[0124] - (Adjust max value) If dis is greater than maxMargin:
[0125] - If the number of iterations is > 7, update max[1] to the minimum spacing and increase the total number of iterations.
[0126] - If power[i] is greater than or equal to 0:
[0127] - If can[i] is true:
[0128] - Define dis as power[i] / 2
[0129] - If i=0 (negative x-axis direction) and power[i+1] is less than 0
[0130] - If max has been modified to the minimum spacing, dis is set to power[i]
[0131] - Otherwise, skip to the (Adjust max value) step
[0132] - If dis is greater than max[i] at this time, set dis to max[i]
[0133] - Update the location of the material (dis)
[0134] - (Adjust max value) If dis is greater than maxMargin:
[0135] - If the number of iterations is > 7, update max[1] to the minimum spacing and increase the total number of iterations.
[0136] Step 5. After the iteration is completed, the height of all new material positions is calculated and the result is returned. At this point, the algorithm is completed and the stack type optimization is completed.
[0137] In summary, the relaxation optimization method provided in the embodiment of the present application can optimize the available space. The algorithm iteratively adjusts the existing box layout to maximize the use of available space. By optimizing the box layout, the algorithm ensures that as little space as possible is wasted, thereby improving the loading efficiency of the pallet. Automated optimization is achieved. The algorithm can intelligently optimize the existing loading results without manual intervention. It automatically adjusts the position of the box through a relaxation algorithm and iterative optimization to achieve the best layout effect. Rapid convergence to the optimal solution is achieved. Through multiple iterations, the algorithm can quickly converge to the optimal box layout, minimize space waste, and improve the loading efficiency of the pallet. Moreover, it has a wide range of applicability. The algorithm can be applied to various loading scenarios, including boxes of different shapes and sizes, pallets of different specifications, and different loading restrictions. It has strong applicability and versatility.
[0138] In a third aspect, an embodiment of the present application provides an electronic device, Figure 3 FIG. 1 is a block diagram of an electronic device according to an exemplary embodiment. Figure 3 As shown, the electronic device may include a processor 11 and a memory 12 storing computer program instructions.
[0139] Specifically, the processor 11 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0140] Among them, the memory 12 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 12 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 12 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 12 may be inside or outside the data processing device. In a specific embodiment, the memory 12 is a non-volatile memory. In a specific embodiment, the memory 12 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. Under appropriate circumstances, the RAM can be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM can be a fast page mode dynamic random access memory (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0141] The memory 12 may be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 11 .
[0142] The processor 11 reads and executes the computer program instructions stored in the memory 12 to implement any one of the relaxation optimization methods for mixed-code single-layer stacking in the above embodiments.
[0143] In one embodiment, the electronic device may further include a communication interface 13 and a bus 10. Figure 3 As shown, the processor 11, the memory 12, and the communication interface 13 are connected via a bus 10 and communicate with each other.
[0144] The communication interface 13 is used to realize the communication between the modules, devices, units and / or equipment in the embodiment of the present application. The communication port 13 can also realize data communication with other components such as: external devices, image / data acquisition equipment, databases, external storage and image / data processing workstations.
[0145] The bus 10 includes hardware, software or both, and couples the components of the electronic device to each other. The bus 10 includes but is not limited to at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. By way of example and not limitation, bus 10 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, bus 10 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0146] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a program stored thereon, and when the program is executed by a processor, the relaxation optimization method for a mixed-code single-layer stacking type provided in the first aspect is implemented.
[0147] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0148] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the relaxation optimization method for a mixed-code single-layer stacking type provided in the first aspect.
[0149] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.
[0150] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0151] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A relaxation optimization method for mixed-code single-layer stacking, characterized in that: include: Obtain predicted loading pattern, pallet information, loaded material information and mixed code parameters; Constructing a site block diagram according to the loaded material information and the mixed code parameters, wherein the site block diagram includes obstacle information of the site; Determine the material movable area according to the predicted loading stack diagram, pallet information and site block diagram; Taking the mixed code parameters as constraints, calculating material movement parameters according to the material movable area and the predicted loading stacking diagram; Moving the material position in the predicted loading stacking diagram according to the movement parameters to obtain an optimized loading stacking diagram; The code mixing parameters include a height tolerance parameter; and the step of constructing a site Block diagram according to the loaded material information and the code mixing parameters includes: Acquire a reference height, and determine a reference height range according to the height tolerance parameter and the reference height; The reference height range is based on comparing the actual heights of all positions of the loaded material information to obtain obstacle information; Taking the coordinate system of the predicted loading stack diagram as a reference, marking the positions in the predicted loading stack diagram with obstacle types according to the obstacle information to obtain the site Block diagram; Wherein, the position smaller than the reference height range is marked as a hole obstacle area, and the position larger than the reference height range is marked as a cliff obstacle area; The determining of the material movable area according to the predicted loading stacking diagram, pallet information and site block diagram includes: Determine a total material placement area according to the pallet information, and determine a material movement boundary according to the total material placement area; Determining material locations of all materials to be loaded according to the predicted loading stack pattern diagram; Marking the range of the total material placement area that does not belong to the obstacle area and the material position as a first movable area; Obtaining the material movable area according to the first movable area and the movable boundary; The code mixing parameters also include the maximum interval of materials; the material movement parameters are calculated according to the material movable area and the predicted loading stacking diagram, including: Obtain the coordinates of the current position, select the iteration direction of the material according to the preset rules, and initialize the gap value of the material; and initialize the maximum single movement distance of the material according to the iteration direction and the maximum interval of the material; Determine the obstacle type to which the current position belongs according to the site block map and coordinates, and update the gap value according to the obstacle type; Determine whether the current position belongs to the material movable area. If so, increment the gap value according to the preset step size, update the coordinates of the current position according to the iteration direction, and re-determine until the current position reaches the movable boundary, and record the gap value at this time; The single movement maximum distance and the gap value are used as material movement parameters of the material in the current iteration direction.
2. The relaxation optimization method according to claim 1, characterized in that: The movement parameters also include the maximum movable distance of the material. If the current position does not belong to the movable area of the material, the optimization method also includes: If the current position belongs to an obstacle area, assigning the gap value according to the obstacle type; If the current position does not belong to an obstacle area and there are materials placed there, the type of material at the current position is determined according to the predicted loading stack pattern diagram; Determine whether the material at the current position is the same as the material at the previous position. If so, increment the value of sameunit according to the preset step size and set the gap value to 0; update the coordinates of the current position according to the iteration direction, and re-determine until the edge of the current material is reached. At this time, obtain the current value of the maximum movable distance of the current material, and update the maximum movable distance to the smaller value of sameunit and the current value; If the material at the current position is different from the material at the previous position, the value of sameunit will be initialized.
3. The relaxation optimization method according to claim 2, characterized in that: If the current position does not belong to an obstacle area and there is material placed, the material movement parameters are calculated according to the material movable area and the predicted loading stacking diagram, and further include: The value of the minimum gap of the material in the iteration direction is updated according to the current value of the gap value and the area where the current position is located; the current value of the gap value is recorded as power, and the current value of the minimum gap of the current material in the iteration direction is recorded as power[i]; wherein, When power is less than 0, if power[i] is equal to 0, power is assigned to power[i]; if power[i] is less than, the larger value of power[i] and power is assigned to power[i]; When power is greater than 0, if power[i] is less than or equal to 0, power is assigned to power[i]; if power[i] is greater than 0, the smaller value between power[i] and power is assigned to power[i]; When power is equal to 0, it indicates that the material cannot move in the iteration direction.
4. The relaxation optimization method according to claim 3, characterized in that: The movement parameter also includes the current movement distance of the material. After traversing an iteration direction and obtaining the minimum gap of the material in the iteration direction, the optimization method further includes: If the gap value is less than 0, the minimum gap value of the material in the iteration direction is calculated according to the first calculation rule to obtain the current moving distance; If the gap value is greater than or equal to 0, the value of the minimum gap of the material in the iteration direction is calculated according to the second calculation rule to obtain the current moving distance; The maximum single movable distance in the current iteration direction is obtained, and it is determined whether the current moving distance is greater than the maximum single movable distance. If so, the current moving distance is updated to the maximum single movable distance.
5. The relaxation optimization method according to claim 4, characterized in that: The optimization method further comprises: When the current moving distance is greater than the maximum material interval and the current number of cycles is greater than a preset threshold, the single maximum movable distance is adjusted to the minimum material interval.
6. An electronic device, characterized in that: It comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a relaxation optimization method for a mixed-code single-layer stacking type as described in any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a relaxation optimization method for a mixed-code single-layer stacking type is implemented as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Dynamic optimization box stacking method and information data processing terminal
CN109665328A
Stacking method and system for same goods
CN110861925A
Stacking method, stacking device, electronic equipment and computer readable storage medium
CN111573292A
On-line cargo stacking method based on under-complete information
CN111891758A
Order-based generation system and method for stable mixed box stack type box supply sequence
CN112085385A
