CN110472792A - A kind of route optimizing method for logistic distribution vehicle based on discrete bat algorithm - Google Patents

A kind of route optimizing method for logistic distribution vehicle based on discrete bat algorithm Download PDF

Info

Publication number
CN110472792A
CN110472792A CN201910758083.3A CN201910758083A CN110472792A CN 110472792 A CN110472792 A CN 110472792A CN 201910758083 A CN201910758083 A CN 201910758083A CN 110472792 A CN110472792 A CN 110472792A
Authority
CN
China
Prior art keywords
bat
point
algorithm
points
fitness value
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
Application number
CN201910758083.3A
Other languages
Chinese (zh)
Other versions
CN110472792B (en
Inventor
张瑾
洪莉
戴二壮
方健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Henan University
Original Assignee
Henan University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Henan University filed Critical Henan University
Priority to CN201910758083.3A priority Critical patent/CN110472792B/en
Publication of CN110472792A publication Critical patent/CN110472792A/en
Application granted granted Critical
Publication of CN110472792B publication Critical patent/CN110472792B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/083Shipping
    • G06Q10/0835Relationships between shipper or supplier and carriers
    • G06Q10/08355Routing methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Development Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention proposes a kind of route optimizing method for logistic distribution vehicle based on discrete bat algorithm, and its step are as follows: the model in logistic distribution vehicle path of the building with capacity consistency, and design solution coding strategy and velocity encoded cine strategy;Initialize client point of the bat algorithm as initialization;It utilizesK‑meansAlgorithm carries out clustering to client's point of initialization, and all clients are pressed its present position and carry out subregion;The bat position after subregion is updated using discrete bat algorithm;A random number is selected, according to the search of the size selection office of random number and current PRF frequency or global search, and calculates new fitness value;Fitness value updates, and impulse ejection rate and sound intensity update;Judge whether to meet termination condition, exports globally optimal solution.The present invention can fast and effeciently solve the Vehicle Routing Problems with capacity-constrained, can greatly improve solving speed, reduce distribution cost, have stronger robustness and feasibility.

Description

Logistics distribution vehicle route optimization method based on discrete bat algorithm
Technical Field
The invention relates to the technical field of logistics distribution, in particular to a logistics distribution vehicle path optimization method based on a discrete bat algorithm.
Background
The prosperous development of electronic commerce enables the logistics distribution demand to be greatly increased, the scale of customers involved in logistics distribution is larger and larger, the distribution of the areas is wider and wider, the requirements of the customers on distribution service are more and more strict, and the competition among logistics enterprises is intensified. How to meet the customer requirements, reduce the distribution cost and improve the competitiveness on the basis of the bearing capacity constraint of the enterprise as far as possible becomes a problem which needs to be solved urgently by the logistics enterprise. Therefore, it is a Problem to be solved urgently to research and design an effective optimization method according to a Vehicle Routing Problem (CVRP) with capacity of constraint.
The vehicle path problem (CVRP) with capacity of constraint belongs to NP-Hard problem as a classical combined optimization problem in logistics activity, the accurate algorithm can not give an optimal solution in a limited time, and the solving difficulty increases exponentially with the increase of scale. In order to effectively meet the delivery requirements of logistics enterprises to customers, an intelligent optimization algorithm can be used for giving a relatively better solution within a limited time. At present, heuristic algorithms are mainly used to solve the CVRP problem, including Tabu Search (TS) Algorithm, Simulated Annealing (SA) Algorithm, Ant Colony Optimization (ACO), Particle Swarm Optimization (PSO), Genetic Algorithm (GA), and the like. However, the above algorithms all have respective disadvantages, the TS algorithm is easy to fall into a local optimal solution, the SA algorithm has a slow convergence rate, the ACO universality and stability are poor, the PSO lacks speed dynamic adjustment, the solving accuracy is low, the GA is easy to fall into precocity, and the like, and therefore, the above algorithms cannot quickly and effectively solve the CVRP problem.
The Bat Algorithm (BA) is inspired by the biological characteristics of search and prey of bats in nature through echo positioning by teaching Yang, and is a novel group intelligent bionic optimization Algorithm proposed in 2010. At present, the bat algorithm obtains a better optimization effect on solving a continuous optimization problem, is less used for solving discrete optimization problems such as a binary optimization problem, a knapsack problem, a minimum ratio TSP problem, a CVRP problem and the like, and is particularly less used for solving the CVRP problem.
Disclosure of Invention
Aiming at the technical problems of low convergence speed and low solving precision of the existing vehicle path optimization method, the invention provides a logistics distribution vehicle path optimization method based on a Discrete bat algorithm, which can greatly improve the solving speed, reduce the distribution cost and have stronger robustness and feasibility by carrying out cluster analysis on customer points through the Discrete Bat Algorithm (DBA).
In order to achieve the purpose, the technical scheme of the invention is realized as follows: a logistics distribution vehicle route optimization method based on a discrete bat algorithm comprises the following steps:
the method comprises the following steps: according to the existing vehicle path problem with capacity constraint, a model of the logistics distribution vehicle path with the capacity constraint is built, and a decoding strategy and a speed coding strategy are designed;
step two: initializing a bat algorithm according to a decoding strategy and a speed coding strategy: initializing the position, pulse frequency and speed of the bat as an initialized customer point;
step three: performing cluster analysis on the client points initialized in the step two by using a K-means algorithm, and partitioning all the client points according to the positions of the client points;
step four: and (3) global search: updating the bats positions after the partition by utilizing a discrete bat algorithm;
step five: selection of a search mode: selecting a random number, selecting local search or global search according to the random number and the current pulse frequency, and calculating a new fitness value;
step six: updating the fitness value: comparing the fitness value obtained in the fifth step with the current minimum fitness value, if the fitness value obtained in the fifth step is smaller than the current minimum fitness value and the current sound loudness is greater than a random number r2 which is generated by applying a rand function and evenly distributed among (0,1), updating the minimum fitness value by using the fitness value obtained in the fifth step, recording the position of each bat to obtain a global optimal solution, otherwise, not updating;
step seven: pulse emissivity and sound loudness update: whether the pulse emission frequency and the sound loudness are updated in the next iteration is judged to be global search or local search and whether the fitness value is updated;
step eight: if the end condition is met, outputting a global optimal solution; otherwise, returning to the step five.
The logistics distribution vehicle path with the ability to restrain in the step one is modeled as follows:
the decision variables are defined as:
wherein,represents the total distance traveled by all vehicles; z represents the total cost, K is the total number of vehicles required; n is the total amount of users; a is the fixed cost of a unit vehicle; b is the oil consumption cost per unit distance; dijThe distance between the client point i and the client point j; q. q.siThe weight of the goods at customer point i; q represents the maximum load capacity of the vehicle; s is the number set of the client points, and the value of S is {1,2, …, N }; x is the number ofijkIndicating whether vehicle k passes customer point i to point customer j, yikIndicating that each customer is guaranteed to have a vehicle to service, i, j equal to 0 indicating a distribution center, and k equal to 0 indicating that the initial number of vehicles is 0.
The design method of the encoding strategy decoding strategy and the speed encoding strategy in the first step comprises the following steps: the scale of the solved problem is N, and the customer points are numbered as different integers from 1 to N;
(1) and (3) a decoding strategy: the encoding of the solution adopts a mode of traversing a distribution point sequence, the encoding length is the number N of distribution points needing to be traversed, each component in the solution corresponds to a client point number, and therefore the encoding form of the obtained solution X is as follows:
X=(m1,m2,…,mN),
where N denotes the code length, miNumber, m, representing the ith customer Point to traversei∈[1,N]And is arbitrarily mi≠mj
(2) Speed coding strategy: the coding of the speed adopts a mode of a client point number increment sequence, each client point number in the speed coding corresponds to a client point number increment, and:
V=(v1,v2,…,vN)
wherein V represents velocity, ViIndicating the speed, v, of the ith delivery point to be traversedi∈[-(N-1),N-1]。
The method for initializing the bat algorithm comprises the following steps:
(1) initializing bat positions: setting the initial position of each bat individual, namely the serial number of the client point where each bat individual is located, as a random number between [1, N ];
(2) initializing pulse frequency: setting the initial pulse frequency of each bat individual to be zero;
(3) initialization speed: setting the initial speed of each bat individual as a random number between [1-N, N-1 ].
The K-means algorithm in the third step comprises the following steps:
step 1: randomly selecting m points from the customer points as the central point of each cluster, wherein m belongs to S;
step 2: randomly selecting a customer point S to be distributed, wherein S belongs to S;
and step 3: comparing the distances from the customer points s to be distributed to the m points respectively, and placing the customer points s to be distributed into the area where the closest point to the customer points s to be distributed belongs;
and 4, step 4: and (4) selecting the next client point to be distributed, and circulating the step (3) until all the client points to be distributed belong to a certain subarea.
The implementation method of the discrete bat algorithm in the fourth step comprises the following steps:
adjusting the pulse frequency: f. ofa=fmin+(fmax-fmin)β;
Adjusting the speed:
adjusting the position:
wherein f isaRepresenting the pulse frequency of the a-th bat; f. ofmax、fminRespectively representing the maximum value and the minimum value of the pulse frequency; beta is a uniformly distributed random number, and beta is an element of 0,1];xa t-1And va t-1Respectively representing the position and the speed of the bat a of the t-1 th generation; x is the number ofa tAnd va tRespectively representing the position and the speed of the t-th generation bat a; x is the number of*Representing the current optimal solution, namely the bat position corresponding to the current minimum fitness value, thereby generating the offspring bats.
In the fifth step, a rand function is used for generating random numbers r1 uniformly distributed among (0,1), if r1 is smaller than the current pulse frequency, global search is carried out according to the fourth step, and a new fitness value is calculated; otherwise, local search is carried out near the current solution; x is the number ofnew=x*+ ε μ; judging whether two-element optimization operation is performed or not according to a certain probability, and calculating a new fitness value; wherein x isnewRepresenting a new solution obtained by random perturbation; x is the number of*Representing a current optimal solution; epsilon represents the random vector generated by the randn function; μ denotes a constant; the probability is determined by a random function, the two-element optimization operation is to randomly select two non-adjacent nodes on the optimal solution route, and to turn over the path between the two nodes to obtain a new path.
The method for solving the fitness value in the fifth step comprises the following steps:
step 1: according to the weight of the goods required to be delivered by each point to be delivered and the limited load Q of the vehicle, the delivery points meeting the load limiting requirement are placed in the running route of the vehicle; if the cargo weight of the distribution point exceeds the limited load Q of the vehicle, applying for a vehicle again, and adding 1 to the total number of the vehicles required currently;
step 2: and calculating the sum of the oil consumption cost and the rental cost of the vehicle, namely the total cost.
In the seventh step, the updating pulse transmitting frequency is as follows:
updating the loudness of sound:
wherein A isa t、Aa t+1Respectively representing the sound volumes of the bat a in the t generation and the t +1 generation; r isa 0Representing an initial pulse emission frequency of the bata; r isa tRepresenting the pulse emission frequency of the bat a in the t generation; the constant α represents the attenuation coefficient of the sound volume, and 0<α<1; the constant γ represents the enhancement factor of the search frequency, and γ>0。
The invention has the beneficial effects that: defining a discretization coding strategy and an operation operator of a bat algorithm, coding the CVRP problem and each variable according to distribution points and vehicles, converting the CVRP problem and each variable into an optimized variable, performing clustering analysis on an initial solution of each iteration by using a K-means clustering algorithm, introducing a two-element optimization (2-optimization, 2-opt) method into a DBA algorithm for local search, increasing a disturbance mechanism, and improving the search speed and the search precision; compared with PSO and GA which are widely applied, the comparison and analysis result shows that the discrete bat algorithm can greatly improve the solving speed, reduce the distribution cost and has stronger robustness and feasibility. The method can quickly and effectively solve the problem of the vehicle path with capacity constraint, further improves the performance of the algorithm, has certain promotion effect on the further development and the popularization and the application of the bat algorithm, and has practical significance on promoting the progress of the logistics industry and the sustainable development of social economy.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a graph of the average variation of the present invention and comparative algorithm over 200 iterations on a comparable scale.
FIG. 3 is a graph of the average change of the present invention and comparative algorithm over 600 iterations on a comparable scale.
Fig. 4 is an average variation curve of 1000 iterations of the present invention and comparative algorithm on a comparable scale.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive effort based on the embodiments of the present invention, are within the scope of the present invention.
As shown in fig. 1, a logistic distribution vehicle route optimization method based on discrete bat algorithm includes the following steps:
the method comprises the following steps: according to the existing problem of the vehicle path with capacity constraint, a logistics distribution vehicle path model with the capacity constraint is built, and a decoding strategy and a speed coding strategy are designed.
The model for constructing the logistics distribution vehicle path with the capacity constraint is as follows:
the decision variables are defined as:
in the formula (1)Represents the total distance traveled by all vehicles; i, j ∈ [1, N ]];k∈[1,K]. Wherein x is0jkIndicating whether the vehicle k is traveling from the distribution center to the customer point j; x is the number ofi0kIndicating whether the vehicle k returns to the distribution center from the customer point i; i. j is equal to 0 and represents the distribution center, and k is equal to 0 and represents that the initial number of vehicles is 0. Z represents the total cost, K is the total number of vehicles required; n is the total amount of users; a is the fixed cost of a unit vehicle; b is the oil consumption cost per unit distance; dijThe distance between the client point i and the client point j; q. q.siOrdering goods for customers iWeight of the material; q represents the maximum load capacity of the vehicle; s is the number set of the client points, and the value of S is {1,2, …, N }; x is the number ofijkIndicating whether vehicle k passes customer point i to point customer j, yikMeaning that each customer is guaranteed to have a vehicle to service it.
In the above model, equation (1) represents an objective function of the least sum of the vehicle departure cost and the distribution cost, equation (1) shows that the k variable starts from 0, the maximum value is N, that is, the weight of each customer point just reaches the limit load weight, each customer point needs to be distributed by one vehicle, equation (2) shows that the total amount of the goods loaded by each vehicle does not exceed the maximum capacity of the vehicle, equation (3) shows that each customer is served by only one vehicle, equation (4) ensures that only one customer point is close to before customer point j, i ranges from 0 and includes the distribution center point, equation (5) ensures that only one customer point is close to after customer point i, j ranges from 0 and includes the distribution center point, equation (6) shows that the vehicle from the distribution center returns to the distribution center after completing the distribution task, equation (7) shows that the sub-loop is eliminated, the elimination of the sub-loop means that the phenomenon that the vehicle does not start from the parking lot is eliminated, the feasible loop is ensured by the formulas (4) and (7) together, and the formulas (8) and (9) represent the value ranges of the decision variables.
And (3) an encoding strategy: assuming that the size of the solution problem is N, the customer points are numbered as different integers from 1 to N.
(1) And (3) a decoding strategy: aiming at the characteristics of the CVRP problem, the coding of the solution adopts a mode of traversing a distribution point sequence, the coding length is the number N of distribution points needing to be traversed, each component in the solution corresponds to a client point number, and therefore the coding form of the obtained solution X is as follows:
X=(m1,m2,…,mN),
where N represents the code length), miNumber, m, representing the ith customer Point to traversei∈[1,N]And is arbitrarily mi≠mj
(2) Speed coding strategy: the speed is encoded in a mode of client point number increment sequence, and the length of the solution X is N, so that the length of the speed code is N. Each customer point number in the code corresponds to a customer point number increment, the value of which can be a positive value or a negative value, and the variation range is [ - (N-1), N-1 ]. The concrete form is as follows:
V=(v1,v2,…,vN)
wherein V represents velocity, ViIndicating the speed, v, of the ith delivery point to be traversedi∈[-(N-1),N-1]。
Step two: initializing a bat algorithm according to a decoding strategy and a speed coding strategy: initializing the position, pulse frequency and speed of the bat;
(1) initializing bat positions: setting the initial position (namely the number of the client point) of each bat as a random number between [1, N ];
(2) initializing pulse frequency: setting the initial pulse frequency of each bat individual to be zero;
(3) initialization speed: setting the initial speed of each bat individual as a random number between [1-N, N-1 ].
Step three: and D, performing clustering analysis on the client points in the step two by using a K-means algorithm, and partitioning all the client points according to the positions of the client points. The data processed in the third step is the position of the initial bat individual in the second step, namely the number of the client point.
In order to improve the searching speed, all the client points are partitioned according to the positions of the client points, the client points are subjected to clustering analysis by using a K-means algorithm and are finally divided into m zones, and each client point belongs to a certain partition. The K-means algorithm comprises the following steps:
step 1: randomly selecting m points from the customer points as the central point of each cluster, wherein m belongs to S;
step 2: randomly selecting a customer point S to be distributed, wherein S belongs to S;
and step 3: comparing the distances from the customer points s to be distributed to the m points respectively, and placing the customer points s to be distributed into the area where the closest point to the customer points s to be distributed belongs;
and 4, step 4: and (4) selecting the next client point to be distributed, and circulating the step (3) until all the client points to be distributed belong to a certain subarea.
Step four: updating the bat positions after the partitioning by utilizing a discrete bat algorithm.
For any bat a, the pulse frequency is adjusted by using a formula (10), the speed is adjusted by using a formula (11), and the position is adjusted by using a formula (12), so that the offspring bats are generated;
fa=fmin+(fmax-fmin)β (10)
wherein f isaThe pulse frequency of the a-th bat, pulse frequency faThe position of the bat is adjusted when the global search is carried out. f. ofmax、fminRespectively representing the maximum value and the minimum value of the pulse frequency; beta is a uniformly distributed random number, and beta is an element of 0,1];xa t -1And va t-1Respectively representing the position and the speed of the bat a of the t-1 th generation; x is the number ofa tAnd va tRespectively representing the position and the speed of the t-th generation bat a; x is the number of*And (4) representing the current optimal solution, wherein the bat position corresponding to the current minimum fitness value is the current optimal solution.
Step five: selection of a search mode: selecting a random number, selecting local search or global search according to the random number and the current pulse frequency, and calculating a new fitness value.
Both the global search and the local search update the bat position, but the global search updates the bat position by adjusting the bat pulse frequency and the bat speed, while the local search searches near the current optimal solution. The rand function is applied to generate random numbers uniformly distributed between (0,1), denoted as r 1. If r1 is less than the current pulse frequency, performing global search according to the fourth step, and calculating a new fitness value; otherwise, local search is carried out near the current solution, the searching mode is shown as formula (13), whether two-element optimization (2-optimization, 2-opt) operation is carried out or not is judged according to certain probability, and a new fitness value is calculated.
xnew=x*+εμ (13)
Wherein x isnewRepresenting a new solution obtained by random perturbation; x is the number of*Representing a current optimal solution; epsilon represents a random vector and is generated by a randn function; mu represents a constant, and 0 mu<1。
The fitness function is used for measuring the total cost in the cargo distribution process, including the vehicle rental cost and the fuel consumption cost related to the driving distance, and is detailed in formula (1). The method for solving the fitness value comprises the following steps:
step 1: according to the weight of the goods required to be delivered by each point to be delivered and the limited load Q of the vehicle, the delivery points meeting the load limiting requirement are placed in the running route of the vehicle; if the cargo weight of the distribution point exceeds the limited load Q of the vehicle, applying for a vehicle again, and adding 1 to the total number of the vehicles required currently;
step 2: and calculating the sum of the oil consumption cost and the rental cost of the vehicle, namely the total cost.
Whether 2-opt operation is performed or not is judged according to a certain probability, the implementation method of the 2-opt operation takes delivery of 6 customer points as an example, the customer points are assumed to be A, B, C, D, E, F and G, an initial optimal solution route is marked as s ═ A, B, C, D, E, F and G }, then two non-adjacent nodes are randomly selected in s, and a new path is obtained by reversing the path between the two nodes. For example, a node B and a node E are randomly selected in the route s, a path before the node B is added to a new path without change, a path from the node B to the node E is added to the new path after the number of the path is reversed, and a path after the node E is added to the new path without change, so that the new path is recorded as s' { a, E, D, C, B, F, G }.
Step six: updating the fitness value: and (4) comparing the fitness value obtained in the fifth step with the current minimum fitness value, if the fitness value obtained in the fifth step is smaller than the current minimum fitness value and the current sound loudness is greater than a random number r2 which is generated by applying a rand function and is uniformly distributed between (0,1), updating the minimum fitness value by using the fitness value obtained in the fifth step, recording the position of each bat, and obtaining a global optimal solution, otherwise, not updating.
If the iteration is the first iteration, the current sound loudness is the initial sound loudness, and if the iteration is not the first iteration, the current sound loudness is the sound loudness after the update of step seven.
And the minimum fitness value is obtained by sequencing all the fitness values obtained in the step five.
Step seven: pulse emissivity and sound loudness update: the updating of the pulse emission frequency and the sound loudness judges whether the global search or the local search is carried out in the next iteration and whether the fitness value is updated.
The pulse transmission frequency r is updated according to the formula (14) and the formula (15), respectivelya tAnd sound loudness Aa t
Wherein: t represents an iterative algebra; a. thea t、Aa t+1Respectively representing the loudness of sound of the bat a in the t th generation and the t +1 th generation, if t is 0, representing the initial loudness of sound, and if t is not equal to 0, updating according to the formula (15); r isa 0An initial pulse emission frequency representing the bata; r isa tRepresenting the pulse emission frequency of the bat a in the t generation; the constant α represents the attenuation coefficient of the sound volume, and 0<α<1; the constant γ represents the enhancement factor of the search frequency, and γ>0. Generating initial sound loudness for the bat individuals by utilizing a random function; and generating initial pulse frequency for the bat individuals by utilizing a random function.
Step eight: if the termination condition is met, outputting a global optimal solution; otherwise, returning to the step five.
The termination conditions were: whether the maximum number of iterations has been reached.
The simulation experiment platform is MATLAB R2017b, the CPU is 3.4GHZ, the memory is 4.0G, and the win 1064-bit operating system. The parameters of the invention take the following values: maximum value f of pulse frequency in DBAmaxMinimum value f of pulse frequency 1min0, attenuation coefficient alpha of sound volume is 0.9, enhancement coefficient gamma of search frequency is 0.9, initial loudness A belongs to (0,1), pulse emission frequency r is used for judging whether the search is global search or local search, and random numbers are represented by r1 and r 2; cross probability p in GAc0.3, probability of variation pm0.2; inertia weight factor w in PSO is 0.2, acceleration coefficient C1=C2=2。
The invention (DBA), PSO and GA are respectively used for 10 times of operation on 12 classical test examples selected from a Solomon standard test library, all tests adopt full floating point number operation, the optimal solution obtained by the algorithm is the minimum value obtained by 10 times of operation, the population scale of 3 algorithms is equal to the problem scale modulus (the size is 101) given in tables 1,2 and 3, and the optimal solutions obtained by the 3 algorithms and corresponding results are compared when the iteration times are respectively 200, 600 and 1000. Table 4 shows the optimal solution obtained by 3 algorithms with a population size of 30, GA and PSO algorithms with a population size equal to the problem specification number, and an iteration number of 1000, and the corresponding result comparison.
TABLE 1 comparison of data from 3 algorithms with 200 iterations
TABLE 2 comparison of operational data for 3 algorithms with 600 iterations
TABLE 3 comparison of data from 3 algorithms with 1000 iterations
TABLE 4 comparison of operational data of 3 algorithms of different population scales with 1000 iterations
As can be seen from tables 1,2 and 3, when the number of iterations is 200, 600 and 1000, the average time obtained by applying the method to solve in 12 cases is slightly slower than the average time obtained by using the GA and PSO algorithms, but the optimal solution obtained by using the DBA algorithm of the invention is superior to the optimal solution obtained by using the GA and PSO algorithms to a great extent. In table 1, the improvement of the present invention over GA and PSO was minimal at solving the C101 problem, increased by 10.31% and 14.32%, respectively, but the improvement of the present invention over GA and PSO was 21.42% and 32.12%, respectively, at solving the RC101 problem, and the improvement of the present invention over GA and PSO algorithms was 15.75% and 22.99%, respectively, at the average solving accuracy. In table 2, the improvement of the present invention over GA was minimal, but was also 13.73% improved when solving the C102 problem, the improvement of the present invention over PSO was minimal, and was 20.11% improved when solving the C204 problem, but the improvement of the present invention over GA and PSO was 20.95% and 35.65%, respectively, when solving the RC105 problem, and the improvement of the present invention over GA and PSO algorithms was 17.42% and 26.21%, respectively, in terms of average solution accuracy. In Table 3, the improvement of the invention over GA was minimal, but 12.71% was also improved when solving the R201 problem, but 19.34% was improved over GA when solving the RC105 problem, 22.93% was improved over PSO when solving the C102 problem, and 33.87% was improved over PSO when solving the RC201 problem. Compared with GA and PSO algorithms, the method has 16.27% and 26.67% improvement in average solving precision. As can be seen from table 4, the average and the optimal values obtained by the present invention at the population size of 30 are better than those obtained by the GA and PSO algorithms at the same size, and the average time consumed by the present invention at the population size of 30 is better than that of the GA and PSO algorithms at the same size, i.e., the average time required by the present invention relative to the GA and PSO is increased by 174.95% and 175.27% on average for 12 test examples, respectively. Compared with GA and PSO algorithms, the average solving precision of the average value is improved by 6.99% and 17.33%. Compared with GA and PSO algorithms, the method has the advantages that the average solving precision of the optimal value is improved by 7.25% and 16.79%, respectively. Therefore, the DBA algorithm has effectiveness.
Since the Solomon data is divided into C, R, RC-represented test problems and the solving difficulty is increased in sequence, compared with the GA and PSO algorithm, the invention can find that the relative solving precision is increased when the difficulty is increased. The DBA algorithm has stronger applicability and optimizing capability compared with GA and PSO algorithms along with the increase of the difficulty of solving the problem.
For further comparison of the solving quality of the 3 algorithms, fig. 2, 3 and 4 are graphs illustrating the variation of the average value of the solutions obtained by 10 operations of the 3 algorithms on 12 test cases with the scale of the problem under the conditions of table 1, table 2 and table 3, respectively, as shown in fig. 2, fig. 3 and fig. 4. As can be seen from the longitudinal directions of fig. 2, fig. 3 and fig. 4, the average values obtained by the DBA solution of the present invention are better than the average values obtained by the GA and PSO algorithms; it can be seen from the horizontal direction that the stability of the invention is superior to the stability of GA and PSO algorithms, and the invention has stronger searching capability and higher stability.
According to the characteristics of the CVRP problem and the optimization mechanism of the BA algorithm, a DBA algorithm for solving the CVRP problem is researched and designed; in order to solve the CVRP problem with discrete attributes, carrying out discretization coding on related variables involved in the BA algorithm; redefining related operation operators for the discretized variables; in order to enhance the robustness of the algorithm, a K-means clustering algorithm is introduced to carry out clustering analysis on distribution points; in order to enhance the local search capability of the algorithm, local intersection and mutation operations are introduced to realize local search of the distribution routes. A potential optimal space is explored by utilizing the self-adaptive random searching performance of the BA, and the search space of the BA can be deeply searched by local cross variation operation, so that the purpose of solving the optimal solution is achieved. In order to verify the effectiveness of the invention, the solution result and the running time of the Solomon algorithm are respectively compared with the PSO algorithm and the GA algorithm. The comparative results show the effectiveness of the invention.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (9)

1. A logistics distribution vehicle path optimization method based on a discrete bat algorithm is characterized by comprising the following steps:
the method comprises the following steps: according to the existing vehicle path problem with capacity constraint, a model of the logistics distribution vehicle path with the capacity constraint is built, and a decoding strategy and a speed coding strategy are designed;
step two: initializing a bat algorithm according to a decoding strategy and a speed coding strategy: initializing the position, pulse frequency and speed of the bat as an initialized customer point;
step three: performing cluster analysis on the client points initialized in the step two by using a K-means algorithm, and partitioning all the client points according to the positions of the client points;
step four: and (3) global search: updating the bats positions after the partition by utilizing a discrete bat algorithm;
step five: selection of a search mode: selecting a random number, selecting local search or global search according to the random number and the current pulse frequency, and calculating a new fitness value;
step six: updating the fitness value: comparing the fitness value obtained in the fifth step with the current minimum fitness value, if the fitness value obtained in the fifth step is smaller than the current minimum fitness value and the current sound loudness is greater than a random number r2 which is generated by applying a rand function and evenly distributed among (0,1), updating the minimum fitness value by using the fitness value obtained in the fifth step, recording the position of each bat to obtain a global optimal solution, otherwise, not updating;
step seven: pulse emissivity and sound loudness update: whether the pulse emission frequency and the sound loudness are updated in the next iteration is judged to be global search or local search and whether the fitness value is updated;
step eight: if the end condition is met, outputting a global optimal solution; otherwise, returning to the step five.
2. The method for logistics distribution vehicle path optimization based on discrete bat algorithm of claim 1, wherein the logistics distribution vehicle path with capacity constraint in the first step is modeled as follows:
the decision variables are defined as:
wherein,represents the total distance traveled by all vehicles; z represents the total cost, K is the total number of vehicles required; n is the total amount of users; a is the fixed cost of a unit vehicle; b is the oil consumption cost per unit distance; dijThe distance between the client point i and the client point j; q. q.siThe weight of the goods at customer point i; q represents the maximum load capacity of the vehicle; s is the number set of the client points, and the value of S is {1,2, …, N }; x is the number ofijkIndicating whether vehicle k passes customer point i to point customer j, yikIndicating that each customer is guaranteed to have a vehicle to service, i, j equal to 0 indicating a distribution center, and k equal to 0 indicating that the initial number of vehicles is 0.
3. The logistics distribution vehicle path optimization method based on the discrete bat algorithm of claim 1 or 2, wherein the design method of the encoding strategy decoding strategy and the speed encoding strategy in the first step is as follows: the scale of the solved problem is N, and the customer points are numbered as different integers from 1 to N;
(1) and (3) a decoding strategy: the encoding of the solution adopts a mode of traversing a distribution point sequence, the encoding length is the number N of distribution points needing to be traversed, each component in the solution corresponds to a client point number, and therefore the encoding form of the obtained solution X is as follows:
X=(m1,m2,…,mN),
where N denotes the code length, miNumber, m, representing the ith customer Point to traversei∈[1,N]And is arbitrarily mi≠mj
(2) Speed coding strategy: the coding of the speed adopts a mode of a client point number increment sequence, each client point number in the speed coding corresponds to a client point number increment, and:
V=(v1,v2,…,vN)
wherein V represents velocity, ViIndicating the speed, v, of the ith delivery point to be traversedi∈[-(N-1),N-1]。
4. The method for logistics distribution vehicle path optimization based on discrete bat algorithm of claim 3, wherein the method for initializing bat algorithm is:
(1) initializing bat positions: setting the initial position of each bat individual, namely the serial number of the client point where each bat individual is located, as a random number between [1, N ];
(2) initializing pulse frequency: setting the initial pulse frequency of each bat individual to be zero;
(3) initialization speed: setting the initial speed of each bat individual as a random number between [1-N, N-1 ].
5. The logistics distribution vehicle path optimization method based on discrete bat algorithm of claim 1, wherein the step of K-means algorithm in the third step is:
step 1: randomly selecting m points from the customer points as the central point of each cluster, wherein m belongs to S;
step 2: randomly selecting a customer point S to be distributed, wherein S belongs to S;
and step 3: comparing the distances from the customer points s to be distributed to the m points respectively, and placing the customer points s to be distributed into the area where the closest point to the customer points s to be distributed belongs;
and 4, step 4: and (4) selecting the next client point to be distributed, and circulating the step (3) until all the client points to be distributed belong to a certain subarea.
6. The method for optimizing a logistics distribution vehicle path based on discrete bat algorithm as claimed in claim 1, wherein the implementation method of the discrete bat algorithm in the fourth step is:
adjusting the pulse frequency: f. ofa=fmin+(fmax-fmin)β;
Adjusting the speed:
adjusting the position:
wherein f isaRepresenting the pulse frequency of the a-th bat; f. ofmax、fminRespectively representing the maximum value and the minimum value of the pulse frequency; beta is a uniformly distributed random number, and beta is an element of 0,1];xa t-1And va t-1Respectively representing the position and the speed of the bat a of the t-1 th generation; x is the number ofa tAnd va tRespectively representing the position and the speed of the t-th generation bat a; x is the number of*Representing the current optimal solution, namely the bat position corresponding to the current minimum fitness value, thereby generating the offspring bats.
7. The method for logistics distribution vehicle path optimization based on discrete bat algorithm of claim 1 or 6, wherein the step five employs rand function to generate random number r1 evenly distributed between (0,1), if r1 is less than current pulse frequency, global search is performed according to step four, and new fitness value is calculated; otherwise, local search is carried out near the current solution; x is the number ofnew=x*+ ε μ; judging whether two-element optimization operation is performed or not according to a certain probability, and calculating a new fitness value; wherein x isnewRepresenting a new solution obtained by random perturbation; x is the number of*Representing a current optimal solution; epsilon represents the random vector generated by the randn function; μ denotes a constant; the probability is determined by a random function, the two-element optimization operation is to randomly select two non-adjacent nodes on the optimal solution route, and to turn over the path between the two nodes to obtain a new path.
8. The method for optimizing the route of a logistics distribution vehicle based on discrete bat algorithm as claimed in claim 7, wherein the method for obtaining the fitness value in the fifth step is:
step 1: according to the weight of the goods required to be delivered by each point to be delivered and the limited load Q of the vehicle, the delivery points meeting the load limiting requirement are placed in the running route of the vehicle; if the cargo weight of the distribution point exceeds the limited load Q of the vehicle, applying for a vehicle again, and adding 1 to the total number of the vehicles required currently;
step 2: and calculating the sum of the oil consumption cost and the rental cost of the vehicle, namely the total cost.
9. The logistics distribution vehicle path optimization method based on the discrete bat algorithm of claim 1, wherein the pulse transmission frequency updated in the seventh step is:
updating the loudness of sound:
wherein A isa t、Aa t+1Respectively representing the sound volumes of the bat a in the t generation and the t +1 generation; r isa 0Representing an initial pulse emission frequency of the bata; r isa tRepresenting the pulse emission frequency of the bat a in the t generation; the constant α represents the attenuation coefficient of the sound volume, and 0<α<1; the constant γ represents the enhancement factor of the search frequency, and γ>0。
CN201910758083.3A 2019-08-16 2019-08-16 Logistics distribution vehicle route optimization method based on discrete bat algorithm Active CN110472792B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910758083.3A CN110472792B (en) 2019-08-16 2019-08-16 Logistics distribution vehicle route optimization method based on discrete bat algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910758083.3A CN110472792B (en) 2019-08-16 2019-08-16 Logistics distribution vehicle route optimization method based on discrete bat algorithm

Publications (2)

Publication Number Publication Date
CN110472792A true CN110472792A (en) 2019-11-19
CN110472792B CN110472792B (en) 2020-07-31

Family

ID=68511945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910758083.3A Active CN110472792B (en) 2019-08-16 2019-08-16 Logistics distribution vehicle route optimization method based on discrete bat algorithm

Country Status (1)

Country Link
CN (1) CN110472792B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111080031A (en) * 2019-12-27 2020-04-28 圆通速递有限公司 Vehicle path optimization method and system based on improved dragonfly algorithm
CN111126688A (en) * 2019-12-19 2020-05-08 北京顺丰同城科技有限公司 Distribution route determining method and device, electronic equipment and readable storage medium
CN112188825A (en) * 2020-10-12 2021-01-05 合肥埃科光电科技有限公司 Multi-head chip mounter mounting efficiency optimization method and system based on bat algorithm
CN112330001A (en) * 2020-10-27 2021-02-05 河南大学 Logistics distribution vehicle route optimization method based on discrete bat algorithm
CN112785085A (en) * 2021-02-08 2021-05-11 日日顺供应链科技股份有限公司 Distribution path optimization method and device
CN114611830A (en) * 2022-03-28 2022-06-10 重庆邮电大学 Medicine distribution vehicle path planning method and device based on multi-dimensional partition

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130159208A1 (en) * 2011-12-19 2013-06-20 Byung Jun Song Shipper-oriented logistics base optimization system
CN105976298A (en) * 2016-06-02 2016-09-28 广东工业大学 Logistics transport scheduling method based on discrete bat algorithm
CN107886157A (en) * 2017-10-30 2018-04-06 中国地质大学(武汉) A kind of new bat optimized algorithm system
CN108121999A (en) * 2017-12-10 2018-06-05 北京工业大学 Support vector machines parameter selection method based on mixing bat algorithm

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130159208A1 (en) * 2011-12-19 2013-06-20 Byung Jun Song Shipper-oriented logistics base optimization system
CN105976298A (en) * 2016-06-02 2016-09-28 广东工业大学 Logistics transport scheduling method based on discrete bat algorithm
CN107886157A (en) * 2017-10-30 2018-04-06 中国地质大学(武汉) A kind of new bat optimized algorithm system
CN108121999A (en) * 2017-12-10 2018-06-05 北京工业大学 Support vector machines parameter selection method based on mixing bat algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱颢: "基于改进蝙蝠算法的带模糊需求的车辆路径问题", 《计算机测量与控制》 *
李丽丽: "蝙蝠算法及其在CVRPTW-SDP问题中的应用", 《万方学位论文数据库》 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111126688A (en) * 2019-12-19 2020-05-08 北京顺丰同城科技有限公司 Distribution route determining method and device, electronic equipment and readable storage medium
CN111126688B (en) * 2019-12-19 2023-05-26 北京顺丰同城科技有限公司 Distribution route determining method, distribution route determining device, electronic equipment and readable storage medium
CN111080031A (en) * 2019-12-27 2020-04-28 圆通速递有限公司 Vehicle path optimization method and system based on improved dragonfly algorithm
CN112188825A (en) * 2020-10-12 2021-01-05 合肥埃科光电科技有限公司 Multi-head chip mounter mounting efficiency optimization method and system based on bat algorithm
CN112188825B (en) * 2020-10-12 2021-09-24 合肥安迅精密技术有限公司 Multi-head chip mounter mounting efficiency optimization method and system based on bat algorithm
CN112330001A (en) * 2020-10-27 2021-02-05 河南大学 Logistics distribution vehicle route optimization method based on discrete bat algorithm
CN112785085A (en) * 2021-02-08 2021-05-11 日日顺供应链科技股份有限公司 Distribution path optimization method and device
CN112785085B (en) * 2021-02-08 2022-11-29 日日顺供应链科技股份有限公司 Distribution path optimization method and device
CN114611830A (en) * 2022-03-28 2022-06-10 重庆邮电大学 Medicine distribution vehicle path planning method and device based on multi-dimensional partition
CN114611830B (en) * 2022-03-28 2024-05-28 重庆邮电大学 Medical delivery vehicle path planning method and device based on multidimensional partition

Also Published As

Publication number Publication date
CN110472792B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN110472792B (en) Logistics distribution vehicle route optimization method based on discrete bat algorithm
Zhou et al. Parameter adaptation-based ant colony optimization with dynamic hybrid mechanism
Hyun et al. A genetic algorithm for multiple objective sequencing problems in mixed model assembly lines
Ren et al. Solving flow-shop scheduling problem with a reinforcement learning algorithm that generalizes the value function with neural network
CN112183812B (en) Finished cigarette logistics vehicle scheduling method considering short-time and low-cost
CN103049805A (en) Vehicle route optimization method with time window constraint based on improved particle swarm optimization (PSO)
CN112269382B (en) Robot multi-target path planning method
CN112330001A (en) Logistics distribution vehicle route optimization method based on discrete bat algorithm
CN114237222B (en) Delivery vehicle path planning method based on reinforcement learning
Geetha et al. A hybrid particle swarm optimization with genetic operators for vehicle routing problem
CN109359771A (en) A kind of line haul vehicle and goods matching algorithm based on big data
Zheng et al. Ant colony optimisation algorithms for two-stage permutation flow shop with batch processing machines and nonidentical job sizes
CN116321299A (en) Internet of vehicles task unloading and resource allocation method based on MEC under information age constraint
Ezugwu et al. Enhanced intelligent water drops algorithm for multi-depot vehicle routing problem
Su et al. A responsive ant colony optimization for large-scale dynamic vehicle routing problems via pheromone diversity enhancement
CN111090935B (en) Public bicycle appointment scheduling and path planning method
Dahan Neighborhood Search Based Improved Bat Algorithm for Web Service Composition.
CN112016750A (en) Improved method for solving problem of vehicle path with constraint
CN112991745A (en) Traffic flow dynamic cooperative allocation method under distributed framework
CN117291323A (en) Vehicle path optimization method, device, equipment and medium based on quantum algorithm
CN112256422A (en) Heterogeneous platform task scheduling method and system based on Q learning
Msallam et al. Improved intelligent water drops algorithm using adaptive schema
Elahi et al. Online context-aware task assignment in mobile crowdsourcing via adaptive discretization
CN110633784B (en) Multi-rule artificial bee colony improvement algorithm
CN116579513A (en) Material distribution path optimization method and system based on improved whale optimization 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