CN112288166A - Optimization method for logistics distribution based on genetic-simulated annealing combined algorithm - Google Patents
Optimization method for logistics distribution based on genetic-simulated annealing combined algorithm Download PDFInfo
- Publication number
- CN112288166A CN112288166A CN202011186360.7A CN202011186360A CN112288166A CN 112288166 A CN112288166 A CN 112288166A CN 202011186360 A CN202011186360 A CN 202011186360A CN 112288166 A CN112288166 A CN 112288166A
- Authority
- CN
- China
- Prior art keywords
- algorithm
- vehicle
- genetic
- simulated annealing
- 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.)
- Granted
Links
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
Abstract
The invention provides an optimization method for logistics distribution based on a genetic-simulated annealing combined algorithm, which relates to the technical field of logistics intelligent distribution. In the combined algorithm mode, the defects of long optimization process and low convergence speed of the simulated annealing algorithm are overcome by utilizing the stronger global search capability of the genetic algorithm, and the probability of convergence to the local optimal solution can be greatly reduced by utilizing the stronger local search capability of the simulated annealing algorithm, so that the performance of the overall algorithm is improved. The invention solves the technical problems of poor timeliness and overhigh labor cost in the traditional logistics distribution process. The service quality and the full load rate of the vehicle are improved, the transportation and distribution cost is reduced, the transportation mileage is saved, and the path benefit is maximized.
Description
Technical Field
The invention relates to the technical field of logistics intelligent distribution, in particular to a method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm.
Background
With the development trend of global economy integration, the huge potential of electronic commerce is excavated, and the logistics industry becomes an important embodiment in international transactions. In the logistics distribution process, the reasonable planning of distribution vehicles and distribution routes is very important, and the reasonable planning can greatly save vehicle consumption, economic cost and human resources.
Compared with the traditional mode of manually calculating the logistics cost and the path, the modern logistics service based on the information technology has the characteristics of openness, globality, low cost, high efficiency and the like, and can better meet the requirements of modern commercial development. Distribution is in a core link in a logistics system and is also an important strategic means for the development of logistics enterprises. With the ever-increasing quality of life, people have more expectations of the logistics service industry, and it is expected that entities can flow faster, safer and cheaper.
Therefore, there is a need to develop an optimization method for logistics distribution based on a genetic-simulated annealing combined algorithm.
Disclosure of Invention
In view of the above, the present invention provides an optimization method for logistics distribution based on a genetic-simulated annealing combined algorithm, which is used for solving the technical problems of poor timeliness and high labor cost in the logistics distribution process.
The invention provides a method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm, which comprises the following steps:
wherein the character O in the above formula represents a distribution center, n represents the number of customers, m represents the number of vehicles, DkMaximum payload of kth vehicle, DMkRepresents the maximum mileage of the kth vehicle, veh represents the number of actually used vehicles, cijUnit cost, q, representing the distance traveled between client i and client jiIndicating the demand for goods for each customer, dijRepresents the distance between client i and client j, eiIndicating the earliest service time, l, that client i requires to reachiIndicating the latest service time, t, reached by client i's requestiIndicating the time of arrival of the vehicle at customer i, alpha indicatesThe overload penalty coefficient, beta represents the excess distance penalty coefficient, lambda represents the time window violation penalty coefficient, cv represents the excess capacity, dv represents the excess distance amount, and tv represents the sum of the time window violation constraints;
the above equation (1.1) represents an objective function, equations (1.2) - (1.3) represent vehicle constraints for the k-th vehicle traveling from one point to another, equations (1.4) - (1.6) represent that each individual customer can be serviced by only one vehicle, equation (1.7) represents that the amount of cargo carried by each vehicle does not exceed the maximum load capacity of the vehicle, equation (1.8) represents that the traveling distance of each vehicle does not exceed the maximum traveling distance of the vehicle, equation (1.9) represents that the vehicle finally returns from the distribution center to form a loop, and equation (1.10) represents the sum of violating the time window constraints;
wherein x isiThe i-th individual customer and the distribution center O are shown as arranged groups.
F1 ═ f (xnew1) -f (x1), f2 ═ f (xnew2) -f (x2), and Δ f1 and Δ f2 are judged, if Δ f1 is less than or equal to 0 or Δ f2 is less than or equal to 0,
accepting a new solution in said step 7, i.e. xnew1 ═ x1, f (xnew1) ═ f (x1) or xnew2 ═ x2, f (xnew2) ═ f (x2), otherwise accepting a new solution according to Metropolis criteria;
and 9, based on any one new solution in the step 8, firstly judging whether the new solution reaches the internal iteration times, if not, returning to the step 7 to obtain the new solution again, if so, continuing to judge whether the new solution reaches the external iteration times to judge, if not, resetting the internal iteration times by slowly reducing the temperature, returning to the step 7 to obtain the new solution again, and if so, ending the operation.
Further, the processing mode selected in the genetic algorithm is to calculate the selected weight value of each individual customer through the fitness function in the step 3, and select the individual customers in the form of roulette, wherein the selected weight value P (x) of each individual customeri) The expression is as follows:
wherein, f (x)i) The representation is an individual customer xiThe fitness function value of (1).
Further, the PMX matching and crossing processing mode in the genetic algorithm is that individual client coordinate data in two groups of initial populations are randomly selected in a roulette mode, then the positions of the two groups of selected individual client coordinate data are exchanged, a mapping relation is established according to the exchanged individual client coordinate data, and the initial populations are sorted.
Furthermore, the mutation processing mode of the genetic algorithm is to increase the diversity of the population by randomly combining the odd number position and the even number position of the path sequence of the initial population, so as to improve the local random search capability of the genetic algorithm.
Further, based on the Metropolis criterion, when the temperature of the particle is at the temperature T, the probability of the particle tending to equilibrate is expressed by exp (- Δ E/(k 'T)), where E represents the internal energy of the particle at the temperature T, Δ E represents the amount of change in the internal energy, and k' represents the Boltzman constant, the Metropolis criterion can be expressed as:
the invention brings the following beneficial effects:
according to the optimization method for logistics distribution based on the genetic-simulated annealing combined algorithm, a global better solution is obtained by using the improved genetic algorithm, and is used as an initial solution of the improved simulated annealing algorithm, and the optimal solution is finally searched. The combination mode makes use of the stronger global search capability of the genetic algorithm, makes up for the defects of long optimization process and low convergence speed of the simulated annealing algorithm, and can greatly reduce the probability of converging to the local optimal solution by using the stronger local search capability of the simulated annealing algorithm, thereby improving the performance of the whole algorithm. The planning of logistics distribution vehicles and distribution routes is more reasonable, vehicle consumption, economic cost and human resources are greatly saved, service quality and the full load rate of the vehicles are improved, transportation and distribution costs are reduced, the transportation mileage is saved, and the path benefit is maximized.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm provided by the invention;
FIG. 2 is a schematic flow chart of a partial matching intersection process based on a genetic algorithm provided by the present invention;
FIG. 3 is a schematic flow chart of a mutation process based on genetic algorithm according to the present invention;
FIG. 4 is one of the partial program code diagrams of a genetic algorithm provided by the present invention;
FIG. 5 is a second partial program code diagram of a genetic algorithm provided in the present invention;
FIG. 6 is a partial program code diagram of a simulated annealing algorithm according to the present invention;
FIG. 7 is a second partial program code diagram of a simulated annealing algorithm according to the present invention;
FIG. 8 is a schematic diagram of an optimal path for logistics distribution between a distribution center and distribution points according to the present invention;
FIG. 9 is an Excel chart of the distribution center and the distribution point coordinates, demand, distance adjacency matrix provided by the present invention;
FIG. 10 is a schematic diagram of interface input and calculation results under preset conditions according to the present invention;
fig. 11 is a second schematic diagram of the interface input and the calculation result under the preset condition according to the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments.
As shown in fig. 1, a method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm includes:
wherein, the aboveWherein the character O represents a distribution center, n represents the number of customers, m represents the number of vehicles, and DkMaximum payload of kth vehicle, DMkRepresents the maximum mileage of the kth vehicle, veh represents the number of actually used vehicles, cijUnit cost, q, representing the distance traveled between client i and client jiIndicating the demand for goods for each customer, dijRepresents the distance between client i and client j, eiIndicating the earliest service time, l, that client i requires to reachiIndicating the latest service time, t, reached by client i's requestiThe time of the vehicle reaching the client i is represented, alpha represents an overload penalty coefficient, beta represents an over-distance penalty coefficient, lambda represents a violation time window penalty coefficient, cv represents an overload amount, dv represents an over-distance amount, and tv represents the sum of violation time window constraints;
the above equation (1.1) represents an objective function, equations (1.2) - (1.3) represent vehicle constraints for the k-th vehicle traveling from one point to another, equations (1.4) - (1.6) represent that each individual customer can be serviced by only one vehicle, equation (1.7) represents that the amount of cargo carried by each vehicle does not exceed the maximum load capacity of the vehicle, equation (1.8) represents that the distance traveled by each vehicle does not exceed the maximum mileage of the vehicle, equation (1.9) represents that the vehicle finally returns from the distribution center to form a loop, and equation (1.10) represents the sum of violating the time window constraints.
In this embodiment, when encoding the coordinate data, TSP (traveling salesman problem) and VRP (vehicle route problem) need to be considered, and decimal encoding is adopted to obtain a formula of the sequence length of the logistics distribution route, as follows:
sequence length is the number of delivery points (not including the delivery center) + total number of vehicles-1
For example, when the delivery point number is 9 and the vehicle number is 4, the route sequence length is 12. To generate the random route sequence, the randderm function of the self-band in matlab can be used, as follows:
randperm(12)=[7 6 12 3 10 8 11 5 4 1 2 9]
in this sequence, it is assumed that 1 to 9 represent serial numbers corresponding to distribution points, and 10 to 12 represent distribution centers, which represent the same distribution center but are represented by different numbers. The sequence is then converted into a path for each vehicle, taking the three distribution centers of the sequences 10, 11, 12 of the distribution centers as truncation points, taking the example given in the above coding as an example, to obtain four segments, as follows:
[7 6 12 3 10 8 11 5 4 1 2 9]
after the randderm function processing is performed on the randomly generated route sequence, it can be seen that in this embodiment, the serial numbers corresponding to the distribution points where the first vehicle passes are 6 and 7, the distribution point where the second vehicle passes is 3, the serial number corresponding to the distribution point where the third vehicle passes is 8, and the serial numbers corresponding to the distribution points where the fourth vehicle passes are 5, 4, 1, 2, and 9. And based on the code analysis method, the population sequence under other distribution environments is processed by analogy.
wherein x isiRepresenting the array of i-th individual customers and the distribution center O, and the quality of the solution depends on the function value of the fitness function, the higher the function value of the fitness function, the better the quality of the solution.
wherein, f (x)i) The representation is an individual customer xiThe fitness function value of (1).
In this embodiment, a partial match crossover (PMX) algorithm is a core part of a genetic algorithm, and since some single genes are copied or lost, chromosomes are invalidated after partial match crossover, in order to solve this problem, a matching relationship between chromosomes can be established at a crossover region, and then conflicts can be eliminated by applying the matching relationship to copied genes outside the crossover region. Through the crossover strategy, the genes with no duplication in the chromosome are very suitable for the sequencing problem in logistics distribution, and the specific steps of partially matching the crossover include, as shown in fig. 2:
step S41, a pair of parent chromosomes is randomly selected through roulette, and two genes of one chromosome are randomly selected to serve as an initial gene and a termination gene of the parent chromosome exchange part;
step S42, then exchanging the positions of the two groups of selected genes to detect the gene conflict;
and step S43, establishing a mapping relation according to the two groups of exchanged genes, and performing gene conversion based on the mapping relation to finally obtain a reordered crossover result.
In this embodiment, the mutation processing manner of the genetic algorithm is to increase the diversity of the population by randomly combining the odd number position and the even number position of the path sequence of the initial population, so as to improve the random search capability of the algorithm and avoid the convergence of the genetic algorithm to the local optimal solution. And the following five variation modes are adopted in the genetic algorithm, as shown in fig. 3.
For example, the first variant adopts two-point exchange, that is, two points are randomly selected from all the points to be passed through, and the positions of the two points are exchanged, and the specific process is shown as a in fig. 3. The second variant uses a two-part exchange, i.e. randomly selecting every two adjacent points among all the points to be passed through, and exchanging the positions of the two parts, as shown in the b diagram of fig. 3. The third method adopts the variation of single-point insertion, that is, two points are randomly selected from all the points to be passed through, and then the point at the previous position is placed behind the next point, and the specific process is shown as a c diagram in fig. 3. The fourth variant uses an inversion variant, in which two points are randomly selected from all the points to be passed through, and the positions of the points in between are inverted, as shown in d of fig. 3. The fifth is a variation mode of extracting odd-numbered and even-numbered positions and randomly combining, namely extracting the numbers of the odd-numbered positions and the even-numbered positions in all points to be passed by, and then generating a random number of 0-1, wherein if the random number is more than 0.5, the odd-numbered positions are in the front and the even-numbered positions are in the back; otherwise, the process is reversed, and the specific process is shown as f diagram in fig. 3.
In this embodiment, part of the program codes of the genetic algorithm is shown in fig. 4 or fig. 5, and the encoded initial population outputs the optimal solution of the new population after being processed by the genetic algorithm series optimization measures, so that high-quality individuals can be retained and bad individuals can be eliminated. In the cross mode, because the traditional single-point cross and two-point cross can generate invalid chromosomes, PMX partial matching cross is adopted, which is a high-frequency and high-quality cross mode used in a genetic algorithm and can avoid the condition that genes on the chromosomes are conflicted after the cross. 5 variants are adopted on the variation, each variant is provided with a probability, and then selection is carried out through roulette. By improving the crossover and variation of the genetic algorithm, the diversity of the population is enriched, the early and middle stages of the genetic algorithm have higher global search efficiency, and better solutions can be more quickly received in the early and middle stages after the improved genetic algorithm is adopted. However, the genetic algorithm still has insufficient capability in local search, is easy to generate the phenomenon of early maturity, has low search efficiency in the later period, is difficult to jump out of local optimality, and has more prominent defects particularly when the scale of the problem becomes large. And the optimal solution of the logistics distribution scheme calculated by the genetic algorithm is subjected to iterative solution by the simulated annealing algorithm, and the differential solution is accepted with a certain probability, so that the local extreme value and premature convergence of the algorithm are avoided, and the method has strong local search capability and supplements the insufficient local search capability of the genetic algorithm.
And 5, judging whether the new population reaches the iteration times, if not, recalculating the fitness of the initial population, if so, outputting the optimal solution of the new population, acquiring a numerical value from the optimal solution, substituting the numerical value into a simulated annealing algorithm for calculation, wherein part of program codes of the simulated annealing algorithm are shown in FIG. 6 or FIG. 7.
Experiments show that the initial temperature T of the simulated annealing algorithm0The higher the simulated annealing, the greater the relative probability that a high quality solution can be obtained, but the increased search time. Therefore, a higher initial temperature should be selected as much as possible in practical problems, and the initial temperature should be optimized in consideration of time and efficiency. In order to achieve better optimization effect, the set function expression of the number of clients and the temperature is as follows through repeated experiments:
the temperature drop coefficient is expressed as follows:
Tk+1=α*Tk,k=0,1,2,…
in the above formula, the decreasing coefficient α represents a constant smaller than 1 but close to 1, and the value interval of α is generally (0.8, 1). Experiments show that the slower the cooling rate, i.e. the larger the reduction coefficient alpha, the easier the simulated annealing can obtain a high-quality solution, but the longer the calculation time is. In practical terms, the amount of temperature decrease should follow the "preferably small" principle. In order to obtain a better optimization effect, the temperature decrease rate α finally adopted was 0.995 through trial and error. Therefore, the simulated annealing algorithm is sensitive to the initial temperature and the temperature drop rate in the actual environment, and the local search capability of the algorithm can be enhanced by increasing the initial temperature and the temperature drop rate, but the search cost of the algorithm can be reduced, such as increasing the optimization time of the algorithm, reducing the convergence speed and the like.
and 8, subtracting the target function result value in the step 6 from the target function result value in the step 7 to obtain:
f1 ═ f (xnew1) -f (x1), f2 ═ f (xnew2) -f (x2), and Δ f1 and Δ f2 are judged, if Δ f1 is less than or equal to 0 or Δ f2 is less than or equal to 0,
the new solution in said step 7 is accepted, i.e. xnew1 ═ x1, f (xnew1) ═ f (x1) or xnew2 ═ x2, f (xnew2) ═ f (x2), otherwise the new solution is accepted according to the Metropolis criterion.
It should be noted that the monte carlo (Metropolis) criterion is to perform iterative solution in the process of the simulated annealing algorithm, and it can accept differential solution with a certain probability, and avoid local extreme value and premature convergence of the algorithm, thereby having strong local search capability. When the temperature of the particle is at temperature T, the probability of approaching equilibrium is expressed by exp (- Δ E/(kT)), where E represents the internal energy of the particle at temperature T, Δ E represents the amount of change in the internal energy, k represents the Boltzman constant, and the Metropolis criterion can be expressed as:
and 9, based on any one new solution in the step 8, firstly judging whether the new solution reaches the internal iteration times, if not, returning to the step 7 to obtain the new solution again, if so, continuing to judge whether the new solution reaches the external iteration times to judge, if not, resetting the internal iteration times by slowly reducing the temperature, returning to the step 7 to obtain the new solution again, and if so, ending the operation to obtain the final optimized optimal solution.
The distribution optimization method is actually applied as shown in fig. 8, in the existing distribution network, P is a distribution center, the rest of a-I are the receiving points of the customers, the position distances of all the customers are fixed, the numbers on each side are kilometers, the numbers in parentheses are the amount of goods to be conveyed to each receiving point, and the unit is ton. The distribution center is supposed to have two trains with maximum loading weights of 2 tons and 5 tons, the distance of a one-time running route of the vehicles is limited to be not more than 35 kilometers, each distribution point is served by one vehicle only once, each vehicle intelligently serves one route, the vehicles uniformly start from the distribution center, return to the distribution center after tasks are completed, and the express delivery vehicle is not loaded in the distribution process and only considers unloading. The unloading time of each point is fixed to be 5 minutes, the vehicle travels 10 kilometers per hour, the wage time of each dispatching personnel is 8 hours, and the required number of vehicles, the optimal path and the dispatching time can be calculated by referring to information based on a genetic-simulated annealing combined algorithm and a program.
As shown in fig. 9, the EXCEL table is first imported into the distribution center and the coordinates, demand, and distance adjacency matrix of each distribution point are represented by a larger distance value, for example 999. For example, when 2 vehicles with a maximum carrying capacity of 5 tons, 3 vehicles with a maximum carrying capacity of 2 tons and a maximum driving distance of 35km are given, the interface input and the input result can be referred to fig. 10. I.e., number of iterations 240: when the optimal distance is 84km and the number of vehicles used is 5, the obtained experimental data are as follows:
the 1 st vehicle: maximum load capacity: 5.0t actual load capacity: 4.9t loading rate: 98.0% travel distance: 22.0km path: 0 → 2 → 3 → 4 → 0;
the 2 nd vehicle: maximum load capacity: 5.0t actual load capacity: 4.7t Loading Rate: 94.0% travel distance: 32.0km path: 0 → 8 → 6 → 7 → 0;
vehicle 3: maximum load capacity: 2.0t actual load capacity: 1.9t loading rate: 95.0% travel distance: 8.0km path: 0 → 5 → 0;
the 4 th vehicle: maximum load capacity: 2.0t actual load capacity: 1.2t loading rate: 60.0% travel distance: 12.0km path: 0 → 9 → 0;
the 5 th vehicle: maximum load capacity: 2.0t actual load capacity: 1.7t loading rate: 85.0% travel distance: 10.0km path: 0 → 1 → 0.
Given two vehicles with maximum payload of 5 tons and 2 tons (no vehicle count), and a maximum distance of 35km traveled, the interface inputs and calculations are shown in fig. 11, i.e., iteration number 240: when the optimal distance is 69km and the number of vehicles used is 3, the following experimental data are obtained:
the 1 st vehicle: maximum load capacity: 5.0t actual load capacity: 5.0t loading rate: 100.0% travel distance: 23.0km path: 0 → 3 → 2 → 1 → 9 → 0;
the 2 nd vehicle: maximum load capacity: 5.0t actual load capacity: 4.7t Loading Rate: 94.0% travel distance: 14.0km path: 0 → 4 → 5 → 0;
vehicle 3: maximum load capacity: 2.0t actual load capacity: 4.7t Loading Rate: 94.0% travel distance: 32.0km path: 0 → 7 → 6 → 8 → 0.
From the above calculation results, it can be seen that although two different types of vehicles are provided, only one vehicle may be used in order to pursue the optimization of the objective function (the shortest distance).
In summary, the optimization method for logistics distribution based on the genetic-simulated annealing combined algorithm provided by the invention overcomes the technical problem that the traditional logistics distribution method only adopts a single genetic algorithm and is easy to fall into local optimization. Or when only a single simulated annealing algorithm is adopted, a long optimization time is spent to ensure that an optimal solution is found. After the advantages and the disadvantages of the algorithms are comprehensively considered and the performance of the whole algorithm is improved, the advantages and the disadvantages of the genetic algorithm and the simulated annealing are utilized to combine the two algorithms to realize optimization, and tests show that the result accuracy and the stability of the combined algorithm are higher than those of a single algorithm and a mixed algorithm of the single algorithm and the two algorithms. The method comprises the steps of firstly, searching for early and middle stages through an improved genetic algorithm, enabling the genetic algorithm to have strong global searching capacity in the early and middle stages to obtain a global better solution, and then taking the better solution as an initial solution of a simulated annealing algorithm. Because the simulated annealing algorithm adopts a parallel search structure, the double initial solutions can be set, so that the double solutions in each internal cycle can be searched simultaneously and the optimal solution in the double initial solutions can be kept, and thus, the parallel mode has higher search efficiency and stronger optimization capability. Meanwhile, the loading rate and the number of vehicles used in each vehicle in the objective function are considered, a multi-objective optimization effect can be achieved, and if the distance is shortest, the vehicle configuration is more reasonable, the full loading rate of the vehicles is higher, and therefore the cost is lower.
Claims (5)
1. A method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm is characterized by comprising the following steps:
step 1, obtaining coordinate data of individual customers and a distribution center, and coding the coordinate data to obtain an initial population;
step 2, establishing a mathematical model, wherein an objective function Z of the mathematical modeliComprises the following steps:
wherein the character O in the above formula represents a distribution center, n represents the number of customers, m represents the number of vehicles, DkMaximum payload of kth vehicle, DMkRepresents the maximum mileage of the kth vehicle, veh represents the number of actually used vehicles, cijUnit cost, q, representing the distance traveled between client i and client jiIndicating the demand for goods for each customer, dijRepresents the distance between client i and client j, eiIndicating the earliest service time, l, that client i requires to reachiIndicating the latest service time, t, reached by client i's requestiThe time of the vehicle reaching the client i is represented, alpha represents an overload penalty coefficient, beta represents an over-distance penalty coefficient, lambda represents a violation time window penalty coefficient, cv represents an overload amount, dv represents an over-distance amount, and tv represents the sum of violation time window constraints;
the above equation (1.1) represents an objective function, equations (1.2) - (1.3) represent vehicle constraints for the k-th vehicle traveling from one point to another, equations (1.4) - (1.6) represent that each individual customer can be serviced by only one vehicle, equation (1.7) represents that the amount of cargo carried by each vehicle does not exceed the maximum load capacity of the vehicle, equation (1.8) represents that the traveling distance of each vehicle does not exceed the maximum traveling distance of the vehicle, equation (1.9) represents that the vehicle finally returns from the distribution center to form a loop, and equation (1.10) represents the sum of violating the time window constraints;
step 3, setting the objective function ZiSimultaneously calculating the objective function Z for the total distance of each individual customeriTo obtain a fitness function f (x)i) And determining the quality of the solution based on the value of said fitness function, said fitness function f (x)i) The expression of (a) is:
wherein x isiThe i-th individual customer and the distribution center O are shown as arranged groups.
Step 4, based on the fitness function f (x)i) The path sequence of the initial population is disturbed through the processing modes of selection, PMX matching intersection and variation in the genetic algorithm, so that the population is diversified, and a new population is generated at the same time;
step 5, judging whether the new population reaches the iteration times, if so, outputting the optimal solution of the new population, otherwise, recalculating the fitness of the initial population;
step 6, acquiring two values x1 and x2 from the optimal solution, substituting the two values into the objective function as an initial solution of a simulated annealing algorithm, and obtaining objective function result values f (x1) and f (x 2);
step 7, generating a new solution again through a mutation processing mode in the genetic algorithm, acquiring two values xnew1 and xnew2 from the new solution, substituting the two values xnew1 and xnew2 into the objective function as the new solution of the simulated annealing algorithm, and obtaining objective function result values f (xnew1) and f (xnew 2);
and 8, subtracting the target function result value in the step 6 from the target function result value in the step 7 to obtain:
f1 ═ f (xnew1) -f (x1), f2 ═ f (xnew2) -f (x2), and Δ f1 and Δ f2 are judged, if Δ f1 is less than or equal to 0 or Δ f2 is less than or equal to 0,
accepting a new solution in said step 7, i.e. xnew1 ═ x1, f (xnew1) ═ f (x1) or xnew2 ═ x2, f (xnew2) ═ f (x2), otherwise accepting a new solution according to Metropolis criteria;
step 9, based on any new solution in the step 8, firstly judging whether the new solution reaches the internal iteration times, if not, returning to the step 7 to obtain the new solution again,
if the internal iteration times are reached, continuously judging whether the external iteration times are reached or not, if the external iteration times are not reached, resetting the internal iteration times by slowly reducing the temperature, returning to the step 7 to obtain a new solution again,
and if the external iteration times are reached, ending the operation.
2. The method for optimizing logistics distribution based on genetic-simulated annealing combined algorithm as claimed in claim 1, wherein the processing manner selected in the genetic algorithm is to calculate the weight value selected by each individual customer through the fitness function in the step 3, and select the individual customers in the form of roulette, wherein the weight value P (x) selected by each individual customer is selectedi) The expression of (a) is:
wherein, f (x)i) The representation is an individual customer xiThe fitness function value of (1).
3. The method for optimizing logistics distribution based on a genetic-simulated annealing combined algorithm as claimed in claim 2, wherein the PMX matching intersection in the genetic algorithm is processed by randomly selecting the coordinate data of the individual customers in the two initial populations through roulette, exchanging the positions of the selected coordinate data of the two groups of individual customers, and establishing a mapping relation according to the exchanged coordinate data of the individual customers to sort the initial populations.
4. The method for optimizing logistics distribution based on genetic-simulated annealing combined algorithm as claimed in claim 3, wherein the mutation processing manner of the genetic algorithm is to increase the diversity of the population by randomly merging the odd number position and the even number position of the path sequence of the initial population, so as to improve the capability of the genetic algorithm to search locally at random.
5. The method for optimizing logistics distribution based on a combined genetic-simulated annealing algorithm as claimed in claim 1, wherein based on the Metropolis criterion, when the temperature of the particle is at the temperature T, the probability of the particle going to equilibrium is expressed by exp (- Δ E/(k 'T)), wherein E represents the internal energy of the particle at the temperature T, Δ E represents the change amount of the internal energy, k' represents the Boltzman constant, and the Metropolis criterion can be expressed as:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011186360.7A CN112288166B (en) | 2020-10-29 | 2020-10-29 | Optimization method for logistics distribution based on genetic-simulated annealing combination algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011186360.7A CN112288166B (en) | 2020-10-29 | 2020-10-29 | Optimization method for logistics distribution based on genetic-simulated annealing combination algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112288166A true CN112288166A (en) | 2021-01-29 |
CN112288166B CN112288166B (en) | 2023-08-29 |
Family
ID=74353639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011186360.7A Active CN112288166B (en) | 2020-10-29 | 2020-10-29 | Optimization method for logistics distribution based on genetic-simulated annealing combination algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112288166B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112978935A (en) * | 2021-02-03 | 2021-06-18 | 齐鲁工业大学 | Sewage treatment system and method for microbial fuel cell |
CN112990564A (en) * | 2021-03-08 | 2021-06-18 | 山东恒安安防技术有限公司 | Method for planning task network point mixed route of coffer boot |
CN113112066A (en) * | 2021-04-11 | 2021-07-13 | 太原理工大学 | Genetic preference strategy SA-GA-based takeaway member meal delivery path planning system |
CN113592148A (en) * | 2021-07-01 | 2021-11-02 | 合肥工业大学 | Optimization method and system for improving distribution route of vehicle and unmanned aerial vehicle |
CN114004386A (en) * | 2021-02-24 | 2022-02-01 | 成都知原点科技有限公司 | Virtual logistics transit station site selection and distribution path optimization method based on intelligent algorithm |
CN114066240A (en) * | 2021-11-16 | 2022-02-18 | 中国民用航空飞行学院 | Navigation rescue scheduling optimization method based on rescue efficiency |
CN114355918A (en) * | 2021-12-27 | 2022-04-15 | 北京航天数据股份有限公司 | Deicing vehicle path planning method and device and storage medium |
CN114971011A (en) * | 2022-05-24 | 2022-08-30 | 燕山大学 | Multi-type combined transport path optimization method based on improved genetic simulated annealing algorithm |
CN117494630A (en) * | 2023-12-29 | 2024-02-02 | 珠海格力电器股份有限公司 | Register time sequence optimization method and device, electronic equipment and storage medium |
WO2024042606A1 (en) * | 2022-08-23 | 2024-02-29 | 日本電信電話株式会社 | Ising model conversion device, ising model conversion method, and program |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10232794A1 (en) * | 2002-07-19 | 2004-02-05 | Uwe Witte | Network packet data transmission system assigns packet routing information based on genetic or simulate annealing algorithms and network quality data |
CN103595652A (en) * | 2013-11-08 | 2014-02-19 | 国家电网公司 | Method for grading QoS energy efficiency in power communication network |
CN109934364A (en) * | 2019-03-10 | 2019-06-25 | 西北工业大学 | A kind of cutter Panel management allocator based on Global Genetic Simulated Annealing Algorithm |
CN110389819A (en) * | 2019-06-24 | 2019-10-29 | 华中科技大学 | A kind of dispatching method and system of computation-intensive batch processing task |
-
2020
- 2020-10-29 CN CN202011186360.7A patent/CN112288166B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10232794A1 (en) * | 2002-07-19 | 2004-02-05 | Uwe Witte | Network packet data transmission system assigns packet routing information based on genetic or simulate annealing algorithms and network quality data |
CN103595652A (en) * | 2013-11-08 | 2014-02-19 | 国家电网公司 | Method for grading QoS energy efficiency in power communication network |
CN109934364A (en) * | 2019-03-10 | 2019-06-25 | 西北工业大学 | A kind of cutter Panel management allocator based on Global Genetic Simulated Annealing Algorithm |
CN110389819A (en) * | 2019-06-24 | 2019-10-29 | 华中科技大学 | A kind of dispatching method and system of computation-intensive batch processing task |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112978935A (en) * | 2021-02-03 | 2021-06-18 | 齐鲁工业大学 | Sewage treatment system and method for microbial fuel cell |
CN114004386A (en) * | 2021-02-24 | 2022-02-01 | 成都知原点科技有限公司 | Virtual logistics transit station site selection and distribution path optimization method based on intelligent algorithm |
CN112990564A (en) * | 2021-03-08 | 2021-06-18 | 山东恒安安防技术有限公司 | Method for planning task network point mixed route of coffer boot |
CN113112066B (en) * | 2021-04-11 | 2023-08-22 | 太原理工大学 | Takeout meal delivery path planning system based on gene preferred strategy SA-GA |
CN113112066A (en) * | 2021-04-11 | 2021-07-13 | 太原理工大学 | Genetic preference strategy SA-GA-based takeaway member meal delivery path planning system |
CN113592148A (en) * | 2021-07-01 | 2021-11-02 | 合肥工业大学 | Optimization method and system for improving distribution route of vehicle and unmanned aerial vehicle |
CN113592148B (en) * | 2021-07-01 | 2024-03-15 | 合肥工业大学 | Optimization method and system for improving delivery route of vehicle and unmanned aerial vehicle |
CN114066240A (en) * | 2021-11-16 | 2022-02-18 | 中国民用航空飞行学院 | Navigation rescue scheduling optimization method based on rescue efficiency |
CN114355918A (en) * | 2021-12-27 | 2022-04-15 | 北京航天数据股份有限公司 | Deicing vehicle path planning method and device and storage medium |
CN114971011A (en) * | 2022-05-24 | 2022-08-30 | 燕山大学 | Multi-type combined transport path optimization method based on improved genetic simulated annealing algorithm |
CN114971011B (en) * | 2022-05-24 | 2024-04-23 | 燕山大学 | Multi-mode intermodal route optimization method based on improved genetic simulated annealing algorithm |
WO2024042606A1 (en) * | 2022-08-23 | 2024-02-29 | 日本電信電話株式会社 | Ising model conversion device, ising model conversion method, and program |
CN117494630A (en) * | 2023-12-29 | 2024-02-02 | 珠海格力电器股份有限公司 | Register time sequence optimization method and device, electronic equipment and storage medium |
CN117494630B (en) * | 2023-12-29 | 2024-04-26 | 珠海格力电器股份有限公司 | Register time sequence optimization method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112288166B (en) | 2023-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112288166A (en) | Optimization method for logistics distribution based on genetic-simulated annealing combined algorithm | |
CN109002902B (en) | Regional multi-stage fresh agricultural product dynamic vehicle path optimization method | |
Park | A hybrid genetic algorithm for the vehicle scheduling problem with due times and time deadlines | |
Tu et al. | OCD: Online crowdsourced delivery for on-demand food | |
CN110298583B (en) | Low-cost vehicle scheduling and path planning method based on multiple parking lots and multiple vehicle types | |
CN113780808B (en) | Vehicle service attribute decision optimization method based on flexible bus connection system line | |
CN109472362B (en) | AGV dynamic scheduling method and device based on variable task window | |
CN113469416B (en) | Dispatching task planning method and equipment | |
CN112733272A (en) | Method for solving vehicle path problem with soft time window | |
CN111445094B (en) | Express vehicle path optimization method and system based on time requirement | |
Wang et al. | A clustering-based extended genetic algorithm for the multidepot vehicle routing problem with time windows and three-dimensional loading constraints | |
CN110705741A (en) | Multi-distribution center vehicle path optimization method based on improved ant colony algorithm | |
Wang et al. | Cooperation and profit allocation for two-echelon logistics pickup and delivery problems with state–space–time networks | |
Hu et al. | Dynamic rebalancing optimization for bike-sharing system using priority-based MOEA/D algorithm | |
Hani et al. | Simulation based optimization of a train maintenance facility | |
CN112183838B (en) | Method for optimally solving intelligent unmanned vehicle path planning problem based on multi-constraint correction C-W algorithm | |
CN111553532B (en) | Method and system for optimizing urban express vehicle path | |
Bacar et al. | An attractors-based particle swarm optimization for multiobjective capacitated vehicle routing problem | |
CN112884367B (en) | Multi-project collaborative scheduling method and system for equipment research and development with multi-skill employee constraint | |
CN116502989B (en) | Cold-chain logistics vehicle path optimization method based on mixed balance optimization algorithm | |
Zhou et al. | Optimization for service routes of pallet service center based on the pallet pool mode | |
CN112163788A (en) | Real-time data-based scheduling method for Internet pile-free single vehicle | |
CN114707707A (en) | Method and system for scheduling AGV task based on improved genetic algorithm | |
Xue et al. | Order acceptance and scheduling in the instant delivery system | |
Su et al. | A heuristic solution framework for the resource-constrained multi-aircraft scheduling problem with transfer of resources and aircraft |
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 |