CN108846602A - A kind of logistics transportation dispatching method and device based on quantum fireworks algorithm - Google Patents

A kind of logistics transportation dispatching method and device based on quantum fireworks algorithm Download PDF

Info

Publication number
CN108846602A
CN108846602A CN201810542936.5A CN201810542936A CN108846602A CN 108846602 A CN108846602 A CN 108846602A CN 201810542936 A CN201810542936 A CN 201810542936A CN 108846602 A CN108846602 A CN 108846602A
Authority
CN
China
Prior art keywords
firework
quantum
fitness
preset formula
fireworks
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
CN201810542936.5A
Other languages
Chinese (zh)
Other versions
CN108846602B (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.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201810542936.5A priority Critical patent/CN108846602B/en
Publication of CN108846602A publication Critical patent/CN108846602A/en
Application granted granted Critical
Publication of CN108846602B publication Critical patent/CN108846602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Landscapes

  • Business, Economics & Management (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of logistics transportation dispatching methods based on quantum fireworks algorithm, by analyzing the Optimization Mechanism of fireworks algorithm and being directed to described logistics transportation scheduling problem, define fireworks population number in fireworks algorithm, the explosion parameters such as density and burst radius, devise the encoding and decoding strategy for dividing random by key in conjunction with vehicle route such as a kind of, the method for proposing a kind of quantum and the mutual inversion of phases of fireworks simultaneously, to introduce Quantum rotating gate enhancing algorithm ability of searching optimum, it is slow to solve the existing logistics transportation dispatching method speed of service, convergence capabilities are weak, and the technical problem that Searching efficiency is low.

Description

Logistics transportation scheduling method and device based on quantum firework algorithm
Technical Field
The invention relates to the field of logistics scheduling, in particular to a logistics transportation scheduling method and device based on a quantum firework algorithm.
Background
The logistics industry is internationally considered as the basic industry of national economic development, the development degree of the logistics industry is one of the important marks of the modernization degree of the weighing country and the comprehensive national force, the logistics operation not only determines the total operation cost of the business enterprises, but also directly influences the stability and the balance of the operation of the whole business system, and therefore the logistics transportation scheduling is one of the core activities of logistics.
In logistics transportation scheduling, one of the most basic logistics transportation scheduling models can be described as: a distribution center has a plurality of vehicles to be delivered to a plurality of customer sites, each vehicle departs from the distribution center, needs to go through all the customers for which the vehicle is responsible, and then returns to the distribution center, and how to select a traveling route is required to minimize the total travel. The vehicle capacity is larger than or equal to the total cargo demand of all the client points which are responsible for the vehicle; all customers can pass by one vehicle only once, but the existing logistics transportation scheduling method is slow in operation speed, weak in convergence capacity and low in optimization efficiency.
Disclosure of Invention
The invention provides a logistics transportation scheduling method and device based on a quantum firework algorithm, which are used for solving the technical problems of low running speed, weak convergence capacity and low optimization efficiency of the conventional logistics transportation scheduling method.
The invention provides a logistics transportation scheduling method based on a quantum firework algorithm, which comprises the following steps:
determining the number of customer points as n and the demand load W which is in one-to-one correspondence with the n customer points as { W }1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the explosion sparks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworks is RupThe lower limit of the random key area of the fireworks is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
According to the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
Positioning fireworks xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, said sets Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
respectively aiming at x in each set by a maximum position methodijSorting in descending order, the set CimThe second dimension value of each element in the distribution vehicle m is the access sequence of the customer points of the distribution vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (1) a customer route of a delivery vehicle m, wherein the number of customer points borne by the delivery vehicle m is GmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle is obtained;
recording global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
Updating the number of exploding sparks S per fireworkiExplosion radius Ai
At each firework xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
randomly selecting GM fireworks in a firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
calculating the fitness value of newly generated explosion sparks and Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to a roulette plate rule, and selecting each alternative firework in the roulette plate rule according to the probability formula:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
If N is presentQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimal fitness value fitnessbest
Updating a quantum mapped random number NQmapMake N beQmapIs [0, K ]]An internal random integer;
will Q fireworks xiConversion to Q quanta Qi
For Q quantum QiCarrying out one-time quantum revolving door updating;
the N rotated quantum individuals qiConverted into N firework units xi', if xi' than xiPreferably, the fireworks x are updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
Outputting the best firework position xbestFitness value of fitbest
Preferably, said updating of the number of exploding sparks S per fireworkiExplosion radius AiThe method specifically comprises the following steps:
determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula specifically includes:
the fourth preset formula is specifically as follows:
preferably, the Q fireworks xiConversion to Q quanta QiThe method specifically comprises the following steps:
to fireworks xi=(xi1,xi2,…,xij,…,xin) Is converted into quantum q by an eighth preset formulaiThe eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking a negative number.
Preferably, said pair of Q quantities QiThe updating of the quantum revolving gate for one time specifically comprises the following steps:
for Q quantum Q by a ninth preset formulaiAnd updating the quantum revolving door once, wherein the ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiQuantum state of j-th dimension position passing through quantum rotation gate, wherein rotation angle delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θijL may be determined by an eleventh preset formula, which is specifically:
wherein the angular direction s (α) is rotatedijij) The method can be determined by an eleventh preset formula, and the eleventh preset formula specifically is as follows:
wherein,andand (4) determining the j-th dimension probability amplitude of the current optimal quantum of the algorithm.
Preferably, the N rotated quantum individuals qiConverted into N firework units xi' specifically, the method comprises the following steps:
subjecting the quantum to individual treatmentConverted into firework individual x through a twelfth preset formulai', the twelfth preset formula specifically is:
the invention provides a logistics transportation scheduling device based on a quantum firework algorithm, which comprises:
a first determining module, configured to determine that the number of customer points is n, and the demand load W corresponding to the n customer points one-to-one is { W ═ W1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q, the number of the explosion sparks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworks is RupThe lower limit of the random key area of the fireworks is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
a first generation module for randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
A first calculation module for calculating a first calculation value based on the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
A first grouping module for grouping the firework position xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, said sets Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
a first ordering module for respectively ordering x in each set by maximum position methodijSorting in descending order, the set CimThe second dimension value of each element in the distribution vehicle m is the access sequence of the customer points of the distribution vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (1) a customer route of a delivery vehicle m, wherein the number of customer points borne by the delivery vehicle m is GmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
the second calculation module is used for calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle is obtained;
recording global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
A first updating module for updating the number S of exploding sparks per fireworkiExplosion radius Ai
A first shifting module for shifting each of the fireworks xiRandomly selecting z dimensions, carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate explosion sparks,the fifth preset formula is specifically as follows:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
the first variable module is used for randomly selecting GM fireworks in a firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
and the third calculation module is used for calculating the fitness value of the newly generated explosion sparks and the Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, and selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to the roulette wheel rule, wherein the probability formula of each alternative firework selected in the roulette wheel rule is as follows:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
a second updating module for updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
A third updating module for if NQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimum fitness value fitnessbest
A first conversion module for converting Q fireworks xiConversion to Q quanta Qi
A fourth updating module for the Q quantity QiCarrying out one-time quantum revolving door updating;
a fifth updating module for updating the N rotated quantum individuals qiConverted into N firework units xi', if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
An output module for outputting the optimal firework positionPut xbestFitness value of fitbest
Preferably, said updating of the number of exploding sparks S per fireworkiExplosion radius AiThe method specifically comprises the following steps:
determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula specifically includes:
the fourth preset formula is specifically as follows:
preferably, the Q fireworks xiConversion to Q quanta QiThe method specifically comprises the following steps:
to fireworks xi=(xi1,xi2,…,xij,…,xin) Is converted into quantum q by an eighth preset formulaiThe eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking a negative number.
Preferably, said pair of Q quantities QiThe updating of the quantum revolving gate for one time specifically comprises the following steps:
for Q quantum Q by a ninth preset formulaiAnd updating the quantum revolving door once, wherein the ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiQuantum state of j-th dimension position passing through quantum rotation gate, wherein rotation angle delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θijL may be determined by an eleventh preset formula, which is specifically:
wherein the angular direction s (α) is rotatedijij) The method can be determined by an eleventh preset formula, and the eleventh preset formula specifically is as follows:
wherein,andand (4) determining the j-th dimension probability amplitude of the current optimal quantum of the algorithm.
Preferably, the N rotated quantum individuals qiConverted into N firework units xi' specifically, the method comprises the following steps:
subjecting the quantum to individual treatmentConverted into firework individual x through a twelfth preset formulai', the twelfth preset formula specifically is:
according to the technical scheme, the invention has the following advantages:
according to the logistics transportation scheduling method based on the quantum firework algorithm, parameters such as the number of firework populations, explosion density and explosion radius in the firework algorithm are defined by analyzing an optimization mechanism of the firework algorithm and aiming at the described logistics transportation scheduling problem, a coding and decoding strategy combining an equally-divided random key and a vehicle path is designed, and a method for mutually converting quantum and fireworks is provided, so that the overall search capability of the algorithm is enhanced by introducing a quantum revolving door, and the technical problems of low operation speed, weak convergence capability and low optimization efficiency of the conventional logistics transportation scheduling method are solved.
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 only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flow chart of an embodiment of a logistics transportation scheduling method based on a quantum firework algorithm provided by the invention;
fig. 2 is a schematic flow chart of another embodiment of a logistics transportation scheduling method based on a quantum firework algorithm provided by the invention;
fig. 3 is a schematic structural diagram of an embodiment of a logistics transportation scheduling device based on a quantum firework algorithm, provided by the invention;
FIG. 4 is an optimal path diagram of an application example of the logistics transportation scheduling method based on the quantum firework algorithm provided by the invention;
fig. 5 is a graph of the shortest path evolution of an application example of the logistics transportation scheduling method based on the quantum firework algorithm provided by the invention.
Detailed Description
The embodiment of the invention provides a logistics transportation scheduling method and device based on a quantum firework algorithm, and solves the technical problems of low running speed, weak convergence capacity and low optimization efficiency of the conventional logistics transportation scheduling method.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides an embodiment of a logistics transportation scheduling method based on a quantum firework algorithm, including:
101, determining the number of customer points as n and the required load weight W corresponding to the n customer points one by one as { W }1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the explosion sparks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworks is RupThe lower limit of the firework random key area is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
102, randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
103 according to the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
104 positioning the fireworks in xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, set Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
respectively aiming at x in each set by a maximum position methodijSorting in descending order, set CimThe second dimension value of each element is the access sequence of the client point of the delivery vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (3), a customer route of the delivery vehicle m, wherein the number G of customer points borne by the delivery vehicle mmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
106, calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the sum of the load demands of the customer points corresponding to the delivery vehicle exceeds the maximum load demand of the vehicleWeight difference of large load limit;
107 recording the global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current best firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
108, updating the number S of explosion sparks of each fireworkiExplosion radius Ai
109 in each firework xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
randomly selecting GM fireworks in the firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
calculating the fitness value of newly generated explosion sparks and Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to a roulette plate rule, and selecting each alternative firework in the roulette plate rule according to the probability formula:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
112, updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
113 if NQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimal fitness value fitnessbest
114 updating the quantum mapping random number NQmapThe Q fireworks xiConversion to Q quanta QiFor Q quantity QiPerforming one-time quantum revolving gate updating, and enabling the N quantum individuals q after the rotationiConverted into N firework units xi', if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
115 outputting the best fireworks position xbestFitness value of fitbest
According to the logistics transportation scheduling method based on the quantum firework algorithm, provided by the embodiment of the invention, parameters such as firework population number, explosion density and explosion radius in the firework algorithm are defined by analyzing an optimization mechanism of the firework algorithm and aiming at the described logistics transportation scheduling problem, an encoding and decoding strategy combining equally-divided random keys and vehicle paths is designed, and a method for mutually converting quantum and fireworks is provided, so that the overall search capability of the quantum revolving door enhanced algorithm is introduced, and the technical problems of low running speed, weak convergence capability and low optimization efficiency of the existing logistics transportation scheduling method are solved.
The above is a description of an embodiment of a logistics transportation scheduling method based on the quantum firework algorithm, and another embodiment of a logistics transportation scheduling method based on the quantum firework algorithm is described in detail below.
Referring to fig. 2, another embodiment of a method for drawing an order thermodynamic diagram distribution based on an electronic fence map according to the present invention includes:
201, determining the number of customer points as n, and the required load weight W corresponding to the n customer points one by one as { W }1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the explosion sparks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworksIs RupThe lower limit of the firework random key area is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
202, randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
203 according to the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
204 firework position xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, set Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
205 by maximum position method, respectively for x in each setijSorting in descending order, set CimThe second dimension value of each element is the access sequence of the client point of the delivery vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (3), a customer route of the delivery vehicle m, wherein the number G of customer points borne by the delivery vehicle mmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
206, calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle;
207 recording the global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current best firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
208, determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula is specifically as follows:
the fourth preset formula is specifically as follows:
209 at each Firework xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
randomly selecting GM fireworks in a firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
calculating the fitness value of newly generated explosion sparks and Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to the roulette plate rule, and selecting each alternative firework in the roulette plate rule according to the probability formula:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
212 updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
213 if NQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimal fitness value fitnessbest
214 updating the quantum mapped random number NQmapTo make fireworks xi=(xi1,xi2,…,xij,…,xin) Is converted into quantum q by an eighth preset formulaiThe eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking negative number, and applying a ninth preset formula to Q quantum QiCarrying out one-time quantum revolving door updating, wherein a ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiQuantum state of j-th dimension position passing through quantum rotation gate, wherein rotation angle delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θij| may be determined by an eleventh preset formula, which is specifically:
wherein, rotatedirection of rotation angle s (α)ijij) The method can be determined by an eleventh preset formula, wherein the eleventh preset formula is specifically as follows:
wherein,andfor the j-dimension probability amplitude of the current optimal quantum of the algorithm, the quantum is subjected to individual analysisConverted into firework individual x through a twelfth preset formulai', the twelfth preset formula specifically is:
if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
215 outputting the best Firework position xbestFitness value of fitbest
According to the logistics transportation scheduling method based on the quantum firework algorithm, provided by the embodiment of the invention, parameters such as firework population number, explosion density and explosion radius in the firework algorithm are defined by analyzing an optimization mechanism of the firework algorithm and aiming at the described logistics transportation scheduling problem, an encoding and decoding strategy combining equally-divided random keys and vehicle paths is designed, and a method for mutually converting quantum and fireworks is provided, so that the overall search capability of the quantum revolving door enhanced algorithm is introduced, and the technical problems of low running speed, weak convergence capability and low optimization efficiency of the existing logistics transportation scheduling method are solved.
The above is a description of an embodiment of a logistics transportation scheduling method based on the quantum firework algorithm, and a detailed description of an embodiment of a logistics transportation scheduling device based on the quantum firework algorithm is provided below.
Referring to fig. 3, an embodiment of a logistics transportation scheduling device based on a quantum firework algorithm provided by the invention includes:
a first determining module 301, configured to determine that the number of customer points is n, and the demand load W corresponding to the n customer points one to one is { W ═ W1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the exploding fireworks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworks is RupThe lower limit of the random key area of the fireworks is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
a first generating module 302 for randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
A first calculating module 303 for calculating a position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
A first grouping module 304 for grouping the firework position xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, set Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
a first ordering module 305 for respectively ordering x in each set by a maximum position methodijSorting in descending order, set CimThe second dimension value of each element is the access sequence of the client point of the delivery vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (3), a customer route of the delivery vehicle m, wherein the number G of customer points borne by the delivery vehicle mmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
a second calculating module 306, configured to calculate a firework x according to a second preset formula according to the customer path of the delivery vehicle m in the solution of fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle;
recording global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
A first updating module 307 for updating the number of exploding sparks S per fireworkiExplosion radius Ai
A first migration module 308 for each firework xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
the first variation module 309 is configured to randomly select GM fireworks from the firework population, randomly select z dimensions for each firework to perform gaussian variation operation, and generate GM gaussian sparks for the randomly selected dimension k according to a seventh preset formula, where the seventh preset formula specifically is:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
a third calculating module 310, configured to calculate fitness values of the newly generated explosion sparks and the gaussian variation sparks, select an optimal individual from the original firework population, the explosion sparks and the gaussian variation sparks as a next generation firework population, and select the remaining (Q-1) next generation firework populations from the original firework population, the explosion sparks and the gaussian variation sparks according to the roulette wheel rule, where a probability formula selected by each candidate in the roulette wheel rule is:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
a second updating module 311 for updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen updating the optimal firework position x of the whole partbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
A third updating module 312 for if NQ≤NQmaxThen the global optimal firework position x is updatedbestAnd most preferablyBest fitness value fitnessbest
A first conversion module 313 for converting the Q fireworks xiConversion to Q quanta Qi
A fourth updating module 314 for the Q quantities QiCarrying out one-time quantum revolving door updating;
a fifth updating module 315 for updating the N rotated quanta qiConverted into N firework units xi', if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimum fitness value fitnessbest
An output module 316 for outputting the optimal firework position xbestFitness value of fitbest
Optionally, the number of exploding sparks S per firework is updatediExplosion radius AiThe method specifically comprises the following steps:
determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula is specifically as follows:
the fourth preset formula is specifically as follows:
optionally, Q fireworks xiConversion to Q quanta QiThe method specifically comprises the following steps:
to fireworks xi=(xi1,xi2,…,xij,…,xin) Converted into quanta qi by an eighth preset formula,the eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking a negative number.
Optionally, for Q quantity QiThe updating of the quantum revolving gate for one time specifically comprises the following steps:
for Q quantum Q by a ninth preset formulaiCarrying out one-time quantum revolving door updating, wherein a ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiDimension j position through quantumQuantum state after rotating the gate, wherein the angle of rotation is delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θij| may be determined by an eleventh preset formula, which is specifically:
wherein the angular direction s (is) of rotationijij) The method can be determined by an eleventh preset formula, wherein the eleventh preset formula is specifically as follows:
wherein,andand (4) determining the j-th dimension probability amplitude of the current optimal quantum of the algorithm.
Optionally, q is added to the N rotated quantum individualsiConverted into N firework units xi' specifically, the method comprises the following steps:
subjecting the quantum to individual treatmentConverted into the firework individual x by a twelfth preset formulai', the twelfth preset formula specifically is:
one application example of the present invention is as follows.
First step, initialization:
(1) setting control parameters: maximum number of iterations NmaxIteration counter N (initial 0), population size of fireworks Q, number of explosion sparks SsumThe explosion radius A of the fireworks, the Gaussian variation spark number GM and the upper limit R of the random key region of the fireworksup4000 and lower limit Rdown0, number of quantum-rotated iterations NQmaxQuantum mapping random number NQmapA constant ε of 10-23
(2) Initializing a population: for each i, randomly generating the ith firework with the position xi
Secondly, according to x of each firework in the initial firework populationiComputing a function adaptation value fitnessi
In the case where the required load of 7 customer points is W { (230,300,400, 50,80,120,90}, the number of delivery vehicles is 4, and the maximum load limit of the 4 delivery vehicles is B { (500,500,700,200 }), it is assumed that the position of the ith firework is xiFor the firework position x according to equation (1) {590,2600,1090,3600,1900,1200,3900}, the method is applied to the firework position xiInternal real number xij(j 1,2, …,7) to generate 4 sets, set Cim(m ═ 1,2,3,4) is: c1={(590,1)}, C2={(1090,3),(1900,5),(1200,6)},C3={(2600,2)},C4={(3600,4),(3900,7)}。
Then applying maximum position method to each set CimInner xijThe descending order coding is carried out, and the following can be obtained: c1={(590,1)},C2={(1900,5),(1200,6),(1090,3)},C3={(2600,2)},C4{ (3900,7), (3600,4) }. I.e. I can get a solution xiThe vehicle path planning results are represented as follows: the path of the vehicle 1 is 0-1-0; the path of the vehicle 2 is 0-5-6-3-0; the path of the vehicle 3 is 0-2-0;the vehicle 4 path is 0-7-4-0, where 0 represents a delivery point.
According to the vehicle path planning result, the sum of the load demands of the customer points in charge of the vehicle 2 can be known to exceed the maximum load limit of the vehicle according to the formula (4), and finally the fitness can be obtained according to the formula (3)iThe sum of 11 path lengths such as d (O,1), d (1, O), d (O,5), d (5,6), d (6,3), d (3, O), d (O,2), d (2, O), d (O,7), d (7,4) and d (4, O) and the excess load of the vehicle 2.
Thirdly, recording the global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework fitness is fitnessbNumber of iterations N with constant optimum valueQ=0。
And step four, N is equal to N + 1.
Fifthly, updating the number S of the explosion sparks of each fireworkiExplosion radius Ai
Sixth step, each firework xiGeneration of SiAn explosion spark.
And seventhly, randomly selecting GM fireworks in the firework population (the same fireworks can be repeatedly selected), and randomly selecting z dimensions for each firework to perform Gaussian variation operation to generate GM Gaussian fireworks.
And eighthly, calculating the fitness values of the explosion sparks and the Gaussian sparks newly generated in the sixth step and the seventh step, and selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as the next-generation firework population. And (C) selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to the roulette plate rule.
Ninthly, updating the position x of the current optimal fireworkbAnd fitness thereofb. If fitnessbAnd fitnessbestSame, then NQ=NQ+ 1; if fitnessbBetter than fitnessbestThen update the global maximumExcellent fireworks position xbest=xbAnd updating the fitness value fitnessbest=fitnessbRecording the worst firework adaptability value fitnessworst,NQ=0。
The tenth step, if NQ≤NQmaxTurning to the fourteenth step, otherwise, updating the quantum mapping random number NQmap
The tenth step, Q fireworks x selected in the ninth stepiConversion to Q quanta Qi
(1) Quantum individual representation form: quantum individuals qiState of each qubit ofIs expressed in the form of quantum angles, i.e.
(2) Suppose that the position of the ith firework is xi={590,2600,1090,3600,1900,1200,3900}、NQmap=2、 K=4、Rup4000 and RdownThe firework x can be formed according to the formulas (11) and (12) when the firework x is 0iConversion to quanta(three significant decimal places are reserved).
The twelfth step, suppose the pair quantaAnd carrying out one-time quantum revolving gate updating. Illustrated here for quantum qiAnd quantum rotation updating is carried out on the quantum state of the middle 4-dimensional position. Wherein the fourth-dimensional state of the optimal quantum is set asfitnessi=160,fitnessbest=120, fitnessworst=235。
(1) determining the rotation direction of the rotation angle as s (α, beta) according to the formula (14)ij=-1。
(2) The magnitude of the angle of rotation is θ according to the formulas (15) and (16)ij≈-0.278。
(3) Quantum spin gate update according to equation (17):
the tenth step is that the N rotated quantum individuals q are treatediConverted into N firework units xi'; if xi' than xiPreferably, the firework x is updatedi=xi';
(1) Suppose after rotation the ith quantum state isNQmap=2、K=4、Rup4000 and Rdown0, quantum q can be expressed according to equation (14)iConverted into fireworks xi'=(2494 6123130 1606 3884 3176 1906)。
Fourteenth, updating the global optimal firework position xbestAnd an optimal fitness value fitnessbest
Fifteenth step, if N is less than or equal to NmaxThen go to the fourth step.
Sixteenth step, outputting the best firework position xbestFitness value of fitbest
TABLE 1
The method provided by the invention is applied to solve the logistics transportation scheduling problem of 23 points (the problem comprises a distribution center, and the other 22 points are customer points), the solving process and the solving result are shown in table 1, fig. 4 and fig. 5, wherein table 1 is the parameter setting of the specific implementation of the method of the invention, fig. 4 is an optimal path diagram, and fig. 5 is a shortest path evolution curve diagram.
The logistics transportation scheduling method based on the quantum firework algorithm has the advantages of strong convergence capacity, strong global optimization capacity and high running speed, and shows good stability and effectiveness when solving logistics transportation scheduling. The specific implementation in this embodiment has been described in the above embodiments, and is not described here again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the system and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed modules and methods may be implemented in other ways. For example, the above-described module embodiments are merely illustrative, and for example, a division of a module is merely a logical division, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts shown as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated into one processing module, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the present invention as defined by the appended claims.

Claims (10)

1. A logistics transportation scheduling method based on a quantum firework algorithm is characterized by comprising the following steps:
determining the number of customer points as n and the demand load W which is in one-to-one correspondence with the n customer points as { W }1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the explosion sparks is SsumThe explosive radius of the fireworks is A, the Gaussian variation fireThe upper limit of the area of the firework random key is R, the number of flowers is GMupThe lower limit of the random key area of the fireworks is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
According to the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
Positioning fireworks xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, said sets Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
respectively aiming at x in each set by a maximum position methodijSorting in descending order, the set CimThe second dimension value of each element in the distribution vehicle m is the access sequence of the customer points of the distribution vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (1) a customer route of a delivery vehicle m, wherein the number of customer points borne by the delivery vehicle m is GmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle is obtained;
recording global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
Updating the number of exploding sparks S per fireworkiExplosion radius Ai
At each firework xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
randomly selecting GM fireworks in a firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
calculating the fitness value of newly generated explosion sparks and Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to a roulette plate rule, and selecting each alternative firework in the roulette plate rule according to the probability formula:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
If N is presentQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimal fitness value fitnessbest
Updating a quantum mapped random number NQmapMake N beQmapIs [0, K ]]An internal random integer;
will Q fireworks xiConversion to Q quanta Qi
For Q quantum QiCarrying out one-time quantum revolving door updating;
the N rotated quantum individuals qiConverted into N firework units xi', if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
Outputting the best firework position xbestFitness value of fitbest
2. The logistics transportation scheduling method based on quantum firework algorithm as claimed in claim 1, wherein the updating of the number of explosion sparks S of each fireworkiExplosion radius AiThe method specifically comprises the following steps:
determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula specifically includes:
the fourth preset formula is specifically as follows:
3. the logistics transportation scheduling method based on quantum firework algorithm as claimed in claim 2, wherein the Q fireworks x are processediConversion to Q quanta QiThe method specifically comprises the following steps:
to fireworks xi=(xi1,xi2,…,xij,…,xin) Is converted into quantum q by an eighth preset formulaiThe eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking a negative number.
4. The logistics transportation scheduling method based on quantum firework algorithm as claimed in claim 3, wherein the pair of Q quanta Q is providediThe updating of the quantum revolving gate for one time specifically comprises the following steps:
for Q quantum Q by a ninth preset formulaiAnd updating the quantum revolving door once, wherein the ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiQuantum state of j-th dimension position passing through quantum rotation gate, wherein rotation angle delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θijL may be determined by an eleventh preset formula, which is specifically:
wherein the angular direction s (α) is rotatedijij) The method can be determined by an eleventh preset formula, and the eleventh preset formula specifically is as follows:
wherein,andand (4) determining the j-th dimension probability amplitude of the current optimal quantum of the algorithm.
5. Logistics transportation tone based on quantum firework algorithm as claimed in claim 4The method is characterized in that N rotated quantum individuals q are subjected to the rotationiConverted into N firework units xi' specifically, the method comprises the following steps:
subjecting the quantum to individual treatmentConverted into firework individual x through a twelfth preset formulai', the twelfth preset formula specifically is:
6. the utility model provides a commodity circulation transportation scheduling device based on quantum fireworks algorithm which characterized in that includes:
a first determining module, configured to determine that the number of customer points is n, and the demand load W corresponding to the n customer points one-to-one is { W ═ W1,w2,…,wnK delivery vehicles and B-B maximum load limit corresponding to the K delivery vehicles one by one1,b2,…,bKThe maximum iteration times are NmaxThe group size of the fireworks is Q and the number of the explosion sparks is SsumThe explosion radius of the fireworks is A, the number of Gaussian variation sparks is GM, and the upper limit of the random key area of the fireworks is RupThe lower limit of the random key area of the fireworks is RdownQuantum rotation iteration number NQmaxQuantum mapping random number NQmapA constant epsilon;
a first generation module for randomly generating the ith firework with the position xi=(xi1,xi2,…,xij,…,xin) Wherein x isij∈[Rdown,Rup);
A first calculation module for calculating a first calculation value based on the position x of each firework in the initial firework populationiCalculating the corresponding function adaptation value fitnessi
A first grouping module for grouping the firework position xiEach real number x insideij(j ═ 1,2, …, n) grouping yields K sets, said sets Cim(m ═ 1,2, …, K) is:
Cim={(xij,j)|Rdown+(m-1)·[(Rup-Rdown)/K]≤xi<Rdown+m·[(Rup-Rdown)/K]};
a first ordering module for respectively ordering x in each set by maximum position methodijSorting in descending order, the set CimThe second dimension value of each element in the distribution vehicle m is the access sequence of the customer points of the distribution vehicle mDetermining the ith firework x according to the access sequenceiIn the solution of (1) a customer route of a delivery vehicle m, wherein the number of customer points borne by the delivery vehicle m is GmThe rule of a first preset formula is met, and the first preset formula specifically comprises:
the second calculation module is used for calculating the fireworks x through a second preset formula according to the customer path of the delivery vehicle m in the solution of the fireworksiFunction adaptation value of (1)iThe second preset formula is as follows:
wherein d (j)mp,jm(p+1)) Is a customer point jmpAnd a customer point jmpDistance between d (O, j)m1) Is a customer point jm1The distance from the point of initial delivery,for the customer to orderThe distance from the point of initial delivery,the weight difference that the sum of the load demands of the customer points corresponding to the distribution vehicle exceeds the maximum load limit of the vehicle is obtained;
recording global optimal firework position xbestAnd its fitness value fitnessbest=fitnessbWherein the current optimal firework adaptability is fitnessbNumber of iterations N with constant optimum valueQ=0;
A first updating module for updating the number S of exploding sparks per fireworkiExplosion radius Ai
A first shifting module for shifting each of the fireworks xiRandomly selecting z dimensions, and carrying out position offset on the randomly selected dimension k belonging to {1,2, …, z } according to a fifth preset formula to generate an explosion spark, wherein the fifth preset formula specifically comprises the following steps:
wherein U (-1,1) is the interval [ -1,1 [ ]]When sparking, is uniformly distributedExceeding the boundary on the dimension k, performing border crossing detection through a mapping rule of a sixth preset formula, and mapping to a new position, wherein the sixth preset formula specifically comprises:
the first variation module is used for randomly selecting GM fireworks in a firework population, randomly selecting z dimensions for each firework to perform Gaussian variation operation, and generating GM Gaussian sparks for the randomly selected dimension k according to a seventh preset formula, wherein the seventh preset formula specifically comprises the following steps:
wherein e is a gaussian distribution with a mean of 1 and a variance of 1;
the third calculation module is used for calculating the fitness value of the newly generated explosion sparks and the Gaussian variation sparks, selecting the optimal individual from the original firework population, the explosion sparks and the Gaussian variation sparks as a next-generation firework population, selecting the rest (Q-1) next-generation firework populations from the original firework population, the explosion sparks and the Gaussian variation sparks according to the roulette plate rule, and selecting each alternative firework according to the roulette plate rule according to the probability formula that the alternative firework is selected in the roulette plate rule:
wherein, FsumFor the total number of the original firework population, the explosion sparks and the Gaussian variation sparks in the iteration,as the distance between the individual in the candidate firework and the other candidate individuals,the distance sum of all the candidate firework individuals and other candidate individuals is obtained;
a second updating module for updating the position x of the current optimal fireworkbAnd corresponding fitnessbIf fitnessbAnd fitnessbestSame, then NQ=NQ+1, if fitnessbBetter than fitnessbestThen the global optimal firework position x is updatedbest=xbAnd updating the fitness value fitnessbest=fitnessb,NQ=0;
A third updating module for if NQ≤NQmaxThen the global optimal firework position x is updatedbestAnd an optimal fitness value fitnessbest
A first conversion module for converting Q fireworks xiConversion to Q quanta Qi
A fourth updating module for the Q quantity QiCarrying out one-time quantum revolving door updating;
a fifth updating module for updating the N rotated quantum individuals qiConverted into N firework units xi', if xi' than xiPreferably, the firework x is updatedi=xi', and update the global optimal firework position xbestAnd an optimal fitness value fitnessbest
An output module for outputting the optimal firework position xbestFitness value of fitbest
7. The logistics transportation scheduling device based on quantum firework algorithm as claimed in claim 6, wherein the updating of the number of explosion sparks S per fireworkiExplosion radius AiThe method specifically comprises the following steps:
determining the fitness corresponding to the ith firework as xi=(xi1,xi2,…,xin) The current optimal firework position is xb=(xb1,xb2,…,xbn) The corresponding fitness is fitnessbThe current worst firework position is xw=(xw1,xw2,…,xwn) The corresponding fitness is fitnesswUpdating the number S of the explosion sparks of each firework through a third preset formula and a fourth preset formulaiExplosion radius AiThe third preset formula specifically includes:
the fourth preset formula is specifically as follows:
8. the method according to claim 7The logistics transportation scheduling device of the quantum firework algorithm is characterized in that Q fireworks x are usediConversion to Q quanta QiThe method specifically comprises the following steps:
to fireworks xi=(xi1,xi2,…,xij,…,xin) Is converted into quantum q by an eighth preset formulaiThe eighth preset formula specifically is:
if | cos θij|≥|sinθijI, then sin θijTaking a positive number, otherwise sin θijTaking a negative number.
9. The logistics transportation scheduling device based on quantum firework algorithm as claimed in claim 8, wherein the pair of Q quanta Q is providediThe updating of the quantum revolving gate for one time specifically comprises the following steps:
for Q quantum Q by a ninth preset formulaiAnd updating the quantum revolving door once, wherein the ninth preset formula specifically comprises:
wherein,is quantum qiThe current quantum state of the j-th dimension location,is quantum qiQuantum state of j-th dimension position passing through quantum rotation gate, wherein rotation angle delta thetaijThe method can be determined by a tenth preset formula, and the tenth preset formula specifically is as follows:
Δθij=s(αijij)·|Δθij|;
wherein the rotation angle is of magnitude | Δ θijL may be determined by an eleventh preset formula, which is specifically:
wherein the angular direction s (α) is rotatedijij) The method can be determined by an eleventh preset formula, and the eleventh preset formula specifically is as follows:
wherein,andand (4) determining the j-th dimension probability amplitude of the current optimal quantum of the algorithm.
10. The logistics transportation scheduling device based on quantum firework algorithm as claimed in claim 9, wherein the N number of rotated quantum individuals q are selectediConverted into N firework units xi' specifically, the method comprises the following steps:
subjecting the quantum to individual treatmentConverted into firework individual x through a twelfth preset formulai', the twelfth preset formula specifically is:
CN201810542936.5A 2018-05-30 2018-05-30 Logistics transportation scheduling method and device based on quantum firework algorithm Active CN108846602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810542936.5A CN108846602B (en) 2018-05-30 2018-05-30 Logistics transportation scheduling method and device based on quantum firework algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810542936.5A CN108846602B (en) 2018-05-30 2018-05-30 Logistics transportation scheduling method and device based on quantum firework algorithm

Publications (2)

Publication Number Publication Date
CN108846602A true CN108846602A (en) 2018-11-20
CN108846602B CN108846602B (en) 2021-07-09

Family

ID=64209945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810542936.5A Active CN108846602B (en) 2018-05-30 2018-05-30 Logistics transportation scheduling method and device based on quantum firework algorithm

Country Status (1)

Country Link
CN (1) CN108846602B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615141A (en) * 2018-12-14 2019-04-12 广东电网有限责任公司 A kind of grid-connected Optimization Scheduling of multi-energy system and device
CN110264140A (en) * 2019-06-27 2019-09-20 广东工业大学 A kind of logistics transportation dispatching method, device and equipment with time window
CN110298517A (en) * 2019-07-04 2019-10-01 广东工业大学 A kind of logistics transportation dispatching method, device and equipment based on parallel computation
CN110471419A (en) * 2019-08-23 2019-11-19 北京工业大学 A kind of multirobot collaboration paths planning method based on differential evolution fireworks algorithm
CN110503234A (en) * 2019-07-03 2019-11-26 广东工业大学 A kind of method, system and the equipment of logistics transportation scheduling
CN110657816A (en) * 2019-09-20 2020-01-07 上海海事大学 Vehicle path problem planning method with hard time window based on firework algorithm
CN112446548A (en) * 2020-12-04 2021-03-05 电子科技大学中山学院 Cable distribution path planning method and device based on rapid discrete firework algorithm and computing equipment
CN113780961A (en) * 2021-10-13 2021-12-10 南京信息工程大学 Low-carbon vaccine cold-chain optimized distribution method of multi-target firework algorithm
CN113870235A (en) * 2021-10-08 2021-12-31 福州大学 Method for detecting defects of circular stamping part based on quantum firework arc edge extraction

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776469A (en) * 2017-03-17 2017-05-31 沈阳航空航天大学 A kind of fireworks algorithm based on simulated annealing Yu Gauss disturbance

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106776469A (en) * 2017-03-17 2017-05-31 沈阳航空航天大学 A kind of fireworks algorithm based on simulated annealing Yu Gauss disturbance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
GAO HONGYUAN 等: "Quantum fireworks algorithm for optimal cooperation mechanism of energy harvesting cognitive radio", 《JOURNAL OF SYSTEMS ENGINEERING AND ELECTRONICS》 *
YANGUANG CAI 等: "Quantum Fireworks Evolutionary Algorithm for Vehicle Routing Problem in Supply Chain with Multiple Time Windows", 《2018 2ND IEEE ADVANCED INFORMATION MANAGEMENT,COMMUNICATES,ELECTRONIC AND AUTOMATION CONTROL CONFERENCE(IMCEC 2018)》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109615141B (en) * 2018-12-14 2020-06-02 广东电网有限责任公司 Grid-connected optimal scheduling method and device for multi-energy system
CN109615141A (en) * 2018-12-14 2019-04-12 广东电网有限责任公司 A kind of grid-connected Optimization Scheduling of multi-energy system and device
CN110264140A (en) * 2019-06-27 2019-09-20 广东工业大学 A kind of logistics transportation dispatching method, device and equipment with time window
CN110264140B (en) * 2019-06-27 2022-03-22 广东工业大学 Logistics transportation scheduling method, device and equipment with time window
CN110503234A (en) * 2019-07-03 2019-11-26 广东工业大学 A kind of method, system and the equipment of logistics transportation scheduling
CN110298517A (en) * 2019-07-04 2019-10-01 广东工业大学 A kind of logistics transportation dispatching method, device and equipment based on parallel computation
CN110471419A (en) * 2019-08-23 2019-11-19 北京工业大学 A kind of multirobot collaboration paths planning method based on differential evolution fireworks algorithm
CN110657816B (en) * 2019-09-20 2021-06-15 上海海事大学 Vehicle path problem planning method with hard time window based on firework algorithm
CN110657816A (en) * 2019-09-20 2020-01-07 上海海事大学 Vehicle path problem planning method with hard time window based on firework algorithm
CN112446548A (en) * 2020-12-04 2021-03-05 电子科技大学中山学院 Cable distribution path planning method and device based on rapid discrete firework algorithm and computing equipment
CN113870235A (en) * 2021-10-08 2021-12-31 福州大学 Method for detecting defects of circular stamping part based on quantum firework arc edge extraction
CN113870235B (en) * 2021-10-08 2024-07-19 福州大学 Circular stamping part defect detection method based on quantum firework arc edge extraction
CN113780961A (en) * 2021-10-13 2021-12-10 南京信息工程大学 Low-carbon vaccine cold-chain optimized distribution method of multi-target firework algorithm

Also Published As

Publication number Publication date
CN108846602B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN108846602B (en) Logistics transportation scheduling method and device based on quantum firework algorithm
Fan et al. Online deep ensemble learning for predicting citywide human mobility
US20140026107A1 (en) Method and system for optimal decomposition of single-qubit quantum circuits using standard quantum gates
CN111626477B (en) Multi-type joint transport path optimization method considering uncertain conditions
CN104008420A (en) Distributed outlier detection method and system based on automatic coding machine
CN114282678A (en) Method for training machine learning model and related equipment
Ma et al. A multiobjective route robust optimization model and algorithm for hazmat transportation
CN108229658A (en) The implementation method and device of object detector based on finite sample
Xie et al. Multistep prediction of bus arrival time with the recurrent neural network
CN103617203A (en) Protein-ligand binding site predicting method based on inquiry drive
CN117875523B (en) Bus stop optimizing method based on multi-source data
CN114169609A (en) Photovoltaic coupling-considered electric vehicle charging station planning method
CN114334028A (en) Method, system and storage medium for generating indefinite 3D structure based on graph neural network
CN114613124B (en) Traffic information processing method, device, terminal and computer readable storage medium
US20100268520A1 (en) Electronic System to Emulate the Chain of the &#34;DNA&#34; Structure of a Chromosome
Guo et al. Towards equitable assignment: Data-driven delivery zone partition at last-mile logistics
CN110503234B (en) Method, system and equipment for logistics transportation scheduling
CN116862743A (en) Passenger link transportation scheme prediction method, system, equipment and medium
Masia et al. The force matching approach to multiscale simulations: Merits, shortcomings, and future perspectives
MALAAININE et al. Conception of geocoding matching algorithm for Casablanca City-Morocco
Wen et al. Hierarchical Sarsa learning based route guidance algorithm
CN106203449A (en) The approximation space clustering system of mobile cloud environment
Jiang et al. Forecasting port container throughput with deep learning approach
Zhai et al. [Retracted] Three‐Dimensional Optimization Development and Regulation of Land Space Based on Spatial Equilibrium Model
Hu et al. A simplified deep residual network for citywide crowd flows prediction

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