CN113361753B - Method, system and medium for determining optimal path based on quantum genetic algorithm - Google Patents
Method, system and medium for determining optimal path based on quantum genetic algorithm Download PDFInfo
- Publication number
- CN113361753B CN113361753B CN202110574816.5A CN202110574816A CN113361753B CN 113361753 B CN113361753 B CN 113361753B CN 202110574816 A CN202110574816 A CN 202110574816A CN 113361753 B CN113361753 B CN 113361753B
- Authority
- CN
- China
- Prior art keywords
- quantum
- fitness
- optimization
- chromosome
- paths
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Biophysics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- Strategic Management (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Economics (AREA)
- Pure & Applied Mathematics (AREA)
- Physiology (AREA)
- Genetics & Genomics (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Development Economics (AREA)
- Condensed Matter Physics & Semiconductors (AREA)
- Game Theory and Decision Science (AREA)
- Computational Mathematics (AREA)
- Entrepreneurship & Innovation (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
Abstract
The present disclosure provides a method, system, and medium for determining an optimal path based on a quantum genetic algorithm. Carrying out quantum coding on all paths to generate a quantum population containing a plurality of chromosomes, and initializing all paths completing quantum coding so that genes on each chromosome in the quantum population have the same initial probability; calculating the fitness of each path in all paths according to the initial probability, and selecting a first fitness; based on the first fitness, performing first optimization on all paths completing quantum coding by utilizing the modified quantum rotating gate, wherein the first optimization comprises the step of evolving a quantum population to obtain a new generation quantum population; executing second optimization on all paths after the first optimization is completed, wherein the second optimization is chromosome crossing optimization, and selecting a new first fitness; and determining the new first fitness as the first fitness, and outputting a path corresponding to the new first fitness as an optimal path.
Description
Technical Field
The present disclosure relates to the field of quantum computing, and in particular, to a method, system, and medium for determining an optimal path based on a quantum genetic algorithm.
Background
The combination of quantum mechanics and modern information computing has two important branches, one is the physical implementation of a quantum computing platform, and the other important direction is the exploration of quantum algorithms. Since 1994, a large number of factorization quantum algorithms have been proposed, and research on quantum algorithms has been widely applied to the fields of neural networks, intelligent control, complex optimization, and the like. Meanwhile, quantum algorithms have been developed into more and more classical algorithms such as genetic algorithms, particle swarm algorithms, and the like.
The quantum genetic algorithm is a probability optimized search algorithm for updating chromosomes by utilizing quantum bits to encode the chromosomes and using quantum logic gates. Qubit encoding enables one chromosome to characterize multiple states simultaneously; the use of quantum logic gates enables the current optimal chromosome to evolve in a better direction. Therefore, the quantum genetic algorithm has great advantages in terms of convergence and convergence speed in terms of optimization and solving of clustering problems.
Consider a classical TSP planning problem (i.e., a trip planning problem, which is described as the distance between a given N number of cities and each pair of cities, solving the shortest path through each city and going back to the starting city once), which is characterized in terms of path planning by the shortest path from the current computing node back to the current computing node via a number of particular computing nodes. In practical applications, for example, takers, start in the morning each day from a starting location (home/company) with a destination of a plurality of cells and restaurants, and return to the starting location after finishing a day of work; and starting from the express station, for example, the courier, wherein the destination is a plurality of delivery/pickup addresses, and finally returning to the express station.
For the above path planning problem, it is known from the enumeration method that all possible paths are commonA strip. The constraint of this problem is only one, i.e. search a set v= { V 1 ,V 2 ,V 3 ,...,V N One of the elements in V represents the number of n cities, arranged X such that:
the minimum value is obtained, and the corresponding path is the optimal path. Wherein d (v) i ,v i+1 ) Representing city v i To v i+1 Is a distance of (3).
For the above problems, it is easy to state but difficult to solve. Current solutions include dynamic programming, list searching, genetic algorithms, and the like. The problem can be applied to the fields of logistics and chip manufacturing.
Under the framework of current quantum genetic algorithms, each possible path in the TSP problem is abstracted to a chromosome, and each city is abstracted to a gene on the chromosome, namely a qubit.
One qubit (gene locus) on a chromosome can be expressed as: Φ1> =α|0> +β|1>, where α, β represent the probability magnitude, which is complex, and there are: the probability amplitude of M qubits in the jth chromosome in the t-th generation can be defined as follows:
where j=1, 2,3 … N, then quantum rotation gate evolution is performed on the chromosome, which is the key to implementing quantum genetic algorithms. The operation of the rotation gate mainly causes the probability amplitude of each gene on the chromosome to converge to 0 or 1, thereby finding the optimal solution. The most common quantum turnstile operation is:
where θ is a rotation angle, and is usually a fixed value. The ith gene of a chromosome can be expressed as:the genes after evolution by using the quantum revolving gate are: />The evolution process is as follows: />Wherein R (θ) i ) A quantum turnstile for manipulating the gene at position i is shown.
However, in the above method, the rotation angle (the size and direction) is designed manually in advance, and can be obtained by looking up a table, and the magnitude of the rotation angle directly affects the convergence speed of the quantum algorithm. The value of the quantum rotation gate is too large, the convergence speed can be slowed down, and the value of the quantum rotation gate is too small, so that the evolution of the chromosome is finished when the optimal solution is not found, and the actual optimization process cannot be met by the evolution mode of the quantum rotation gate with fixed angle. When determining the optimal path, the accuracy and planning duration of the optimal path are seriously affected.
Disclosure of Invention
The disclosure provides a TSP problem planning system scheme based on a quantum genetic algorithm to solve the technical problems.
A first aspect of the present disclosure provides a method of determining an optimal path based on a quantum genetic algorithm, the optimal path being a shortest path from a current computing node back to the current computing node via a plurality of specific computing nodes, the method comprising: s1, carrying out quantum coding on all paths to generate a quantum population containing a plurality of chromosomes, and initializing all paths completing the quantum coding so that genes on each chromosome in the quantum population have the same initial probability; wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes; s2, calculating the fitness of each path in all paths according to the initial probability, and selecting the maximum value of the fitness as a first fitness, wherein the fitness characterizes the survival of the chromosome and the capability of evolving genes on the chromosome to the next generation; step S3, based on the first fitness, performing first optimization on all paths completing the quantum encoding by using a modified quantum rotation gate, wherein the first optimization comprises the evolution of the quantum population to obtain a new generation quantum population; step S4, performing second optimization on all paths after the first optimization is completed, wherein the second optimization is chromosome intersection optimization, calculating fitness of each path after the chromosome intersection optimization, selecting the maximum value of the fitness of each path after the chromosome intersection optimization as a second fitness, and taking the larger value of the first fitness and the second fitness as a new first fitness; and step S5, determining whether the new first fitness is the first fitness, if so, entering a convergence state by the quantum population, and outputting a path corresponding to the new first fitness as the optimal path.
Specifically, in the step S1, the initializing all paths for completing the quantum encoding includes setting an initial evolution algebra of the quantum population to 0, and setting initial probabilities of the genes to be all
Specifically, in the step S3, the modified quantum rotation gate is expressed as:
wherein the rotation angle of the quantum rotating gate is correctedf max For the first fitness, f x For fitness of the respective chromosomes, θ i For the initial rotation angle of the modified quantum rotation gate, the value range is [0.001 pi, 0.05 pi ]],S=|(f max -f x )|·α i β i ,α i And beta i The probability of the ith gene is represented.
Specifically, in the step S4, the chromosome cross optimization includes a first cross optimization and a second cross optimization, wherein: the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence; the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
A second aspect of the present disclosure provides a system for determining an optimal path based on a quantum genetic algorithm, the optimal path being a shortest path from a current computing node back to the current computing node via a plurality of specific computing nodes, the system comprising: a first module configured to quantum encode all paths to generate a quantum population comprising a plurality of chromosomes, and initialize all paths for which the quantum encoding is completed such that genes on each chromosome in the quantum population have the same initial probability; wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes; a second module configured to calculate fitness of each of the all paths according to the initial probability, selecting a maximum of the fitness as a first fitness, the fitness characterizing the chromosome's ability to survive and evolve genes on the chromosome to the next generation; a third module configured to perform a first optimization of all paths completing the quantum encoding with a modified quantum rotation gate based on the first fitness, the first optimization comprising evolving the quantum population to obtain a new generation quantum population; a fourth module configured to perform a second optimization on all paths after the first optimization is completed, the second optimization being a chromosome crossover optimization, and calculate fitness of each path after the chromosome crossover optimization, select a maximum value of fitness of each path after the chromosome crossover optimization as a second fitness, and use a larger value of the first fitness and the second fitness as a new first fitness; and a fifth module configured to determine whether the new first fitness is the first fitness, if so, enter a convergence state by the quantum population, and output a path corresponding to the new first fitness as the optimal path.
Specifically, the first module is specifically configured such that initializing all paths that complete the quantum encoding includes setting an initial evolution algebra of the quantum population to 0, and setting initial probabilities of the genes to all
In particular, the third module is specifically configured to the modified quantum rotation gate to be represented as:
wherein the rotation angle of the quantum rotating gate is correctedf max For the first fitness, f x For fitness of the respective chromosomes, θ i For the initial rotation angle of the modified quantum rotation gate, the value range is [0.001 pi, 0.05 pi ]],S=|(f max -f x )|·α i β i ,α i And beta i The probability of the ith gene is represented.
In particular, the fourth module is specifically configured such that the chromosomal cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein: the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence; the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
A third aspect of the present disclosure provides a non-transitory computer readable medium storing instructions which, when executed by a processor, perform steps in a method of determining an optimal path based on a quantum genetic algorithm according to the first aspect of the present disclosure.
In conclusion, the improved quantum revolving door is utilized to realize evolution operation on genes on chromosomes, so that the effectiveness and practicability of the algorithm are greatly improved. Meanwhile, the chromosome in the later evolution stage is subjected to perturbation, namely, corresponding gene positions are adjusted, so that the population is further activated, excellent information is reserved, and the problem that the system falls into a local extremum is avoided. Thereby improving the accuracy and the high efficiency of path planning.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following description will briefly describe the drawings that are required to be used in the embodiments or the description in the prior art, and it is apparent that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to these drawings without inventive effort to those skilled in the art.
FIG. 1 is a flow chart of a method of determining an optimal path based on a quantum genetic algorithm according to an embodiment of the present disclosure; and
fig. 2 is a block diagram of a system for determining an optimal path based on a quantum genetic algorithm according to an embodiment of the present disclosure.
Detailed Description
The following description of the embodiments of the present disclosure will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all, of the embodiments of the present disclosure. Based on the embodiments in this disclosure, all other embodiments that a person of ordinary skill in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
A first aspect of the present disclosure provides a method of determining an optimal path based on a quantum genetic algorithm, the optimal path being a shortest path from a current computing node back to the current computing node via a plurality of particular computing nodes. FIG. 1 is a flow chart of a method of determining an optimal path based on a quantum genetic algorithm according to an embodiment of the present disclosure; as shown in fig. 1, the method includes: s1, carrying out quantum coding on all paths to generate a quantum population containing a plurality of chromosomes, and initializing all paths completing the quantum coding so that genes on each chromosome in the quantum population have the same initial probability; wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes; s2, calculating the fitness of each path in all paths according to the initial probability, and selecting the maximum value of the fitness as a first fitness, wherein the fitness characterizes the survival of the chromosome and the capability of evolving genes on the chromosome to the next generation; step S3, based on the first fitness, performing first optimization on all paths completing the quantum encoding by using a modified quantum rotation gate, wherein the first optimization comprises the evolution of the quantum population to obtain a new generation quantum population; step S4, performing second optimization on all paths after the first optimization is completed, wherein the second optimization is chromosome intersection optimization, calculating fitness of each path after the chromosome intersection optimization, selecting the maximum value of the fitness of each path after the chromosome intersection optimization as a second fitness, and taking the larger value of the first fitness and the second fitness as a new first fitness; and step S5, determining whether the new first fitness is the first fitness, if so, entering a convergence state by the quantum population, and outputting a path corresponding to the new first fitness as the optimal path.
In step S1, all paths are quantum encoded to generate a quantum population comprising a plurality of chromosomes, and all paths completing the quantum encoding are initialized such that genes on each chromosome in the quantum population have the same initial probability. Wherein each chromosome characterizes one path and the quantum population characterizes all paths, the all paths being all paths from the current computing node back to the current computing node via a plurality of the specific computing nodes. Specifically, the initial evolution algebra of the quantum population is set to 0, and the initial probabilities of the genes are set to be respectivelyTo complete the initialization.
In some embodiments, the quantum population is initialized,
in order to balance the overlong encoding time caused by oversized population size, M chromosomes are randomly generated as initial quantum populations, m=n, and let t=0 (evolution time, or evolution algebra), and initialized as:q (t) is a quantum population, and in order to ensure that genes in all populations appear with the same probability, all probability amplitudes appearing in the quantum population, alpha and beta are initialized to be +.>
In step S2, the fitness of each of the all paths is calculated according to the initial probability, and the maximum value of the fitness is selected as a first fitness, wherein the fitness characterizes the chromosome survival and the ability of the genes on the chromosome to evolve to the next generation. The greater the fitness, the greater the chance of survival and reproduction.
In some embodiments, the general population P (t) is generated after the quantum population Q (t) is measured. The measurement is carried out by adopting a random number method, namely, for each quantum bit in each chromosome, a number x is randomly generated, and x is E [0,1 ]]If x is not less than |alpha 2 1 is taken as the quantum bit measurement result, which indicates that the node can be connected; otherwise, take 0, indicating that the node cannot be connected. Meanwhile, invalid paths are deleted in the measuring process, and only the swordsman paths are kept. The construction of the fitness function may employ any method known in the art for calculating fitness to calculate fitness in step S2. For example, in the TSP problem, the inverse of the total path length is taken as the fitness:d (x) represents the length of the total path.
In step S3, based on the first fitness, a first optimization is performed on all paths completing the quantum encoding with a modified quantum rotation gate, the first optimization comprising evolving the quantum population to obtain a new generation of quantum population P (t+1). Wherein the modified quantum rotation gate is expressed as:
wherein the rotation angle of the quantum rotating gate is correctedf max For the first fitness, f x For fitness of the respective chromosomes, θ i For the initial rotation angle of the modified quantum rotation gate, the value range is [0.001 pi, 0.05 pi ]],S=|(f max -f x )|·α i β i ,α i And beta i The probability of the ith gene is represented.
In step S4, a second optimization is performed on all paths after the first optimization is completed, the second optimization is chromosome crossover optimization, fitness of each path after the chromosome crossover optimization is calculated, the maximum value of the fitness of each path after the chromosome crossover optimization is selected as a second fitness, and the larger value of the first fitness and the second fitness is used as a new first fitness.
In some embodiments, the chromosomal cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein: the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence; the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
In some embodiments, the evolving quantum population P (t)' is subjected to chromosome cross optimization, i.e., post perturbation: all chromosomes in the population are randomly transposed and the order of all chromosomes is randomly determined. And shifting the kth qubit of each chromosome in the population for k times to obtain new population chromosomes and gene bit sequencing.
In step S5, it is determined whether the new first fitness is the first fitness, if so, the quantum population enters a convergence state, and a path corresponding to the new first fitness is output as the optimal path.
A second aspect of the present disclosure provides a system for determining an optimal path based on a quantum genetic algorithm, the optimal path being a shortest path from a current computing node back to the current computing node via a plurality of particular computing nodes. Fig. 2 is a block diagram of a system for determining an optimal path based on a quantum genetic algorithm according to an embodiment of the present disclosure, and as shown in fig. 2, the system 200 includes: a first module 201 configured to quantum encode all paths to generate a quantum population comprising a plurality of chromosomes, and initialize all paths for which the quantum encoding is completed such that genes on each chromosome in the quantum population have the same initial probability; wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes; a second module 202 configured to calculate fitness of each of the all paths according to the initial probability, selecting a maximum of the fitness as a first fitness, the fitness characterizing the chromosome's ability to survive and evolve genes on the chromosome to the next generation; a third module 203 configured to perform a first optimization of all paths completing the quantum encoding with a modified quantum rotation gate based on the first fitness, the first optimization comprising evolving the quantum population to obtain a new generation quantum population; a fourth module 204 configured to perform a second optimization on the all paths after the first optimization is completed, the second optimization being a chromosome crossover optimization, and calculate fitness of the respective paths after the chromosome crossover optimization, select a maximum value of the fitness of the respective paths after the chromosome crossover optimization as a second fitness, and use a larger value of the first fitness and the second fitness as a new first fitness; and a fifth module 205 configured to determine whether the new first fitness is the first fitness, if so, the quantum population enters a convergence state, and output a path corresponding to the new first fitness as the optimal path.
Specifically, the first module 201 is specifically configured to initialize all paths that complete the quantum encoding, including setting an initial evolution algebra of the quantum population to 0, and setting initial probabilities of the genes to allTo complete the initialization.
In particular, the third module 203 is specifically configured such that the modified quantum rotation gate is represented as:
wherein the rotation angle of the quantum rotating gate is correctedf max For the first fitness, f x For fitness of the respective chromosomes, θ i For the initial rotation angle of the modified quantum rotation gate, the value range is +.>S=|(f max -f x )|·α i β i ,α i And beta i The probability of the ith gene is represented.
In particular, the fourth module 204 is specifically configured such that the chromosomal cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein: the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence; the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
A third aspect of the present disclosure provides a non-transitory computer readable medium storing instructions which, when executed by a processor, perform steps in a method of determining an optimal path based on a quantum genetic algorithm according to the first aspect of the present disclosure.
In conclusion, the improved quantum revolving door is utilized to realize evolution operation on genes on chromosomes, so that the effectiveness and practicability of the algorithm are greatly improved. Meanwhile, the chromosome in the later evolution stage is subjected to perturbation, namely, corresponding gene positions are adjusted, so that the population is further activated, excellent information is reserved, and the problem that the system falls into a local extremum is avoided. Thereby improving the accuracy and the high efficiency of path planning.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present disclosure, and not for limiting the same; although the present disclosure has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present disclosure.
Claims (5)
1. A method of determining an optimal path based on a quantum genetic algorithm, wherein the optimal path is a shortest path from a current computing node back to the current computing node via a plurality of particular computing nodes, the method comprising:
s1, carrying out quantum coding on all paths to generate a quantum population containing a plurality of chromosomes, and initializing all paths completing the quantum coding so that genes on each chromosome in the quantum population have the same initial probability;
wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes;
s2, calculating the fitness of each path in all paths according to the initial probability, and selecting the maximum value of the fitness as a first fitness, wherein the fitness characterizes the survival of the chromosome and the capability of evolving genes on the chromosome to the next generation;
step S3, based on the first fitness, performing first optimization on all paths completing the quantum encoding by using a modified quantum rotation gate, wherein the first optimization comprises the evolution of the quantum population to obtain a new generation quantum population;
step S4, performing second optimization on all paths after the first optimization is completed, wherein the second optimization is chromosome intersection optimization, calculating fitness of each path after the chromosome intersection optimization, selecting the maximum value of the fitness of each path after the chromosome intersection optimization as a second fitness, and taking the larger value of the first fitness and the second fitness as a new first fitness; and
step S5, determining whether the new first fitness is the first fitness, if so, entering a convergence state by the quantum population, and outputting a path corresponding to the new first fitness as the optimal path;
in the step S3, the modified quantum rotation gate is expressed as:
wherein the rotation angle of the quantum rotating gate is corrected,f max For the first degree of adaptation to be described,f x for the fitness of the respective chromosome, < ->For the initial rotation angle of the modified quantum rotation gate, the value range is [0.001 pi, 0.05 pi ]],/>,α i Andβ i represent the firstiProbability of individual genes;
in the step S4, the chromosome cross optimization includes a first cross optimization and a second cross optimization, wherein:
the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence;
the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
3. A system for determining an optimal path based on a quantum genetic algorithm, wherein the optimal path is a shortest path from a current computing node back to the current computing node via a plurality of particular computing nodes, the system comprising:
a first module configured to quantum encode all paths to generate a quantum population comprising a plurality of chromosomes, and initialize all paths for which the quantum encoding is completed such that genes on each chromosome in the quantum population have the same initial probability;
wherein each chromosome characterizes one path, the quantum population characterizes all paths, the all paths are all paths starting from the current computing node and returning to the current computing node through a plurality of the specific computing nodes;
a second module configured to calculate fitness of each of the all paths according to the initial probability, selecting a maximum of the fitness as a first fitness, the fitness characterizing the chromosome's ability to survive and evolve genes on the chromosome to the next generation;
a third module configured to perform a first optimization of all paths completing the quantum encoding with a modified quantum rotation gate based on the first fitness, the first optimization comprising evolving the quantum population to obtain a new generation quantum population;
a fourth module configured to perform a second optimization on all paths after the first optimization is completed, the second optimization being a chromosome crossover optimization, and calculate fitness of each path after the chromosome crossover optimization, select a maximum value of fitness of each path after the chromosome crossover optimization as a second fitness, and use a larger value of the first fitness and the second fitness as a new first fitness; and
a fifth module configured to determine whether the new first fitness is the first fitness, if so, enter a convergence state by the quantum population, and output a path corresponding to the new first fitness as the optimal path;
the third module is specifically configured to the modified quantum rotator gate to:
wherein the rotation angle of the quantum rotating gate is corrected,f max For the first degree of adaptation to be described,f x for the fitness of the respective chromosome, < ->For the initial rotation angle of the modified quantum rotation gate, the value range is [0.001 pi, 0.05 pi ]],/>,α i Andβ i represent the firstiProbability of individual genes;
the fourth module is specifically configured such that the chromosomal cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein:
the first cross optimization is specifically to acquire the current position sequence of each chromosome in the new generation quantum population after evolution as a first position sequence, and randomly adjust the first position sequence into a second position sequence different from the first position sequence;
the second cross optimization is specifically that a chromosome is randomly selected from the second position sequence to serve as a target chromosome, a gene is randomly selected from the target chromosome to serve as a target gene, a gene quantum ranking sequence number k of the target gene on the target chromosome is obtained, and the target gene is shifted by k positions on the gene quantum ranking.
4. A system for determining optimal paths based on a quantum genetic algorithm according to claim 3, wherein the first module is specifically configured such that initializing all paths for which the quantum encoding is completed comprises setting an initial evolution algebra of the quantum population to 0, setting initial probabilities of the genes to all。
5. A non-transitory computer readable medium storing instructions which, when executed by a processor, perform the steps in a method of determining an optimal path based on a quantum genetic algorithm according to any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110574816.5A CN113361753B (en) | 2021-05-26 | 2021-05-26 | Method, system and medium for determining optimal path based on quantum genetic algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110574816.5A CN113361753B (en) | 2021-05-26 | 2021-05-26 | Method, system and medium for determining optimal path based on quantum genetic algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113361753A CN113361753A (en) | 2021-09-07 |
CN113361753B true CN113361753B (en) | 2023-07-04 |
Family
ID=77527713
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110574816.5A Active CN113361753B (en) | 2021-05-26 | 2021-05-26 | Method, system and medium for determining optimal path based on quantum genetic algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113361753B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115292652B (en) * | 2022-10-08 | 2023-02-03 | 北京航天驭星科技有限公司 | Method and device for determining initial orbit of space debris by improving quantum genetic algorithm |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11118501A (en) * | 1997-10-17 | 1999-04-30 | Yoshinori Haseyama | Optimum route searching method |
CN104406593A (en) * | 2014-12-03 | 2015-03-11 | 广西民族大学 | Method for determining optimal route of airway of unmanned aerial vehicle |
CN104700160A (en) * | 2015-02-16 | 2015-06-10 | 南京邮电大学 | Vehicle route optimization method |
CN105787600A (en) * | 2016-03-03 | 2016-07-20 | 国家电网公司 | Electric taxi charging station planning method based on adaptive quantum genetic algorithm |
CN106658639A (en) * | 2016-12-21 | 2017-05-10 | 天津理工大学 | QG-OLSR routing method based on quantum genetic strategy |
CN106940742A (en) * | 2017-03-07 | 2017-07-11 | 西安石油大学 | Bad hole track optimizing method based on quick self-adapted quantum genetic algorithm |
CN107330808A (en) * | 2017-07-21 | 2017-11-07 | 山东万腾电子科技有限公司 | Complex scene scheduling method and system based on quantum evolutionary algorithm |
CN110647994A (en) * | 2019-08-09 | 2020-01-03 | 广东科学技术职业学院 | TSP (Total suspended particulate) optimization method based on improved mutation operator genetic algorithm |
CN111178582A (en) * | 2019-11-29 | 2020-05-19 | 浙江工业大学 | Logistics distribution optimization method based on improved genetic algorithm |
CN111242382A (en) * | 2020-01-18 | 2020-06-05 | 国网山东省电力公司菏泽供电公司 | Microphone array arrangement optimization method based on quantum genetic algorithm |
CN111273686A (en) * | 2020-02-15 | 2020-06-12 | 北京理工大学 | Path planning method for multiple unmanned aerial vehicles to simultaneously reach designated place in three-dimensional environment |
WO2021022637A1 (en) * | 2019-08-06 | 2021-02-11 | 南京赛沃夫海洋科技有限公司 | Unmanned surface vehicle path planning method and system based on improved genetic algorithm |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904421B2 (en) * | 2001-04-26 | 2005-06-07 | Honeywell International Inc. | Methods for solving the traveling salesman problem |
-
2021
- 2021-05-26 CN CN202110574816.5A patent/CN113361753B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11118501A (en) * | 1997-10-17 | 1999-04-30 | Yoshinori Haseyama | Optimum route searching method |
CN104406593A (en) * | 2014-12-03 | 2015-03-11 | 广西民族大学 | Method for determining optimal route of airway of unmanned aerial vehicle |
CN104700160A (en) * | 2015-02-16 | 2015-06-10 | 南京邮电大学 | Vehicle route optimization method |
CN105787600A (en) * | 2016-03-03 | 2016-07-20 | 国家电网公司 | Electric taxi charging station planning method based on adaptive quantum genetic algorithm |
CN106658639A (en) * | 2016-12-21 | 2017-05-10 | 天津理工大学 | QG-OLSR routing method based on quantum genetic strategy |
CN106940742A (en) * | 2017-03-07 | 2017-07-11 | 西安石油大学 | Bad hole track optimizing method based on quick self-adapted quantum genetic algorithm |
CN107330808A (en) * | 2017-07-21 | 2017-11-07 | 山东万腾电子科技有限公司 | Complex scene scheduling method and system based on quantum evolutionary algorithm |
WO2021022637A1 (en) * | 2019-08-06 | 2021-02-11 | 南京赛沃夫海洋科技有限公司 | Unmanned surface vehicle path planning method and system based on improved genetic algorithm |
CN110647994A (en) * | 2019-08-09 | 2020-01-03 | 广东科学技术职业学院 | TSP (Total suspended particulate) optimization method based on improved mutation operator genetic algorithm |
CN111178582A (en) * | 2019-11-29 | 2020-05-19 | 浙江工业大学 | Logistics distribution optimization method based on improved genetic algorithm |
CN111242382A (en) * | 2020-01-18 | 2020-06-05 | 国网山东省电力公司菏泽供电公司 | Microphone array arrangement optimization method based on quantum genetic algorithm |
CN111273686A (en) * | 2020-02-15 | 2020-06-12 | 北京理工大学 | Path planning method for multiple unmanned aerial vehicles to simultaneously reach designated place in three-dimensional environment |
Non-Patent Citations (8)
Title |
---|
A New Quantum Rotation Angle of Quantum-Inspired Evolutionary Algorithm for TSP;Li Jialin 等;2017 IEEE International Conference on Computational Science and Engineering (CSE) and IEEE International Conference on Embedded and Ubiquitous Computing (EUC);369-374 * |
A novel quantum genetic algorithm and its application;Zhang Sheng 等;2012 8th International Conference on Natural Computation (ICNC 2012);613-617 * |
Novel Quantum Genetic Algorithm and Its Applications;Zhang Gexiang 等;Frontiers of Electrical and Electronic Engineering in China;第1卷;31-36 * |
一种改进的量子遗传算法及在TSP求解中的应用;李晓波;2010 3rd International Conference on Computational Intelligence and Industrial Application (PACIIA);96-100 * |
一种新的求解TSP的混合量子进化算法;武妍;包建军;;计算机应用(10);2433-2436 * |
改进的量子进化算法及其在优化问题中的应用;王丹琴;中国优秀硕士学位论文全文数据库 信息科技辑(第8期);I140-79 * |
求解CVRP的改进量子遗传算法研究;曹云;向凤红;毛剑琳;郭宁;;软件导刊;16(12);60-63 * |
量子遗传算法在TSP中的应用;潘子宇;耿鹏;;网络安全技术与应用(08);54-56 * |
Also Published As
Publication number | Publication date |
---|---|
CN113361753A (en) | 2021-09-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Xiang et al. | A clustering-based surrogate-assisted multiobjective evolutionary algorithm for shelter location problem under uncertainty of road networks | |
Maity et al. | A modified genetic algorithm for solving uncertain constrained solid travelling salesman problems | |
CN111861013B (en) | Power load prediction method and device | |
CN109215740A (en) | Full-length genome RNA secondary structure prediction method based on Xgboost | |
WO2023116111A1 (en) | Disk fault prediction method and apparatus | |
CN109299776A (en) | One seed nucleus incremental transfinites learning machine, difference grey wolf method for mixing and optimizing on multiple populations | |
CN111832725A (en) | Multi-robot multi-task allocation method and device based on improved genetic algorithm | |
CN113361753B (en) | Method, system and medium for determining optimal path based on quantum genetic algorithm | |
CN106599610A (en) | Method and system for predicting association between long non-coding RNA and protein | |
Raj et al. | Applications of Genetic Algorithm with Integrated Machine Learning | |
CN114420197A (en) | Connector design method of protein degradation targeting chimera based on self-encoder | |
Cristóbal et al. | An overview of nonparametric contributions to the problem of functional estimation from biased data | |
Trawiński et al. | Evaluation of fuzzy system ensemble approach to predict from a data stream | |
CN117291323A (en) | Vehicle path optimization method, device, equipment and medium based on quantum algorithm | |
Xu et al. | Ant Colony Optimization for Multiple Travelling Salesmen Problem with Pivot Cities | |
Telec et al. | Evaluation of neural network ensemble approach to predict from a data stream | |
Garro et al. | Path planning optimization using bio-inspirited algorithms | |
CN110852505B (en) | Smart city traffic flow prediction method based on quantum genetic optimization LVQ neural network | |
Guo et al. | An improved quantum genetic algorithm | |
Hao et al. | An enhanced two phase estimation of distribution algorithm for solving scheduling problem | |
CN115526434B (en) | Object information prediction method, device, computer equipment and storage medium | |
Cahyani et al. | Traveling Salesman Problem Multi-destination Route Recommendation System Using Genetic Algorithm and Google Maps API | |
Ray et al. | Modeling and forecasting of hybrid rice yield using a grey model improved by the genetic algorithm. | |
CN116341670B (en) | Method and device for processing graph network data through quantum node embedding algorithm | |
Singh et al. | A review on genetic algorithm operations and application in telecommunication routing |
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 |