CN111445094B - Express vehicle path optimization method and system based on time requirement - Google Patents
Express vehicle path optimization method and system based on time requirement Download PDFInfo
- Publication number
- CN111445094B CN111445094B CN202010347591.5A CN202010347591A CN111445094B CN 111445094 B CN111445094 B CN 111445094B CN 202010347591 A CN202010347591 A CN 202010347591A CN 111445094 B CN111445094 B CN 111445094B
- Authority
- CN
- China
- Prior art keywords
- time
- individual
- vehicle
- delivery
- point
- 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
- 238000000034 method Methods 0.000 title claims abstract description 37
- 238000005457 optimization Methods 0.000 title claims abstract description 24
- 238000012384 transportation and delivery Methods 0.000 claims abstract description 78
- 230000002068 genetic effect Effects 0.000 claims abstract description 41
- 238000009826 distribution Methods 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 13
- 230000006870 function Effects 0.000 claims description 7
- 238000002360 preparation method Methods 0.000 claims description 7
- 230000035772 mutation Effects 0.000 claims description 6
- 238000003860 storage Methods 0.000 claims description 6
- 238000012163 sequencing technique Methods 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 abstract description 27
- 230000000694 effects Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 12
- 210000000349 chromosome Anatomy 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002860 competitive effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
- 230000002028 premature Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000004083 survival effect Effects 0.000 description 1
Images
Classifications
-
- 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/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- 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/08—Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
- G06Q10/083—Shipping
- G06Q10/0835—Relationships between shipper or supplier and carriers
- G06Q10/08355—Routing methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Economics (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Strategic Management (AREA)
- General Physics & Mathematics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Marketing (AREA)
- Entrepreneurship & Innovation (AREA)
- Bioinformatics & Computational Biology (AREA)
- Development Economics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Genetics & Genomics (AREA)
- Game Theory and Decision Science (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Physiology (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a method and a system for optimizing express vehicle paths in combination with time requirements. And adopting a roulette method to perform primary selection on the population, adopting triangular probability to perform secondary selection on unselected individuals, and finally decoding the optimal individual to obtain a path after the vehicle is optimized. The method can effectively solve the problem of complex express delivery path and time requirements, and also improves the optimization effect of the genetic algorithm.
Description
Technical Field
The invention relates to the technical field of logistics optimization, in particular to a method and a system for optimizing express vehicle paths in combination with time requirements.
Background
Express delivery is an emerging logistics business that has developed in the last two to thirty years, is particularly rapid in the last ten years, has become an important support for electronic commerce, and is called the "last mile" logistics closest to customers. The express industry has developed from past unordered competition to present ordered competition, and the time, efficiency and service quality of express delivery directly determine the survival of express companies. In the face of intense market competition, express companies increasingly attach importance to improving service quality and reducing operation cost, and the problem of vehicle route is the core problem of improving distribution efficiency of the express companies. The early vehicle path problem is solved by some simple and accurate algorithms, such as a split plane method, a branch and bound method, a network flow algorithm, a dynamic programming method and the like, but the algorithms are only suitable for small-scale vehicle path problems. With the generation and application of intelligent heuristic algorithms in recent years, many scholars at home and abroad adopt various intelligent heuristic algorithms to study the problem.
The Maryori considers the number of express items, the vehicle load, the vehicle capacity and the like in research, takes the influence factors as constraints, and optimizes the delivery path of the express items through a genetic algorithm. The Li Lingyu utilizes a C-W saving algorithm to carry out optimization research on the express delivery route, and develops express delivery route optimization software based on the Internet by combining with a Gaode map; the method comprises the steps that the problem of LBS express delivery route is optimized through a particle swarm algorithm by the Bambuting; the delivery path of the express is optimized by the method of the elite ant colony system simulation in the old. Because the code of the optimization problem is that random vehicle numbers are arranged from small to large according to the client numbers, the total number of vehicles is the upper limit of the vehicle numbers, for example, 4 vehicles are provided, the vehicle numbers serving each client are natural numbers between 1 and 4, and the genetic algorithm is optimized by simulating the genetic inheritance principle, namely, the inheritance is completed by changing the base pairs of chromosomes, and the base pairs are A-T, T-A, C-G, G-C4 types, the code of the problem is identical with the chromosomes in genetics, and the problem is solved by using the genetic algorithm particularly effectively. The genetic algorithm is an optimization algorithm which realizes global search by changing chromosomes in a population by utilizing the principle of biological competitive selection, has strong global search capability, but the search is earlier converged due to the existence of a knockout mechanism, and finally the premature phenomenon occurs.
Disclosure of Invention
In view of this, the present invention aims to provide a method and a system for optimizing an express delivery vehicle route in combination with a time requirement, which can not only effectively solve the problem of complex express delivery route and time requirement, but also improve the optimization effect of a genetic algorithm.
The invention is realized by adopting the following scheme: a method for optimizing express delivery vehicle paths in combination with time requirements specifically comprises the following steps:
step S1: acquiring vehicle number information, customer time requirement information and distribution point information, and carrying out combined coding on the information to form genetic codes [ y1, y 2.,. yi.,. yn ], wherein each genetic code corresponds to an individual;
step S2: initializing a population, setting the iteration number G to be 1,
step S3: calculating the fitness value of each individual, and selecting the individual with the minimum fitness value as the optimal individual, wherein the fitness value is the total time cost T of all vehicles in the individual A The reciprocal of (a);
step S4: judging whether the current iteration number meets the requirement, if so, entering a step S8, otherwise, entering a step S5;
step S5: adopting a roulette method, selecting whether the individual enters the next generation according to the fitness value of each individual and the probability function, wherein the higher the fitness value is, the higher the probability of entering the next generation is; the individuals selected to enter the next generation go to step S6, and the individuals not selected to enter the next generation go to step S7;
step S6: performing crossing operation and mutation operation, and sending the crossed and mutated population to step S8;
step S7: secondly selecting unselected individuals by adopting the triangular probability, sequencing the unselected individuals in the step S4, determining whether to update the unselected individuals according to the triangular distribution probability of the individuals, and sending the updated unselected individuals and the unselected individuals into the step S8 after updating the currently selected individuals;
step S8: obtaining a new population, and enabling the iteration times G to be G + 1;
step S9: and decoding the genetic codes of the optimal individuals of the current population to obtain the optimal driving path of each vehicle.
Further, in step S1, in the genetic code [ y1, y2,.., yi,. yn ], the value of the element yi represents the number of the vehicle, the vector position where the element is located represents the customer number to be served by the vehicle of the number, and each element yi is bound with the corresponding customer time requirement information and the distribution point position information, and the road section information of the distribution point to another distribution point.
Further, the calculating the fitness value of each individual specifically includes the following steps:
step S31: for the genetic code of an individual, finding all elements with the element value of j, acquiring the positions of the elements in the genetic code, namely all client numbers to be served by j, and acquiring the information bound by j;
step S32: according to the time requirement of the client, the vehicle j sequentially goes from the distribution center to the distribution points corresponding to the clients according to the sequence of time from first to last and finally returns to the distribution center to obtain the path of the vehicle j in the individual;
step S33: according to the method from step S31 to step S32, all codes in the individual are traversed to obtain the paths of all vehicles corresponding to one individual, the total time cost of all vehicles in the individual is calculated according to the paths, and the reciprocal value of the total time cost is taken as the fitness value of the individual.
Further, in step S3, the total time cost T of all vehicles in one individual A Is calculated as follows:
in the formula, V is a number set of distribution vehicles, V ═ 1, 2.. multidot.m }, and m is a total number of vehicles; p is a number set of distribution points, where P is {1, 2., l }, and l is a total number of distribution points; t is the number set of the time period of delivery, T ═ T 1 ,T 2 ,...,T D },T D Total number of time periods for a day; c is a uniform number set of the clients, C ═ 1, 2.., n }, and n is the total number of the uniform numbers of the clients; t is H Numbering sets for morning and evening congested periods, T L Numbering sets for blocks of noon congestion, T H And T L All T subsets; t is t ij Denotes the time required from point i to point j, q i Indicating the number of deliveries to the delivery point i,indicating the additional waiting traffic light time required from delivery point i to delivery point j during the peak hours of commuting,indicating the additional waiting traffic light time, E, required from delivery point i to delivery point j at noon peak hours T (i) Represents the penalty time cost, w, incurred by failing to meet the customer time requirement ij Indicating the time to wait before reaching the delivery point, theta indicates the average waiting time of each dispatch,the average sign-in time of each express is represented, and alpha represents the average preparation time before each express signs-in; x is the number of ijtk Representing integer variables, x, when the delivery vehicles are from delivery points i to j and within the corresponding planned time period ijtk 1, otherwise x ijtk =0;y ijtk Representing an integer variable, when the delivery vehicle is from delivery point i to j, at a time in the morning and evening rush hour period, y ijtk 1, otherwise y ijtk =0;z ijtk Representing an integer variable, z, when the delivery vehicle is from delivery point i to j, during the mid-day rush hour period ijtk 1, otherwise z ijtk =0。
Further, the extra waiting traffic light time required from the i point of the distribution point to the j point of the distribution point during the peak period of going to and from workAdditional waiting traffic light time required from delivery point i to delivery point j at noon peak hoursAverage sign-in time of each expressAnd the average preparation time alpha before each express is signed in is estimated by historical data.
Further, the penalty time cost E generated by the failure to meet the customer time requirement T (i) Is calculated as follows:
E T (i) 60 x the point error fee/average salary.
Further, the interleaving operation specifically comprises: setting a first judgment probability P, randomly generating a random number from 0 to 1 for each genetic code on an individual, and if the random number is greater than the first judgment probability P, randomly replacing the original code with the code at the corresponding position of other individuals;
the mutation operation specifically comprises the following steps: and setting a second judgment probability P, judging all elements on each individual, generating a random number between 0 and 1 for each element, and randomly generating a trolley number to replace the element if the random number is greater than the second judgment probability P.
Further, in step S7, the triangular probability formula for each individual is:
P j =2(n+1-j)/n(n+1),j=1,…,n;
in the formula, n is the number of unselected individuals, j is the ranking of the fitness value of the individual in the rest of individuals, the individual j with the highest fitness value is 1, the triangular probability is 2/(n +1), the individual j with the lowest fitness value is n, and the triangular probability is 2/n (n + 1).
Further, the decoding in step S9 specifically includes: aiming at each vehicle number, finding all elements in the genetic code of the vehicle in the optimal individual, acquiring the positions of the elements in the genetic code, namely all customer numbers to be served by the vehicle, acquiring corresponding distribution points according to the customer numbers, and acquiring code binding information; and for the same vehicle, sequentially arranging the vehicle to go to each distribution point from the distribution center and then return to the distribution center according to the time sequence required by the customer.
The invention also provides a path optimization system of the express vehicle path optimization method based on the combination of the time requirement, which comprises an input module for acquiring vehicle number information and customer time requirement information, a map application module for acquiring distribution point positions and road section information, an output module for outputting a path optimization result, a storage module and a processor; the memory module stores therein a computer program that can be executed by the processor, which when executing executes the computer program performs the method steps as described above.
Compared with the prior art, the invention has the following beneficial effects: the invention applies the genetic algorithm added with the local search module to the express vehicle distribution path planning, thereby greatly shortening the express vehicle delivery time. Meanwhile, factors including the driving time of the express delivery vehicle, the traffic jam time, the preparation time for sorting before delivery, the time for the customer to sign in from the delivery point, the time for waiting for the customer to reach the delivery point and the time for waiting in advance from the delivery point are included in the calculation of the adaptability value, so that the satisfaction degree of the customer can be improved to a greater extent by the result of the algorithm.
Drawings
Fig. 1 is a route location diagram of an express delivery point according to an embodiment of the present invention. Where, O denotes a distribution center, C1, C2, and C3 denote traffic congestion positions, 1,2, 3, 4, 5, 6, 7, 8, and 9 denote distribution points, each of which includes a plurality of customers, and each of the distribution points is represented by a distance, which is expressed in kilometers, for example, the distance between 1 and 2 points is 0.9 kilometer.
FIG. 2 is a flow chart of a genetic algorithm according to an embodiment of the present invention.
FIG. 3 is a decoding diagram according to an embodiment of the present invention.
FIG. 4 is a comparison graph of the optimized iteration curves of the algorithm of the embodiment of the present invention and the standard genetic algorithm under the same example.
Fig. 5 is a diagram of a path and a node for final optimization of an express delivery vehicle according to an embodiment of the present invention.
FIG. 6 is a table of customer requirements according to an embodiment of the present invention.
Fig. 7 is a distance table of a region according to an embodiment of the present invention, which includes information on traffic jam sections.
FIG. 8 is a table comparing the optimization results of the algorithm of the present invention and the standard genetic algorithm under the same example.
Detailed Description
The invention is further explained below with reference to the drawings and the embodiments.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 2, the invention provides a method for optimizing a express delivery vehicle path in combination with a time requirement, which specifically comprises the following steps:
step S1: acquiring vehicle number information, customer time requirement information and distribution point information, and carrying out combined coding on the information to form genetic codes [ y1, y 2.,. yi.,. yn ], wherein each genetic code corresponds to an individual;
step S2: initializing a population, setting the iteration number G to be 1,
step S3: calculating the fitness value of each individual, and selecting the individual with the minimum fitness value as the optimal individual, wherein the fitness value is the total time cost T of all vehicles in the individual A The reciprocal of (a);
step S4: judging whether the current iteration number meets the requirement, if so, entering a step S8, otherwise, entering a step S5;
step S5: adopting a roulette method, selecting whether the individual enters the next generation according to the fitness value of each individual and the probability function, wherein the higher the fitness value is, the higher the probability of entering the next generation is; the individuals selected to enter the next generation go to step S6, and the individuals not selected to enter the next generation go to step S7;
step S6: performing crossing operation and mutation operation, and sending the crossed and mutated population to step S8;
step S7: secondly selecting unselected individuals by adopting the triangular probability, sequencing the unselected individuals in the step S4, determining whether to update the unselected individuals according to the triangular distribution probability of the individuals, and sending the currently selected individuals together with the unselected individuals into the step S8 after updating operation is carried out on the currently selected individuals, wherein the updating operation is as follows;
1) setting an upper limit L of the replacement length which is less than the total length of the code, and randomly generating a replacement length for an individual i:
l(i)=Int(rand×L),i=1,…,n
2) randomly extracting a section of code from the optimal solution, wherein the code length is l (i), and replacing the code on the corresponding position of the individual i;
3) calculating new individual adaptive values, if the adaptive values are improved, replacing the old individual, otherwise, randomly generating a code to replace the original individual;
step S8: obtaining a new population, and enabling the iteration times G to be G + 1;
step S9: and decoding the genetic codes of the optimal individuals of the current population to obtain the optimal driving path of each vehicle.
In this embodiment, in step S1, in the genetic code [ y1, y2,.. once, yi.. once ] yn ], the value of the element yi represents the number of the vehicle, the vector position where the element is located represents the customer number to be serviced by the vehicle of the number, and each element yi is bound with the corresponding customer time requirement information, the distribution point position information, and the road section information of the distribution point going to another distribution point.
In this embodiment, the calculating the fitness value of each individual specifically includes the following steps:
step S31: for the genetic code of an individual, finding all elements with the element value of j, acquiring the positions of the elements in the genetic code, namely all client numbers to be served by j, and acquiring the information bound by j;
step S32: according to the time requirement of the client, the vehicle j sequentially goes from the distribution center to the distribution points corresponding to the clients according to the sequence of time from first to last and finally returns to the distribution center to obtain the path of the vehicle j in the individual;
step S33: according to the method from step S31 to step S32, all codes in the individual are traversed to obtain the paths of all vehicles corresponding to one individual, the total time cost of all vehicles in the individual is calculated according to the paths, and the reciprocal value of the total time cost is taken as the fitness value of the individual.
In the present embodiment, in step S3, the total time cost T of all vehicles in one individual A Is calculated as follows:
in the formula, V is a number set of distribution vehicles, V ═ 1, 2.. multidot.m }, and m is a total number of vehicles; p is a number set of distribution points, P is {1, 2.., l }, and l is a total number of distribution points; t is the number set of the time period of delivery, T ═ T 1 ,T 2 ,...,T D },T D The total number of time periods for a day, e.g. the distribution time period for a day is from 9 am, each time period being one hour, for a total of 11 time periods, T 1 Then represents a time period of 9:00-10:00, T 5 Then represents a time period of 14:00-15: 00; c is a uniform number set of the clients, C ═ 1, 2.., n }, and n is the total number of the uniform numbers of the clients; t is H Numbering sets for morning and evening congested periods, T L Numbering sets for blocks of noon congestion, T H And T L All T subsets; t is t ij Denotes the time required from point i to point j, q i Indicating the number of deliveries to the delivery point i,indicating the additional waiting traffic light time required from delivery point i to delivery point j during the peak hours of commuting,indicating the extra waiting traffic light time, E, required from delivery point i to delivery point j during the midday peak T (i) Represents the penalty time cost, w, incurred by failing to meet the customer time requirement ij Indicating the time to wait before reaching the delivery point, theta indicates the average waiting time of each dispatch,the average sign-in time of each express is represented, and alpha represents the average preparation time before each express signs-in; x is the number of ijtk Representing integer variables, x, when the delivery vehicles are from delivery points i to j and within the corresponding planned time period ijtk 1, otherwise x ijtk =0;y ijtk Representing an integer variable, when the delivery vehicle is from delivery point i to j, at a time in the morning and evening rush hour period, y ijtk 1, otherwise y ijtk =0;z ijtk Representing an integer variable, z, when the delivery vehicle is from delivery point i to j, during the mid-day rush hour period ijtk 1, otherwise z ijtk =0。
In this embodiment, the extra waiting time for traffic lights from i point to j pointAdditional waiting traffic light time required from delivery point i to delivery point j at noon peak hoursAverage sign-in time of each expressAnd the average preparation time alpha before each express is signed in is estimated by historical data.
The required extra waiting traffic light time comprises three peak periods of the road in the morning, the noon and the evening, the extra waiting traffic light time is calculated only in the road section which can generate congestion, the information of the congested road section can be obtained according to historical data statistics, and if the time is in the congestion period and is in the peak period of the road, the extra waiting traffic light time is added to the total consumption time.
In this embodiment, the penalty time cost E generated by the failure to meet the customer time requirement T (i) Is calculated as follows:
E T (i) 60 x the point error fee/average salary.
If the route planning is not reasonable, the delivery time exceeds the time requirement of the client, and a certain penalty is given, wherein the penalty is that the money penalty is converted into the time cost and is added into the total time cost. For example, the time cost is 60 minutes when the error point fee is 30 yuan and the average salary of each courier is 30 yuan, and if the two customer demand times are exceeded, the penalty time cost is 2 × 30-60 minutes.
Preferably, if it is found that the time finally returned to the distribution center exceeds the time constraint, a time cost with a larger value is added, for example, the time returned to the distribution center is late, which causes the related personnel to be unable to go off duty on time, so that additional subsidies need to be given to the personnel, for example, 120 yuan, and the salary of the courier is 30 yuan, which needs to pay a time cost of 4 hours.
In this embodiment, the crossing operation specifically includes: setting a first judgment probability P, randomly generating a random number from 0 to 1 for each genetic code on an individual, and if the random number is greater than the first judgment probability P, randomly replacing the original code with the codes at corresponding positions of other individuals;
the mutation operation specifically comprises the following steps: and setting a second judgment probability P, judging all elements on each individual, generating a random number between 0 and 1 for each element, and randomly generating a trolley number to replace the element if the random number is greater than the second judgment probability P.
In the present embodiment, in step S7, the triangular probability formula for each individual is:
P j =2(n+1-j)/n(n+1),j=1,…,n;
in the formula, n is the number of unselected individuals, j is the ranking of the fitness value of the individual in the rest of individuals, the individual j with the highest fitness value is 1, the triangular probability is 2/(n +1), the individual j with the lowest fitness value is n, and the triangular probability is 2/n (n + 1).
In this embodiment, the decoding in step S9 specifically includes: aiming at each vehicle number, finding all elements in the genetic code of the vehicle in the optimal individual, acquiring the positions of the elements in the genetic code, namely all customer numbers to be served by the vehicle, acquiring corresponding distribution points according to the customer numbers, and acquiring code binding information; and for the same vehicle, sequentially arranging the vehicle to go to each distribution point from the distribution center and then return to the distribution center according to the time sequence required by the customer. The decoding process can obtain the driving path, and also can obtain the time of arriving at the distribution point and the time of leaving the distribution point, namely the driving path can be planned in y time. Fig. 3 is an example of decoding. Wherein, the time requirement of the client is coded into the code of the time period, such as 1 represents 9:00-10:00, 2 represents 10:00-11:00, and so on. And arranging the rest numbers according to the time sequence according to the time requirement of the client to generate the path plan of the express delivery vehicle, wherein the path of the No. 3 vehicle decoded by the example is changed into 3-1-5-10.
The embodiment also provides a route optimization system of the express vehicle route optimization method based on the time requirement, which comprises an input module for acquiring vehicle number information and customer time requirement information, a map application module for acquiring distribution point positions and road section information, an output module for outputting route optimization results, a storage module and a processor; the memory module stores therein a computer program that can be executed by the processor, which when executing executes the computer program performs the method steps as described above.
The map application module can adopt a Baidu map or a Gade map.
As shown in fig. 1, fig. 1 is a route location diagram of an express delivery point according to an embodiment of the present invention, and corresponding customer requirements are shown in fig. 6, where the customer numbers, the delivery points where the customers are located, and the earliest and latest delivery times required by the customers are included, in this embodiment, 78 customer numbers, 9 corresponding delivery points, 4 vehicles responsible for delivery, and information such as traffic jam sections obtained from historical data are shown in fig. 7. The optimal path of the vehicle obtained by decoding the optimal individual obtained by the method of the embodiment is shown in fig. 5, and the calculated total delivery time length is shown in fig. 8, wherein the total time cost obtained by the algorithm of the embodiment is 1581 minutes, while the time cost obtained by the conventional algorithm is 1823.6, and obviously, the algorithm of the embodiment can shorten more time cost. Meanwhile, the optimized iteration curve of the genetic algorithm and the traditional genetic algorithm is shown in fig. 4, and it can be seen that the genetic algorithm of the embodiment has a better effect.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing is directed to preferred embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow. However, any simple modification, equivalent change and modification of the above embodiments according to the technical essence of the present invention are within the protection scope of the technical solution of the present invention.
Claims (7)
1. A method for express vehicle path optimization in combination with time requirements, comprising the steps of:
step S1: acquiring vehicle number information, customer time requirement information and distribution point information, and carrying out combined coding on the information to form genetic codes [ y1, y 2.,. yi.,. yn ], wherein each genetic code corresponds to an individual;
step S2: initializing a population, setting the iteration number G to be 1,
step S3: calculating the fitness value of each individual, and selecting the individual with the minimum fitness value as the optimal individual, wherein the fitness value is the total time cost T of all vehicles in the individual A The reciprocal of (a);
step S4: judging whether the current iteration number meets the requirement, if so, entering a step S8, otherwise, entering a step S5;
step S5: adopting a roulette method, selecting whether the individuals enter the next generation or not according to the fitness value of each individual and the probability function, wherein the larger the fitness value is, the higher the probability of entering the next generation is; the individuals selected to enter the next generation go to step S6, and the individuals not selected to enter the next generation go to step S7;
step S6: performing crossing operation and mutation operation, and sending the crossed and mutated population to step S8;
step S7: secondly selecting unselected individuals by adopting the triangular probability, sequencing the unselected individuals in the step S4, determining whether to update the unselected individuals according to the triangular distribution probability of the individuals, and sending the updated unselected individuals and the unselected individuals into the step S8 after updating the currently selected individuals;
step S8: obtaining a new population, and enabling the iteration times G to be G + 1;
step S9: decoding the genetic codes of the optimal individuals of the current population to obtain the optimal running path of each vehicle;
in step S1, in the genetic code [ y1, y 2.. once, yi.. once,. yn ], the value of the element yi represents the number of the vehicle, the vector position where the element is located represents the customer number to be served by the vehicle of the number, and each element yi is bound with corresponding customer time requirement information, distribution point position information and road section information of a distribution point going to another distribution point;
in step S3, the total time cost T of all vehicles in an individual A Is calculated as follows:
in the formula, V is a number set of distribution vehicles, V ═ 1, 2.. multidot.m }, and m is a total number of vehicles; p is a number set of distribution points, P is {1, 2.., l }, and l is a total number of distribution points; t is the number set of the time period of delivery, T ═ T 1 ,T 2 ,...,T D },T D Total number of time periods for a day; c is a uniform number set of the clients, C ═ 1, 2.., n }, and n is the total number of the uniform numbers of the clients; t is H Numbering sets for morning and evening congested periods, T L Numbering sets for blocks of noon congestion, T H And T L All T subsets; t is t ij Denotes the time required from point i to point j, q i The number of the delivery point i is indicated,indicating the additional waiting traffic light time required from delivery point i to delivery point j during the peak hours of commuting,indicating the additional waiting traffic light time, E, required from delivery point i to delivery point j at noon peak hours T (i) Represents the penalty time cost, w, incurred by failing to meet the customer time requirement ij Indicating the time to wait before reaching the delivery point, theta indicates the average waiting time of each dispatch,the average sign-in time of each express is represented, and alpha represents the average preparation time before each express signs-in; x is the number of ijtk Representing integer variables, x, when the delivery vehicles are from delivery points i to j and within the corresponding planned time period ijtk 1, otherwise x ijtk =0;y ijtk Representing an integer variable, when the delivery vehicle is from delivery point i to j, at a time in the morning and evening rush hour period, y ijtk 1, otherwise y ijtk =0;z ijtk Representing an integer variable, z, when the delivery vehicle is from delivery point i to j, during the mid-day rush hour period ijtk 1, otherwise z ijtk =0;
In step S7, the triangular probability formula for each individual is:
wherein n is the number of unselected individuals, j 3 Is the rank of the fitness value of the individual in the rest individuals, and the individual j with the highest fitness value 3 1, the triangular probability is 2/(n +1), and the individual j with the lowest fitness value 3 Is n, the triangular probability is 2/n (n + 1).
2. The method for express vehicle path optimization in combination with time requirement as claimed in claim 1, wherein the calculating the fitness value of each individual specifically comprises the following steps:
step S31: for genetic coding of an individual, find the element value j 1 The position of these elements in the genetic code is obtained, i.e. the element value is j 1 All the clients to be served have numbers and the element value is acquired as j 1 Binding information;
step S32: according to the time requirement of the client, the vehicle j 2 According to the sequence of time from first to last, the vehicles j in the individual are obtained by going from the distribution center to the distribution points corresponding to the customers in sequence and returning to the distribution center 2 A path of (a);
step S33: according to the method from step S31 to step S32, all codes in the individual are traversed to obtain the paths of all vehicles corresponding to one individual, the total time cost of all vehicles in the individual is calculated according to the paths, and the reciprocal value of the total time cost is taken as the fitness value of the individual.
3. The method for route optimization of courier vehicles with combination of time requirement as claimed in claim 2, wherein the additional waiting traffic light time from i point of delivery to j point of delivery during peak hours of workAdditional waiting traffic light time required from delivery point i to delivery point j at noon peak hoursAverage sign-in time of each expressAnd the average preparation time alpha before each express is signed in is estimated by historical data.
4. According to claim 3The express delivery vehicle path optimization method combined with the time requirement is characterized in that the penalty time cost E generated by the failure of meeting the time requirement of the client T (i) Is calculated as follows:
E T (i) 60 x the point error fee/average salary.
5. The express vehicle path optimization method in combination with time requirements of claim 1,
the crossing operation specifically comprises the following steps: setting a first judgment probability P, randomly generating a random number from 0 to 1 for each genetic code on an individual, and if the random number is greater than the first judgment probability P, randomly replacing the original code with the code at the corresponding position of other individuals;
the mutation operation specifically comprises the following steps: and setting a second judgment probability P, judging all elements on each individual, generating a random number between 0 and 1 for each element, and randomly generating a trolley number to replace the element if the random number is greater than the second judgment probability P.
6. The method for optimizing the express vehicle route according to the combination of the time requirement, according to claim 1, wherein the decoding in step S9 is specifically: aiming at each vehicle number, finding all elements in the genetic code of the vehicle in the optimal individual, acquiring the positions of the elements in the genetic code, namely all customer numbers to be served by the vehicle, acquiring corresponding distribution points according to the customer numbers, and acquiring code binding information; and for the same vehicle, sequentially arranging the vehicle to go to each distribution point from the distribution center and then return to the distribution center according to the time sequence required by the customer.
7. A path optimization system based on the express vehicle path optimization method combined with the time requirement of any one of claims 1 to 6, is characterized by comprising an input module for acquiring vehicle number information and customer time requirement information, a map application module for acquiring distribution point position and road section information, an output module for outputting a path optimization result, a storage module and a processor; the memory module stores a computer program that can be executed by the processor, and the processor implements the method steps according to any one of claims 1 to 6 when executing the computer program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010347591.5A CN111445094B (en) | 2020-04-28 | 2020-04-28 | Express vehicle path optimization method and system based on time requirement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010347591.5A CN111445094B (en) | 2020-04-28 | 2020-04-28 | Express vehicle path optimization method and system based on time requirement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111445094A CN111445094A (en) | 2020-07-24 |
CN111445094B true CN111445094B (en) | 2022-08-12 |
Family
ID=71651903
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010347591.5A Active CN111445094B (en) | 2020-04-28 | 2020-04-28 | Express vehicle path optimization method and system based on time requirement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111445094B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112132312B (en) * | 2020-08-14 | 2022-08-23 | 蓝海(福建)信息科技有限公司 | Path planning method based on evolutionary multi-objective multi-task optimization |
CN112138304A (en) * | 2020-09-27 | 2020-12-29 | 华东师范大学 | Multi-vehicle linkage fire extinguishing device and method |
CN113219994A (en) * | 2021-06-04 | 2021-08-06 | 吉林大学 | Grid map optimal path planning method comprising traffic signal lamps |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107145971A (en) * | 2017-04-18 | 2017-09-08 | 苏州工业职业技术学院 | A kind of express delivery dispatching optimization method of dynamic adjustment |
CN109919376A (en) * | 2019-03-01 | 2019-06-21 | 浙江工业大学 | Multi-field model and multi-vehicle-type vehicle route dispatch control method |
US10346766B1 (en) * | 2012-10-19 | 2019-07-09 | Amazon Technologies, Inc. | Determination and optimization of delivery routes |
CN110619441A (en) * | 2019-09-23 | 2019-12-27 | 徐州工程学院 | Leader-based GA-PSO (genetic algorithm-particle swarm optimization) soft time window vehicle path optimization method |
-
2020
- 2020-04-28 CN CN202010347591.5A patent/CN111445094B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10346766B1 (en) * | 2012-10-19 | 2019-07-09 | Amazon Technologies, Inc. | Determination and optimization of delivery routes |
CN107145971A (en) * | 2017-04-18 | 2017-09-08 | 苏州工业职业技术学院 | A kind of express delivery dispatching optimization method of dynamic adjustment |
CN109919376A (en) * | 2019-03-01 | 2019-06-21 | 浙江工业大学 | Multi-field model and multi-vehicle-type vehicle route dispatch control method |
CN110619441A (en) * | 2019-09-23 | 2019-12-27 | 徐州工程学院 | Leader-based GA-PSO (genetic algorithm-particle swarm optimization) soft time window vehicle path optimization method |
Non-Patent Citations (2)
Title |
---|
A New Hybrid Genetic Variable Neighborhood Search Heuristic for the Vehicle Routing Problem with Multiple Time Windows;Slim Belhaiza Rym M’Hallah Ghassen Ben Brahim;《2017 IEEE 进化计算大会(CEC)》;20170707;全文 * |
快递配送车辆路径优化研究;麻存瑞,柏赟,赵欣苗,曾玮;《交通运输系统工程与信息》;20170831;第17卷(第4期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111445094A (en) | 2020-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111445094B (en) | Express vehicle path optimization method and system based on time requirement | |
WO2021036658A1 (en) | Multi-objective optimization method and system for master production schedule of casting parallel workshops | |
Chen et al. | Solving the first‐mile ridesharing problem using autonomous vehicles | |
CN108764777B (en) | Electric logistics vehicle scheduling method and system with time window | |
Chen et al. | Design of limited-stop bus service with capacity constraint and stochastic travel time | |
CN111178582B (en) | Logistics distribution optimization method based on improved genetic algorithm | |
Liu et al. | Novel multi-objective resource allocation and activity scheduling for fourth party logistics | |
CN111428931B (en) | Logistics distribution line planning method, device, equipment and storage medium | |
CN109002902A (en) | Subregion multistage fresh agricultural products dynamic vehicle method for optimizing route | |
CN101673382A (en) | Combined optimization method for agricultural chain-operation logistics delivering and loading-distribution | |
Grzybowska et al. | Decision support system for real-time urban freight management | |
CN108267954B (en) | Cutter punctual delivery path planning algorithm with hard time window | |
CN110705741B (en) | Multi-distribution center vehicle path optimization method based on improved ant colony algorithm | |
CN110097218B (en) | Unmanned commodity distribution method and system in time-varying environment | |
Wang et al. | Carbon reduction in the location routing problem with heterogeneous fleet, simultaneous pickup-delivery and time windows | |
CN110689165A (en) | Vehicle path optimization method based on road network reachability | |
CN111709561A (en) | Real-time adding and optimizing method for solving dynamic vehicle path problem | |
Hani et al. | Simulation based optimization of a train maintenance facility | |
CN112580865A (en) | Mixed genetic algorithm-based takeout delivery path optimization method | |
CN113792989B (en) | Demand-driven parallel optimization scheduling method between shared sightseeing vehicle areas | |
Kamsopa et al. | Hybrid genetic algorithm for multi-period vehicle routing problem with mixed pickup and delivery with time window, heterogeneous fleet, duration time and rest area | |
CN111553532B (en) | Method and system for optimizing urban express vehicle path | |
Liu et al. | An adaptive large neighborhood search method for rebalancing free-floating electric vehicle sharing systems | |
Fallah et al. | A green competitive vehicle routing problem under uncertainty solved by an improved differential evolution algorithm | |
Zhao et al. | Robust Optimization of Mixed-Load School Bus Route Based on Multi-Objective Genetic Algorithm. |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20240508 Address after: 230000 B-2704, wo Yuan Garden, 81 Ganquan Road, Shushan District, Hefei, Anhui. Patentee after: HEFEI LONGZHI ELECTROMECHANICAL TECHNOLOGY Co.,Ltd. Country or region after: China Address before: No.1 Xueyuan Road, Dongqiao Economic Development Zone, Jiaocheng District, Ningde City, Fujian Province Patentee before: NINGDE NORMAL University Country or region before: China |
|
TR01 | Transfer of patent right |