Truck loading method and device, electronic equipment and storage medium
By preprocessing the order data and optimizing the greedy algorithm of space cutting, the loading plan with the optimal loading rate is generated, which solves the loading problem of unfixed vehicle combinations and realizes the generation of efficient and accurate loading plans for intelligent loading.
Patent Information
- Application Number
- CN202310231978.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-08
- Publication Date
- 2024-09-10
AI Technical Summary
The existing intelligent vehicle loading solutions cannot effectively solve the order situation of large-scale packaging and unstable vehicle combinations, and still need to rely on manual experience.
By preprocessing the order data, a transportation vehicle plan is generated, and the greedy algorithm of space cutting is used for parallel packing to optimize the placement of products in the vehicle and achieve a loading plan with the optimal loading rate.
It realizes the generation of intelligent loading solutions for different vehicle combinations, improves loading efficiency and accuracy, and reduces reliance on manual experience.
Smart Images

Figure CN118627983A
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of logistics technology, and in particular to a loading method and device, electronic equipment, and storage medium. Background Art
[0002] In the logistics scheduling scenario, the steps of allocating products of different orders to different vehicles and packing the products currently rely mainly on manpower. Usually, when allocating products manually, it is necessary to consider the order, position and orientation of the products in the vehicle, as well as the loading rate of the vehicle, etc. Therefore, it is highly dependent on manual experience.
[0003] In the process of implementing the embodiments of the present invention, the inventors found that there are at least the following problems in the above-mentioned related technologies: the existing intelligent loading solutions usually only consider fixed vehicle combinations, or only involve loading products on a single vehicle. There is currently no solution for large-scale packaging and orders with unstable vehicle combinations in actual logistics scenarios, and it is still necessary to rely on manual experience. Summary of the invention
[0004] The embodiments of the present application provide a loading method and device, an electronic device, and a storage medium, which can solve the problem of large-scale loading of products when the vehicle combination is not fixed.
[0005] The purpose of the embodiment of the present invention is achieved through the following technical solutions:
[0006] To solve the above technical problems, in the first aspect, an embodiment of the present invention provides a loading method, comprising: preprocessing order data; generating a number of transport vehicle plans according to the preprocessed order data and the vehicle loading rate requirements; pre-allocating each product to each vehicle of each transport vehicle plan to obtain products that can be loaded into the same vehicle in each transport vehicle plan; for products that can be loaded into the same vehicle, parallel packing based on a greedy algorithm of space cutting to obtain loading plans for each product in each vehicle of each transport vehicle plan; and outputting a transport vehicle plan and a loading plan with the optimal loading rate.
[0007] In some embodiments, the preprocessing of the order data includes: determining product information and transportation information of each product based on the order data, wherein the product information includes product type, quantity, volume, weight, and constraints, and the transportation information includes shipping location, carrier, and date; based on the product information and the transportation information, merging products of the same type to determine products that can be classified into the same category.
[0008] In some embodiments, the method generates several transport vehicle plans based on the preprocessed order data and the vehicle loading rate requirements, including: establishing a mathematical model based on the product information of each product and the vehicle information of each vehicle, wherein the vehicle information includes the type and quantity of the vehicle; setting a theoretical loading rate threshold; and solving based on the mathematical model and the theoretical loading rate threshold by a linear programming solver to obtain several transport vehicle plans.
[0009] In some embodiments, the pre-allocation of each product to each vehicle of each transport vehicle scheme to obtain products that can be loaded into the same vehicle in each transport vehicle scheme includes: setting a neighborhood structure based on vehicle information of each vehicle in each transport vehicle scheme and placement constraints for each product, wherein the vehicle information also includes the model of the vehicle and the number of vehicles of the same model, and the placement constraints for each product include the placement method of the product; initializing the solution set and neighborhood of the variable neighborhood search algorithm, wherein each solution in the solution set corresponds to a loading scheme, and each neighborhood corresponds to a product placement position search space and a product placement method search space; based on the neighborhood structure, performing a neighborhood search on each solution in the solution set by a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transport vehicle scheme.
[0010] In some embodiments, the solution set and neighborhood of the initial variable neighborhood search algorithm include: setting the maximum number of iterations, the number of neighborhoods, and the maximum number of neighborhood local searches; based on heuristic rules and theoretical loading rate thresholds, generating an initial solution set and marking the optimal solution in the initial solution set as the current optimal solution.
[0011] In some embodiments, based on the neighborhood structure, a neighborhood search is performed on each solution in the solution set through a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transport vehicle solution, including: based on the neighborhood structure, local searches are performed in the neighborhood for each solution in the initial solution set in turn to obtain feasible solutions corresponding to each solution; judging whether the feasible solution is better than the current optimal solution; if it is not better than the current optimal solution, continuing to perform local searches in the neighborhood until the number of local searches reaches the maximum number of neighborhood local searches or the feasible solution is better than the current optimal solution; if it is better than the current optimal solution, replacing the current optimal solution in the initial solution set with the feasible solution, and continuing to perform neighborhood searches on each solution in the initial solution set until the number of searches for all solutions in the initial solution set reaches the maximum number of iterations.
[0012] In some embodiments, for products that can be loaded into the same vehicle, the greedy algorithm based on space cutting is used for parallel packing to obtain the loading scheme of each product in each vehicle of each transportation vehicle scheme, including: obtaining product information and product constraints of products that can be loaded into the same vehicle, as well as vehicle information of the vehicle; based on the product information, generating a block list, wherein the block list includes simple blocks and composite blocks, wherein the simple blocks correspond to blocks spliced together from the same type of products, and the composite blocks are simple blocks of different types of products; initializing a space stack, wherein the space stack includes spaces where blocks are placed and remaining spaces where no blocks are placed. If there is, the storage space of the entire vehicle is used as the initial remaining space stack; after placing the feasible blocks that meet the product constraints in the block list into the remaining space stack, the remaining space stack is cut, and the new space not occupied by the blocks after cutting is used as the new remaining space stack; determine whether the remaining space stack is empty; if not, continue to place other feasible blocks that meet the product constraints in the block list into the new remaining space stack, and continue to cut the new remaining space stack until the remaining space stack is empty; if so, save the product information and location information corresponding to all the placed blocks as a loading plan.
[0013] To solve the above technical problems, in a second aspect, a loading device is provided in an embodiment of the present invention, including: a preprocessing module for preprocessing order data; a vehicle allocation module for generating a number of transport vehicle schemes according to the preprocessed order data and the vehicle loading rate requirements; a product allocation module for pre-allocating each product to each vehicle of each transport vehicle scheme, so as to obtain products that can be loaded into the same vehicle in each transport vehicle scheme; a loading module for parallel packing of products that can be loaded into the same vehicle based on a greedy algorithm of space cutting, so as to obtain a loading scheme for each product in each vehicle of each transport vehicle scheme; an output module for outputting a transport vehicle scheme and a loading scheme with an optimal loading rate.
[0014] To solve the above technical problems, in the third aspect, an embodiment of the present invention provides an electronic device, comprising: 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 method described in the first aspect above.
[0015] To solve the above technical problems, in a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described in the first aspect above.
[0016] Compared with the prior art, the beneficial effects of the present invention are as follows: Different from the prior art, an embodiment of the present invention provides a loading method and device, an electronic device, and a storage medium. The loading method first preprocesses the order data, and then generates several transport vehicle plans according to the preprocessed order data and the vehicle loading rate requirements, and then pre-allocates each product to each vehicle of each transport vehicle plan to obtain products that can be loaded into the same vehicle in each transport vehicle plan, and then for the products that can be loaded into the same vehicle, a greedy algorithm based on space cutting is used for parallel packing to obtain loading plans for each product in each vehicle of each transport vehicle plan, and finally outputs the transport vehicle plan and loading plan with the optimal loading rate. The loading method provided in the embodiment of the present invention can provide different loading plans for different vehicle combinations, and output the optimal transportation plan, so as to realize the generation of intelligent loading plans for large-scale orders. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise specified, the figures in the drawings do not constitute proportional limitations.
[0018] Figure 1 It is a schematic flow chart of a loading method provided by an embodiment of the present invention;
[0019] Figure 2 yes Figure 1 A schematic diagram of a sub-process of step S200 in the vehicle loading method shown;
[0020] Figure 3 yes Figure 1 A schematic diagram of a sub-process of step S300 in the vehicle loading method shown;
[0021] Figure 4 yes Figure 3 A schematic diagram of a sub-process of step S330 in the vehicle loading method shown;
[0022] Figure 5 yes Figure 1 A schematic diagram of a sub-process of step S400 in the vehicle loading method shown;
[0023] Figure 6 is a structural block diagram of a vehicle loading device provided by an embodiment of the present invention;
[0024] Figure 7 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements may be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0026] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail 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 used to limit the present application.
[0027] It should be noted that, if there is no conflict, the various features in the embodiments of the present invention can be combined with each other, and all are within the scope of protection of this application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart.
[0028] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0029] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0030] In order to solve the problem that large-scale loading orders in actual logistics scenarios cannot be loaded intelligently, a loading method and device, an electronic device, and a storage medium are provided in an embodiment of the present invention. The loading method can provide a transport vehicle solution with different vehicle combinations and meeting the loading rate requirements according to the order data, and provide a corresponding plurality of loading solutions for each transport vehicle solution, and can output the transport vehicle solution and loading solution with the optimal loading rate, thereby realizing the generation of intelligent loading solutions for large-scale orders.
[0031] Specifically, the embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0032] The embodiment of the present invention provides a loading method, see Figure 1 , which shows the process of a loading method provided by an embodiment of the present invention, the loading method includes but is not limited to the following steps:
[0033] Step S100: pre-processing order data;
[0034] In an embodiment of the present invention, it is first necessary to pre-process the order data to obtain the information of each product in the order and the transportation requirements for each product, and then classify each product to reduce the complexity of the loading scale and improve the algorithm's solution speed. Specifically, according to the order data, the product information and transportation information of each product are determined, wherein the product information includes the type, quantity, volume, weight, and constraints of the product, and the transportation information includes the shipping location, carrier, and date; based on the product information and the transportation information, the same type of products are merged to determine the products that can be classified into the same category, thereby reducing the scale of product packaging quantity. Among them, the constraints on the products are mainly constraints on the placement of the products. For example, for some fragile products or products that are easily deformed or cannot be squeezed, there are special requirements for the placement direction and placement position, that is, constraints on the products. The same category of products may refer to the same products or products of the same type or products with the same constraints, etc., which can be set according to actual needs. When merging products, the products are combined or stacked in pairs in the same way to synthesize a new product. When loading the products subsequently, the merged new product can be simulated as a whole.
[0035] Step S200: generating a number of transport vehicle solutions according to the pre-processed order data and the vehicle loading rate requirements;
[0036] In the embodiment of the present invention, after obtaining product information and transportation information, various transportation vehicle solutions can be generated in combination with vehicle information and transportation requirements. Each transportation vehicle solution corresponds to a different vehicle combination, and each transportation solution can meet the requirements for vehicle loading rate. Figure 2 , which shows Figure 1 A sub-process of step S200 in the loading method shown, wherein a plurality of transport vehicle solutions are generated according to the pre-processed order data and the vehicle loading rate requirements, includes:
[0037] Step S210: establishing a mathematical model according to the product information of each product and the vehicle information of each vehicle, wherein the vehicle information includes the type and quantity of the vehicle;
[0038] First, based on the product information, the volume and weight of each product can be obtained, so as to determine the total volume and total weight of all products. Based on the total volume and total weight of the products, a relevant mathematical model can be established to achieve the solution. The specific mathematical model can be set as follows:
[0039]
[0040]
[0041]
[0042] 0≤x i ≤M i ,i∈N (4)
[0043] Wherein, formula (1) indicates that the total volume of the vehicle in the loading plan is minimized, formula (2) indicates that the total volume of the order accounts for 70%-90% of the total volume of the vehicle, formula (3) indicates the vehicle load limit, formula (4) indicates that the number xi of vehicle type i shall not exceed its maximum available number Mi, N indicates the set of vehicle types, vi indicates the available volume of vehicle type i, V indicates the total volume of the products in the order, wi indicates the weight limit of vehicle type i, and W indicates the total weight of the products in the order.
[0044] Step S220: setting a theoretical loading rate threshold;
[0045] Next, a theoretical loading rate threshold needs to be set as a limit to avoid using too many vehicles for loading without limit. The loading rate of each vehicle or all vehicles as a whole is limited within the theoretical loading rate threshold, which can ensure that all products can be loaded while ensuring that the loading cost is not too high. The theoretical loading rate threshold can be set according to actual needs, for example, set to 90%.
[0046] Step S230: Based on the mathematical model and the theoretical loading rate threshold, a linear programming solver is used to obtain a plurality of transport vehicle solutions.
[0047] After determining the data model and the theoretical loading rate threshold, combined with the vehicle information of the existing vehicles, the transport vehicle plan that meets the constraints in step S210 and step S220 can be solved by the cp l ex linear programming solver. It should be noted that in step S210 and step S220, only the total volume of the vehicle, the volume ratio of the product to the vehicle, the vehicle's load limit, the number of vehicles, and the vehicle's loading rate are constrained. In actual use, other constraints may be added or some of the constraints may be reduced. The mathematical model may be set accordingly according to actual needs.
[0048] Step S300: pre-allocate each product to each vehicle of each transport vehicle solution to obtain products that can be loaded into the same vehicle in each transport vehicle solution;
[0049] After multiple transport vehicle solutions are obtained in step S200, there are also multiple situations for the products that can be loaded into each vehicle in each transport vehicle solution. Therefore, it is necessary to pre-allocate the products and allocate each product to different vehicles in the same transport vehicle solution to improve the loading rate of the products. For details, please refer to Figure 3 , which shows Figure 1A sub-process of step S300 in the loading method shown, wherein the pre-allocation of each product to each vehicle of each transport vehicle solution to obtain products that can be loaded into the same vehicle in each transport vehicle solution, includes:
[0050] Step S310: setting a neighborhood structure based on the vehicle information of each vehicle in each transport vehicle scheme and the placement constraints of each product, wherein the vehicle information also includes the model of the vehicle and the number of vehicles of the same model, and the placement constraints of each product include the placement method of the product;
[0051] The embodiment of the present invention adopts the variable neighborhood search algorithm (VNS) to realize the pre-allocation of products. Therefore, for the initial setting of the algorithm, first, a three-layer coding method is adopted. The first layer represents the vehicle model where the product is to be placed, the second layer represents the vehicle number under the same model, and the third layer represents the placement method of the product. After the pre-allocation is completed, the vehicle model where each product is placed and which vehicle among all vehicles of the model it is, as well as the method in the vehicle can be determined based on the coding. Based on this coding method, the neighborhood structure of the algorithm can be designed, and three neighborhoods are set corresponding to the three-layer coding. Specifically, neighborhood one randomly selects products between different models and exchanges the vehicle positions where the products are placed; neighborhood two randomly selects products of different vehicles of the same model and exchanges the vehicle positions where the products are placed; neighborhood three randomly selects a product and randomly changes the placement method of the product.
[0052] Step S320: Initialize the solution set and neighborhood of the variable neighborhood search algorithm, wherein each solution in the solution set corresponds to a loading scheme, and each neighborhood corresponds to a product placement position search space and a product placement method search space;
[0053] Specifically, the solution set and neighborhood of the variable neighborhood search algorithm are initialized, including: setting the maximum number of iterations gmax, the number of neighborhoods kmax, and the maximum number of neighborhood local searches lmax; based on heuristic rules and theoretical loading rate thresholds, an initial solution set s = {x1, x2, x3, ..., xi} is generated and the optimal solution in the initial solution set is marked as the current optimal solution xop. Based on heuristic rules and theoretical loading rate thresholds, the convergence efficiency of the algorithm can be improved. Taking the theoretical loading rate threshold set to 90% as an example, the specific steps of generating the initial solution set are to randomly select a product and randomly place it in a vehicle. If the loading rate of the selected vehicle exceeds 90%, a new vehicle is selected for placement until all products are placed. Each product and its corresponding placement vehicle or placement location or placement method and other information can be saved as a loading plan, and a loading plan corresponds to a solution saved in the initial solution set.
[0054] Step S330: Based on the neighborhood structure, a neighborhood search is performed on each solution in the solution set by a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transportation vehicle solution.
[0055] After setting up the neighborhood structure and obtaining the initial solution set, you can perform a neighborhood search for each solution in the solution set to optimize the vehicle type to which the product is assigned, different vehicles of the same type, and the way they are placed in the vehicle, to achieve product pre-allocation. Furthermore, for each transportation vehicle solution obtained after pre-allocation, the actual loading rate of each vehicle can be calculated, output as the evaluation value of the solution and saved, to judge the quality of the allocation effect. For details, please refer to Figure 4 , which shows Figure 3 A sub-process of step S330 in the loading method shown in the figure, based on the neighborhood structure, performing a neighborhood search on each solution in the solution set by a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transport vehicle solution, includes:
[0056] Step S331: Based on the neighborhood structure, locally search each solution in the initial solution set in the neighborhood in turn to obtain a feasible solution corresponding to each solution;
[0057] For the initial solution set s = {x1, x2, x3, ..., xi}, that is, for each product, it is necessary to perform local search and perturbation in the neighborhood of each product in turn to optimize the allocation of each product, that is, to perform local search on each subset x1, x2, x3, ..., xi in the initial solution set in turn, and for each subset, the feasible solution corresponding to the subset can be obtained after the search. The feasible solution represents the distribution method of the product in the vehicle, corresponding to a unique vehicle type, vehicle number and placement method in the vehicle.
[0058] Step S332: Determine whether the feasible solution is better than the current optimal solution; if not, that is, not better than the current optimal solution, jump to step S333; if yes, that is, better than the current optimal solution, jump to step S334;
[0059] Since there are different combinations of vehicle types, vehicle numbers and placement methods of products in vehicles when searching based on the above-mentioned neighborhood structure, there are one or more feasible solutions. In order to obtain the optimal allocation method, for the feasible solutions corresponding to each subset in the initial solution set, it is necessary to determine whether the feasible solution xi is worse than the current optimal solution xop; if not, that is, not better than the current optimal solution xop, it means that it is not as good as the allocation method in the initial solution set, and jump to step S333 to continue local search in the neighborhood to obtain other feasible solutions xi; if yes, that is, better than the current optimal solution xop, it means that there is a solution that is better than the initial solution set, and jump to step S334 to replace the current optimal solution xop in the initial solution set with the feasible solution xi, that is, xop = xi. Among them, based on the evaluation value in step S330, it can be compared which allocation effect is better between the feasible solution xi and the initial current optimal solution xop.
[0060] Step S333: Continue to perform local search in the neighborhood until the number of local searches reaches the maximum number of local searches in the neighborhood or the feasible solution is better than the current optimal solution;
[0061] When the feasible solution xi is not better than the current optimal solution xop, continue to perform local search in the neighborhood to obtain other feasible solutions xi until the search reaches the maximum number of times lmax, or jump to step S334 when the feasible solution xi is better than the current optimal solution xop.
[0062] Step S334: After replacing the current optimal solution in the initial solution set with the feasible solution, continue to perform neighborhood search on each solution in the initial solution set until the number of searches for all solutions in the initial solution set reaches the maximum number of iterations.
[0063] When the feasible solution xi is obtained to be better than the current optimal solution xop, the current optimal solution xop is updated to the feasible solution xi. After all feasible solutions xi are judged, the process jumps to step S331 to repeat the calculation of the feasible solution of the next subset in the initial solution set, the comparison of the feasible solution with the current optimal solution, the update of the current optimal solution, etc., until the search times of all subsets in the initial solution set, that is, all solutions, reaches the maximum number of iterations gmax. After the above steps S331 to S334, the initial solution set after updating the current optimal solutions corresponding to all subsets can be obtained. The updated solution set can be output to obtain the products that can be loaded into the same vehicle in each transport vehicle solution.
[0064] Step S400: for products that can be loaded into the same vehicle, a greedy algorithm based on space cutting is used for parallel packing to obtain a loading plan for each product in each vehicle of each transport vehicle plan;
[0065] After determining the products that can be loaded into the same vehicle in each transport vehicle solution, the embodiment of the present invention uses a greedy algorithm based on space cutting to load all vehicles of each transport vehicle solution in parallel according to the placement mode and vehicle position corresponding to the pre-assigned products, so as to improve the solution speed. After loading, the actual loading rate can also be calculated and used as the evaluation value in step S330. For details, please refer to Figure 5 , which shows Figure 1 A sub-process of step S400 in the loading method shown, wherein for products that can be loaded into the same vehicle, a greedy algorithm based on space cutting is used to pack in parallel to obtain a loading solution for each product in each vehicle of each transport vehicle solution, including:
[0066] Step S410: obtaining product information and product constraints of products that can be loaded into the same vehicle, and vehicle information of the vehicle;
[0067] First, it is necessary to obtain product information such as the length, width, height and other dimensions of the products loaded into the same vehicle, the weight of the products, the product name, product number, the quantity of the products, as well as product constraints such as the number of stacking layers and placement of the products, as well as vehicle information such as the length, width, height and other dimensions of the vehicle, and the vehicle's weight limit.
[0068] Step S420: Generate a block list based on the product information, wherein the block list includes simple blocks and composite blocks, the simple blocks correspond to blocks formed by splicing products of the same type, and the composite blocks correspond to simple blocks of products of different types;
[0069] Secondly, based on the products that can be combined into the same category in the same vehicle in step S100, the products can be saved as blocks in the block list. Within the restrictions and constraints on the number of products in a vehicle, simple blocks are blocks of the same category and different numbers formed by splicing in the three directions of the xyz axis in the spatial rectangular coordinate system, and composite blocks are blocks generated by splicing simple blocks of different categories of products in any direction of the xyz axis in consideration of the utilization rate of the combined area of the blocks. Among them, the blocks in the generated block list can be sorted from large to small according to volume.
[0070] Step S430: Initializing a space stack, wherein the space stack includes a space where blocks are placed and a remaining space where no blocks are placed, and the storage space of the entire vehicle is used as an initial remaining space stack;
[0071] After the blocks are loaded, the space stack may include the space where the products, i.e., the blocks, are placed, and the remaining space where no blocks are placed. After the space stack is initialized, the initialized space stack clears all the storage spaces in the vehicle and uses all the storage spaces of the entire vehicle as the initial remaining space stack where blocks can be placed.
[0072] Step S440: after placing the feasible blocks in the block list that meet the product constraints into the remaining space stack, cutting the remaining space stack, and using the new space not occupied by the blocks obtained after cutting as a new remaining space stack;
[0073] Then, the feasible blocks that meet the space constraints in the block list are traversed, and the blocks are placed in the remaining space stack in order from large to small. After placement, the space where the blocks are placed is cut off from the remaining space stack according to the x, y, and z axis directions to obtain a new remaining space stack.
[0074] Step S450: Determine whether the remaining space stack is empty; if not, jump to step S460; if so, jump to step S470;
[0075] For the newly obtained remaining space stack, it is necessary to determine whether the remaining space stack is empty. If it is empty, it means that no more products can be put in, and jump to step S470 to end the space division. If it is not empty, it means that products can continue to be put in, and jump to step S460 to continue the space division.
[0076] Step S460: Continue placing other feasible blocks in the block list that meet the product constraints into the new remaining space stack, and continue cutting the new remaining space stack until the remaining space stack is empty;
[0077] For the remaining space stack, continue to put other feasible blocks in the block list that meet the space constraints and are not placed in the space stack into the remaining space stack in order from large to small, and repeat the steps of cutting the remaining space stack according to the three schemes of x, y, and z axes until the remaining space stack is empty.
[0078] Step S470: Save the product information and location information corresponding to all placed blocks as a loading plan.
[0079] When the remaining space stack is empty, it means that all products have been put into the vehicle and the vehicle is fully loaded. At this time, the placement position, placement method, and product information mapping of each block in the space stack are saved and output, and the loading plan of the products that can be loaded into the same vehicle in the vehicle can be obtained. Repeat the above steps for the products that can be loaded into the same vehicle in each transport vehicle plan obtained in step S300, and the loading plan of each vehicle in each transport vehicle plan can be obtained.
[0080] Step S500: Output the transport vehicle plan and loading plan with the best loading rate.
[0081] After obtaining the loading plan of each vehicle in each transport vehicle plan through step S400, the optimal transport vehicle plan is determined in combination with the actual loading rate, and the optimal product loading plan is determined in the optimal transport vehicle plan. When outputting the transport vehicle plan and loading plan with the optimal loading rate, a visual output method can be used to display the compartment space of each vehicle in a three-dimensional coordinate method, and according to the space inside each vehicle and the corresponding placed products, its coordinates and corresponding product attributes are calculated, displayed on a three-dimensional coordinate system, and different colors and symbols are used as different product identifications, and the loading results of the optimal transport plan and the corresponding vehicle model are output.
[0082] The embodiment of the present invention also provides a loading device 100, see Figure 6 , which shows a structural block diagram of a loading device 100 provided in an embodiment of the present invention, wherein the loading device 100 includes: a preprocessing module 110, a vehicle allocation module 120, a product allocation module 130, a loading module 140 and an output module 150.
[0083] The preprocessing module 110 is used to preprocess the order data; the preprocessing module 110 is also used to determine the product information and transportation information of each product based on the order data, wherein the product information includes the type, quantity, volume, weight, and constraints of the product, and the transportation information includes the shipping location, carrier, and date; based on the product information and the transportation information, the same type of products are merged to determine products that can be classified into the same category.
[0084] The vehicle allocation module 120 is used to generate a number of transport vehicle solutions based on the preprocessed order data and the vehicle loading rate requirements; the vehicle allocation module 120 is also used to establish a mathematical model based on the product information of each product and the vehicle information of each vehicle, wherein the vehicle information includes the type and quantity of the vehicle; set a theoretical loading rate threshold; based on the mathematical model and the theoretical loading rate threshold, solve through a linear programming solver to obtain a number of transport vehicle solutions.
[0085] The product allocation module 130 is used to pre-allocate each product to each vehicle of each transport vehicle scheme to obtain products that can be loaded into the same vehicle in each transport vehicle scheme; the product allocation module 130 is also used to set the neighborhood structure based on the vehicle information of each vehicle in each transport vehicle scheme and the placement constraints of each product, wherein the vehicle information also includes the vehicle model and the number of vehicles of the same model, and the placement constraints of each product include the placement method of the product; initialize the solution set and neighborhood of the variable neighborhood search algorithm, wherein each solution in the solution set corresponds to a loading scheme, and each neighborhood corresponds to the product placement position search space and the product placement method search space; based on the neighborhood structure, the variable neighborhood search algorithm is used to perform neighborhood search on each solution in the solution set to obtain products that can be loaded into the same vehicle in each transport vehicle scheme. The product allocation module 130 is also used to set the maximum number of iterations, the number of neighborhoods, and the maximum number of neighborhood local searches; based on the heuristic rules and the theoretical loading rate threshold, an initial solution set is generated and the optimal solution in the initial solution set is marked as the current optimal solution. The product allocation module 130 is also used to perform local search in the neighborhood for each solution in the initial solution set based on the neighborhood structure to obtain a feasible solution corresponding to each solution; determine whether the feasible solution is better than the current optimal solution; if it is not better than the current optimal solution, continue to perform local search in the neighborhood until the number of local searches reaches the maximum number of neighborhood local searches or the feasible solution is better than the current optimal solution; if it is better than the current optimal solution, replace the current optimal solution in the initial solution set with the feasible solution, and continue to perform neighborhood search for each solution in the initial solution set until the number of searches for all solutions in the initial solution set reaches the maximum number of iterations.
[0086] The loading module 140 is used for parallel packing of products that can be loaded into the same vehicle based on a greedy algorithm of space cutting, so as to obtain a loading plan for each product in each vehicle of each transportation vehicle plan; the loading module 140 is also used to obtain product information and product constraints of products that can be loaded into the same vehicle, as well as vehicle information of the vehicle; based on the product information, a block list is generated, wherein the block list includes simple blocks and composite blocks, wherein the simple blocks correspond to blocks spliced together from the same type of products, and the composite blocks are simple blocks of different types of products; and a space stack is initialized, wherein the space stack includes spaces where blocks are placed and spaces where no blocks are placed. If there is remaining space for the block, and there is, use the storage space of the entire vehicle as the initial remaining space stack; after placing the feasible blocks that meet the product constraints in the block list into the remaining space stack, cut the remaining space stack, and use the new space not occupied by the blocks after cutting as the new remaining space stack; determine whether the remaining space stack is empty; if not, continue to place other feasible blocks that meet the product constraints in the block list into the new remaining space stack, and continue to cut the new remaining space stack until the remaining space stack is empty; if so, save the product information and location information corresponding to all the placed blocks as a loading plan.
[0087] The output module 150 is used to output a transport vehicle solution and a loading solution with an optimal loading rate. Preferably, the output module 150 is a visual output module.
[0088] The present invention also provides an electronic device, see Figure 7 , which shows that it is possible to execute Figures 1 to 5 The hardware structure of the electronic equipment of the vehicle installation method.
[0089] The electronic device 10 includes: at least one processor 11; and a memory 12 communicatively connected to the at least one processor 11. Figure 7 The memory 12 stores instructions that can be executed by the at least one processor 11, and the instructions are executed by the at least one processor 11 so that the at least one processor 11 can perform the above Figures 1 to 5 The processor 11 and the memory 12 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0090] The memory 12 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the vehicle loading method in the embodiment of the present application, for example, Figure 6The processor 11 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 12, that is, realizes the loading method of the above method embodiment.
[0091] The memory 12 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the loading device, etc. In addition, the memory 12 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 12 may optionally include a memory remotely arranged relative to the processor 11, and these remote memories may be connected to the loading device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0092] The one or more modules are stored in the memory 12, and when executed by the one or more processors 11, the loading method in any of the above method embodiments is executed, for example, the above described Figures 1 to 5 Steps to achieve Figure 6 The functions of each module and unit in it.
[0093] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0094] The present application also provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, for example, to execute the above-described Figures 1 to 5 Steps to achieve Figure 6 The functions of each module in.
[0095] The present application also provides a computer program product, including a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the loading method in any of the above method embodiments, for example, executing the above described Figures 1 to 5 Steps to achieve Figure 6 The functions of each module in.
[0096] The embodiment of the present invention provides a loading method and device, an electronic device, and a storage medium. The loading method first preprocesses the order data, and then generates several transport vehicle plans according to the preprocessed order data and the vehicle loading rate requirements, and then pre-allocates each product to each vehicle of each transport vehicle plan to obtain products that can be loaded into the same vehicle in each transport vehicle plan, and then for the products that can be loaded into the same vehicle, a greedy algorithm based on space cutting is used for parallel packing to obtain the loading plan of each product in each vehicle of each transport vehicle plan, and finally outputs the transport vehicle plan and loading plan with the optimal loading rate. The loading method provided by the embodiment of the present invention can provide different loading plans for different vehicle combinations, and output the optimal transportation plan, so as to realize the generation of intelligent loading plans for large-scale orders.
[0097] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of loading a vehicle, It is characterized in that include: Preprocess order data; Generate several transport vehicle plans based on the pre-processed order data and vehicle loading rate requirements; Pre-allocate each product to each vehicle of each transport vehicle solution to obtain products in each transport vehicle solution that can be loaded into the same vehicle; For products that can be loaded into the same vehicle, a greedy algorithm based on space cutting is used for parallel packing to obtain a loading plan for each product in each vehicle of each transport vehicle plan; Output the transport vehicle plan and loading plan with the best loading rate.
2. The loading method according to claim 1, It is characterized in that The preprocessing of the order data includes: Determine product information and shipping information of each product according to the order data, wherein the product information includes product type, quantity, volume, weight, and constraints, and the shipping information includes shipping location, carrier, and date; Based on the product information and the transportation information, a merging operation is performed on products of the same type to determine products that can be classified into the same category.
3. The loading method according to claim 2, It is characterized in that According to the pre-processed order data and the vehicle loading rate requirements, several transport vehicle solutions are generated, including: Establishing a mathematical model based on product information of each product and vehicle information of each vehicle, wherein the vehicle information includes the type and quantity of the vehicle; Set theoretical loading rate threshold; Based on the mathematical model and the theoretical loading rate threshold, a linear programming solver is used to obtain several transport vehicle solutions.
4. The loading method according to claim 2, It is characterized in that The pre-allocation of each product to each vehicle of each transport vehicle solution to obtain products in each transport vehicle solution that can be loaded into the same vehicle includes: A neighborhood structure is set based on vehicle information of each vehicle in each transport vehicle solution and placement constraints on each product, wherein the vehicle information further includes the model of the vehicle and the number of vehicles of the same model, and the placement constraints on each product include the placement method of the product; Initialize the solution set and neighborhood of the variable neighborhood search algorithm, wherein each solution in the solution set corresponds to a loading scheme, and each neighborhood corresponds to a product placement location search space and a product placement method search space; Based on the neighborhood structure, a neighborhood search is performed on each solution in the solution set by a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transportation vehicle solution.
5. The loading method according to claim 4, It is characterized in that The solution set and neighborhood of the initialization variable neighborhood search algorithm include: Set the maximum number of iterations, number of neighborhoods, and maximum number of neighborhood local searches; Based on the heuristic rule and the theoretical loading rate threshold, an initial solution set is generated and the optimal solution in the initial solution set is marked as the current optimal solution.
6. The loading method according to claim 5, It is characterized in that Based on the neighborhood structure, performing neighborhood search on each solution in the solution set by using a variable neighborhood search algorithm to obtain products that can be loaded into the same vehicle in each transportation vehicle solution, including: Based on the neighborhood structure, each solution in the initial solution set is sequentially searched locally in the neighborhood to obtain a feasible solution corresponding to each solution; Determine whether the feasible solution is better than the current optimal solution; If it is not better than the current optimal solution, continue to perform local search in the neighborhood until the number of local searches reaches the maximum number of local searches in the neighborhood or the feasible solution is better than the current optimal solution; If it is better than the current optimal solution, the current optimal solution in the initial solution set is replaced by the feasible solution, and the neighborhood search is continued for each solution in the initial solution set until the search times of all solutions in the initial solution set reaches the maximum number of iterations.
7. The loading method according to any one of claims 2 to 6, It is characterized in that For the products that can be loaded into the same vehicle, the greedy algorithm based on space cutting is used for parallel packing to obtain the loading scheme of each product in each vehicle of each transportation vehicle scheme, including: Obtain product information and product constraints of products that can be loaded into the same vehicle, and vehicle information of the vehicle; Based on the product information, a block list is generated, wherein the block list includes simple blocks and composite blocks, wherein the simple blocks correspond to blocks formed by splicing products of the same type, and the composite blocks correspond to simple blocks of products of different types; Initializing a space stack, wherein the space stack includes a space where blocks are placed and a remaining space where no blocks are placed, and the storage space of the entire vehicle is used as an initial remaining space stack; After placing the feasible blocks in the block list that meet the product constraints into the remaining space stack, cutting the remaining space stack, and using the new space not occupied by the blocks obtained after cutting as a new remaining space stack; Determine whether the remaining space stack is empty; If not, continue to place other feasible blocks in the block list that meet the product constraints into the new remaining space stack, and continue to cut the new remaining space stack until the remaining space stack is empty; If so, the product information and location information corresponding to all placed blocks are saved as a loading plan.
8. A loading device, It is characterized in that include: Preprocessing module, used to preprocess order data; The vehicle allocation module is used to generate several transport vehicle solutions based on the pre-processed order data and the requirements for vehicle loading rate; A product allocation module, used for pre-allocating each product to each vehicle of each transport vehicle scheme, so as to obtain products in each transport vehicle scheme that can be loaded into the same vehicle; The loading module is used to pack the products that can be loaded into the same vehicle in parallel based on the greedy algorithm of space cutting, so as to obtain the loading plan of each product in each vehicle of each transportation vehicle plan; The output module is used to output the transport vehicle plan and loading plan with the best loading rate.
9. An electronic device, It is characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is 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 method according to any one of claims 1 to 7.
