CN110533151A - A kind of firefly optimization algorithm based on the law of universal gravitation - Google Patents

A kind of firefly optimization algorithm based on the law of universal gravitation Download PDF

Info

Publication number
CN110533151A
CN110533151A CN201910686336.0A CN201910686336A CN110533151A CN 110533151 A CN110533151 A CN 110533151A CN 201910686336 A CN201910686336 A CN 201910686336A CN 110533151 A CN110533151 A CN 110533151A
Authority
CN
China
Prior art keywords
firefly
law
gravitation
optimization algorithm
population
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910686336.0A
Other languages
Chinese (zh)
Inventor
易灵芝
冯晓东
朱和潇
黄其森
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiangtan University
Original Assignee
Xiangtan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiangtan University filed Critical Xiangtan University
Priority to CN201910686336.0A priority Critical patent/CN110533151A/en
Publication of CN110533151A publication Critical patent/CN110533151A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The firefly optimization algorithm based on the law of universal gravitation that the invention discloses a kind of.Glowworm swarm algorithm (FA) is a kind of novel colony intelligence optimization method.For the problem that glowworm swarm algorithm is when solving globally optimal solution, it is too low and be easily trapped into local convergence that there are solving precisions.The algorithm refers to the law of universal gravitation, using gravitation as the attraction between firefly particle, generate a kind of novel evolutionary computation mode, and when population falls into local optimum region, the diversity of firefly individual is improved using Gaussian mutation, and optimization algorithm convergence with probability 1 is in global optimum.

Description

A kind of firefly optimization algorithm based on the law of universal gravitation
Technical field
The present invention relates to a kind of firefly optimization algorithms.Especially a kind of firefly based on the law of universal gravitation, which optimizes, to be calculated Method.
Background technique
In order to solve complicated optimization problem, people after the inspiration of various natural phenomenas or process, mention in by nature A series of colony intelligence optimization algorithm is gone out, there are commonly ant group algorithm, particle swarm algorithm and glowworm swarm algorithms.Use for reference firefly The biological nature of information is transmitted using shining, glowworm swarm algorithm is as a kind of new colony intelligence optimization algorithm, in the algorithm, The firefly individual of initial position random distribution can all fly to the stronger firefly individual of neighbouring fluorescent brightness, by multiple group After body movement, whole fireflies be may build up near most bright firefly, complete final optimizing.Due to this algorithm structure letter Parameter that is single, needing to adjust is less, while having preferable optimizing search capability, asks so being widely used in multi-modal optimization Topic, automatic control, price expectation, compression of images etc..But since development time is still short, there is solving precision it is too low and hold The problem of easily falling into local convergence.
Summary of the invention
For glowworm swarm algorithm when solving globally optimal solution, it is too low and be easily trapped into local convergence that there are solving precisions Problem, the present invention disclose a kind of firefly optimization algorithm based on the law of universal gravitation, the law of universal gravitation are introduced into the light of firefly In worm algorithm, in the hope of globally optimal solution.
The present invention uses following technical scheme to solve above-mentioned technical problem:
The present invention provides a kind of firefly optimization algorithm based on the law of universal gravitation, the specific steps are as follows:
Step 1: dimension n, light intensity absorption coefficient gamma, gravitation primary constant G is arranged in initialization firefly number m0, Step factor α, step-length attenuation coefficient Δ α etc. parameters set maximum number of iterations, and generate each light of firefly at random in solution room The initial position of worm;
Step 2: calculating the target fitness value f (x of each fireflyi) and any two firefly before space away from From rijAnd gravitational constant G;
Step 3: calculating the gravitation of object;
Step 4: the target fitness value of any two firefly individual being compared, by the light of firefly that fitness value is poor The update of worm progress spatial position;
Step 5: recalculating the fitness value of each firefly, if obtaining the more excellent fitness value of population, update optimal suitable Response;If population adaptive optimal control degree 5 times all do not update, worst firefly state is replaced using optimal firefly state, Intermediate population is generated, and Gaussian mutation operation is carried out to intermediate population;
Step 6: region constraint is carried out to all firefly individuals;
Step 7: judging whether to reach maximum number of iterations, if so, going to step 8;Otherwise 2 are gone to step;
Step 8: terminating iteration, export result;
The invention adopts the above technical scheme compared with prior art, has following technical effect that the present invention is based on universal The firefly optimization algorithm of law of gravitation improves it in terms of two, so that optimization algorithm had both been able to maintain original algorithm Evolutionary edge, and can effectively improve the precision and convergence capabilities of algorithm, especially when search range and initial value obtain it is larger When, algorithm still has higher precision and convergence capabilities.
Detailed description of the invention
Fig. 1 is glowworm swarm algorithm schematic diagram of the present invention.
Fig. 2 is the algorithm flow chart of embodiment of the present invention.
Specific embodiment
Combined with specific embodiments below, the present invention is furture elucidated.
The present invention provides a kind of firefly optimization algorithm based on the law of universal gravitation, the specific steps are as follows:
Step 1: dimension n, light intensity absorption coefficient gamma, gravitation primary constant G is arranged in initialization firefly number m0, Step factor α, step-length attenuation coefficient Δ α etc. parameters set maximum number of iterations, and generate each light of firefly at random in solution room The initial position of worm;
Step 2: calculating the target fitness value f (x of each fireflyi) and any two firefly before space away from From rijAnd gravitational constant G;
Step 3: calculating the gravitation of object;
Step 4: the target fitness value of any two firefly individual being compared, by the light of firefly that fitness value is poor The update of worm progress spatial position;
Step 5: recalculating the fitness value of each firefly, if obtaining the more excellent fitness value of population, update optimal suitable Response;If population adaptive optimal control degree 5 times all do not update, worst firefly state is replaced using optimal firefly state, Intermediate population is generated, and Gaussian mutation operation is carried out to intermediate population;
Step 6: region constraint is carried out to all firefly individuals;
Step 7: judging whether to reach maximum number of iterations, if so, going to step 8;Otherwise 2 are gone to step;
Step 8: terminating iteration, export result;
As further technical solution of the present invention, initial firefly population number is m in step 1 and step 2, and search is empty Between for n tie up, the position of i-th firefly in space isWhereinI-th firefly is represented n-th Position in dimension space.The maximum fluorescence brightness for defining i-th firefly is
I0i=f (xi) (1)
Wherein, f (xi) it is the corresponding target fitness value in i-th firefly position.Define the phase of i-th firefly It is to fluorescent brightness
Wherein, γ is the light intensity absorption factor, indicates that the fluorescent brightness of firefly is influenced by propagation medium and gradually changed Characteristic, value with solve the section in domain it is related, be generally set to constant .rij=| | xi-xj| | indicate i-th firefly and jth Space length between firefly.Define firefly Attraction Degree be
Wherein: β0For the maximum Attraction Degree factor, the Attraction Degree size of position at maximum fluorescence brightness is indicated.Formula (3) description The fluorescence that firefly issues attractions of other individuals will be increased with distance and the absorption of propagation medium and be gradually reduced Characteristic.
The position of i-th firefly is evolved and can be indicated by formula (4) in searching process:
xi(t+1)=xi(t)+β(xj(t)-xi(t))+α(rand-1/2) (4)
Wherein: α is step factor, and value is the constant in [0,1];Rand is that obedience is equally distributed random in [0,1] The factor;Disturbance term α (rand-1/2) can effectively expande the search range of firefly, prevent firefly from falling into local optimum too early.
As further technical solution of the present invention, step 3 defines object j and is to the gravitation of object i
Wherein,Indicate the universal gravitational constant in moment t, G0For gravitation primary constant, rijFor Euclidean distance between object and i object j, miIndicate the quality of object i.Define object i quality be
Wherein, f (xi) indicate the corresponding target fitness value in i-th firefly position, it is asked if solving minimum Topic, thenIf solving maximum problem,
As further technical solution of the present invention, step 4 defines the update of position
Wherein, rand is the random number of [0,1], and α is step factor, and in [0,1] interior value, Δ α is step-length attenuation coefficient, The interior value in [0.95,1].
As further technical solution of the present invention, if step 5 firefly population does not all send out in continuous 5 iteration It is raw to evolve, then judge that it has fallen into local optimum region.It is disturbed at this time using Gaussian mutation factor pair firefly population, It is set to restore evolvability.It operates as follows:
First by all fireflies according to fitness size sort, then using optimal firefly by worst firefly group into The replacement of row state updates, and obtains intermediate population, finally carries out Gaussian mutation processing to intermediate population according to formula (8).
xi=xi+xi*N(0,1) (8)
Wherein, N (0,1) is to obey the random vector for being desired for the Gaussian Profile that 0, variance is 1.
As further technical solution of the present invention, step 6 is being searched for always for the individual guaranteed in firefly population It is effectively searched in space, region constraint processing has been carried out to all firefly individuals, a physical efficiency is made to be detached from specified model When other than enclosing, individual is effectively withdrawn into designated space, to complete global optimizing task.Region constraint processing is such as formula (9) institute Show:
Wherein, xminFor search space lower limit, xmaxFor the search space upper limit.
As further technical solution of the present invention, step 7 exports optimal solution:
Judge whether to reach maximum number of iterations, if then terminating iteration output optimal solution, otherwise, and return step 2 is suitable Sequence executes.

Claims (7)

1. a kind of firefly optimization algorithm based on the law of universal gravitation, it is characterized in that the law of universal gravitation is referred to, it will be universal Gravitation generates a kind of novel evolutionary computation mode as the attraction between firefly particle, and falls into part in population When optimal region, the diversity of firefly individual is improved using Gaussian mutation, and optimization algorithm convergence with probability 1 is in the overall situation It is optimal, and carry out as follows:
Step 1: dimension n, light intensity absorption coefficient gamma, gravitation primary constant G is arranged in initialization firefly number m0, step-length because Sub- α, step-length attenuation coefficient Δ α etc. parameters set maximum number of iterations, and generate the first of each firefly at random in solution room Beginning position;
Step 2: calculating the target fitness value f (x of each fireflyi) and any two firefly before space length rij And gravitational constant G;
Step 3: calculating the gravitation of object;
Step 4: the target fitness value of any two firefly individual is compared, by the poor firefly of fitness value into The update of row spatial position;
Step 5: recalculating the fitness value of each firefly, if obtaining the more excellent fitness value of population, update adaptive optimal control degree; If population adaptive optimal control degree 5 times all do not update, worst firefly state is replaced using optimal firefly state, in generation Between population, and to intermediate population carry out Gaussian mutation operation;
Step 6: region constraint is carried out to all firefly individuals;
Step 7: judging whether to reach maximum number of iterations, if so, going to step 8;Otherwise 2 are gone to step;
Step 8: terminating iteration, export result.
2. firefly according to claim 1 introduces the law of universal gravitation, solves group and be easily trapped into asking for local convergence Topic, optimization algorithm seek optimal solution.
3. the firefly optimization algorithm according to claim 1 based on the law of universal gravitation, which is characterized in that step 3 is fixed Adopted object j solves maximum value minimum problem to the gravitation of object i, the quality of definition object i.
4. the firefly optimization algorithm according to claim 1 based on the law of universal gravitation, which is characterized in that step 4 is fixed The update that adopted position is set.
5. the firefly optimization algorithm according to claim 1 based on the law of universal gravitation, which is characterized in that step 5 is such as Fruit firefly population all there is no evolving, then judges that it has fallen into local optimum region in continuous 5 iteration.It adopts at this time It is disturbed with Gaussian mutation factor pair firefly population, it is made to restore evolvability.
6. the firefly optimization algorithm according to claim 1 based on the law of universal gravitation, which is characterized in that step 6 is Guarantee that the individual in firefly population is effectively searched in search space always, all firefly individuals are carried out Region constraint processing makes a physical efficiency when being detached from other than specified range, individual is effectively withdrawn into designated space, to complete Global optimizing task.
7. the firefly optimization algorithm according to claim 1 based on the law of universal gravitation, which is characterized in that step 7 is defeated Optimal solution out judges whether to reach maximum number of iterations, if then terminating iteration output optimal solution, otherwise, and return step 2 is suitable Sequence executes.
CN201910686336.0A 2019-07-29 2019-07-29 A kind of firefly optimization algorithm based on the law of universal gravitation Pending CN110533151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910686336.0A CN110533151A (en) 2019-07-29 2019-07-29 A kind of firefly optimization algorithm based on the law of universal gravitation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910686336.0A CN110533151A (en) 2019-07-29 2019-07-29 A kind of firefly optimization algorithm based on the law of universal gravitation

Publications (1)

Publication Number Publication Date
CN110533151A true CN110533151A (en) 2019-12-03

Family

ID=68660566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910686336.0A Pending CN110533151A (en) 2019-07-29 2019-07-29 A kind of firefly optimization algorithm based on the law of universal gravitation

Country Status (1)

Country Link
CN (1) CN110533151A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395059A (en) * 2020-11-16 2021-02-23 哈尔滨工程大学 CMP task scheduling method for improving firefly algorithm
CN113971329A (en) * 2021-09-22 2022-01-25 广州杰赛科技股份有限公司 Layout method of modeled camera
CN116633830A (en) * 2023-05-25 2023-08-22 哈尔滨工业大学 Seed mutation operation scheduling method based on firefly algorithm

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395059A (en) * 2020-11-16 2021-02-23 哈尔滨工程大学 CMP task scheduling method for improving firefly algorithm
CN112395059B (en) * 2020-11-16 2024-07-02 哈尔滨工程大学 CMP task scheduling method for improving firefly algorithm
CN113971329A (en) * 2021-09-22 2022-01-25 广州杰赛科技股份有限公司 Layout method of modeled camera
CN116633830A (en) * 2023-05-25 2023-08-22 哈尔滨工业大学 Seed mutation operation scheduling method based on firefly algorithm
CN116633830B (en) * 2023-05-25 2024-01-23 哈尔滨工业大学 Seed mutation operation scheduling method based on firefly algorithm

Similar Documents

Publication Publication Date Title
CN110533151A (en) A kind of firefly optimization algorithm based on the law of universal gravitation
CN110516831A (en) A kind of short-term load forecasting method based on MWOA algorithm optimization SVM
CN109242878B (en) Image multi-threshold segmentation method based on self-adaptive cuckoo optimization method
CN109886343B (en) Image classification method and device, equipment and storage medium
CN108830418A (en) A kind of Short-Term Load Forecasting Method
CA2353992A1 (en) Robust modeling
CN112330487B (en) Photovoltaic power generation short-term power prediction method
CN111126549A (en) Double-star spectrum fitting method based on strategy improved goblet and sea squirt intelligent algorithm
CN113762603A (en) Photovoltaic base station short-term photovoltaic power prediction method based on improved sparrow algorithm optimization
CN110895772A (en) Electricity sales amount prediction method based on combination of grey correlation analysis and SA-PSO-Elman algorithm
CN117077671B (en) Interactive data generation method and system
CN104318271B (en) Image classification method based on adaptability coding and geometrical smooth convergence
CN109472397A (en) Polymerization technique parameter adjusting method based on viscosity change
CN109582985A (en) A kind of NoC mapping method of improved genetic Annealing
CN115424177A (en) Twin network target tracking method based on incremental learning
CN111667016A (en) Incremental information classification method based on prototype
CN114819091B (en) Multi-task network model training method and system based on self-adaptive task weight
CN116341605A (en) Grey wolf algorithm hybrid optimization method based on reverse learning strategy
CN109300140A (en) Method for detecting image edge based on genetic algorithm and ant group algorithm
CN113705724B (en) Batch learning method of deep neural network based on self-adaptive L-BFGS algorithm
CN108985323A (en) A kind of short term prediction method of photovoltaic power
Zhang et al. The WuC-Adam algorithm based on joint improvement of Warmup and cosine annealing algorithms
CN109284810A (en) A kind of firefly method based on simplex method
CN109002878A (en) A kind of GA Optimized BP Neural Network
CN116935133A (en) Cardiovascular disease classification method and system based on SPECT image recognition

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20191203