Intelligent logistics loading method
Technical Field
The invention relates to the field of logistics transportation, in particular to an intelligent logistics loading method.
Background
The traditional loading planning has small data volume, and can obtain an optimal solution within a limited time by using dynamic planning, but the current scene is to uniformly load orders of a city, the optimal solution is obtained by np problem, and the whole solving process is required to return within second level, so that the simple dynamic planning cannot adapt to the rapid return of high-quality solution of the data of the city volume. The traditional method for solving the large-volume problem mostly uses a genetic variation algorithm, and the actual genetic variation algorithm has too much randomness in the large np problem and cannot obtain a good result.
Disclosure of Invention
The invention mainly solves the problems that the existing logistics planning scheme can not adapt to the rapid return of high-quality solutions of the data of one city body mass, too much randomness exists, and high-quality solutions can not be realized, and provides an intelligent logistics loading method which uses a clustering algorithm to preprocess all order point sets, obtains n clusters which are distributed relatively and concentrated in a short time, and then constructs feasible solutions meeting loading constraint conditions for each order set in sequence.
The technical scheme adopted by the invention for solving the technical problem is that the intelligent logistics loading method comprises the following steps:
s1: acquiring input required by a logistics module;
s2: screening the order to be distributed and the available transport capacity information of each area by limiting the dimension of the area;
s3: selecting a region to be planned according to the priority of the restricted region;
s4: clustering the order sets of the areas to be distributed;
s5: vehicle allocation and loading is performed on the order.
As a preferable mode of the above-mentioned solution, in step S1, the information including the order to be delivered, the available transportation capacity information, and the restricted area information is input, and the information including the order ID, the commodity information and the required quantity of the order, the place of the order placing shop, and the area to which the order placing shop belongs; the available capacity information includes an ID, a name, a familiar area, a location, a vehicle type corresponding to the driver, and a loadable amount of the vehicle type of the available driver, wherein the location information is expressed by two-dimensional coordinates.
As a preferable scheme of the above scheme, the restricted area includes a restricted area, a limited number area, and a general area.
As a preferable mode of the above, the step S5 includes the steps of:
s51: selecting a cluster with the largest order quantity from the clustered cluster set as a cluster set O of orders to be distributed;
s52: selecting a vehicle of a certain vehicle type from the available transport capacity information as a vehicle to be loaded according to a large vehicle priority principle;
s53: in the order cluster set O to be distributed, randomly selecting a certain order meeting loading constraint as a first loading order of the vehicle of the selected vehicle type according to the corresponding loading capacity of the selected vehicle type;
s54: removing the order from the order cluster O to be delivered;
s55: judging whether the vehicle has a loading space, if so, entering the step S56; if not, the user can not select the specific application,
step S52 is entered;
s56: acquiring a corresponding order set to be distributed from the order set to be distributed O according to the residual loading space of the vehicle;
s57: judging whether the order set to be distributed is empty, if so, loading a cluster set adjacent to the order set O to be distributed; if not, calculating the target function of the order set to be distributed, screening the target order processing device corresponding to the minimum value of the target function, and entering the step S55 after deleting the target order.
As a preferable embodiment of the foregoing solution, the loading, in step S57, a neighboring cluster of the cluster O to be dispatched, includes the following steps:
s571: acquiring a neighboring cluster of a to-be-distributed order cluster O as a to-be-distributed order cluster L;
s572: judging whether the order cluster L to be distributed is empty, if so, entering the step S3; if not, acquiring a corresponding order set to be distributed from the order set to be distributed L according to the residual loading space of the vehicle, and entering the step S57.
As a preferable solution of the above solution, the neighboring cluster is a cluster having a smallest straight-line distance from a center of a currently planned cluster to a center of a remaining cluster to be planned.
As a preferable solution of the above solution, the objective function is:
F0=-dxy+dxz+dzy
wherein, F0For the amount of distance change after order insertion, dxyIs the distance between original order x and original order y, dxzDistance, d, from original order x to insert order zzyThe distance from the original order y to the insert order z.
As a preferable scheme of the above scheme, when step S3 is executed, if the area with plan is empty, it indicates that the order of each area is planned; otherwise, the process proceeds to step S4.
The invention has the advantages that: the intelligent loading planning of logistics can be completed in a short time, and a feasible solution with the lowest transportation cost is obtained.
Drawings
Fig. 1 is a schematic flow chart of an intelligent logistics loading method in the embodiment.
Detailed Description
The technical solution of the present invention is further described below by way of examples with reference to the accompanying drawings.
Example (b):
the intelligent logistics loading method of the embodiment, as shown in fig. 1, includes the following steps:
s1: acquiring input required by a logistics module; inputting order information to be distributed, available transport capacity information and limited area information, wherein the order information to be distributed comprises an order ID, commodity information and required quantity of the order, the position of an order placing shop and the area of the order placing shop; the available capacity information includes an ID, a name, a familiar area, a location, a vehicle type corresponding to the driver, and a loadable amount of the vehicle type of the available driver. Wherein the position information is represented by two-dimensional coordinates.
S2: screening the order to be distributed and the available transport capacity information of each area by limiting the dimension of the area; the restricted area includes a restricted area, a restricted number area and a general area, and the distribution area is influenced by practical factors such as restricted lines and restricted numbers, and the restricted area is required to be used as a dimension to divide corresponding orders to be distributed and available capacity information.
S3: selecting a region to be planned according to the priority of the restricted region; the priority of the restricted areas is preset according to a preset rule, and all the restricted areas are sequentially acquired from high to low according to the priority and are used as areas to be planned for loading planning. When step S3 is executed, if the area with plan is empty, it indicates that the order of each area is planned; otherwise, the process proceeds to step S4.
S4: clustering the order sets of the areas to be distributed; in the step, the orders to be distributed are clustered according to the distance by using a clustering algorithm such as kmeans, the clustered clusters can be sequentially selected to be loaded when vehicles are specifically distributed in the subsequent step, the orders with smaller relative distance can be distributed on one vehicle to a certain extent, and the quality of an initial solution is provided.
S5: vehicle allocation and loading of orders comprising the steps of:
s51: selecting a cluster with the largest order quantity from the clustered cluster set as a cluster set O of orders to be distributed;
s52: selecting a vehicle of a certain vehicle type from the available transport capacity information as a vehicle to be loaded according to a large vehicle priority principle; and calculating the total volume of the order points contained in each cluster set after clustering, selecting the order point set of the cluster with the largest total volume as the initial order set to be delivered, preferentially loading larger vehicle types, ensuring that the orders loaded by the larger vehicle types are relatively concentrated, and reducing logistics cost.
S53: in the order cluster set O to be distributed, randomly selecting a certain order meeting loading constraint as a first loading order of the vehicle of the selected vehicle type according to the corresponding loading capacity of the selected vehicle type;
s54: removing the order from the order cluster O to be delivered;
s55: judging whether the vehicle has a loading space, if so, entering the step S56; if not, go to step S52;
s56: acquiring a corresponding order set to be distributed from the order set to be distributed O according to the residual loading space of the vehicle;
s57: judging whether the order set to be distributed is empty, if so, loading a cluster set adjacent to the order set O to be distributed; if not, calculating the target function of the order set to be distributed, screening the target order processing device corresponding to the minimum value of the target function, and entering the step S55 after deleting the target order.
Loading a neighbor cluster of a cluster of orders to be dispatched O, comprising the steps of:
s571: acquiring a neighboring cluster set of a to-be-distributed order cluster set O as a to-be-distributed order cluster set L, wherein the neighboring cluster set is a cluster set with the minimum straight-line distance from the currently planned cluster set center to the central point of the rest to-be-planned cluster sets;
s572: judging whether the order cluster L to be distributed is empty, if so, entering the step S3; if not, acquiring a corresponding order set to be distributed from the order set to be distributed L according to the residual loading space of the vehicle, and entering the step S57.
The objective function in step S57 is:
F0=-dxy+dxz+dzy
wherein, F0For the amount of distance change after order insertion, dxyIs the distance between original order x and original order y, dxzDistance, d, from original order x to insert order zzyThe distance from the original order y to the insert order z. If the existing order distribution routes are set to be 0, 1 and 2 and the order 3 is inserted now, the distance variation F between the order 3 inserted into 0 and 1 is calculated in sequence0‘=-d01+d03+d13And the distance variation F between order 3 insertion 1 and 20‘’=-d12+d13+d23Selecting F0‘And F0‘’The solution corresponding to the smaller value of the solution regenerates the route, assuming F0‘At a smaller value, the regenerated routes are 0, 3, 1, 2.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.