A pulp ship mixed loading method and system based on an optimization strategy and a penalty mechanism
Through the method based on optimization strategies and punishment mechanisms, the skyline algorithm and neighborhood search algorithm are used to optimize the mixing process of pulp boats, which solves the mixing problem caused by irregular cabin structure and lifting blind spots of pulp boats, and achieves the rationality and efficiency of the smooth stacking and mixing results of single-class pulp.
Patent Information
- Application Number
- CN202410230231.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-29
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2044-02-29
AI Technical Summary
The prior art is difficult to effectively solve the mixing problems caused by irregular cabin structure and lifting blind spots during the loading process of pulp boats, and it is impossible to accurately realize the flat stacking of single-class pulp.
The pulp boat mixing method based on optimization strategy and punishment mechanism is adopted. By obtaining the basic information of the pulp bag and ship information, the cabin is divided into multiple loadable areas. The skyline algorithm and neighborhood search algorithm are used to optimize the loading order and form of the pulp bag, and combined with the punishment mechanism and post-processing operations, the optimal mixing solution is generated.
The flat stacking of single-type pulp in the pulp package is realized, the rationality and efficiency of mixing results are improved, the needs of multi-constraint problems are met, and the economical and safety of loading are improved.
Smart Images

Figure CN118095984B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pulp ship stowage, and specifically relates to a pulp ship mixed loading method and system based on an optimization strategy and a penalty mechanism. Background Art
[0002] With the improvement of the national living standard, the pulp transportation volume has been growing rapidly in recent years. The rapidly growing transportation volume has given rise to more and more stowage requirements.
[0003] Pulp stowage is a key link in the process of pulp ship transportation. The quality of the stowage plan directly affects the safety and economy of pulp sea transportation. A reasonable stowage plan can improve the terminal loading and unloading efficiency, reduce cargo losses, and shorten the ballast water adjustment time.
[0004] In the existing ship stowage technology, there is less research on pulp ship stowage. Since pulp ships need to consider the irregular structure of the cabin such as steps and waist pits during actual stowage, and there are blind spots in the placement during the lifting process, and the height of pulp stowage has a non-proportional relationship with the irregular structure. Especially in the case of mixed loading of pulp, it is impossible to accurately achieve the flat stacking of single-type pulp in the mixed pulp packages, and it cannot meet the mixed loading requirements of pulp ship stowage.
[0005] Therefore, there is an urgent need for a pulp ship mixed loading method based on an optimization strategy and a penalty mechanism to solve the above-mentioned mixed loading problems of pulp ships. Summary of the Invention
[0006] In view of the deficiencies of the prior art, the present invention proposes a pulp ship mixed loading method and system based on an optimization strategy and a penalty mechanism.
[0007] The first aspect of the present invention discloses a pulp ship mixed loading method based on an optimization strategy and a penalty mechanism, including:
[0008] S1: Obtain the basic information of pulp packages and determine the target stowage quantity of different types of pulp packages. Divide the cabin into multiple loadable areas according to the ship information. Generate a combined pulp package list according to different types of pulp packages. The combined pulp package list is segmented according to the pulp package type, and obtain the loading sequence and loading form of the pulp packages loaded in the loadable area;
[0009] S2: Divide the pulp packages in the combined pulp package list into type-one pulp packages to be loaded and type-two pulp packages not loaded according to the loading sequence and assembly form. Determine the optimization strategy and penalty mechanism for pulp package stowage according to the target stowage quantity, the full-load quantity of the loadable area, and the blind area information of the loadable area;
[0010] S3: Based on the optimization strategy and penalty mechanism, use the skyline algorithm to stow the first type of pulp packages and the second type of pulp packages into the stowable area, and generate an initial mixed stowage solution for the stowable area through multiple constraint conditions;
[0011] S4: Use the neighborhood search algorithm to perform cross-replacement and mutation optimization on the pulp packages of the initial mixed stowage solution, select the optimal solution in the process of solving the initial solution through the scoring function and comparison function of the neighborhood search algorithm, and output the optimal solution as the target mixed stowage solution;
[0012] S5: Perform post-processing operations on the target mixed stowage solution to identify, adjust, and fill the gaps in the stowable area, optimize the target mixed stowage solution with the goal of maximizing the number of loaded pulp, and save it as the final mixed stowage result;
[0013] S6: Traverse the stowable area until all types of pulp packages are stowed, and output the mixed stowage result file.
[0014] In an alternative embodiment, the step of dividing the cabin into multiple stowable areas according to the ship information includes:
[0015] S11: Divide the ship into the crane area, the cabin area, the cabin layer area, and the stowable area of the cabin layer;
[0016] S12: Define the information classes of the ship division areas respectively, and save the corresponding area information in the information classes;
[0017] S13: Obtain the absolute coordinates based on the key points of the stowable area, set the coordinate system center at the center of the ship's stern, and convert the coordinate points of the absolute coordinates into relative coordinate points through a coordinate conversion tool;
[0018] S14: Identify the stowable area as a rectangular area through a segmentation algorithm, obtain the ship's red line information based on the relative coordinate points, and return the blind area position coordinates, blind area radius, size information of the stowable area, pulp size information, and red line information including the coordinates of two points on the red line.
[0019] In an alternative embodiment, the step of determining the optimization strategy and penalty mechanism for pulp package stowage according to the target stowage quantity, the full-load quantity of the stowable area, and the blind area information of the stowable area includes:
[0020] S21: Determine whether the current stowable area for stowing pulp packages is a blind area. If there is no blind area and the target stowage quantity falls within the preset interval of the full-load quantity, sort the combined pulp package list in the loading order, and adjust the quantities of different types of pulp packages from top to bottom in the stowable area until the quantities of the same type of pulp packages are the same, and output the position information of the first type of pulp packages;
[0021] S22: If the target stowage quantity of the pulp packages does not fall within the preset interval of the full-load quantity, or the stowable area where the pulp packages are stowed is a blind area, then the Y-axis distance between adjacent sky lines input for the first-class pulp packages is limited by a preset value. When the Y-axis distance between adjacent sky lines in the sky line list generated by stowing the first-class pulp packages exceeds the preset value, the square of the Y-axis distance is added as a penalty mechanism to the optimization objective, and the optimized score for the stowage of the first-class pulp packages is output.
[0022] In an alternative embodiment, the step of stowing the first-class pulp packages and the second-class pulp packages into the stowable area by using the skyline algorithm based on the optimization strategy and the penalty mechanism to generate the initial mixed stowage solution for the stowable area includes:
[0023] S31: By defining the shape change of the stowage area, the irregular area is transformed into a regular stowage area including rectangles, stepped shapes, and trapezoids. Then, according to the obtained heights of the first-class pulp packages, the second-class pulp packages, and the cabin height, the three-dimensional stowage task of the regular stowage area is transformed into a two-dimensional stowage task, and the bottom-left algorithm is used to optimize the area waste rate of the minimum stowable area of the pulp packages as the objective;
[0024] S32: A sky line list is generated within the stowable area by using the skyline algorithm. The stowable area is divided into a stowed area and an unstowed area by the sky line. The sky line includes endpoint coordinates and the sky line length. The stowage of the first-class pulp packages is prioritized, and then the stowage of the second-class pulp packages is carried out;
[0025] S33: Based on the constraint conditions that the endpoints of the sky line are the smallest respectively on the X-axis and the Y-axis, the pulp packages identified as rectangular boxes are allocated to the unstowed area divided by the sky line. The sky line is cut by the rectangular box, and a new sky line is generated at the top of the rectangular box and added to the sky line list. The current sky line that cannot allocate the rectangular box is merged with other sky lines and then the sky line list is updated;
[0026] S34: Traverse the combined pulp package list to sequentially read the first-class pulp packages and the second-class pulp packages in the loading order. The selected pulp packages are allocated to different sky lines to calculate the wasted area. By traversing the sky line list, the combination of the selected pulp packages and the sky line with the smallest wasted area is obtained. Based on the combination of the selected pulp packages and the sky line, the pulp packages in the combined pulp package sequence are loaded into the stowable area to generate a pulp package loading list.
[0027] In an alternative embodiment, the step of generating the initial mixed stowage solution for the stowable area by using multiple constraint conditions includes:
[0028] S35: Obtain the number of red lines based on the ship information and preset the touch limit times of the red lines. When loading pulp packages according to the pulp package loading list, judge based on the actual red line touch times and the touch limit times. If the red line touch times exceed the touch limit times, mutate the pulp package into a pulp package that does not touch the red line according to the pulp package loading list. If the pulp package cannot be mutated, discard the current pulp package and proceed with the loading of the next pulp package;
[0029] S36: Obtain the working limit information of the ship's waist pit and the crane based on the ship information, and generate a ship obstacle avoidance blind area according to the working limit information. The ship obstacle avoidance blind area includes a circular blind area, an upper blind area, and a lower blind area;
[0030] S37: Traverse the pulp package loading list, calculate the distance between the center of the circular blind area and the center of gravity of the pulp package. If the distance is greater than the radius of the blind area, return the pulp package data to the pulp package loading list for the calculation of the next pulp package. If the distance is less than the radius of the blind area, calculate the intersection coordinates of the pulp package and the circular blind area according to the height of the center of gravity of the pulp package, and move the pulp package to the edge of the circular blind area for obstacle avoidance, and return the moved pulp package data to the pulp package loading list;
[0031] S38: Traverse the pulp package loading list, calculate the distance between the lower blind area and the center of gravity of the pulp package. If the center of gravity of the pulp package is not within the lower blind area and the pulp package is not located in the projection of the lower blind area, return the pulp package data to the pulp package loading list for the calculation of the next pulp package. If the center of gravity of the pulp package is within the lower blind area, search the pulp package loading list and mutate the pulp package into a mutated pulp package that is more than twice the height of the lower blind area, and return the mutated pulp package data to the pulp package loading list;
[0032] S39: Traverse the pulp package loading list, judge whether the next pulp package can be loaded above the currently loaded pulp package to avoid the upper blind area. If it can, load the next pulp package. If not, judge the positional relationship between the next pulp package and the upper blind area. When the center of gravity of the pulp package is far from the upper blind area, continue loading. When the center of gravity of the pulp package is within the upper blind area, mutate the pulp package into a larger pulp package until the center of gravity of the pulp package is far from the upper blind area, and return the pulp package data to the pulp package loading list;
[0033] S310: Confirm that all type I pulp packages and type II pulp packages in the combined pulp package list are loaded according to the pulp package loading list, and update the skyline list in real time when loading each pulp package, and output the initial mixed loading solution for the pulp package loading.
[0034] In an optional embodiment, the cross - replacement and mutation optimization of the pulp packages of the initial mixed - loading solution by using the neighborhood search algorithm, and the selection of the optimal solution in the process of solving the initial solution through the scoring function and comparison function of the neighborhood search algorithm, and the output of the optimal solution as the mixed - loading target solution include:
[0035] S41: Define a neighborhood search function according to the ship information and the initial mixed - loading solution, set the target number of loop optimizations of the initial solution, and update the pulp package loading list of the initial mixed - loading solution to optimize and iterate the initial mixed - loading solution through the neighborhood search function;
[0036] S42: During the optimization iteration process, cross - replace the positions of the pulp packages of the initial mixed - loading solution in a random order until the number of loop optimizations of the initial mixed - loading solution is less than one - third of the target number;
[0037] S43: When the number of loop optimizations of the initial mixed - loading solution is between one - third and two - thirds of the target number, mutate and optimize the pulp packages into pulp packages of new sizes according to the probability distribution function configured by the cabin - type constraint;
[0038] S44: When the number of loop optimizations of the initial mixed - loading solution is between two - thirds and the maximum target number, use the uniform - distribution random mutation method to mutate the pulp packages into new pulp packages with a uniform probability distribution, traverse the initial mixed - loading solution until all pulp packages complete the neighborhood search operation, and output the mixed - loading pulp package list of the optimal solution;
[0039] S45: Calculate the score of the loading - area mixed - loading pulp package loading plan in the optimal solution through the scoring function, sort the loading - plan scores according to the scoring priority of the comparison function, and select the pulp package loading plan with the highest score to update as the mixed - loading target solution output after the neighborhood search operation.
[0040] In an optional embodiment, the post - processing operations of identifying, adjusting, and filling the gaps in the loadable area for the mixed - loading target solution to optimize the target solution to maximize the number of loaded pulp and save it as the final loading result include:
[0041] S51: Obtain the pulp package loading position information and loading - area information of the mixed - loading target solution;
[0042] S52: Detect the gap area of the loading area according to the post - processing strategy, divide the gap area into several rectangular blocks, and obtain the position information and size information of the rectangular blocks;
[0043] S53: Traverse the rectangular blocks, merge the rectangular blocks into gap rectangular blocks with the maximum area of the merged gap area as the constraint condition, and obtain the position information and size information of the gap rectangular blocks;
[0044] S54: Determine the number of rows and columns of the slotted pulp package combination without detecting the rationality of the pulp package combination according to the sizes of the slotted rectangular block and the pulp package.
[0045] S55: Detect the rationality of the current slotted pulp package combination. If it is reasonable, fill the slotted pulp package into the slotted rectangular block. If it is not reasonable, adjust the number of pulp packages in the rows and columns of the slotted pulp package combination according to the quantity limit and row-column quantity limit of the slotted pulp package combination until the detection result of the slotted pulp package combination is legal, then fill it into the slotted rectangular block, and output the pulp package type and position information of the slotted pulp package combination.
[0046] S56: Traverse all the slotted rectangular blocks until the goal of maximizing the loaded pulp quantity is optimized, and update the mixed loading target solution to the final mixed loading result for storage.
[0047] The second aspect of the present invention discloses a pulp ship mixed loading system based on an optimization strategy and a penalty mechanism, and the system includes:
[0048] A stowage list generation module, which is used to obtain the basic information of the pulp package and determine the target stowage quantity of different types of pulp packages, divide the ship's cabin into multiple loadable areas according to the ship information, generate a combined pulp package list according to different types of pulp packages, the combined pulp package list is segmented according to the pulp package type, and obtain the loading sequence and loading form of the pulp packages loaded in the loadable area.
[0049] A mixed loading rule module, which is used to divide the pulp packages in the combined pulp package list into first-class pulp packages to be loaded and second-class pulp packages not to be loaded according to the loading sequence and assembly form, and determine the optimization strategy and penalty mechanism for pulp package stowage according to the target stowage quantity, the full-load quantity of the loadable area, and the blind area information of the loadable area.
[0050] A mixed loading solution module, which is used to stow the first-class pulp packages and second-class pulp packages into the loadable area by using the skyline algorithm based on the optimization strategy and the penalty mechanism, and generate an initial mixed loading solution for the loadable area through multiple constraint conditions.
[0051] A mixed loading optimization module, which is used to perform cross-replacement and mutation optimization on the pulp packages of the initial mixed loading solution by using the neighborhood search algorithm, select the optimal solution in the process of solving the initial solution through the scoring function and comparison function of the neighborhood search algorithm, and output the optimal solution as the mixed loading target solution.
[0052] A post-processing module for mixed loading, which is used to perform post-processing operations of identifying, adjusting, and filling the gaps in the loadable area on the mixed loading target solution, optimize the mixed loading target solution with the goal of maximizing the loaded pulp quantity, and save it as the final mixed loading result.
[0053] The mixed loading output module is used to traverse the loadable area until all types of pulp packages are loaded, and output the mixed loading result file.
[0054] The third aspect of the present invention discloses a pulp ship mixed loading device based on an optimization strategy and a penalty mechanism, including:
[0055] At least one processor, and,
[0056] A memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the pulp ship mixed loading methods based on an optimization strategy and a penalty mechanism disclosed in the first aspect of the present invention.
[0058] The fourth aspect of the present invention discloses a computer-readable storage medium, which stores computer-executable instructions for causing a computer to execute any one of the pulp ship mixed loading methods based on an optimization strategy and a penalty mechanism disclosed in the first aspect of the present invention.
[0059] Compared with the prior art, the present invention has the following advantages:
[0060] The present invention divides the pulp packages in the combined pulp package list into first-class pulp packages to be loaded and second-class pulp packages not loaded according to the loading sequence and assembly form, and uses the skyline algorithm to load the first-class pulp packages and the second-class pulp packages based on an optimization strategy and a penalty mechanism. At the same time, the initial solution is further optimized through neighborhood search and gap filling post-processing operations to generate the optimal mixed loading solution, accurately realizing the flat stacking of single-class pulp in the mixed loading pulp packages, ensuring the rationality of the mixed loading result, and also meeting the multi-constraint problems that need to be considered in the actual loading process, improving the rationality, economy and safety of the output loading result, and providing an effective solution for the loading of pulp ships. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0062] Figure 1 It is a flowchart of the pulp ship mixed loading method based on an optimization strategy and a penalty mechanism of the present invention;
[0063] Figure 2This is a schematic diagram of the pulp and ship mixed loading system based on the optimization strategy and penalty mechanism of the present invention. Detailed implementation manners
[0064] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the following describes and explains the present application in combination 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 used to limit the present application. Based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.
[0065] Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, the present application can also be applied to other similar scenarios based on these drawings without making creative efforts. In addition, it can also be understood that although the efforts made in such a development process may be complex and lengthy, for those of ordinary skill in the art related to the content disclosed in the present application, some design, manufacturing or production changes made on the basis of the technical content disclosed in the present application are only conventional technical means and should not be understood as the content disclosed in the present application being insufficient.
[0066] Referring to "embodiment" in the present application means that the specific features, structures or characteristics described in combination with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various positions in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those of ordinary skill in the art explicitly and implicitly understand that the embodiments described in the present application can be combined with other embodiments without conflict.
[0067] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the ordinary meanings understood by those with ordinary skills in the technical field to which this application belongs. The words such as "a", "an", "one", "the" and the like involved in this application do not indicate a quantity limitation and may represent a singular or plural number. The terms "include", "comprise", "have" and any variations thereof involved in this application are intended to cover non-exclusive inclusion; 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 further include unlisted steps or units, or may further include other steps or units inherent to these processes, methods, products or devices. The similar words such as "connect", "be connected", "couple" 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 means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships may exist. For example, "A and / or B" may represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the front and back associated objects. The terms "first", "second", "third" and the like involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.
[0068] Embodiment 1
[0069] See Figure 1 , the embodiment of the present invention discloses a pulp ship mixed loading method based on an optimization strategy and a penalty mechanism, including:
[0070] S1: Obtain the basic information of pulp packages and determine the target stowage quantity of different types of pulp packages. Divide the ship's hold into multiple loadable areas according to the ship information, generate a combined pulp package list according to different types of pulp packages, segment the combined pulp package list according to the pulp package type, and obtain the loading sequence and loading form of the pulp packages loaded in the loadable areas;
[0071] In an optional embodiment, the dividing the ship's hold into multiple loadable areas according to the ship information includes:
[0072] S11: Divide the ship into a crane area, a hold area, a hold layer area, and a loadable area of the hold layer;
[0073] S12: Define the information classes of the ship's divided areas respectively, and save the corresponding area information in the information classes;
[0074] S13: Obtain the absolute coordinates according to the key points of the loadable area, set the coordinate system center at the center of the ship's stern, and convert the coordinate points of the absolute coordinates into relative coordinate points through a coordinate conversion tool;
[0075] S14: Identify the assemblable area as a rectangular area through a segmentation algorithm, obtain the ship's red line information based on the relative coordinate points, and return the blind area position coordinates, blind area radius, dimensions of the loadable area, pulp dimensions, and red line information including the coordinates of two points on the red line.
[0076] It should be noted that due to the presence of steps and waist pockets inside the cabin, and there are blind areas where the crane cannot be placed during hoisting, the placeable area inside the cabin is not a simple rectangular shape. It is necessary to re-segment each area of the cabin to generate the loadable area required by the algorithm. Considering the presence of steps and waist pockets in the cabin, the cabin is divided into multiple loadable areas based on the height information of the steps and waist pockets. At the same time, considering that the height of the steps and the pulp is not in an equal proportion during the pulp stowage process, there will be a height difference of the pulp on the same layer. Each layer of the cabin is further segmented into multiple stowable areas based on the step dimensions and positions.
[0077] Furthermore, based on the above segmentation method, a ship is divided into a crane, a cabin, cabin layers, and stowable areas on each layer, and multiple classes are defined to save the input information:
[0078] class CRANEDTATA # Define the crane class to save the properties related to the crane
[0079] class CABIN # Define the cabin class to save the properties related to the cabin
[0080] class LAYER # Define the cabin layer class to save the properties related to the cabin layer
[0081] class LAYERTYPE # Define the possible segmentation methods of the cabin layer
[0082] class LA_COORD # Define the loadable area class to save the properties related to the loadable area
[0083] class TOP_OBSTACLE # Define the waist pocket class to save the properties related to the waist pocket
[0084] Based on the input information saved in the above classes, it is necessary to convert it into the dimensions of the loadable area required by the algorithm, pulp dimensions, and stowage red line information.
[0085] Furthermore, since the loadable areas within the areas that can be loaded are represented by the absolute coordinates of each key point (LASLP_XC_LIST, LASLP_YC_LIST), the absolute coordinate to relative coordinate algorithm is implemented through the function change_coordinate. Then, based on the relative coordinates, the length and width information of the loadable areas are obtained through the function get_stwoageCase. Finally, the size information of the loadable areas is obtained. The specific steps are as follows: By default, the original coordinate system is the center of the stern; the coordinate points in the absolute coordinates are converted into relative coordinate points to obtain the coordinates of the points to be converted; the coordinates of the relative coordinate origin in the original coordinate system are obtained, and it is judged whether they are opposite in the x and y directions of the original coordinates (regardless of whether the axes are converted), and then it is further determined whether the xy axes are exchanged; Based on the above relative coordinate information, the red line information of each loading area can be generated through the function get_redline. Finally, the red line information redlines is obtained. Further, all possible red lines are obtained, the directions of the lines are kept the same, and the overlapping parts with the cabin are confirmed as red lines. Taking the input of cabin number 6, the 3rd layer, the 4th segmentation method, and the fifth loadable area as an example, the algorithm identifies the loadable area as a rectangle, and returns the position coordinates and radius of the circular blind area, returns the size information of the loadable area, and returns the two-point coordinates of the red line respectively.
[0086] S2: Divide the pulp packages in the combined pulp package list into the first type of pulp packages to be loaded and the second type of pulp packages not loaded according to the loading order and assembly form, and determine the optimization strategy and penalty mechanism for the pulp package loading according to the target loading quantity, the full-load quantity of the loadable area, and the blind area information of the loadable area;
[0087] In an optional embodiment, the determining the optimization strategy and penalty mechanism for the pulp package loading according to the target loading quantity, the full-load quantity of the loadable area, and the blind area information of the loadable area includes:
[0088] S21: Determine whether the current loadable area for loading the pulp packages is a blind area. If there is no blind area and the target loading quantity falls within the preset interval of the full-load quantity, then sort the combined pulp package list according to the loading order, and adjust the quantities of different types of pulp packages one by one from top to bottom in the loadable area until the quantities of the same type of pulp packages are the same, and output the position information of the first type of pulp packages;
[0089] S22: If the target loading quantity of the pulp packages does not fall within the preset interval of the full-load quantity, or the loadable area for loading the pulp packages is a blind area, then limit the Y-axis distance between the adjacent sky lines input for the first type of pulp packages by a preset value. When the Y-axis distance between the adjacent sky lines in the sky line list generated by loading the first type of pulp packages exceeds the preset value, then take the square of the Y-axis distance as the penalty mechanism and add it to the optimization objective, and output the optimization score for the loading of the first type of pulp packages.
[0090] It should be noted that the idea of mixed loading of pulp packages is to first generate a list of combined pulp packages according to different pulp types, distinguish the segments of different pulp types in the list, load the first type of pulp package first during the loading process of the skyline algorithm, and then load the second type of pulp package. Each time a new first type of pulp package is loaded, it is judged whether the required number of the first type of pulp package is exceeded. If it is exceeded, this pulp package is discarded.
[0091] Furthermore, in order to make the upper surface relatively flat after loading the first type of pulp, two optimization strategies are provided. The first is to subtract a certain number from the single type of pulp that has been fully loaded to the required number of the first type of pulp. The second is not to directly load the second type of pulp after loading the first type of pulp, but to use cross and mutation optimization strategies to make the upper surface relatively flat and then fix the position of the first type of pulp. Only the second type of pulp is loaded subsequently for both optimization strategies, and cross and mutation only act on the second type of pulp. The selection method of the two optimization strategy algorithms is determined by the quantity of the first type of pulp and whether there is a blind area. If there is a blind area and the required quantity of the first type of pulp is less than 20% of the full load quantity or greater than 80% of the full load quantity, the second method is selected; otherwise, the first method is selected.
[0092] S3: Based on the optimization strategy and penalty mechanism, the first type of pulp package and the second type of pulp package are loaded into the loadable area by using the skyline algorithm, and an initial solution for mixed loading of the loadable area is generated through multiple constraint conditions;
[0093] It should be noted that the task objective is to given a list of combined pulp packages, load these first type of pulp packages and second type of pulp packages into the cabin in sequence, and output an initial solution for pulp package loading through the input list of combined pulp packages and cabin data, including the number, size, and position of the pulp packages loaded in each loading area.
[0094] Furthermore, the problem of the task objective is a three-dimensional bin packing problem. Since the pulp height and the cabin height are known, this problem can be regarded as a two-dimensional bin packing problem for solution first. The following algorithms can be used in the two-dimensional bin packing problem: shelf algorithm, guillotine algorithm, maximal rectangles algorithm, and skyline algorithm.
[0095] In an optional embodiment, the loading of the first type of pulp package and the second type of pulp package into the loadable area by using the skyline algorithm based on the optimization strategy and penalty mechanism to generate the initial solution for mixed loading of the loadable area includes:
[0096] S31: Transform the irregular area into a regular loading area including rectangles, stepped shapes, and trapezoids by defining the shape change of the loading area. Then, convert the three-dimensional packing task of the regular loading area into a two-dimensional packing task according to the obtained height of the first type of pulp bale, the height of the second type of pulp bale, and the height of the cabin. Optimize the area waste rate of the minimum loadable area of the pulp bale with the bottom-left algorithm as the goal.
[0097] S32: Generate a skyline list within the loadable area through the skyline algorithm. Divide the loadable area into a packed area and an unpacked area by the skyline. The skyline includes endpoint coordinates and skyline length. First, conduct the stowage of the first type of pulp bale, and then conduct the stowage of the second type of pulp bale.
[0098] S33: Based on the constraint conditions that are the minimum on the X-axis and Y-axis respectively for the skyline endpoint coordinates, allocate the pulp bales identified as rectangular boxes to the unpacked area segmented by the skyline. Cut the skyline by the rectangular box and generate a new skyline at the top of the rectangular box and add it to the skyline list. Merge the current skyline that cannot allocate the rectangular box with other skylines and then update the skyline list.
[0099] S34: Traverse the combined pulp bale list and sequentially read the first type of pulp bale and the second type of pulp bale in the loading order. Allocate the selected pulp bales to different skylines to calculate the wasted area. Obtain the combination of the selected pulp bale and the skyline with the minimum wasted area by traversing the skyline list. Based on the combination of the selected pulp bale and the skyline, load the pulp bales in the combined pulp bale sequence into the loadable area to generate a pulp bale loading list.
[0100] It should be noted that the Skyline algorithm is implemented by maintaining a list of horizontal segments (skyline segments), which consists of segments at the top of the entire area. A skyline segment is determined by two objects: the endpoint coordinates (x, y) on the left side of the segment and the segment length w. Below the skyline segment is the allocated space, and above is the unallocated space. Adopt the bottom-left heuristic method, that is, try to select the unallocated space with the minimum y-axis and also the minimum x-axis to stack the next rectangle. After the rectangle is placed on the skyline, the skyline where it is placed will be cut, that is, the skyline needs to be shortened according to the placement method of the rectangle, and the top edge of the rectangle is used as a new skyline and added to the list. When it is obvious that a rectangle cannot be placed on a skyline, the skyline needs to be merged. Specifically, the skyline is raised to the same height as other skylines, and then multiple skylines are combined into one. Loop through the above steps: select a skyline to place a rectangle, cut the skyline, and merge the skylines, then the skyline algorithm for rectangular packing can be realized.
[0101] Furthermore, to improve the stowage efficiency and the utilization rate of the loading area, a heuristic method of minimizing the wasted area is adopted. By calculating the wasted area generated when a pulp bale is placed on all skyline segments in the skyline list respectively, and selecting the skyline segment with the minimum wasted area to place the currently traversed pulp bale, the specific steps are as follows: Define the skyline segment class, which includes the x-coordinate of the left endpoint of the segment, the y-coordinate of the left endpoint of the segment, and the width of the segment; Define the combined pulp bale class, including the number of basic pulp bales in a row in the combined pulp bale, the number of basic pulp bales in a column in the combined pulp bale, the x-coordinate of the lower left corner point of the combined pulp bale, the y-coordinate of the lower left corner point of the combined pulp bale, the width and height of the combined pulp bale; What is calculated is the wasted area generated when the pulp bale is placed on each skyline segment. There is an outer loop to traverse each skyline segment, and based on the x-coordinate of the lower right corner point of the combined pulp bale and the x-coordinate of the lower left corner point of the combined pulp bale, traverse the skyline segment after the i-th (i traversal represents the selected skyline) skyline; If the skyline is already on the right side of the pulp bale and there is no contact with the pulp bale, no wasted area will be generated and neither will the subsequent skyline segments; If the skyline is on the left side of the pulp bale, there is also no contact with the pulp bale, and continue to traverse the next skyline segment; In the case where the pulp bale is above a skyline, calculate the product of the remaining width of this skyline and the height of the pulp bale. If the pulp bale is longer than the skyline segment, a wasted area will be generated below, and calculate the product of the height difference between the pulp and the skyline and the width by which the pulp bale extends.
[0102] In an optional embodiment, the generation of the initial mixed loading solution of the loadable area by multiple constraint conditions includes:
[0103] S35: Obtain the number of red lines according to the ship information and preset the touch limit times of the red lines. When stowing the pulp bales according to the pulp bale stowage list, judge according to the actual red line touch times and the touch limit times. If the red line touch times exceed the touch limit times, mutate the pulp bale into a pulp bale that does not touch the red line according to the pulp bale stowage list. If the pulp bale cannot be mutated, discard the current pulp bale and proceed with the stowage of the next pulp bale;
[0104] It should be noted that since the constraint objective of pulp stowage includes that the number of contacts between the pulp bale and the red line (i.e., the number of contacts between the short side of the pulp bale and the cabin bulkhead) does not exceed the preset number of times (preferably 10 times), a judgment is made when the pulp bale is placed. If the total red line touch times will be greater than the set number of times after putting in this pulp bale, then choose to discard this pulp bale or mutate it into other pulp bales that can meet the requirements, so as to ensure that the touch times with the red line always reach the given requirements.
[0105] S36: Obtain the working limit information of the ship's waist pit and the crane according to the ship information, and generate a ship obstacle avoidance blind area based on the working limit information. The ship obstacle avoidance blind area includes a circular blind area, an upper blind area, and a lower blind area;
[0106] It should be noted that in pulp stowage, due to the working limits of the ship's waist pit and the crane, some blind areas (including rectangular and circular blind areas) will be generated. When stowing in the blind area, it is required that the center of gravity of the pulp cannot be placed within the blind area. Therefore, an obstacle avoidance algorithm for the circular blind area, the blind area of the staircase stowage area, and the blind area of other shaped stowage areas is designed.
[0107] Furthermore, for the circular blind area generated by the crane, the center of gravity of the pulp bale is moved to the edge of the circular blind area to achieve obstacle avoidance. For the blind area of the staircase stowage area, it is regarded as the lower blind area. That is, when stowing in the staircase area, first load the blind area, and then load the remaining stowable space. At this time, if the center of gravity of the pulp bale falls within the blind area, the pulp bale is directly mutated into a larger pulp bale to avoid the blind area. For the blind area of other shaped stowage areas, it is regarded as the upper blind area, that is, the blind area is stowed last. For this situation, when stowing the area under the projection of the blind area, continuous judgment is carried out. If another pulp bale that can avoid the blind area can be placed above the currently stowed pulp bale, no operation is required; otherwise, the relationship between the currently stowed pulp bale and the blind area needs to be judged. If the center of gravity can avoid the blind area after the pulp bale is placed in the blind area, it is placed in the blind area; otherwise, consider whether the pulp bale can mutate into a larger-sized pulp bale that can avoid the blind area. If it can, a new pulp bale is stowed; otherwise, the current pulp bale is abandoned and the next pulp bale is continued to be probed.
[0108] S37: Traverse the pulp bale stowage list, calculate the distance between the center of the circular blind area and the center of gravity of the pulp bale. If the distance is greater than the radius of the blind area, return the pulp bale data to the pulp bale stowage list for calculation of the next pulp bale. If the distance is less than the radius of the blind area, calculate the intersection coordinates of the pulp bale and the circular blind area according to the height of the center of gravity of the pulp bale, and move the pulp bale to the edge of the circular blind area for obstacle avoidance, and return the moved pulp bale data to the pulp bale stowage list;
[0109] S38: Traverse the pulp bale stowage list, calculate the distance between the lower blind area and the center of gravity of the pulp bale. If the center of gravity of the pulp bale is not within the lower blind area and the pulp bale is not located in the projection of the lower blind area, return the pulp bale data to the pulp bale stowage list for calculation of the next pulp bale. If the center of gravity of the pulp bale is within the lower blind area, search the pulp bale stowage list to mutate the pulp bale into a mutated pulp bale with a height more than twice that of the lower blind area, and return the mutated pulp bale data to the pulp bale stowage list;
[0110] S39: Traverse the pulp package loading list, determine whether the next pulp package can be loaded above the currently loaded pulp package to avoid the upper blind area. If so, load the next pulp package. Otherwise, judge the positional relationship between the next pulp package and the upper blind area. When the center of gravity of the pulp package is far from the upper blind area, continue loading. When the center of gravity of the pulp package is within the upper blind area, mutate the pulp package into a larger pulp package until the center of gravity of the pulp package is far from the upper blind area, and return the pulp package data to the pulp package loading list;
[0111] S310: Confirm that all type-I pulp packages and type-II pulp packages in the combined pulp package list are stowed according to the pulp package loading list, and update the skyline list in real time when loading each pulp package, and output the initial mixed stowage solution of the pulp package stowage.
[0112] S4: Use the neighborhood search algorithm to perform crossover replacement and mutation optimization on the pulp packages of the initial mixed stowage solution, select the optimal solution in the process of solving the initial solution through the scoring function and comparison function of the neighborhood search algorithm, and output the optimal solution as the target mixed stowage solution;
[0113] It should be noted that after calculating through the optimized skyline algorithm described above, an initial solution can be generated, but this solution is often not the optimal solution, so optimization is required. Perform neighborhood operations on the initial solution to find the optimal solution. Specifically, neighborhood search is achieved by performing operations such as swapping and replacing the pulp packages in the combined pulp package sequence. An evaluation function is designed according to the task objective to score and compare the solution before the neighborhood operation and the solution after the neighborhood operation. If the latter is closer to the target, select it as the new basic solution. If the former is still closer to the target, maintain the original basic solution, and so on in a loop to find the optimal solution and output it as the target mixed stowage solution.
[0114] In an alternative embodiment, the step of using the neighborhood search algorithm to perform crossover replacement and mutation optimization on the pulp packages of the initial mixed stowage solution, selecting the optimal solution in the process of solving the initial solution through the scoring function and comparison function of the neighborhood search algorithm, and outputting the optimal solution as the target mixed stowage solution includes:
[0115] S41: Define a neighborhood search function according to the ship information and the initial mixed stowage solution, set the target number of loop optimizations for the initial solution, and update the pulp package loading list of the initial mixed stowage solution to optimize and iterate the initial mixed stowage solution through the neighborhood search function;
[0116] S42: Randomly cross-replace the positions of the pulp packages in the initial mixed stowage solution during the optimization iteration until the number of loop optimizations of the initial mixed stowage solution is less than one-third of the target number;
[0117] S43: When the number of loop optimizations of the initial mixed loading solution is between one-third and two-thirds of the target number, mutate and optimize the pulp packages according to the probability distribution function configured by the cabin type constraint to pulp packages of new sizes;
[0118] S44: When the number of loop optimizations of the initial mixed loading solution is between two-thirds of the target number and the maximum target number, use the uniform distribution random mutation method to mutate the pulp packages into new pulp packages with a uniform probability distribution, traverse the initial mixed loading solution until the neighborhood search operation for all pulp packages is completed, and output the list of mixed loading pulp packages of the optimal solution;
[0119] S45: Calculate the score of the loading plan of the mixed loading pulp packages in the loading area in the optimal solution through the scoring function, sort the loading plan scores according to the scoring priority of the comparison function, and select the pulp package loading plan with the highest score to update to the mixed loading target solution output after the neighborhood search operation.
[0120] It should be noted that by defining the neighborhood search function and updating the pulp package sequence, the neighborhood search function is def update_input(M, inputItems, new_list, epoch, max_epoch, isSpeCabin, type): where M is the BinManager class, inputItems is the list of combined pulp packages of basic pulp of various sizes, epoch is the current loop round (number of optimizations), max_epoch is the maximum loop round (number of optimizations), isSpeCabin flags whether it is the bow or stern cabin, type represents the type of the basic pulp currently loaded. Define the scoring function to include calculating the number of basic pulp packages loaded in the loading area, calculating the number of combined pulp packages loaded in the loading area, and calculating the number of times the pulp touches the cabin wall (red line). Define the comparison function to obtain the comparison result. The first item in the scoring list of the two sets of results is the result score after the current neighborhood operation, and the second item is the best result score currently. The scoring priority of the comparison function includes sorting according to the larger the number of basic pulp packages, the smaller the number of combined pulp packages, and the fewer the number of touches with the red line.
[0121] S5: Perform post-processing operations of identifying, adjusting, and filling the gaps in the loadable area on the mixed loading target solution, optimize the mixed loading target solution with the goal of maximizing the number of loaded pulp, and save it as the final mixed loading result;
[0122] It should be noted that after the target solution is loaded with pulp by the skyline algorithm, there will still be unloaded gap areas in the loadable area. Considering a post-processing strategy to identify the size of the gap area and determine whether the area can continue to be loaded with pulp. If it can be loaded, the largest possible pulp package is loaded in the gap area to maximize the number of loaded pulp. The type and position information of the pulp package for filling the gap are output based on the position information of each pulp load and the load area information after loading by the skyline algorithm.
[0123] In an optional embodiment, the post-processing operations of identifying, adjusting, and filling the gaps in the loadable area of the mixed loading target solution to optimize the target solution with the goal of maximizing the number of loaded pulp and saving it as the final loading result include:
[0124] S51: Obtain the position information of the pulp package loading and the load area information of the mixed loading target solution;
[0125] S52: Detect the gap area of the load area according to the post-processing strategy, divide the gap area into several rectangular blocks, and obtain the position information and size information of the rectangular blocks;
[0126] S53: Traverse the rectangular blocks, and merge the rectangular blocks into a gap rectangular block with the constraint that the area of the merged gap area is the largest, and obtain the position information and size information of the gap rectangular block;
[0127] S54: Determine the number of rows and columns of the gap pulp package combination without detecting the rationality of the pulp package combination according to the size of the gap rectangular block and the pulp package;
[0128] S55: Detect the rationality of the current gap pulp package combination. If it is reasonable, fill the gap pulp package into the gap rectangular block. If it is unreasonable, adjust the number of pulp packages in the rows and columns of the gap pulp package combination according to the quantity limit and row-column quantity limit of the gap pulp package combination until the detection result of the gap pulp package combination is legal and then fill it into the gap rectangular block, and output the type and position information of the pulp packages in the gap pulp package combination;
[0129] S56: Traverse all the gap rectangular blocks until the goal of maximizing the number of loaded pulp is optimized, and update the mixed loading target solution to the final mixed loading result for saving.
[0130] Further, first, detect the gap areas existing in the loadable area, identify and segment the gap areas into multiple rectangular blocks, obtain the size and position information of each rectangular block. At the same time, considering the situation that the obtained rectangular blocks may be merged into rectangular blocks with a larger area, traverse all the rectangular blocks and merge the mergable rectangular blocks to maximize the area of the rectangular blocks. Based on the obtained information of the gap rectangular blocks, without considering whether the combination method of the basic pulp packages is reasonable (meeting the legality constraints of pulp package stowage), determine the number of rows and columns of the basic pulp package combination based on the ratio of the length and width of the rectangular block to the length and width of the basic pulp package. Then, judge whether the type of the combined pulp package is reasonable. If it is reasonable, fill this type into the rectangular block. If it is illegal, consider that the reason for the illegality is that the number of basic pulp packages in a row or column exceeds the limit. Therefore, judge whether the number of rows or columns exceeds the limit, then halve the number of pulp packages in the row or column that exceeds the limit, and then detect the rationality. If it is illegal, halve it until the combined pulp package is reasonable.
[0131] S6: Traverse the loadable area until the stowage of all types of pulp packages is completed, and output the mixed stowage result file.
[0132] The present invention divides the pulp packages in the combined pulp package list into the first-class pulp packages to be loaded and the second-class pulp packages not to be loaded according to the loading order and assembly form, uses the skyline algorithm to stow the first-class pulp packages and the second-class pulp packages based on the optimization strategy and penalty mechanism. At the same time, the initial solution is further optimized through neighborhood search and gap filling post-processing operations to generate the optimal mixed stowage solution, accurately realizing the flat stacking of single-type pulp in the mixed pulp packages, ensuring the rationality of the mixed stowage result, and also meeting the multi-constraint problems that need to be considered in the actual stowage process, improving the rationality, economy and safety of the output stowage result, and providing an effective solution for the stowage of pulp ships.
[0133] As Figure 2 shown, the second aspect of the present invention discloses a pulp ship mixed stowage system based on an optimization strategy and a penalty mechanism. The system includes:
[0134] A stowage list generation module, which is used to obtain the basic information of the pulp packages and determine the target stowage quantity of different types of pulp packages, divide the ship's cabin into multiple loadable areas according to the ship information, generate a combined pulp package list according to different types of pulp packages, the combined pulp package list is segmented according to the pulp package type, and obtain the loading order and loading form of the pulp packages loaded in the loadable area;
[0135] A mixed stowage rule module, which is used to divide the pulp packages in the combined pulp package list into the first-class pulp packages to be loaded and the second-class pulp packages not to be loaded according to the loading order and assembly form, and determine the optimization strategy and penalty mechanism for the pulp package stowage according to the target stowage quantity, the full-load quantity of the loadable area and the blind area information of the loadable area;
[0136] The mixed loading solution module is used to load the first type of pulp packages and the second type of pulp packages into the loadable area by using the skyline algorithm based on the optimization strategy and the penalty mechanism, and generate the initial solution of the mixed loading in the loadable area through multiple constraint conditions;
[0137] The mixed loading optimization module is used to perform cross-replacement and mutation optimization on the pulp packages of the initial solution of the mixed loading by using the neighborhood search algorithm, select the optimal solution in the process of solving the initial solution through the scoring function and the comparison function of the neighborhood search algorithm, and output the optimal solution as the target solution of the mixed loading;
[0138] The post-processing module for mixed loading is used to perform post-processing operations of identifying, adjusting, and filling the gaps in the loadable area on the target solution of the mixed loading, optimize the target solution of the mixed loading to maximize the number of loaded pulp, and save it as the final mixed loading result;
[0139] The mixed loading output module is used to traverse the loadable area until the loading of all types of pulp packages is completed, and output the mixed loading result file.
[0140] The third aspect of the present invention discloses a pulp ship mixed loading device based on an optimization strategy and a penalty mechanism, including:
[0141] At least one processor, and,
[0142] A memory communicatively connected to the at least one processor; wherein,
[0143] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the pulp ship mixed loading method according to any one of the first aspect of the present invention.
[0144] This computer device may be a terminal, and this computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of this computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements the pulp ship mixed loading method. The display screen of this computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device may be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0145] The fourth aspect of the present invention discloses a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the pulp ship mixed loading method based on an optimization strategy and a penalty mechanism as described in any one of the first aspect of the present invention.
[0146] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above embodiments of the pulp ship mixed loading method based on an optimization strategy and a penalty mechanism. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0147] Alternatively, if the above modules of the present invention are implemented in the form of software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the embodiments of the present invention, in essence, or the parts that contribute to the related technologies can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the methods of the various embodiments of the present invention. The aforementioned storage medium includes: various media such as a removable storage device, RAM, ROM, a magnetic disk, or an optical disc that can store program codes.
[0148] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A pulp ship mixed loading method based on optimization strategy and penalty mechanism, characterized in that: The method comprises: S1: Obtain basic information of pulp bales and determine the target loading quantity of pulp bales of different types, divide the cabin into multiple loading areas according to the ship information, generate a combined pulp bale list according to different types of pulp bales, and divide the combined pulp bale list into sections according to the types of pulp bales, and obtain the loading order and loading form of the pulp bales loaded in the loading areas; S2: According to the loading order and assembly form, the pulp bales in the combined pulp bale list are divided into Class I pulp bales that should be loaded and Class II pulp bales that are not loaded, and the optimization strategy and penalty mechanism of pulp bale loading are determined according to the target loading quantity, the full load quantity of the loading area, and the blind area information of the loading area; S3: Based on the optimization strategy and penalty mechanism, the first-class pulp bales and the second-class pulp bales are loaded into the loading area by using the skyline algorithm, and the mixed loading initial solution of the loading area is generated by multiple constraints; S4: using a neighborhood search algorithm to perform cross-replacement and mutation optimization on the pulp bales of the mixed initial solution, selecting the optimal solution of the initial solution solving process through the scoring function and comparison function of the neighborhood search algorithm, and outputting the optimal solution as the mixed target solution; S5: performing post-processing operations of identifying, adjusting, and filling gaps in the loading area on the mixed loading target solution, so as to optimize the mixed loading target solution with the goal of maximizing the amount of loaded pulp and save it as the final mixed loading result; S6: traversing the loadable area until all types of pulp bales are loaded, and outputting a mixed loading result file; The step of using a skyline algorithm to load the first-class pulp bales and the second-class pulp bales into the loadable area based on the optimization strategy and the penalty mechanism to generate an initial mixed loading solution for the loadable area includes: S31: The irregular area is transformed into a regular loading area including a rectangle, a step shape and a trapezoid by defining the shape change of the loading area, and then the three-dimensional packing task of the regular loading area is transformed into a two-dimensional packing task according to the obtained height of the first type of pulp bales, the height of the second type of pulp bales and the cabin height, and the pulp bales are optimized by the bottom-left algorithm with the goal of minimizing the area waste rate of the loading area; S32: Generate a skyline list in the loadable area by using a skyline algorithm, divide the loadable area into a packed area and an unpacked area by using the skyline, wherein the skyline includes endpoint coordinates and a skyline length, and firstly load the first type of pulp bales, and then load the second type of pulp bales; S33: based on the constraint condition that the coordinates of the skyline endpoints are the smallest on the X-axis and the Y-axis respectively, the pulp bales identified as rectangular boxes are allocated to the unboxed areas of the skyline segmentation, the skyline is cut by the rectangular box and a new skyline is generated at the top of the rectangular box and added to the skyline list, and the current skyline that cannot be allocated with a rectangular box is merged with other skylines and the skyline list is updated; S34: traversing the combined pulp package list and sequentially reading the first-class pulp packages and the second-class pulp packages in the loading order, allocating the selected pulp packages to different skylines to calculate the wasted areas, obtaining the selected pulp packages and skyline combinations with the smallest wasted areas by traversing the skyline list, and packing the pulp packages in the combined pulp package sequence into the loadable area based on the selected pulp packages and the skyline combination to generate a pulp package loading list; The generating of the mixed loading initial solution of the loadable area by multiple constraints comprises: S35: obtaining the number of red lines according to the ship information and presetting the red line touching limit times, and making a judgment according to the actual red line touching times and the touching limit times when stowing the pulp bale through the pulp bale loading list; if the red line touching times exceed the touching limit times, the pulp bale is mutated into a pulp bale that does not touch the red line according to the pulp bale loading list; if the pulp bale cannot be mutated, the current pulp bale is discarded and the next pulp bale is stowed; S36: Acquire work restriction information of the ship's waist and crane through the ship information, and generate a ship obstacle avoidance blind area according to the work restriction information, wherein the ship obstacle avoidance blind area includes a circular blind area, an upper blind area, and a lower blind area; S37: traverse the pulp package list, calculate the distance between the center of the circular blind area and the center of gravity of the pulp package, if the distance is greater than the radius of the blind area, return the pulp package data to the pulp package list to calculate the next pulp package, if the distance is less than the radius of the blind area, calculate the intersection coordinates of the pulp package and the circular blind area according to the center of gravity height of the pulp package, move the pulp package to the edge of the circular blind area according to the intersection coordinates to avoid obstacles, and return the moved pulp package data to the pulp package list; S38: traverse the pulp package loading list, calculate the distance between the lower blind area and the center of gravity of the pulp package, if the center of gravity of the pulp package is not in the lower blind area and the pulp package is not located in the projection of the lower blind area, return the pulp package data to the pulp package loading list to calculate the next pulp package, if the center of gravity of the pulp package is in the lower blind area, search the pulp package loading list to mutate the pulp package into a mutant pulp package with a height more than twice that of the lower blind area, and return the mutant pulp package data to the pulp package loading list; S39: traverse the pulp package loading list, determine whether the next pulp package can be loaded above the currently loaded pulp package to avoid the upper blind area, if yes, load the next pulp package, if not, determine the positional relationship between the next pulp package and the upper blind area, continue loading when the center of gravity of the pulp package is far away from the upper blind area, and when the center of gravity of the pulp package is within the upper blind area, mutate the pulp package into a larger pulp package until the center of gravity of the pulp package is far away from the upper blind area, and return the pulp package data to the pulp package loading list; S310: confirming that all the first-class pulp bales and second-class pulp bales in the combined pulp bale list have completed loading according to the pulp bale loading list, and updating the skyline list in real time when loading each pulp bale, and outputting the mixed loading initial solution of the pulp bale loading.
2. The pulp ship mixed loading method based on optimization strategy and penalty mechanism according to claim 1 is characterized in that: The method of dividing the cabin into a plurality of loading areas according to the ship information comprises: S11: Divide the ship into a crane area, a cabin area, a cabin layer area and a cabin layer loadable area; S12: defining information classes of ship segmentation areas respectively, and storing corresponding area information in the information classes; S13: Obtaining absolute coordinates according to key points of the loadable area, setting a coordinate system center at the center of the stern, and converting the coordinate points of the absolute coordinates into relative coordinate points by using a coordinate conversion tool; S14: Identify the assembly area as a rectangular area through a segmentation algorithm, obtain the ship red line information according to the relative coordinate points and return the blind spot position coordinates, blind spot radius, size information of the loading area, pulp size information, and red line information including the coordinates of two red line points.
3. The pulp ship mixed loading method based on optimization strategy and penalty mechanism according to claim 1 is characterized in that: The optimization strategy and penalty mechanism for determining pulp bale loading according to the target loading quantity, the full loading quantity of the loading area, and the blind area information of the loading area include: S21: Determine whether the current loading area for loading pulp bales is a blind area. If there is no blind area and the target loading quantity falls within the preset range of the full load quantity, sort the combined pulp bale list in loading order, adjust the quantity of different types of pulp bales from top to bottom in the loading area until the quantity of pulp bales of the same type is the same, and output the position information of pulp bales of one type; S22: If the target loading quantity of pulp bales does not fall within the preset interval of the full load quantity, or the loading area of the pulp bales is a blind spot, the Y-axis distance of adjacent skylines input for a type of pulp bales is limited by a preset value, and when the Y-axis distance of adjacent skylines in the skyline list generated by loading a type of pulp bales exceeds the preset value, the square of the Y-axis distance is added to the optimization target as a penalty mechanism, and the optimization score of the loading of a type of pulp bales is output.
4. The pulp ship mixed loading method based on optimization strategy and penalty mechanism according to claim 1 is characterized in that: The method of using a neighborhood search algorithm to perform cross-replacement and mutation optimization on the pulp bales of the mixed initial solution, selecting the optimal solution of the initial solution solving process through the scoring function and comparison function of the neighborhood search algorithm, and outputting the optimal solution as the mixed target solution includes: S41: defining a neighborhood search function according to the ship information and the mixed loading initial solution, setting a target number of loop optimization of the initial solution, updating the pulp package loading list of the mixed loading initial solution, and optimizing and iterating the mixed loading initial solution through the neighborhood search function; S42: in the optimization iteration process, the pulp bale positions of the mixed initial solution are cross-replaced in random order until the number of cyclic optimization times of the mixed initial solution is less than one third of the target number; S43: when the number of cyclic optimizations of the mixed loading initial solution is between one third and two thirds of the target number, optimizing the variation of the pulp bale to a pulp bale of a new size according to the probability distribution function of the cabin type constraint configuration; S44: when the number of cyclic optimizations of the mixed initial solution is between two-thirds of the target number and the maximum target number, a uniform distribution random mutation method is used to mutate the pulp package into a new pulp package with a uniform probability distribution, the mixed initial solution is traversed until the neighborhood search operation of all pulp packages is completed, and a mixed pulp package list of the optimal solution is output; S45: Calculate the score of the mixed pulp bale loading scheme in the loading area in the optimal solution through the scoring function, sort the loading scheme scores according to the scoring priority of the comparison function, select the pulp bale loading scheme with the highest score and update it as the mixed loading target solution output after the neighborhood search operation.
5. The pulp ship mixed loading method based on optimization strategy and penalty mechanism according to claim 1 is characterized in that: The post-processing operation of identifying, adjusting, and filling the gaps in the loading area of the mixed loading target solution to optimize the target solution with the goal of maximizing the amount of loaded pulp and save it as the final loading result includes: S51: Acquire pulp package loading position information and loading area information of the mixed loading target solution; S52: Detecting the gap area of the loading area according to the post-processing strategy, dividing the gap area into a number of rectangular blocks and obtaining position information and size information of the rectangular blocks; S53: traversing the rectangular blocks, merging the rectangular blocks into gap rectangular blocks with the maximum gap area of the merged rectangular blocks as a constraint, and acquiring position information and size information of the gap rectangular blocks; S54: determining the number of rows and columns of the gap pulp bale combination according to the sizes of the gap rectangular blocks and the pulp bales without detecting the rationality of the pulp bale combination; S55: Detecting the rationality of the current gap pulp package combination. If it is reasonable, fill the gap pulp package in the gap rectangular block. If it is unreasonable, adjust the number of pulp packages in the rows and columns of the gap pulp package combination according to the number limit of the gap pulp package combination and the number limit of the rows and columns, until the gap pulp package combination is tested to be legal and then filled in the gap rectangular block, and output the pulp package type and position information of the gap pulp package combination; S56: Traverse all the gap rectangular blocks until the target optimization of maximizing the amount of loaded pulp is completed, and the mixed loading target solution is updated to the final mixed loading result for storage.
6. A pulp ship mixed loading system based on optimization strategy and penalty mechanism, characterized in that: The system comprises: A loading list generation module is used to obtain basic information of pulp bales and determine the target loading quantity of pulp bales of different types, divide the cabin into multiple loading areas according to the ship information, generate a combined pulp bale list according to different types of pulp bales, and divide the combined pulp bale list into sections according to the types of pulp bales to obtain the loading order and loading form of the pulp bales loaded in the loading areas; The mixed loading rule module is used to classify the pulp bales in the combined pulp bale list into the first type of pulp bales that should be loaded and the second type of pulp bales that are not loaded according to the loading sequence and assembly form, and determine the optimization strategy and penalty mechanism for pulp bale loading according to the target loading quantity, the full load quantity of the loadable area, and the blind area information of the loadable area; A mixed loading solution module is used to load the first-class pulp bales and the second-class pulp bales into the loadable area by using a skyline algorithm based on an optimization strategy and a penalty mechanism, and to generate an initial mixed loading solution for the loadable area by using multiple constraints; A mixed loading optimization module, used to perform cross replacement and variation optimization on the pulp bales of the mixed loading initial solution by using a neighborhood search algorithm, select the optimal solution of the initial solution solving process by using the scoring function and comparison function of the neighborhood search algorithm, and output the optimal solution as the mixed loading target solution; A mixed loading post-processing module is used to perform post-processing operations such as identifying, adjusting, and filling gaps in the loading area on the mixed loading target solution, so as to optimize the mixed loading target solution with the goal of maximizing the amount of loaded pulp and save it as the final mixed loading result; A mixed loading output module, used for traversing the loadable area until all types of pulp bales are loaded, and outputting a mixed loading result file; The step of using a skyline algorithm to load the first-class pulp bales and the second-class pulp bales into the loadable area based on the optimization strategy and the penalty mechanism to generate an initial mixed loading solution for the loadable area includes: By defining the shape change of the loading area, the irregular area is transformed into a regular loading area including a rectangle, a step shape and a trapezoid. Then, according to the obtained height of the first type of pulp bales, the height of the second type of pulp bales and the cabin height, the three-dimensional packing task of the regular loading area is transformed into a two-dimensional packing task. The pulp bales are optimized with the goal of minimizing the area waste rate of the loadable area through the bottom-left algorithm. A skyline list is generated in the loadable area through the skyline algorithm. The loadable area is divided into a packed area and an unpacked area through the skyline. The skyline includes the endpoint coordinates and the skyline length. The first type of pulp bales are loaded first, and then the second type of pulp bales are loaded. Based on the skyline endpoint coordinates, the loading area is divided into a packed area and an unpacked area. According to the minimum constraint conditions on the X-axis and Y-axis, the pulp packages identified as rectangular boxes are allocated to the unpacked area segmented by the skyline, the skyline is cut by the rectangular box and a new skyline is generated on the top of the rectangular box and added to the skyline list, and the current skyline that cannot be allocated with a rectangular box is merged with other skylines to update the skyline list; the combined pulp package list is traversed to read the first-class pulp packages and the second-class pulp packages in the loading order in turn, and the selected pulp packages are allocated to different skylines to calculate the wasted area, and the selected pulp packages and skyline combinations with the smallest wasted area are obtained by traversing the skyline list, and the pulp packages in the combined pulp package sequence are placed in the loadable area based on the selected pulp packages and skyline combinations to generate a pulp package loading list; The generating of the mixed loading initial solution of the loadable area by multiple constraints comprises: The number of red lines is obtained according to the ship information and the red line touch limit times are preset. When loading the pulp package through the pulp package loading list, the actual number of red line touches and the touch limit times are judged. If the red line touches exceed the touch limit times, the pulp package is mutated into a pulp package that does not touch the red line according to the pulp package loading list. If the pulp package cannot be mutated, the current pulp package is discarded and the next pulp package is loaded. The working restriction information of the ship's waist and crane is obtained through the ship information, and the ship obstacle avoidance blind area is generated according to the working restriction information. The ship obstacle avoidance blind area includes a circular blind area, an upper blind area, and a lower blind area; the pulp package loading list is traversed to calculate the distance between the center of the circular blind area and the center of gravity of the pulp package; if the distance is greater than the radius of the blind area, the pulp package data is returned to the pulp package loading list to calculate the next pulp package; if the distance is less than the radius of the blind area, the intersection coordinates of the pulp package and the circular blind area are calculated according to the center of gravity height of the pulp package, and the pulp package is moved to the edge of the circular blind area according to the intersection coordinates for obstacle avoidance, and the moved pulp package data is returned to the pulp package loading list; the pulp package is traversed Loading list, calculate the distance between the lower blind area and the center of gravity of the pulp package. If the center of gravity of the pulp package is not in the lower blind area and the pulp package is not located in the projection of the lower blind area, return the pulp package data to the pulp package loading list to calculate the next pulp package. If the center of gravity of the pulp package is in the lower blind area, search the pulp package loading list to mutate the pulp package into a mutant pulp package with a height of more than twice the lower blind area, and return the mutant pulp package data to the pulp package loading list; traverse the pulp package loading list to determine whether the next pulp package can be loaded above the currently loaded pulp package to avoid the upper blind area , if it is possible, then load the next pulp bale; if not, determine the positional relationship between the next pulp bale and the upper blind area; when the center of gravity of the pulp bale is far away from the upper blind area, continue loading; when the center of gravity of the pulp bale is within the upper blind area, mutate the pulp bale into a larger pulp bale until the center of gravity of the pulp bale is far away from the upper blind area, and return the pulp bale data to the pulp package loading list; confirm that all the first-class pulp bales and second-class pulp bales in the combined pulp package list have completed the loading according to the pulp package loading list, and update the skyline list in real time when loading each pulp bale, and output the mixed loading initial solution of the pulp package loading.
7. A pulp ship mixing equipment based on optimization strategy and penalty mechanism, characterized in that: include: at least one processor, and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the pulp ship mixing method based on optimization strategy and penalty mechanism as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the pulp ship mixed loading method based on optimization strategy and penalty mechanism as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Stowage optimization method, system and equipment based on single-layer stowage algorithm and medium
CN115796400A
Automatic stowage optimization method and equipment for pulp ship and medium
CN115965165A