CN113361753A - 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
- CN113361753A CN113361753A CN202110574816.5A CN202110574816A CN113361753A CN 113361753 A CN113361753 A CN 113361753A CN 202110574816 A CN202110574816 A CN 202110574816A CN 113361753 A CN113361753 A CN 113361753A
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- 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
Abstract
The present disclosure provides a method, system, and medium for determining an optimal path based on a quantum genetic algorithm. Performing 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 all chromosomes 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 using the modified quantum revolving gate, wherein the first optimization comprises the step of carrying out evolution on a quantum population to obtain a new generation of quantum population; executing second optimization on all paths after the first optimization is completed, wherein the second optimization is chromosome cross optimization, and selecting 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 computation has two important branches, one is the physical realization of a quantum computing platform, and the other important direction is the exploration of a quantum algorithm. Since 1994, a large number of mass factorization quantum algorithms were proposed, 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 using quantum bits to encode the chromosomes and using quantum logic gates. Qubit encoding enables one chromosome to simultaneously characterize multiple states; the use of quantum logic gates enables the current optimal chromosomes to evolve in a better direction. Therefore, the quantum genetic algorithm has great advantages in the aspects of convergence and convergence speed in the aspects of optimization and solution of the clustering problem.
Consider a classical TSP planning problem (i.e., a traveler planning problem that describes solving the shortest path through and only once each city and back to the starting city given the distance between N cities and each pair of cities) characterized in terms of path planning as the shortest path from the current computing node back to the current computing node via a number of particular computing nodes. In practical applications, such as take-out, each morning from a starting location (home/business), destined for a number of cells and restaurants, and returning to the starting location after the end of a day's work; for example, the express delivery person starts from the express delivery station, and the destination of the express delivery person is a plurality of delivery/pickup addresses, and finally returns to the express delivery station.
For the above path planning problem, all possible paths are common as known from enumerationAnd (3) strips. The constraint of the problem is only one, i.e. one set V ═ V is searched1,V2,V3,...,VNOne of (elements in V represent numbers for n cities) arranges X such that:
and taking the minimum value, the corresponding path is the optimal path. Wherein d (v)i,vi+1) Representing a city viTo vi+1The distance of (c).
For the above problem, it is easy to state but difficult to solve. Current solutions include dynamic programming, list search, 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 into a chromosome, and each city is abstracted into a gene on the chromosome, i.e., a qubit.
A qubit (gene bit) on a chromosome can be represented as: i Φ 1> + α |0> + β |1>, where α, β denote the probability amplitude, which is a complex number, and there is: i α |2+ | β |2 ═ 1, the probability amplitude of M qubits in the jth chromosome in the tth generation can be defined as follows:
where j is 1,2,3 … N, and then performing quantum rotating gate evolution on the chromosome, which is the key to implementing quantum genetic algorithms. The operation of the revolving gate is mainly to make the probability amplitude of each gene on the chromosome converge to 0 or 1, and then find the optimal solution. The most common quantum rotary gate operates as:
where θ is a rotation angle, and is usually a fixed value. The ith gene of a chromosome can be expressed as:the genes evolved by using the quantum revolving gate are as follows:the evolution process is as follows:wherein R (theta)i) Represents a quantum spin gate operating on the gene at position i.
However, in the above method, the selection of the rotation angle (its size and direction) is artificially designed in advance, and can be obtained by looking up the table, and the amplitude directly influences the convergence rate of the quantum algorithm. If the value is too large, the convergence rate will be slowed down, and if the value is too small, the chromosome will end the evolution when the optimal solution is not found, so the evolution mode of the quantum revolving gate with a fixed angle cannot meet the actual optimization process. When the optimal path is determined, the accuracy and the planning duration of the optimal path are seriously influenced.
Disclosure of Invention
The present disclosure provides a quantum genetic algorithm-based TSP problem planning system scheme to solve the above technical problems.
A first aspect of the present disclosure provides a method for determining an optimal path based on a quantum genetic algorithm, where the optimal path is a shortest path from a current computing node to the current computing node via a plurality of specific computing nodes, and the method includes: step 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 all chromosomes in the quantum population have the same initial probability; wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes; step S2, calculating the fitness of each path in all the paths according to the initial probability, selecting the maximum value of the fitness as a first fitness, wherein the fitness represents the survival ability of the chromosome and the ability of evolving the genes on the chromosome to the next generation; step S3, based on the first fitness, performing first optimization on all paths completing the quantum coding by using a modified quantum revolving gate, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population; step S4, performing a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculating fitness of each path after the chromosome cross optimization, selecting a maximum value of the fitness of each path after the chromosome cross optimization as a second fitness, and taking a 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, the quantum population enters a convergence state, and outputting a path corresponding to the new first fitness as the optimal path.
Specifically, in the step S1, in the step S1, the initializing all paths for completing the quantum coding includes setting an initial evolution generation number of the quantum population to 0, and setting initial probabilities of the genes to be all 0
Specifically, in the step S3, the modified quantum revolving gate is represented as:
wherein the modified rotation angle of the quantum rotary gatefmaxIs the first fitness, fxAs fitness of said individual chromosomes, thetaiThe initial rotation angle of the quantum revolving door is the value range of [0.001 pi, 0.05 pi],S=|(fmax-fx)|·αiβi,αiAnd betaiThe probability of the ith gene is shown.
Specifically, in the step S4, the chromosome cross optimization includes a first cross optimization and a second cross optimization, wherein: the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence; the second cross optimization specifically includes 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 moved by k 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, where the optimal path is a shortest path from a current computing node to the current computing node via a plurality of specific computing nodes, and the system includes: a first module configured to perform quantum coding on all paths to generate a quantum population including a plurality of chromosomes, and initialize all paths on which the quantum coding is completed so that genes on the chromosomes in the quantum population have the same initial probability; wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes; a second module, configured to calculate fitness of each of the all paths according to the initial probability, and select a maximum value of the fitness as a first fitness, where the fitness represents the ability of the chromosome to survive and evolve a gene on the chromosome to a next generation; a third module configured to perform a first optimization on all paths completing the quantum coding by using the modified quantum revolving gate based on the first fitness, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population; a fourth module, configured to perform a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculate fitness of each path after the chromosome cross optimization, select a maximum value of the fitness of each path after the chromosome cross 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, 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 is specifically configured to initialize all paths completing the quantum coding, including setting an initial evolution algebra of the quantum population to 0, and setting initial probabilities of the genes to be all 0
In particular, the third module is specifically configured such that the modified quantum rotation gate is represented as:
wherein the modified rotation angle of the quantum rotary gatefmaxIs the first fitness, fxAs fitness of said individual chromosomes, thetaiThe initial rotation angle of the quantum revolving door is the value range of [0.001 pi, 0.05 pi],S=|(fmax-fx)|·αiβi,αiAnd betaiThe probability of the ith gene is shown.
In particular, the fourth module is specifically configured such that the chromosome cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein: the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence; the second cross optimization specifically includes 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 moved by k on the gene quantum ranking.
A third aspect of the present disclosure provides a non-transitory computer readable medium having stored thereon 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 scheme utilizes the improved quantum revolving gate to realize evolution operation on the genes on the chromosome, so that the effectiveness and the practicability of the algorithm are greatly improved. Meanwhile, the chromosome at the later stage of evolution is subjected to perturbation, namely, the corresponding gene position is adjusted, so that the population further obtains activity, excellent information is retained, and the problem that the system falls into a local extreme value is avoided. Therefore, the accuracy and the efficiency of path planning are improved.
Drawings
In order to more clearly illustrate the detailed description of the present disclosure or the technical solutions in the prior art, the drawings needed for the detailed description or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without inventive efforts.
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 technical solutions of the present disclosure will be described clearly and completely with reference to the accompanying drawings, and it is to be understood that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
The present disclosure provides, in a first aspect, a method for determining an optimal path based on a quantum genetic algorithm, where the optimal path is a shortest path from a current computing node back to the current computing node via a plurality of specific 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 comprises: step 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 all chromosomes in the quantum population have the same initial probability; wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes; step S2, calculating the fitness of each path in all the paths according to the initial probability, selecting the maximum value of the fitness as a first fitness, wherein the fitness represents the survival ability of the chromosome and the ability of evolving the genes on the chromosome to the next generation; step S3, based on the first fitness, performing first optimization on all paths completing the quantum coding by using a modified quantum revolving gate, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population; step S4, performing a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculating fitness of each path after the chromosome cross optimization, selecting a maximum value of the fitness of each path after the chromosome cross optimization as a second fitness, and taking a 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, the quantum population enters a convergence state, 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 including a plurality of chromosomes, and all paths for which the quantum-encoding is completed are initialized so that genes on the respective chromosomes in the quantum population have the same initial probability. Wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes. Specifically, the initial evolution algebra of the quantum population is set to 0, and the initial probabilities of the genes are all set to 0To complete the initialization.
In some embodiments, the quantum population is initialized,
in order to balance the overlong encoding time caused by the overlarge population size, M chromosomes are randomly generated as an initial quantum population, wherein M is equal to N, and t is equal to 0 (evolution time or evolution algebra), and the initial number is as follows:q (t) is a quantum population, and in order to ensure that the genes in all populations appear with the same probability, all probability amplitudes, alpha and beta, appearing in the quantum population are initially set to be
In step S2, fitness of each of the all paths is calculated according to the initial probability, and a maximum value of the fitness is selected as a first fitness, where the fitness characterizes the ability of the chromosome to survive and evolve a gene on the chromosome into a next generation. The greater the fitness, the higher the chances of survival and reproduction.
In some embodiments, measuring the quantum population q (t) results in the common population p (t). The measurement adopts a random number method, namely, for each quantum bit in each chromosome, a number x is randomly generated, and x belongs to [0, 1 ]]If x is not less than | alpha2If yes, the qubit measurement result takes 1, indicating that the node can be connected; otherwise, 0 is taken, indicating that the node cannot be connected. Meanwhile, the invalid path is deleted in the measurement process, and only the swordsman path is kept. The fitness function may be constructed to calculate the fitness in step S2 using any method known in the art for calculating fitness. 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, performing a first optimization on all paths completing the quantum coding by using the modified quantum revolving gate, where the first optimization includes evolving the quantum population to obtain a new generation of quantum population P (t + 1). Wherein the modified quantum revolving gate is represented as:
wherein the modified rotation angle of the quantum rotary gatefmaxIs the first fitness, fxAs fitness of said individual chromosomes, thetaiThe initial rotation angle of the quantum revolving door is the value range of [0.001 pi, 0.05 pi],S=|(fmax-fx)|·αiβi,αiAnd betaiIndicates the ith geneThe probability of (c).
In step S4, performing a second optimization on all the paths after the first optimization, where the second optimization is a chromosome cross optimization, calculating fitness of each path after the chromosome cross optimization, selecting a maximum value of the fitness of each path after the chromosome cross optimization as a second fitness, and using a larger value of the first fitness and the second fitness as a new first fitness.
In some embodiments, the chromosome cross-optimization comprises a first cross-optimization and a second cross-optimization, wherein: the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence; the second cross optimization specifically includes 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 moved by k on the gene quantum ranking.
In some embodiments, chromosome cross-optimization, i.e. post perturbation, is performed on the evolved quantum population p (t)': all chromosomes in the population are randomly transposed and the bit sequences of all chromosomes are randomly determined. And moving the kth quantum site of each chromosome in the population for k times to obtain a new population chromosome and gene site sequence.
In step S5, it is determined whether the new first fitness is the first fitness, and 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 specific 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, as shown in fig. 2, the system 200 includes: a first module 201 configured to perform quantum coding on all paths to generate a quantum population including a plurality of chromosomes, and initialize all paths in which the quantum coding is completed, so that genes on each chromosome in the quantum population have the same initial probability; wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes; a second module 202, configured to calculate fitness of each of the all paths according to the initial probability, and select a maximum value of the fitness as a first fitness, where the fitness represents the ability of the chromosome to survive and evolve a gene on the chromosome to a next generation; a third module 203 configured to perform a first optimization on all paths completing the quantum coding by using the modified quantum revolving gate based on the first fitness, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population; a fourth module 204, configured to perform a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculate fitness of each path after the chromosome cross optimization, select a maximum value of the fitness of each path after the chromosome cross 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 for completing the quantum coding, including setting an initial evolution generation number of the quantum population to 0, and setting initial probabilities of the genes to be all 0To complete the initialization.
In particular, the third module 203 is specifically configured such that the modified quantum rotation gate is represented as:
wherein the modified rotation angle of the quantum rotary gatefmaxIs the first fitness, fxAs fitness of said individual chromosomes, thetaiThe initial rotation angle of the quantum revolving door is corrected in the value range ofS=|(fmax-fx)|·αiβi,αiAnd betaiThe probability of the ith gene is shown.
In particular, the fourth module 204 is specifically configured to determine the chromosome crossing optimization comprises a first crossing optimization and a second crossing optimization, wherein: the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence; the second cross optimization specifically includes 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 moved by k on the gene quantum ranking.
A third aspect of the present disclosure provides a non-transitory computer readable medium having stored thereon 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 scheme utilizes the improved quantum revolving gate to realize evolution operation on the genes on the chromosome, so that the effectiveness and the practicability of the algorithm are greatly improved. Meanwhile, the chromosome at the later stage of evolution is subjected to perturbation, namely, the corresponding gene position is adjusted, so that the population further obtains activity, excellent information is retained, and the problem that the system falls into a local extreme value is avoided. Therefore, the accuracy and the efficiency of path planning are improved.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present disclosure.
Claims (9)
1. A method 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 specific computing nodes, the method comprising:
step 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 all chromosomes in the quantum population have the same initial probability;
wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes;
step S2, calculating the fitness of each path in all the paths according to the initial probability, selecting the maximum value of the fitness as a first fitness, wherein the fitness represents the survival ability of the chromosome and the ability of evolving the genes on the chromosome to the next generation;
step S3, based on the first fitness, performing first optimization on all paths completing the quantum coding by using a modified quantum revolving gate, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population;
step S4, performing a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculating fitness of each path after the chromosome cross optimization, selecting a maximum value of the fitness of each path after the chromosome cross optimization as a second fitness, and taking a larger value of the first fitness and the second fitness as a new first fitness; and
and step S5, determining whether the new first fitness is the first fitness, if so, the quantum population enters a convergence state, and outputting a path corresponding to the new first fitness as the optimal path.
2. The method for determining the optimal path based on the quantum genetic algorithm of claim 1, wherein in the step S1, the initializing all paths for completing the quantum encoding comprises setting the initial evolution algebra of the quantum population to 0 and setting the initial probabilities of the genes to be all 0
3. The method for determining an optimal path based on quantum genetic algorithm of claim 1, wherein in the step S3, the modified quantum revolving gate is represented as:
4. The method for determining an optimal path based on quantum genetic algorithm as claimed in claim 1, wherein in said step S4, said chromosome crossing optimization comprises a first crossing optimization and a second crossing optimization, wherein:
the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence;
the second cross optimization specifically includes 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 moved by k on the gene quantum ranking.
5. 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 specific computing nodes, the system comprising:
a first module configured to perform quantum coding on all paths to generate a quantum population including a plurality of chromosomes, and initialize all paths on which the quantum coding is completed so that genes on the chromosomes in the quantum population have the same initial probability;
wherein each chromosome characterizes a path, and the quantum population characterizes all paths, which are all paths from the current compute node back to the current compute node via the particular compute nodes;
a second module, configured to calculate fitness of each of the all paths according to the initial probability, and select a maximum value of the fitness as a first fitness, where the fitness represents the ability of the chromosome to survive and evolve a gene on the chromosome to a next generation;
a third module configured to perform a first optimization on all paths completing the quantum coding by using the modified quantum revolving gate based on the first fitness, wherein the first optimization includes evolving the quantum population to obtain a new generation of quantum population;
a fourth module, configured to perform a second optimization on all the paths after the first optimization is completed, where the second optimization is a chromosome cross optimization, calculate fitness of each path after the chromosome cross optimization, select a maximum value of the fitness of each path after the chromosome cross 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, the quantum population enters a convergence state, and output a path corresponding to the new first fitness as the optimal path.
6. The system for determining optimal path based on quantum genetic algorithm of claim 5Wherein the first module is specifically configured to initialize all paths for completing the quantum coding, including setting an initial evolution algebra of the quantum population to 0, and setting initial probabilities of the genes to be all 0
7. The system for determining an optimal path based on quantum genetic algorithm of claim 5, wherein the third module is specifically configured to represent the modified quantum revolving gate as:
8. The system for determining an optimal path based on quantum genetic algorithm of claim 5, wherein the fourth module is specifically configured for the chromosome cross optimization comprises a first cross optimization and a second cross optimization, wherein:
the first cross optimization specifically includes acquiring a current position sequence of each chromosome in the evolved new-generation quantum population as a first position sequence, and randomly adjusting the first position sequence to a second position sequence different from the first position sequence;
the second cross optimization specifically includes 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 moved by k on the gene quantum ranking.
9. A non-transitory computer readable medium storing instructions, wherein the instructions, when executed by a processor, perform the steps of a method of determining an optimal path based on a quantum genetic algorithm according to any one of claims 1-4.
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 true CN113361753A (en) | 2021-09-07 |
CN113361753B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115292652A (en) * | 2022-10-08 | 2022-11-04 | 北京航天驭星科技有限公司 | Method and device for determining initial orbit of space debris by improving quantum genetic algorithm |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11118501A (en) * | 1997-10-17 | 1999-04-30 | Yoshinori Haseyama | Optimum route searching method |
US20030084011A1 (en) * | 2001-04-26 | 2003-05-01 | Honeywell International Inc. | Methods for solving the traveling salesman problem |
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 |
-
2021
- 2021-05-26 CN CN202110574816.5A patent/CN113361753B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11118501A (en) * | 1997-10-17 | 1999-04-30 | Yoshinori Haseyama | Optimum route searching method |
US20030084011A1 (en) * | 2001-04-26 | 2003-05-01 | Honeywell International Inc. | Methods for solving the traveling salesman problem |
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 |
---|
LI JIALIN 等: "A New Quantum Rotation Angle of Quantum-Inspired Evolutionary Algorithm for TSP", 2017 IEEE INTERNATIONAL CONFERENCE ON COMPUTATIONAL SCIENCE AND ENGINEERING (CSE) AND IEEE INTERNATIONAL CONFERENCE ON EMBEDDED AND UBIQUITOUS COMPUTING (EUC), pages 369 - 374 * |
ZHANG GEXIANG 等: "Novel Quantum Genetic Algorithm and Its Applications", FRONTIERS OF ELECTRICAL AND ELECTRONIC ENGINEERING IN CHINA, vol. 1, pages 31 - 36, XP019203311, DOI: 10.1007/s11460-005-0014-8 * |
ZHANG SHENG 等: "A novel quantum genetic algorithm and its application", 2012 8TH INTERNATIONAL CONFERENCE ON NATURAL COMPUTATION (ICNC 2012), pages 613 - 617 * |
曹云;向凤红;毛剑琳;郭宁;: "求解CVRP的改进量子遗传算法研究", 软件导刊, vol. 16, no. 12, pages 60 - 63 * |
李晓波: "一种改进的量子遗传算法及在TSP求解中的应用", 2010 3RD INTERNATIONAL CONFERENCE ON COMPUTATIONAL INTELLIGENCE AND INDUSTRIAL APPLICATION (PACIIA), pages 96 - 100 * |
武妍;包建军;: "一种新的求解TSP的混合量子进化算法", 计算机应用, no. 10, pages 2433 - 2436 * |
潘子宇;耿鹏;: "量子遗传算法在TSP中的应用", 网络安全技术与应用, no. 08, pages 54 - 56 * |
王丹琴: "改进的量子进化算法及其在优化问题中的应用", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 8, pages 140 - 79 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115292652A (en) * | 2022-10-08 | 2022-11-04 | 北京航天驭星科技有限公司 | Method and device for determining initial orbit of space debris by improving quantum genetic algorithm |
CN115292652B (en) * | 2022-10-08 | 2023-02-03 | 北京航天驭星科技有限公司 | Method and device for determining initial orbit of space debris by improving quantum genetic algorithm |
Also Published As
Publication number | Publication date |
---|---|
CN113361753B (en) | 2023-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Initialization strategies to enhancing the performance of genetic algorithms for the p-median problem | |
Xiang et al. | A clustering-based surrogate-assisted multiobjective evolutionary algorithm for shelter location problem under uncertainty of road networks | |
CN111861013B (en) | Power load prediction method and device | |
Tian et al. | A fast clustering based evolutionary algorithm for super-large-scale sparse multi-objective optimization | |
Niu et al. | An improved learnable evolution model for solving multi-objective vehicle routing problem with stochastic demand | |
CN108629150A (en) | The RNA secondary structure prediction methods of quantum genetic algorithm based on assistance on multiple populations | |
CN112013829A (en) | Multi-UAV/UGV (unmanned aerial vehicle/user generated Unit) cooperative long-term operation path planning method based on multi-objective optimization | |
CN113762595B (en) | Traffic time prediction model training method, traffic time prediction method and equipment | |
WO2023116111A1 (en) | Disk fault prediction method and apparatus | |
CN115661550A (en) | Graph data class imbalance classification method and device based on generation countermeasure network | |
CN113361753A (en) | Method, system, and medium for determining optimal path based on quantum genetic algorithm | |
CN116170328A (en) | Method and device for predicting bandwidth used for graphic coding | |
Jahani et al. | Green virtual network embedding with supervised self-organizing map | |
Mohsen et al. | An optimization algorithm based on harmony search for rna secondary structure prediction | |
CN104156462A (en) | Complex network community mining method based on cellular automatic learning machine | |
CN114093426B (en) | Marker screening method based on gene regulation network construction | |
CN106406082A (en) | System control method and device, controller and control system | |
CN110852505B (en) | Smart city traffic flow prediction method based on quantum genetic optimization LVQ neural network | |
Hu et al. | Apenas: An asynchronous parallel evolution based multi-objective neural architecture search | |
Xueyuan | Research on solution of tsp based on improved genetic algorithm | |
Lou | An intelligent teaching test paper generation system based on ant colony hybrid genetic algorithms | |
Zhao et al. | A two-stage differential evolutionary algorithm for deep ensemble model generation | |
Xu et al. | Ant Colony Optimization for Multiple Travelling Salesmen Problem with Pivot Cities | |
Gong et al. | Research on data filling algorithm based on improved k-means and information entropy | |
WO2023044931A1 (en) | Rna-protein interaction prediction method and apparatus, and medium and electronic device |
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 |