CN110533279B - Method, system and storage medium for scheduling cloud logistics platform - Google Patents
Method, system and storage medium for scheduling cloud logistics platform Download PDFInfo
- Publication number
- CN110533279B CN110533279B CN201910635877.0A CN201910635877A CN110533279B CN 110533279 B CN110533279 B CN 110533279B CN 201910635877 A CN201910635877 A CN 201910635877A CN 110533279 B CN110533279 B CN 110533279B
- Authority
- CN
- China
- Prior art keywords
- chromosome
- point
- pick
- vehicle
- population
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
- G06F18/24147—Distances to closest patterns, e.g. nearest neighbour classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- Data Mining & Analysis (AREA)
- Human Resources & Organizations (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Physics & Mathematics (AREA)
- Economics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Strategic Management (AREA)
- Biophysics (AREA)
- Artificial Intelligence (AREA)
- Entrepreneurship & Innovation (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Development Economics (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Educational Administration (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Genetics & Genomics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Physiology (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the invention provides a method, a system and a storage medium for scheduling the capacity of a cloud logistics platform, and belongs to the field of vehicle scheduling problem models and algorithms. The method comprises the following steps: acquiring the variety of distributed goods of each distribution point; clustering the hub points according to the categories by adopting a KNN algorithm to form a plurality of hub centers, wherein each hub center is used for collecting and distributing one category of the goods; and determining an optimal scheduling scheme for transporting the goods from the picking point to the hub according to the hub and the corresponding picking point by adopting a genetic algorithm, wherein the picking point is used for sending the goods. The method, the system and the storage medium can ensure the rationality of the scheduling scheme and improve the scheduling efficiency of cloud platform logistics.
Description
Technical Field
The invention relates to the field of vehicle scheduling problem models and algorithms, in particular to a method, a system and a storage medium for scheduling the capacity of a cloud logistics platform.
Background
The capacity scheduling problem under the cloud logistics platform is essentially a vehicle path problem, is a key problem which cannot be avoided in logistics business, and is a hot problem for studying by scholars at home and abroad. The reasonable vehicle scheduling scheme can save the transportation cost and time for enterprises, improve the efficiency of logistics service, and improve the competitiveness for the enterprises, so that the method has important significance for the research of the problem.
Disclosure of Invention
The invention aims to provide a method, a system and a storage medium for scheduling the capacity of a cloud logistics platform. The method, the system and the storage medium can ensure the rationality of the vehicle scheduling scheme of the cloud logistics platform, so that the vehicle scheduling efficiency is improved.
In order to achieve the above object, an embodiment of the present invention provides a method for scheduling cloud logistics platform capacity, where the method includes:
acquiring the variety of distributed goods of each distribution point;
clustering the hub points according to the categories by using a KNN (k-nearest neighbor, k-neighborhood) algorithm to form a plurality of hub centers, wherein each hub center is used for collecting and distributing one category of the goods;
and determining an optimal scheduling scheme for transporting the goods from the picking point to the hub according to the hub and the corresponding picking point by adopting a genetic algorithm, wherein the picking point is used for sending the goods.
In another aspect, the present invention further provides a system for scheduling capacity of a cloud logistics platform, where the system includes a processor configured to execute any one of the above methods.
In yet another aspect, the present invention also provides a storage medium storing instructions for reading by a machine to cause the machine to perform any one of the methods described above.
According to the technical scheme, the method, the system and the storage medium for scheduling the capacity of the cloud logistics platform cluster the cargo distribution points by adopting a KNN clustering method, so that a plurality of distribution centers are formed; and then, aiming at each distribution center, a scheduling scheme that the vehicles transport goods from the goods picking point to the distribution center is analyzed by adopting a genetic algorithm, so that the rationality of the scheduling scheme is ensured, and the scheduling efficiency of the vehicles is improved.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
fig. 1 is a flow diagram of a method for scheduling cloud logistics platform capacity according to one embodiment of the present invention;
FIG. 2 is a flow diagram of a method for clustering hub using KNN algorithm according to one embodiment of the invention;
FIG. 3 is a flow diagram of a method for determining a scheduling scheme using a genetic algorithm according to one embodiment of the present invention;
FIG. 4 is a flow diagram of chromosome coding according to one embodiment of the present invention;
FIG. 5 is a flow diagram of initializing a population according to one embodiment of the invention;
FIG. 6 is a flow diagram of a crossover operation on a population according to one embodiment of the invention;
FIG. 7 is a flow diagram of a mutation operation on a population according to one embodiment of the present invention;
FIG. 8 is a flow diagram of a process for checking operators according to one embodiment of the invention;
fig. 9 is a line graph of fitness of a genetic algorithm as a function of iteration number according to one example of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
In the embodiments of the present invention, unless otherwise specified, the use of directional terms such as "upper, lower, top, and bottom" is generally used with respect to the orientation shown in the drawings or the positional relationship of the components with respect to each other in the vertical, or gravitational direction.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present invention, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between the various embodiments can be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not be within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating a method for scheduling cloud capacity of a cloud logistics platform according to an embodiment of the invention. In fig. 1, the method may include:
in step S100, the kind of the distributed goods for each distribution point is acquired.
In step S200, the hub points are clustered according to categories using a KNN algorithm to form a plurality of hub centers. Wherein each hub is adapted to hub a type of cargo. In the prior art, the body environment of a logistics platform generally includes a pick-up point for delivery, a hub point for collecting and forwarding the goods to a destination again, and a vehicle for transporting the goods from the pick-up point to the hub point. In consideration of the scheduling efficiency, generally, the same distribution point only collects one type of goods, which results in the current situation that a plurality of distribution points may collect one type of goods at the same time. In the method for determining the scheduling scheme in the prior art, the distributed points are often directly used as conditions for vehicle scheduling problems, so that the algorithm is too large in scale when the scheme is determined. Thus, in this embodiment, clustering by the KNN algorithm based on the category of the distribution goods at each of the distribution points to form the plurality of distribution centers can greatly reduce the scale of subsequent algorithms. The specific details for clustering using the KNN algorithm may be in a variety of forms known to those skilled in the art. In one example of the invention, the specific details may be, for example, the method illustrated in fig. 2. In fig. 2, the method may include:
in step S210, a data set including the category (a plurality of the distribution points and the corresponding category of the distributed cargo) is loaded into the KNN algorithm.
In step S220, a parameter K of the KNN algorithm is set.
In step S230, an unselected hub is randomly selected from the data set as a predicted point.
In step S240, the distance from the predicted point to each known point is calculated separately. Where the known points may represent the hub points that have been clustered. In this embodiment, it is considered that each known point may be a plurality of scatters randomly selected in advance among the set of scatters as the known point when the first scatterer is selected.
In step S250, the calculated distances are sorted from small to large.
In step S260, the predicted points are clustered into the hub where the known points corresponding to the first K distances are located.
In step S270, it is determined whether there is an unselected hub.
In the case where it is determined that there is a non-selected hub, this indicates that the clustering operation on the hub has not been completed, and therefore step S230 needs to be executed again.
In the case that it is determined that there are no unselected hubs, which indicates that the clustering operation has been completed, step S280 may be performed to output a plurality of hubs each representing a type of goods to be distributed.
In step S300, a genetic algorithm is used to determine an optimal scheduling scheme for transporting the cargo from the pickup point to the hub according to the hub and the corresponding pickup point, respectively. Wherein the pick-up point can be used to send out goods. In this embodiment, the genetic algorithm may be used to determine the optimal scheduling scheme for each hub separately. Before the determination of the genetic algorithm, an objective function can be preset, for which the person skilled in the art can determine for the actual problem. In one example of the present invention, the specific procedure for determining the objective function may be, for example:
step 1, setting a first target subfunction according to a formula (1),
wherein f is 1 Is a first objective sub-function, N is a set of pick-up points, g j For the cargo weight of the jth pick-up point, M is the set of dispatchable vehicles, Q m Rated load of the m-th vehicle, x m Indicates whether the m-th vehicle participates in the scheduling, and x is the number of scheduling instances that the m-th vehicle participates in the scheduling m =1, in case the mth vehicle is not involved in the dispatch, x m =0;
Step 2, setting a second target subfunction according to the formula (2),
wherein, f 2 As a second objective sub-function, M is a set of schedulable vehicles, c k For a fixed cost of departure for vehicles of the k-vehicle type,indicating whether the m-th vehicle is a k-th vehicle type, in the case where the m-th vehicle is a k-th vehicle type,in the case where the m-th vehicle is not the k-th vehicle type,n is the set of pick-up points, c is the cost per unit distance traveled by the vehicle,d ij Is the distance from location i to location j, the locations including pick-up points and distribution centers, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case that the m-th vehicle is from the delivery point i to the delivery point j, x mij =0;
Step 3, setting a third target subfunction according to the formula (3),
wherein f is 3 For a third objective sub-function, M is a set of dispatchable vehicles, N is a set of pick-up points, t ij For the time of travel of the vehicle from position i to position j, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case that the m-th vehicle is from the delivery point i to the delivery point j, x mij =0,T i A latest shipment time limit for pick-up point i;
step 4, carrying out normalization processing on the first target subfunction, the second target subfunction and the third target subfunction by adopting a formula (4),
wherein f' is a function after normalization processing, and f is a function before normalization processing;
step 5, setting an objective function according to the formula (5),
F=min(λ 2 f 2 '-λ 1 f 1 '+λ 3 f 3 '), (5)
where F is the objective function, λ 1 、λ 2 And λ 3 Is a predetermined weight, f 1 '、f 2 ' and f 3 ' is a first target sub-function, a second target sub-function and a third target sub-function after normalization processing;
and 6, setting the constraint conditions of the objective function according to the formulas (6-1) to (6-8).
Where M is a set of dispatchable vehicles, N is a set of pick-up points, g j Weight of cargo at jth pick-up point, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case the m-th vehicle does not go from pickup point i to pickup point j, x mij =0,Q m Rated load for the mth vehicle, P is the set of all locations including pick-up points and distribution centers, P j Is the jth position;
where M is a set of dispatchable vehicles, N is a set of pick-up points, x mij Indicating whether the m-th vehicle is moving from pick-up point i to pick-up point j, x mi0 Indicating whether the mth vehicle is from a pickup point i to a pickup point 0, wherein the pickup point 0 indicates a hub;
where M is a set of dispatchable vehicles, N is a set of pick-up points, x mij Indicating whether the mth vehicle is from pick-up point i to pick-up point j;
where M is a set of dispatchable vehicles, N is a set of pick-up points, x mir Indicating whether the m-th vehicle is moving from pick-up point i to pick-up point r, x mrj Indicates whether the m-th vehicle is driven fromA goods picking point r to a goods picking point j;
where M is a set of dispatchable vehicles, N is a set of pick-up points, x mij Indicating whether the mth vehicle is from pick-up point i to pick-up point j;
the specific details for the genetic algorithm may be in a variety of forms known to those skilled in the art. In one example of the invention, the specific details may be, for example, the steps shown in FIG. 3. In fig. 3, the genetic algorithm may include:
in step S310, a chromosome of the genetic algorithm is encoded. In this example, the specific details of encoding the chromosome may be, for example, as shown in fig. 4. In fig. 4, the specific details may include, for each chromosome:
in step S311, m + n different numbers are randomly selected in the interval range of [1,m + n ] to generate a natural number string. Wherein m is the number of vehicles, n is the number of pick-up points, and 1 is the number of the distribution center. In step S311, based on that m is the number of vehicles, i.e., the number of dispatchable vehicles, and n is the number of pickup points, in the generated natural number string, the numbers 1, 2, 3 … m may represent dispatched vehicles, m +1, m +2, m +3 … m + n may represent pickup points, and the number 0 may represent a hub. In this example, taking the number of vehicles as 3 and the number of pick-up points as 6 as an example, the generated natural number string may be, for example: 1. 6, 7, 8, 2, 9, 3, 4, 5.
In step S312, it is determined whether the top digit of the natural number string is within the range of [1,m ].
In step S313, in the case where it is judged that the leading digit of the natural number string is outside the range of [1,m ], the natural number string is deleted and m + n different digits are randomly selected again in the range of [1,m + n ] to generate one natural number string.
In step S314, if it is determined that the top digit of the natural number string is within the range of [1,m ], the digit 0 is added to the end of the natural number string.
In step S315, the number 0 is inserted into the previous digit of the number located in the interval range of [1,m ] in the non-leading digits of the natural number string to generate a chromosome of length 2m + n. Taking the natural number string shown in step S311 as an example, after the processing of steps S312 to S315, the specific form of the chromosome finally generated may be, for example: 1. 6, 7, 8,0, 2, 9, 0, 3, 4, 5, 0, which chromosome indicates that the scheduling scheme may be as shown in table 1,
TABLE 1
In step S320, a population and the number of iterations are initialized. The specific number of iterations should be known to those skilled in the art. In one example of the present invention, the initial value of the number of iterations may be, for example, 0. Specific details for initializing the population may be, for example, the steps shown in fig. 5. In fig. 5, the step S320 may include:
in step S321, the number 0 in the chromosome is extracted.
In step S322, it is determined whether the top digit of the extracted chromosome is within the range of [1,m ].
If the first digit of the extracted chromosome is judged to be outside the range of the interval of [1,m ], the selected vehicle is not satisfied with the condition, and the chromosome of the genetic algorithm can be encoded again.
In step S323, if the extracted chromosome is judged to have the top number within the range of [1,m ], which indicates that the selected vehicle satisfies the condition, it may be further judged whether the total weight of the cargo between any two numbers within the range of [1,m ] on the chromosome is less than or equal to the rated load of the vehicle.
Under the condition that the total weight of the cargos between two numbers located in the interval range of [1,m ] on the chromosome is judged to be larger than the rated load of the vehicle, the situation shows that the rated load of the vehicle is difficult to meet the transportation requirement of the cargos when the vehicle is dispatched by the chromosome, so that the dispatching scheme of the chromosome is unreasonable, the chromosome of the genetic algorithm can be encoded again, and the step S310 is executed in a return mode.
In step S324, in the case that the total weight of the cargo between any two numbers located in the interval range of [1,m ] on the chromosome is judged to be less than or equal to the rated load of the vehicle, this indicates that the scheduling scheme represented by the chromosome meets the requirement of vehicle transportation, so that the chromosome can be added into the population.
In step S325, it is determined whether the number of chromosomes in the population is greater than or equal to a preset population size.
In the case that the number of chromosomes in the population is determined to be smaller than the population size, which indicates that the number of generated chromosomes cannot form the population, the chromosomes of the genetic algorithm may be encoded again, i.e., the process returns to step S310.
In step S326, in the case where the number of chromosomes in the population is determined to be greater than or equal to the population size, this indicates that the number of chromosomes is already able to form the population, and therefore the population can be output.
In step S330, it is determined whether the iteration count reaches a preset count threshold.
In step S340, in the case where it is determined that the number of iterations has not reached the number threshold, fitness of each chromosome in the population is calculated. For the fitness function determination, it may be determined using the objective function shown in equation (5), while taking into account the possible problem of forward overflow, in this example, the fitness function may be determined according to equation (7),
wherein, F' is a fitness function, and F is an objective function.
In step S350, a selection operation is performed on the population. This selection operation may take many forms known to those skilled in the art. In a preferred example of the present invention, the selection of the population may be performed by roulette, and specifically, may be performed for example according to formula (8),
wherein, F i Fitness of chromosome i, P (F) i ) The probability of being selected for the ith chromosome.
In step S360, a cross operation is performed on the population. For this crossover operation, various forms known to those skilled in the art are possible. In a preferred example of the invention, the interleaving operation may specifically comprise the steps as illustrated in fig. 6. In fig. 6, this step 360 may include:
in step S361, two chromosomes are randomly selected from the population as a first parent chromosome and a second parent chromosome.
In step S362, non-0 numbers at x positions are randomly extracted from the first parent chromosome and inserted into corresponding positions in the second parent chromosome to form a new chromosome. In this step, chromosome 1 and chromosome 2 are randomly generated, for example, wherein,
the sequence of chromosome 1 may be: 1. 6, 7, 8,0, 2, 9, 0, 3, 4, 5, 0
The sequence of chromosome 2 may be: 1. 8,0, 2, 6, 9, 7,0, 3, 5, 4,0
In performing the crossover operation, the fourth digit 8 and the tenth digit 4 in chromosome 1 may be extracted and the digits 8 and 4 inserted into the fourth digit and the tenth digit, respectively, of chromosome 2, thereby generating chromosome 3, wherein,
the sequence of chromosome 3 is: 1. 0,2, 8, 6, 9, 7,0, 3, 4, 5, 0.
In step S363, a new chromosome is processed by using a preset checking operator and added to the population. For the checking operator, it can be determined by the person skilled in the art for the problem to be actually solved. In a preferred example of the present invention, the checking operator may comprise a method as illustrated in fig. 8.
In fig. 8, the method may include:
in step S400, the number 0 in the chromosome is extracted.
In step S401, it is determined whether the top digit of the extracted chromosome is within the range of [1,m ];
in step S402, when it is determined that the top digit of the extracted chromosome is outside the range of [1,m ], the last digit on the chromosome within the range of [1,m ] is exchanged with the top digit of the chromosome to update the chromosome, and step S403 is performed.
In step S403, when it is determined that the top digit of the extracted chromosome is within the range of [1,m ], it is determined whether the total weight of the cargo between any two digits on the chromosome that are within the range of [1,m ] is greater than the rated load of the vehicle.
In step S404, when it is determined that the total weight of the cargos having any two numbers located within the range of [1,m ] on the chromosome is less than or equal to the rated load of the vehicle, the number of mutations and the mutation threshold are initialized.
In step S405, two positions are randomly selected on the chromosome, and numbers on the two positions are exchanged to update the chromosome.
In step S406, it is determined whether the variation count is greater than or equal to a variation threshold.
In step S407, if it is determined that the mutation number is smaller than the mutation threshold, updating the mutation number, randomly selecting two positions on the chromosome again, and exchanging numbers at the two positions to update the chromosome (return to step S405);
in step S408, if the number of mutations is determined to be greater than or equal to the mutation threshold, a new chromosome is output and the number 0 in the chromosome is extracted again, i.e., the process returns to step S400.
In step S409, when it is determined that the total weight of the cargos of any two numbers located within the interval range of [1,m ] on the chromosome is less than or equal to the rated load of the vehicle, the chromosome is output.
In step S364, the number of crossings is updated. Wherein, the initial crossing number may be 0.
In step S365, it is determined whether the crossing number is greater than or equal to a preset crossing number threshold.
Under the condition that the crossing frequency is judged to be smaller than the crossing frequency threshold value, randomly selecting two chromosomes from the population again to serve as a first parent chromosome and a second parent chromosome (returning to execute the step S371);
in step S366, in the case where the number of crossings is judged to be greater than or equal to the threshold number of crossings, the population is output.
In step S370, a mutation operation is performed on the population. The details of the variation operation may be in a variety of forms known to those skilled in the art. In one example of the invention, the specific details may be, for example, the method illustrated in FIG. 7. In fig. 7, the method may include:
in step S371, an unselected chromosome is randomly selected from the population.
In step S372, the number of variations and the variation threshold are randomly generated.
In step S373, two positions are randomly selected on the chromosome, and numbers on the two positions are exchanged to update the chromosome.
In step S374, it is determined whether the mutation number is greater than or equal to a mutation threshold.
And under the condition that the mutation frequency is judged to be smaller than the mutation threshold value, updating the mutation frequency, randomly selecting two positions on the chromosome again, and exchanging numbers on the two positions to update the chromosome.
In step S375, in the case where the mutation number is judged to be greater than or equal to the mutation threshold, the chromosome is processed by the method of the check operator shown in fig. 8, and the chromosome is added to the population.
In step S376, it is determined whether there are chromosomes in the population that have not been selected;
and under the condition that the unselected chromosomes exist in the population, randomly selecting one unselected chromosome from the population again.
In step S377, in the case where it is judged that there is no unselected chromosome in the population, the population is output.
In step S380, the iteration count is updated, and it is determined again whether the iteration count reaches the count threshold.
In step S390, in the case where it is determined that the number of iterations reaches the number threshold, the chromosome with the maximum fitness is output as the optimal scheduling plan.
In one example of the present invention, the method shown above is applied to vehicle dispatching work of company D. The company D is a logistics company on a cloud logistics platform and mainly operates the transportation work of vegetables and fruits, three trucks are hung under the company, and the specifications are 5 tons for 4.2 meters rated load, 8 tons for 6.2 meters rated load and 10 tons for 7.2 meters rated load respectively. At this stage, company D has accumulated orders over a period of time to prepare the same scheduled pick.
Through history data stored by company D, information (coordinates, types of goods, etc.) of the pick-up point and the distribution point is acquired. And clustering the distributed points by adopting a KNN algorithm so as to form a plurality of distributed centers.
After the clustering is completed, information of schedulable vehicles is obtained in the history data, as shown in table 2,
TABLE 2
The types of goods delivered by the pick-up point are shown in table 3,
TABLE 3
The data in table 2 and table 3 were processed using a genetic algorithm. Wherein the weight values of the genetic algorithm are set to 0.5, 0.25 and 0.25 (λ) 1 、λ 2 And λ 3 ) The population scale is 80, the cross probability is 30%, the mutation probability is 50%, and the frequency threshold is 500.
The variation in fitness of the optimal solution generated by the genetic algorithm is shown in fig. 9. In fig. 9, after the number of iterations of the genetic algorithm reaches 500, the generated fitness value gradually converges, thereby obtaining a sequence of 3, 11, 27,0,5, 19, 20, 13,0,7, 17, 12, 22,0,4, 15, 14,0,6, 10, 26, 25, 18,0,9, 16, 21, 24, 23,0,2,0,8,0,1,0 representing the optimal scheduling scheme.
The chromosome is decoded, and the obtained optimal scheduling scheme is shown in table 4,
TABLE 4
In another aspect, the present invention further provides a system for scheduling capacity of a cloud logistics platform, where the system includes a processor, and the processor may be configured to perform any one of the above methods.
In yet another aspect, the present invention also provides a storage medium that may store instructions that are readable by a machine to cause the machine to perform any one of the methods described above.
According to the technical scheme, the method, the system and the storage medium for scheduling the capacity of the cloud logistics platform cluster the cargo distribution points by adopting a KNN clustering method, so that a plurality of distribution centers are formed; and then, aiming at each distribution center, a scheduling scheme that the vehicles transport goods from the goods picking point to the distribution center is analyzed by adopting a genetic algorithm, so that the rationality of the scheduling scheme is ensured, and the scheduling efficiency of the vehicles is improved.
Although the embodiments of the present invention have been described in detail with reference to the accompanying drawings, the embodiments of the present invention are not limited to the specific details of the above embodiments, and various simple modifications can be made to the technical solution of the embodiments of the present invention within the technical idea of the embodiments of the present invention, and these simple modifications all belong to the protection scope of the embodiments of the present invention.
It should be noted that the various features described in the foregoing embodiments may be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not be described separately for the various possible combinations.
Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a (may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In addition, various different embodiments of the present invention may be arbitrarily combined with each other, and the embodiments of the present invention should be considered as disclosed in the disclosure of the embodiments of the present invention as long as the embodiments do not depart from the spirit of the embodiments of the present invention.
Claims (8)
1. A method for scheduling cloud logistics platform movement, the method comprising:
acquiring the variety of distributed goods of each distribution point;
clustering the hub points according to the categories by adopting a KNN algorithm to form a plurality of hub centers, wherein each hub center is used for collecting and distributing one category of the goods;
determining an optimal scheduling scheme for transporting the goods from the picking point to the hub according to the hub and the corresponding picking point by adopting a genetic algorithm, wherein the picking point is used for sending the goods;
the clustering the hub points according to the categories using the KNN algorithm to form a plurality of hub centers comprises:
loading a data set containing the category into the KNN algorithm;
setting a parameter K of the KNN algorithm;
randomly selecting an unselected collecting and distributing point from the data set as a prediction point;
calculating the distance from the predicted point to each known point respectively, wherein the known points represent the clustering points which are clustered;
sorting the distances in a small to large form;
clustering the predicted points to a distributed center where known points corresponding to the first K distances are located;
judging whether unselected collecting and distributing points exist or not;
under the condition that the unselected collecting and distributing points exist, randomly selecting one unselected collecting and distributing point from the data set again to serve as a prediction point;
under the condition that the unselected hub points do not exist, outputting a plurality of hub centers;
the optimal scheduling scheme for transporting the goods from the picking point to the hub is determined by adopting a genetic algorithm according to the hub and the corresponding picking point respectively comprises the following steps:
a first objective sub-function is set according to equation (1),
wherein f is 1 Is the first objective sub-function, N is the set of pick-up points, g j For the cargo weight of the jth pick-up point, M is a set of dispatchable vehicles, Q m Rated load of the m-th vehicle, x m Indicates whether the m-th vehicle participates in the scheduling, and x is the scheduling of the m-th vehicle m =1, in case the m-th vehicle is not involved in the scheduling, x m =0;
A second objective sub-function is set according to equation (2),
wherein f is 2 For said second objective subfunction, M is a set of schedulable vehicles, c k For a fixed cost of departure for vehicles of the k-vehicle type,indicating whether the m-th vehicle is a k-th vehicle type, in the case where the m-th vehicle is a k-th vehicle type,in the case where the m-th vehicle is not the k-th vehicle type,n is a set of pick-up points, N is the set of pick-up points, c is the cost per unit distance traveled by the vehicle, d ij Is the distance from location i to location j, said locations including said pick-up point and said hub, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case that the m-th vehicle is from the delivery point i to the delivery point j, x mij =0;
A third objective sub-function is set according to equation (3),
wherein f is 3 For said third objective sub-function, M is a set of dispatchable vehicles, N is said set of pick-up points, t ij For the time of travel of the vehicle from position i to position j, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case that the m-th vehicle is from the delivery point i to the delivery point j, x mij =0,T i A latest shipment time limit for pick-up point i;
normalizing the first target sub-function, the second target sub-function and the third target sub-function by adopting a formula (4),
wherein f' is a function after normalization processing, and f is a function before normalization processing;
an objective function is set according to equation (5),
F=min(λ 2 f 2 '-λ 1 f 1 '+λ 3 f 3 '),(5)
wherein F is the objective function, λ 1 、λ 2 And λ 3 Is a predetermined weight, f 1 '、f 2 ' and f 3 ' is the first objective sub-function, the second objective sub-function and the third objective sub-function after normalization processing;
setting the constraint conditions of the objective function according to the formula (6-1) to the formula (6-8),
wherein M is a set of schedulable vehicles, N is a set of the pick-up points, g j The weight of the cargo at jth pick-up point, x mij Indicates whether the m-th vehicle is from pick-up point i to pick-up point j, and x is the case where the m-th vehicle is from pick-up point i to pick-up point j mij =1, in case the m-th vehicle is not from pick-up point i to pick-up point j, x mij =0,Q m Is the rated load of the mth vehicle, P is the set of all positions including the pick-up point and the hub, P j Is the jth of said locations;
wherein M is a set of schedulable vehicles, N is a set of the pickup points, x mij Indicating whether the mth vehicle is from pick-up point i to pick-up point j, x mi0 Indicating whether the mth vehicle is from a delivery point i to a delivery point 0, wherein the delivery point 0 indicates a distribution center;
wherein M is a set of schedulable vehicles, N is a set of the pick-up points, x mij Indicating whether the mth vehicle is from pick-up point i to pick-up point j;
wherein M is a set of schedulable vehicles, N is a set of the pick-up points, x mir Indicating whether the m-th vehicle is from pick-up point i to pick-upCargo point r, x mrj Indicating whether the mth vehicle is from pick-up point r to pick-up point j;
wherein M is a set of schedulable vehicles, N is a set of the pick-up points, x mij Indicating whether the mth vehicle is from pick-up point i to pick-up point j;
2. the method of claim 1, wherein determining, using a genetic algorithm, an optimal scheduling scheme for transporting the cargo from the pick-up point to the hub based on the hub and the corresponding pick-up point, respectively, comprises:
encoding a chromosome of the genetic algorithm;
initializing a population and iteration times;
judging whether the iteration times reach a preset time threshold value or not;
under the condition that the iteration times are judged not to reach the times threshold value, calculating the fitness of each chromosome in the population;
selecting the population;
performing cross operation on the population;
performing mutation operation on the population;
updating the iteration times, and judging whether the iteration times reach the time threshold value again;
and under the condition that the iteration times reach the time threshold value, outputting the chromosome with the maximum fitness as the optimal scheduling scheme.
3. The method of claim 2, wherein encoding the chromosome of the genetic algorithm comprises:
randomly selecting m + n different numbers in the interval range of [1, m + n ] to generate a natural number string, wherein m is the number of schedulable vehicles, n is the number of the pickup points, and 1 is the number of the hub;
judging whether the first digit of the natural number string is positioned in the range of the interval of [1,m ];
under the condition that the first digit of the natural number string is judged to be positioned outside the interval range of [1,m ], deleting the natural number string and randomly selecting m + n different digits again in the interval range of [1, m + n ] to generate a natural number string;
adding a number 0 to the tail of the natural number string under the condition that the first digit of the natural number string is judged to be positioned in the range of [1,m ];
inserting the number 0 in the previous digit of the digits in the interval range of [1,m ] in the non-first digits of the natural number string to generate a chromosome with the length of 2m + n.
4. The method of claim 3, wherein initializing the population and the number of iterations comprises:
extracting a number 0 from the chromosome;
judging whether the extracted first digit of the chromosome is within the range of [1,m ];
coding the chromosome of the genetic algorithm again under the condition that the extracted first digit of the chromosome is judged to be positioned outside the range of the [1,m ];
when the extracted first digit of the chromosome is judged to be positioned in the range of [1,m ], judging whether the total weight of the cargo between any two digits positioned in the range of [1,m ] on the chromosome is smaller than or equal to the rated load of the vehicle;
coding the chromosome of the genetic algorithm again under the condition that the total weight of the cargo between two numbers located in the interval range of [1,m ] is judged to be larger than the rated load of the vehicle;
adding the chromosome to a population if the total weight of the cargo between any two numbers on the chromosome that lie within the interval range of [1,m ] is judged to be less than or equal to the rated load of the vehicle;
judging whether the number of chromosomes in the population is larger than or equal to a preset population scale or not;
coding the chromosomes of the genetic algorithm again under the condition that the number of the chromosomes in the population is judged to be smaller than the population scale;
and outputting the population under the condition that the number of chromosomes in the population is judged to be larger than or equal to the population size.
5. The method of claim 4, wherein said calculating the fitness of each of said chromosomes in the population comprises:
the fitness function is determined according to equation (7),
wherein F' is the fitness function, and F is an objective function;
the selecting operation of the population comprises:
selecting the population according to formula (8),
wherein, F i Fitness of the chromosome of item i, P (F) i ) A probability of being selected for the ith chromosome;
the performing of the crossover operation on the population comprises:
randomly selecting two chromosomes from the population as a first parent chromosome and a second parent chromosome;
randomly extracting a non-0 number at x positions from the first parent chromosome and inserting it into a corresponding position in the second parent chromosome to form a new chromosome;
processing the new chromosome by adopting a preset checking operator and adding the chromosome into the population;
updating the crossing times, wherein the initial crossing times are 0;
judging whether the crossing times are greater than or equal to a preset crossing time threshold value or not;
under the condition that the crossing times are judged to be smaller than the crossing time threshold value, randomly selecting two chromosomes from the population again to serve as a first parent chromosome and a second parent chromosome;
outputting the population under the condition that the crossing times are judged to be greater than or equal to the crossing time threshold;
the performing variation operations on the population comprises:
randomly selecting an unselected chromosome from the population;
randomly generating variation times and a variation threshold;
randomly selecting two positions on the chromosome, and exchanging numbers on the two positions to update the chromosome;
judging whether the variation frequency is greater than or equal to the variation threshold value;
under the condition that the mutation frequency is judged to be smaller than the mutation threshold value, updating the mutation frequency, randomly selecting two positions on the chromosome again, and exchanging numbers on the two positions to update the chromosome;
processing the chromosome by adopting the checking operator under the condition that the mutation times is judged to be greater than or equal to the mutation threshold value, and adding the chromosome into the population;
judging whether unselected chromosomes exist in the population;
under the condition that the unselected chromosomes exist in the population, randomly selecting one unselected chromosome from the population again;
and outputting the population under the condition that the unselected chromosomes do not exist in the population.
6. The method of claim 5, wherein the inspection operator comprises:
extracting a number 0 from the chromosome;
judging whether the extracted first digit of the chromosome is within the range of [1,m ];
when the extracted first digit of the chromosome is judged to be positioned outside the range of [1,m ], exchanging the last digit positioned in the range of [1,m ] on the chromosome with the first digit of the chromosome to update the chromosome, and judging whether the total weight of the cargo between any two digits positioned in the range of [1,m ] on the chromosome is larger than the rated load of the vehicle;
when the extracted first digit of the chromosome is judged to be positioned in the range of [1,m ], judging whether the total weight of the cargoes between any two digits positioned in the range of [1,m ] on the chromosome is larger than the rated load of the vehicle;
initializing a variation frequency and a variation threshold under the condition that the total weight of the cargos of any two numbers which are positioned in the interval range of [1,m ] on the chromosome is judged to be less than or equal to the rated load of the vehicle;
randomly selecting two positions on the chromosome, and exchanging numbers on the two positions to update the chromosome;
judging whether the variation frequency is greater than or equal to the variation threshold value;
under the condition that the mutation frequency is judged to be smaller than the mutation threshold value, updating the mutation frequency, randomly selecting two positions on the chromosome again, and exchanging numbers on the two positions to update the chromosome;
under the condition that the variation frequency is judged to be greater than or equal to the variation threshold value, outputting a new chromosome and extracting the number 0 in the chromosome again;
and under the condition that the total weight of the cargoes of any two numbers positioned in the interval range of [1,m ] on the chromosome is judged to be less than or equal to the rated load of the vehicle, outputting the chromosome.
7. A system for scheduling capacity of a cloud logistics platform, the system comprising a processor configured to perform the method of any of claims 1 to 6.
8. A storage medium storing instructions for reading by a machine to cause the machine to perform a method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910635877.0A CN110533279B (en) | 2019-07-15 | 2019-07-15 | Method, system and storage medium for scheduling cloud logistics platform |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910635877.0A CN110533279B (en) | 2019-07-15 | 2019-07-15 | Method, system and storage medium for scheduling cloud logistics platform |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110533279A CN110533279A (en) | 2019-12-03 |
CN110533279B true CN110533279B (en) | 2023-01-06 |
Family
ID=68660223
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910635877.0A Active CN110533279B (en) | 2019-07-15 | 2019-07-15 | Method, system and storage medium for scheduling cloud logistics platform |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110533279B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110942271B (en) * | 2019-12-11 | 2021-04-09 | 江苏佳利达国际物流股份有限公司 | Intelligent transportation scheduling management method based on neural network genetic algorithm |
CN112184099A (en) * | 2020-08-21 | 2021-01-05 | 安徽信息工程学院 | Method for optimizing transportation problem based on K-Means clustering and genetic algorithm |
CN117350607B (en) * | 2023-09-18 | 2024-06-07 | 嘉兴环洋电商物流服务有限公司 | International logistics transportation path planning system of improved KNN algorithm model |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699982A (en) * | 2013-12-26 | 2014-04-02 | 浙江工业大学 | Logistics distribution control method with soft time windows |
WO2018196525A1 (en) * | 2017-04-27 | 2018-11-01 | 北京京东尚科信息技术有限公司 | Goods handling method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20180032955A1 (en) * | 2016-08-01 | 2018-02-01 | Sap Se | System and method of minimizing waiting time in vehicle routing and scheduling with narrow time-windows |
-
2019
- 2019-07-15 CN CN201910635877.0A patent/CN110533279B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103699982A (en) * | 2013-12-26 | 2014-04-02 | 浙江工业大学 | Logistics distribution control method with soft time windows |
WO2018196525A1 (en) * | 2017-04-27 | 2018-11-01 | 北京京东尚科信息技术有限公司 | Goods handling method and device |
Non-Patent Citations (4)
Title |
---|
"Solving vehicle routing problem by using improved K-nearest neighbor algorithm for best solution";Mazin AbedMohammed等;《Journal of Computational Science》;20171231;第21卷;第232-240页 * |
"基于 K-Means++和遗传算法的提货车辆路径研究";张雪婷;《中国优秀硕士学位论文全文数据库信息科技辑》;20180115;第2018年卷(第01期);第I140-115页 * |
"基于云平台的多配送中心车辆调度问题研究";邢鹏;《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》;20131215;第2013年卷(第S22期);第C034-723页 * |
时间限制下的应急疏散车辆调度模型;俞武扬;《电子科技大学学报(社科版)》;20130630;第15卷(第03期);第28-31页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110533279A (en) | 2019-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110533279B (en) | Method, system and storage medium for scheduling cloud logistics platform | |
US10229385B2 (en) | Free location item and storage retrieval | |
Liu et al. | Novel multi-objective resource allocation and activity scheduling for fourth party logistics | |
CN112183812B (en) | Finished cigarette logistics vehicle scheduling method considering short-time and low-cost | |
CN115994725A (en) | Logistics part freight method, device, equipment and storage medium | |
CN112488386B (en) | Logistics vehicle distribution planning method and system based on distributed entropy multi-target particle swarm | |
CN115860613B (en) | Spare part and vehicle goods matching and vehicle dispatching method considering reservation mechanism | |
WO2021106977A1 (en) | Transportation route determination method, computer program, and transportation route determination device | |
CN113673922A (en) | Fishbone type warehouse layout-based multi-vehicle picking path problem optimization method and system | |
Arishi et al. | Machine learning approach for truck-drones based last-mile delivery in the era of industry 4.0 | |
CN115345549B (en) | Vehicle path adjustment method and system combined with loading scheme | |
Wang et al. | Simulation-based optimisation of logistics distribution system for an assembly line with path constraints | |
CN115081119B (en) | Method, device and equipment for optimizing train loading and readable storage medium | |
CN113120487A (en) | Inventory system and goods storing and taking method | |
KR102503198B1 (en) | Device and method for providing optimal cargo delivery route based on artificial intelligence | |
CN111985683B (en) | Path optimization method for material distribution of multi-target discrete assembly workshop | |
CN111199375A (en) | Intelligent logistics transportation system | |
Naumov et al. | Model of the delivery routes forming process as a service provided by forwarding companies | |
CN116664053B (en) | Commodity inventory management method | |
CN117236824B (en) | Logistics scheduling method for agricultural product online transaction platform | |
CN113762563A (en) | Warehousing goods space optimal layout method and system based on order grey correlation analysis | |
CN113780913B (en) | Method and device for generating safety stock information | |
CN113935528A (en) | Intelligent scheduling method and device, computer equipment and storage medium | |
CN117709836A (en) | Management system of digital logistics supply chain | |
Islam et al. | Solving capacitated vehicle routing problem by using heuristic approaches: A case study |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |