CN113255873A - Clustering longicorn herd optimization method, system, computer equipment and storage medium - Google Patents

Clustering longicorn herd optimization method, system, computer equipment and storage medium Download PDF

Info

Publication number
CN113255873A
CN113255873A CN202110617692.4A CN202110617692A CN113255873A CN 113255873 A CN113255873 A CN 113255873A CN 202110617692 A CN202110617692 A CN 202110617692A CN 113255873 A CN113255873 A CN 113255873A
Authority
CN
China
Prior art keywords
longicorn
individual
cluster
optimal
optimal position
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
CN202110617692.4A
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.)
Guangzhou University
Original Assignee
Guangzhou 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 Guangzhou University filed Critical Guangzhou University
Priority to CN202110617692.4A priority Critical patent/CN113255873A/en
Publication of CN113255873A publication Critical patent/CN113255873A/en
Pending legal-status Critical Current

Links

Images

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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering

Abstract

The invention provides a clustered longicorn group optimization method, a system, computer equipment and a storage medium, wherein longicorn group algorithm parameters are preset, longicorn group is randomly initialized according to a particle swarm strategy, clustered analysis is carried out on the longicorn group to obtain a certain number of longicorn clusters, after the optimal position in each longicorn cluster and the corresponding cluster optimal weight are obtained, the optimal position of each longicorn individual obtained by searching is combined, the movement speed and the position increment of the longicorn individual are updated, the longicorn group is updated according to the movement speed and the position increment of the longicorn individual, and the fitness value before and after the longicorn group is updated is compared to update the optimal position and the group optimal position of each longicorn individual until the preset maximum iteration times is reached, so that the defects of the existing optimization accuracy and convergence accuracy are overcome, and the local optimal solution is reasonably and effectively utilized to strengthen information exchange among groups and increase group diversity, further improving the optimizing performance and robustness of the algorithm.

Description

Clustering longicorn herd optimization method, system, computer equipment and storage medium
Technical Field
The invention relates to the technical field of intelligent optimization algorithms, in particular to a clustering longicorn herd optimization method and system based on a weight distribution strategy, computer equipment and a storage medium.
Background
An intelligent optimization algorithm is an optimization method established by simulating some natural phenomenon or process. Compared with the traditional mathematical programming method, the method is more suitable for solving the multi-objective optimization problem, particularly the complex problem in engineering, and numerous scholars prove the high efficiency of the intelligent optimization algorithm in function optimization.
The existing Tianniu swarm algorithm (BSO) combines the advantages of the Tianniu whisker algorithm (BAS) and the particle swarm algorithm (PSO), thereby not only accelerating the iteration speed of the swarm, but also avoiding falling into the local optimal solution to a greater extent, and also solving the problem that the original Tianniu whisker algorithm is not good in performance in a high-dimensional space under the condition of inheriting the advantage of less adjustment parameters required by the Tianniu whisker algorithm, the test results of 23 international reference functions show that the performance of the algorithm is obviously superior to the particle swarm algorithm and the Tianniu whisker algorithm, and the performance of the algorithm in practical application performance is obviously superior to the existing traditional algorithm, but because the Tianniu swarm algorithm is mixed improvement on the basis of the Tianniu whisker algorithm, the algorithm can continuously jump out of a local area or lack of the local search capability of a border because of a larger search step length in the early stage, the algorithm can not search fully, the global optimal point is missed, the convergence precision in the later stage of the algorithm is not high, and a plurality of local extreme points searched in the algorithm iteration process are not utilized, so that the waste of useful information is caused to a certain extent. Although many researchers have made many improvements to the longicorn swarm algorithm based on the above problems, most researchers focus on mixing with other algorithms or improving the algorithms by their ideas, and do not improve the robustness of the algorithms by substantially improving the algorithms themselves, and the introduced other mixing algorithms can make up for the shortcomings of the longicorn swarm algorithm to some extent, but the mixing algorithms in practical application may not necessarily have better effects than the original algorithms, and even have a phenomenon of reversing in many aspects.
Therefore, there is a need for providing an improved longicorn herd algorithm which further enhances the information exchange among longicorn individuals on the basis of inheriting the advantages of the existing longicorn herd algorithm (BSO), reasonably and effectively utilizes the local optimal solution obtained in the search process of the longicorn, so that the local optimal solution participates in the decision of next movement of the longicorn herd to enhance the information exchange among the herds, increase the diversity of the herds, and improve the optimization performance and the robustness.
Disclosure of Invention
The invention aims to provide a clustered longicorn group optimization method, which overcomes the defects of the prior longicorn group algorithm in the aspects of optimization accuracy and convergence accuracy, strengthens information exchange among longicorn individuals, reasonably and effectively utilizes local optimal solution obtained in the searching process of the longicorn to strengthen information exchange among groups and increase group diversity, and further improves the optimization performance and robustness of the algorithm.
In order to achieve the above object, it is necessary to provide a clustered skyhook crowd optimizing method, system, computer device and storage medium.
In a first aspect, an embodiment of the present invention provides a clustered longicorn herd optimization method, where the method includes the following steps:
presetting parameters of a longicorn swarm algorithm, and randomly initializing a longicorn swarm according to a particle swarm strategy;
performing clustering analysis on the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
acquiring the intra-cluster optimal position of each longicorn cluster, and acquiring the cluster optimal weight corresponding to the intra-cluster optimal position;
searching the optimal position of each longicorn individual of the longicorn population, and updating the individual moving speed of the longicorn according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual;
updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals, and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
and comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the population optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, if so, stopping the iterative update of the longicorn population, and otherwise, entering the iterative update of the longicorn population by the next wheel.
Further, the step of performing cluster analysis on the longicorn population by using a clustering algorithm to obtain longicorn clusters with a specific number comprises:
determining the optimal K value of a K-means clustering algorithm by adopting a contour coefficient method;
performing K-means cluster analysis on the longicorn population according to the optimal K value to obtain longicorn clusters with specific numbers; the particular number is consistent with the optimal K value.
Further, the step of obtaining the intra-cluster optimal position of each longicorn cluster and obtaining the cluster optimal weight corresponding to the intra-cluster optimal position comprises:
calculating individual fitness value of each longicorn in each longicorn cluster, and taking the individual position of the longicorn corresponding to the minimum value of the individual fitness value of each longicorn as the optimal position in the cluster;
determining the cluster priority weight of each cluster internal optimal position according to the positive and negative distribution conditions of the fitness value corresponding to each cluster internal optimal position, wherein the cluster priority weight is expressed as:
Figure BDA0003096553010000031
in the formula, the set K contains K optimal positions in the clusterA set of (a); x is the number ofjJ is more than or equal to 1 and less than or equal to K and is the optimal position in the cluster of the jth longicorn cluster in the set K; w (x)j) Corresponding cluster priority weight to the optimal position in the jth cluster; f (x)j) The fitness value of the optimal position in the jth cluster is obtained; y ismaxThe maximum value of the fitness value of the optimal position in all the clusters in the set K.
Further, the step of obtaining the optimal position of each longicorn individual of the longicorn population by searching, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster optimal weight and the optimal position of each longicorn individual comprises:
calculating different searching position adaptability values of each longicorn individual, and taking the position of the longicorn individual corresponding to the minimum value of the different searching position adaptability values as the optimal position of each longicorn individual;
updating the individual moving speed of the longicorn according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual according to the following formula:
Figure BDA0003096553010000041
ω=ωmax-(ωmaxmin)*t/Max_iter
c0=d1+1.2*(cos(t*π)/Max_iter)
c1=d2-1.2*(cos(t*π)/Max_iter)
in the formula, t and Max _ iter are respectively the current iteration times and the maximum iteration times; s is the S-th dimension in the S-dimensional solution space;
Figure BDA0003096553010000042
respectively determining the moving speed of the longicorn individual, the position of the longicorn individual and the optimal position of the longicorn individual in the s-dimensional space of the ith longicorn of the t iteration;
Figure BDA0003096553010000043
and wjRespectively for the jth iteration, the jth intra-cluster optimal position and the intra-cluster most optimal positionCluster priority weight corresponding to the priority position; ω is the inertial weight, where ω isminAnd ωmaxRespectively is the minimum value and the maximum value of the initial preset inertia weight; c. C0And c1Respectively an individual learning factor and a social learning factor; d1And d2Is a constant value of r0And r1Are all [0,1]Random vector in between.
Further, the step of updating the position increment of the longicorn individual according to the movement speed of the longicorn individual and updating the position of each longicorn individual in the longicorn population according to the movement speed of the longicorn individual and the position increment of the longicorn individual comprises the following steps:
updating the position of the left whisker of the longicorn individual and the position of the right whisker of the longicorn individual according to the moving speed of the longicorn individual and the position of the longicorn individual and the following formulas:
Figure BDA0003096553010000044
in the formula (I), the compound is shown in the specification,
Figure BDA0003096553010000051
and
Figure BDA0003096553010000052
the positions of the left beard and the right beard of the longhorn beetle are respectively the position of the left beard and the position of the right beard of the longhorn beetle;
Figure BDA0003096553010000053
respectively determining the position and the moving speed of the longicorn individual in the s-dimensional space of the ith longicorn in the t iteration; dtThe distance between the left and right whiskers of the t-th iteration longicorn;
updating the position increment of the longhorn beetle individual according to the moving speed of the longhorn beetle individual, the position of the left whisker of the longhorn beetle individual and the position of the right whisker of the longhorn beetle individual according to the following formula:
Figure BDA0003096553010000054
δt+1=η*δt
dt=δt/c
η=δmin*(δmaxmin)(1/(1+10*t/Max_iter))
in the formula (I), the compound is shown in the specification,
Figure BDA0003096553010000055
position increment of the ith longicorn in the s-dimensional space for the t +1 iteration; deltatFor the t-th iteration of the longicorn movement step, deltaminAnd deltamaxRespectively setting the minimum value and the maximum value of the initial preset longicorn moving step length;
Figure BDA0003096553010000056
moving speed of the ith longicorn in the s-dimensional space for the t iteration; sign (·) is a sign function; eta is an adaptive variable related to the current iteration time t and the maximum iteration time Max _ iter; c is [0,2 ]]A constant of (d);
Figure BDA0003096553010000057
and
Figure BDA0003096553010000058
respectively representing the adaptability value of the left beard of the longhorn beetle individual and the adaptability value of the right beard of the longhorn beetle individual;
updating the position of the longicorn individual according to the movement speed of the longicorn individual and the position increment of the longicorn individual and the following formula:
Figure BDA0003096553010000059
where t represents the current iteration number and S represents the S-th dimension in the S-dimensional solution space.
Figure BDA00030965530100000510
And
Figure BDA00030965530100000511
respectively, the t th iterationi, the moving speed of the longicorn individuals and the position increment of the longicorn individuals in the s-dimensional space; alpha is a weight coefficient between the moving speed of the longicorn individual and the position increment of the longicorn individual.
Further, the step of comparing the fitness values before and after the update of the longicorn population and updating the optimal position of each longicorn individual and the optimal position of the population comprises the following steps:
calculating the individual fitness value of each longicorn of the updated longicorn population;
comparing the fitness value of each celestial cow individual with the fitness value of the optimal position of each celestial cow individual before updating, and updating each celestial cow individual position corresponding to the smaller value of the fitness values to be the optimal position of each celestial cow individual;
and obtaining the optimal position of the group according to the minimum value of the fitness values of the optimal positions of all the longicorn individuals.
Further, the step of judging whether the current iteration number has reached a preset maximum iteration number, if so, stopping the iterative update of the longicorn population, otherwise, entering the iterative update of the longicorn population by the next wheel set comprises:
and if the current iteration times do not reach the preset maximum iteration times, clustering analysis is carried out on the longicorn population again by adopting a clustering algorithm, and the next iteration is started until the preset maximum iteration times are reached, and the iteration is stopped.
In a second aspect, an embodiment of the present invention provides a clustered skyhook population optimization system, where the system includes:
the initialization module is used for presetting skynet herd algorithm parameters and randomly initializing a skynet herd according to a particle swarm strategy;
the clustering module is used for carrying out clustering analysis on the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
the cluster priority calculation module is used for acquiring the intra-cluster optimal position of each longicorn cluster and obtaining a cluster priority weight corresponding to the intra-cluster optimal position;
the speed updating module is used for searching and obtaining the optimal position of each longicorn individual of the longicorn population, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual;
the population updating module is used for updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
and the group optimization calculation module is used for comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the group optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, stopping the iterative update of the longicorn population if the current iteration number reaches the preset maximum iteration number, and otherwise, entering the iterative update of the next wheel set of the longicorn population.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the above method.
The method includes presetting parameters of a skynet swarm algorithm, randomly initializing according to a particle swarm strategy to obtain a skynet swarm, performing clustering analysis on the skynet swarm by adopting the clustering algorithm to obtain a specific number of skynet clusters, obtaining an intra-cluster optimal position and a corresponding cluster optimal weight of each skynet cluster, updating the moving speed of each skynet individual and the position increment of each skynet individual in combination with the searched optimal position of each skynet individual of the skynet swarm, comparing the fitness values of the whole skynet swarm before and after updating, updating the optimal position of each skynet individual and the optimal position of the swarm until reaching a preset maximum iteration number and stopping iteration to obtain the optimal position of the swarm. Compared with the prior art, the clustering longicorn group optimization method based on the weight distribution strategy not only overcomes the defects of the existing longicorn group algorithm in the aspects of optimizing accuracy and convergence precision, but also reasonably and effectively utilizes the local optimal solution in the longicorn exploration process to strengthen the information exchange among groups, increase the diversity of the groups and further improve the optimizing performance and the robustness of the algorithm.
Drawings
FIG. 1 is a schematic diagram of an application scenario of the optimization method for clustering longicorn herds in the embodiment of the present invention;
FIG. 2 is a schematic flow chart of an optimization method of a clustered skyhook population according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of a K-means clustering algorithm employed in the embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating the process of determining the optimal K value for K-means clustering by using the contour coefficient method according to the embodiment of the present invention;
FIG. 5 is a schematic flow chart of the clustering analysis of the longicorn population by using the clustering algorithm in step S12 in FIG. 2;
FIG. 6 is a schematic flowchart of the step S13 in FIG. 2 for obtaining the intra-cluster optimal position and the corresponding cluster priority weight of each longicorn cluster;
FIG. 7 is a schematic flow chart illustrating the step S14 of FIG. 2 for updating the moving speed of the longicorn individual;
FIG. 8 is a schematic view of a pressure vessel in an embodiment of the invention;
FIG. 9 is a schematic structural diagram of an optimization system for clustered longicorn herds in an embodiment of the present invention;
fig. 10 is an internal structural view of a computer device in the embodiment of the present invention.
Detailed Description
In order to make the purpose, technical solution and advantages of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments, and it is obvious that the embodiments described below are part of the embodiments of the present invention, and are used for illustrating the present invention only, but not for limiting the scope of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The clustering longicorn group search algorithm (KMBSO) used in the weight distribution strategy-based clustering longicorn group optimization method provided by the invention is an improvement of the existing longicorn group algorithm (BSO) obtained by introducing a Particle Swarm Optimization (PSO) algorithm into a longicorn whisker algorithm (BAS), and can be applied to a terminal or a server shown in fig. 1. The terminal can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers and portable wearable devices, and the server can be implemented by an independent server or a server cluster formed by a plurality of servers. The server can generate a final clustering Tianniu group to search to obtain a group optimal position, namely a global optimal solution of the target function, and the generated global optimal solution result is sent to the terminal so as to be checked and analyzed by a user of the terminal.
The skyhook algorithm (BAS) is an algorithm that simulates foraging behavior of skyhaws. The method is characterized in that the specific position of food is not clear in the foraging process of a longicorn individual, the flying direction of the longicorn individual in the next step needs to be judged according to the strength of smell emitted by the food on the left and the right, if the strength of the smell collected by the left longicorn is larger than that collected by the right longicorn, the longicorn flies to the left in the next step, and if not, the longicorn flies to the right. In the modeling application of the actual longicorn whisker algorithm, a mass center X and a left whisker X are adoptedlAnd the right palpus XrThree variables represent a longicorn individual and the corresponding BAS model is as follows:
setting the position of the longicorn individual in the S-dimensional solution space as X ═ X (X)1,X2,···,XS) And then the position of the longicorn left beard and the position of the longicorn right beard are as follows:
Figure BDA0003096553010000091
in the formula, d is the distance between the left and right whiskers of the longicorn;
Figure BDA0003096553010000092
is in a random directionThe quantities, where rands (S, d/2) is a random function that generates an S-dimensional random vector.
When the advancing direction of the longhorn beetle in the next step is determined, the fitness values f corresponding to the left and right positions of the longhorn beetle given in the formula (1) are comparedlAnd frJudging the advancing direction of the longicorn, adopting a preset individual longicorn moving step length delta, and updating the individual position of the longicorn in the next step through the following formula (2) to enable the individual position of the longicorn to gradually approach the optimal position, so that a global optimal solution is obtained:
Figure BDA0003096553010000093
where t is the current iteration number, f (X)l)、f(Xr) Respectively the fitness value delta of the left and right whiskers of the longicorntSign is the moving step length of the longicorn individual at the t iteration]To determine the sign function of the direction of the further movement of the longicorn.
The long chain Beard Algorithm (BAS) can perform efficient optimization only by one long chain beard individual, which greatly reduces the calculation amount, but in the complex problem of high dimension, the optimization performance is not ideal in low dimension space due to the influence of the initial position of the single individual.
The Particle Swarm Optimization (PSO) is obtained by simulating foraging behavior of a bird swarm, simulating birds by designing mass-free particles, and sharing information of individual birds in the bird swarm, so that the motion of the whole bird swarm in a search space is ordered, and finally a global optimal solution is obtained. In the modeling application of the actual particle swarm optimization, a population needs to be initialized randomly, and the attribute of each particle is described by the speed V and the position X, and the corresponding PSO model is as follows:
setting the particle in S-dimension space, randomly giving n particles, and setting the position of the ith particle in S-dimension space as Xi=(Xi1,Xi2,…,Zis)TI is 1, …, n, corresponding to a speed Vi=(Vi1,Vi2,…,Vis)TI is 1, …, n, and the velocity and position of the particles are updated according to the following formula:
Figure BDA0003096553010000101
Figure BDA0003096553010000102
in the formula, t represents the current iteration number, and S represents the S-th dimension in the S-dimensional solution space;
Figure BDA0003096553010000103
the speed of the ith particle in the s-dimensional space is respectively the t-th and t + 1-th iterations;
Figure BDA0003096553010000104
the position of the ith particle in the s-dimensional space is respectively the t th and t +1 th iterations;
Figure BDA0003096553010000105
the optimal position of the ith particle in the s-dimensional space for the tth iteration is determined;
Figure BDA0003096553010000106
the optimal position of the population for the t iteration is obtained; omega is an inertia factor; c. C0And c1Respectively an individual learning factor and a social learning factor; r is0And r1Are all unit random variables.
The Particle Swarm Optimization (PSO) is a relatively mature swarm intelligence algorithm, which is introduced into a longicorn Beard Algorithm (BAS) to transform a longicorn from a single intelligence to a swarm intelligence obtained longicorn swarm optimization (BSO), and the representation of a longicorn swarm comprising n longicorn individuals in the S dimension is described as G ═ (X ═ X)1,X2,···,Xn) Wherein X isi=(Xi1,Xi2,···,XiS)TRepresents the position of the ith longicorn in the S dimension, and simultaneously, Vi=(Vi1,Vi2,···,ViS)TRepresenting the velocity variables required for the longicorn individual to move in solution space,in addition, the optimal position and the global optimal position in the population individual iteration process in the particle swarm optimization are reserved, and P is calculatedi=(Pi1,Pi2,···,PiS)TExpressing the optimal position of the longicorn individual in the movement process of the ith longicorn, and calculating Pg=(Pg1,Pg2,···,PgS)TThe optimal position of the longicorn population searched in the solution space is shown. The formula of the moving speed of the longicorn individuals of the specific longicorn swarm algorithm BSO model is shown as the formula (4), and the positions of the longicorn individuals are updated as follows:
Figure BDA0003096553010000107
Figure BDA0003096553010000108
Figure BDA0003096553010000109
δt+1=η*δt (8)
dt=δt/c (9)
η=δmin*(δmaxmin)(1/(1+10*t/Max_iter)) (10)
in the formula (I), the compound is shown in the specification,
Figure BDA00030965530100001010
position increment of the ith longicorn in the s-dimensional space is respectively carried out on the t +1 th iteration and the t th iteration; deltaminAnd deltamaxRespectively setting the minimum value and the maximum value of the initial preset longicorn moving step length; eta is an adaptive variable related to the current iteration time t and the maximum iteration time Max _ iter; c is [0,2 ]]A constant of (d); dtThe distance between the left and right whiskers of the t-th iteration longicorn;
Figure BDA0003096553010000111
and
Figure BDA0003096553010000112
respectively representing the adaptability value of the left beard of the longhorn beetle individual and the adaptability value of the right beard of the longhorn beetle individual; alpha is a weight coefficient between the moving speed of the longicorn individual and the position increment of the longicorn individual. It should be noted that the variables not explained in detail herein are introduced with reference to the aforementioned variables identified above, and are not described herein again.
In the longicorn herd algorithm model, except omega and c0And c1And besides the updating of the self-adaptive parameters, the method mainly controls the longicorn individuals to search for the optimal solution in the solution space through the values of the updating speed V and the position increment xi, so that the iteration speed of the population can be increased, the situation that the longicorn individuals get into the local optimal solution can be avoided to a greater extent, and the problem that the original longicorn algorithm is poor in performance in a high-dimensional space is solved under the advantage that the longicorn algorithm needs few adjusting parameters. The present invention improves the speed updating formula shown in (3) based on the skyhook cluster algorithm, and the following embodiments will describe in detail the clustering skyhook cluster optimization method based on weight assignment.
In one embodiment, as shown in fig. 2, there is provided a clustered skyhook population optimization method, including the following steps:
s11, presetting skyhook swarm algorithm parameters, and randomly initializing a skyhook swarm according to a particle swarm strategy;
wherein, initialization of the longicorn population randomly generates a longicorn population G ═ (X)1,X2,···,Xn) The method of (a) is implemented by using the prior art, and is not particularly limited herein. Longicorn herd algorithm parameters include, but are not limited to, longicorn individual movement V i1, …, n, longicorn individual initial position XiI is 1, …, n, inertia weight ω (adjusting its value can change the proportion of global and local optimization performance of the algorithm), individual skyhook movement step δ, weight α, and maximum iteration number Max _ iter. Where the initial assignment of δ is half the value of the search space range and α is [0,1 ]]C is a [0,2 ]]Internal constant values, X, V, ω, δ, η, c0And c1Etc. are all variable onesAnd (4) adaptive adjustment, wherein adaptive adjustment updating is carried out in each iteration.
S12, performing clustering analysis on the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
the clustering algorithms are many, such as K-Means clustering, Means-Shift clustering, density-based noise application space clustering, expectation maximization clustering using a gaussian mixture model, and aggregation hierarchical clustering, and can be selected according to actual application requirements in principle. In this embodiment, a K-means clustering algorithm is preferably used for clustering analysis, and as shown in fig. 3, the specific clustering method is as follows:
for n individuals with m dimensions, the K-means algorithm groups the n individuals into assigned K class clusters according to similarity. On the premise of determining initialized k cluster center points, each individual is allocated to the nearest cluster according to the following Euclidean distance formula:
Figure BDA0003096553010000121
wherein, XiRepresents the ith individual, i is more than or equal to 1 and less than or equal to n; cjJ is more than or equal to 1 and less than or equal to k and represents the jth cluster center; xitAnd CjtRespectively representing the attribute values of the individual and the central point in the t-th dimension, wherein t is more than or equal to 1 and less than or equal to m.
After one clustering operation, the center point of each cluster should be updated. And then, continuing to operate according to the rule in the step (12) until the difference value of each dimension of the clustering center points of the previous and next two times does not exceed a given value, and updating the center points in a manner of calculating the mean value of the individuals in each cluster on each dimension, wherein the specific calculation formula is as follows:
Figure BDA0003096553010000122
wherein, ClJ is more than or equal to 1 and less than or equal to k and represents the center of the first cluster; i SlL represents the number of individuals in the ith cluster; xiIndicates in the l-th cluster1 is more than or equal to i is more than or equal to | Sl|。
The simple and high-efficiency K-means clustering algorithm is the most widely and famous clustering algorithm, and can improve the clustering efficiency while ensuring the clustering effect. In addition, the K-means clustering algorithm can well classify corresponding populations, but as a method for unsupervised learning, the clustering effect is greatly influenced by the size of the cluster number, namely the difficulty is that the cluster number is not easy to determine, the existing method for determining the cluster number includes an elbow method, a contour coefficient method, a guillsky criterion method, a Gap statistical method, a Canopy algorithm and the like, all of which can be used for selecting the cluster number in principle, but all of which have the best application scenes, and can be selected according to application requirements in practical application. In this embodiment, a contour coefficient method is preferably used to determine the number of clusters K in the K-means clustering algorithm, the contour coefficient is used as an index for measuring the dissimilarity of an individual in a cluster and the dissimilarity between clusters, and is also a standard for measuring the quality of a clustering condition, as shown in fig. 4, an optimal number of clusters (number of clusters) is determined by a method for obtaining a total contour coefficient by comparing the mean values of the contour coefficients of the whole population under different clustering numbers, and a specific calculation formula is as follows:
Figure BDA0003096553010000131
Figure BDA0003096553010000132
wherein a (i) represents the average distance of individual i from other individuals in the cluster; and b (i) represents that the average distance set of the individual i and the individual in other clusters takes the minimum value, i is more than or equal to 1 and less than or equal to n, and n is the number of the individual in the population. T iskRepresents the average of the profile coefficients of the individuals in the whole population when the number of clusters is k, since the number of clusters is generally not greater than the square of the population number, so
Figure BDA0003096553010000133
TkHas a value of [ -1,1 [)]In the interval, the closer to 1, the better the classification condition is, and the optimal clustering number and the classification condition of each longicorn cluster can be obtained by taking the classification condition as the judgment basis.
As shown in fig. 5, the step S12 of specifically performing cluster analysis on the longicorn population by using a clustering algorithm to obtain longicorn clusters with a specific number includes:
s121, determining an optimal K value of a K-means clustering algorithm by adopting a contour coefficient method;
s122, performing K-means cluster analysis on the longicorn population according to the optimal K value to obtain longicorn clusters with specific numbers; the particular number is consistent with the optimal K value.
S13, obtaining the intra-cluster optimal position of each longicorn cluster, and obtaining cluster optimal weight corresponding to the intra-cluster optimal position;
the number of the intra-cluster optimal positions corresponds to the number of the longicorn clusters obtained by the cluster analysis, and the principle of intra-cluster optimal position determination is consistent with the current international benchmark function for solving the minimum function problem, that is, the position with the minimum fitness in the cluster is selected as the intra-cluster optimal position, and the weight of the influence of the intra-cluster optimal position is distributed according to the fitness value, as shown in fig. 6, the step S13 of specifically obtaining the intra-cluster optimal position of each longicorn cluster, and obtaining the cluster optimal weight corresponding to the intra-cluster optimal position includes:
s131, calculating individual fitness values of the longicorn in each longicorn cluster, and taking the individual position of the longicorn corresponding to the minimum value of the individual fitness values of the longicorn as the optimal position in the cluster;
wherein the optimal position within the cluster is denoted as Qj=(Q1,Q2,···,QS) J is 1, …, K, and different Q is calculated according to the following weight distribution formulajWeighted value Wj
S132, determining the cluster priority weight of each cluster internal optimal position according to the positive and negative distribution conditions of the fitness value corresponding to each cluster internal optimal position, wherein the cluster priority weight is expressed as:
Figure BDA0003096553010000141
in the formula, the set K comprises a set of K optimal positions in clusters; x is the number ofjJ is more than or equal to 1 and less than or equal to K and is the optimal position in the cluster of the jth longicorn cluster in the set K; w (x)j) Corresponding cluster priority weight to the optimal position in the jth cluster; f (x)j) The fitness value of the optimal position in the jth cluster is obtained; y ismaxThe maximum value of the fitness value of the optimal position in all the clusters in the set K.
The distribution principle that the cluster priority weight is small is that the smaller the fitness value is, the larger the distributed weight is. In this embodiment, the fitness values of the optimal positions in the clusters obtained according to the above steps are considered in three cases, namely, all positive numbers, all negative numbers, and positive numbers and negative numbers, and different cluster priority weight distribution formulas are adopted. Compared with the prior art, the weight distribution mode is more comprehensive in distribution principle, except for the fact that the extreme point is positive or negative, when the cattle individual fitness value is positive or negative all the time, the method in the formula (15) can greatly accelerate the convergence speed of the algorithm, leads the result to be globally optimal, and obviously improves the order of magnitude which can be reached in the accuracy of solving the algorithm problem.
S14, searching the optimal position of each longicorn individual of the longicorn population, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster optimal weight and the optimal position of each longicorn individual;
the method comprises the steps of obtaining a speed updating formula of a longicorn group algorithm, updating the moving speed of the longicorn individuals, and updating the moving speed of the longicorn individuals, wherein the updating of the moving speed of the longicorn individuals is core processing in the longicorn group algorithm, directly influences the searching effect, based on the defects that effective information exchange between the longicorn individuals and between groups cannot be better realized due to the fact that a local optimal value is ignored in the prior art, and the diversity of the groups is increased, the optimal position in a cluster and the corresponding cluster optimal weight obtained in the step are introduced into the speed updating formula of the longicorn group algorithm, and therefore the optimizing performance and the robustness of the longicorn group algorithm are improved. As shown in fig. 7, the step S14 of obtaining the optimal position of each longicorn individual in the longicorn population by searching, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster priority weight, and the optimal position of each longicorn individual includes:
s141, calculating different search position adaptability values of each longicorn individual, and taking the position of the longicorn individual corresponding to the minimum value of the different search position adaptability values as the optimal position of each longicorn individual;
the selection principle of the individual optimal position of each longicorn is consistent with the selection of the optimal position in the cluster, namely the minimum value of the fitness value of different positions of each longicorn in the whole search process is selected and searched, so that the individual position of the longicorn corresponding to the minimum value of the fitness is obtained.
S142, updating the individual moving speed of the longicorn according to the optimal position in the cluster, the cluster optimal weight and the optimal position of each longicorn individual according to the following formula:
Figure BDA0003096553010000151
ω=ωmax-(ωmaxmin)*t/Max_iter (17)
c0=d1+1.2*(cos(t*π)/Max_iter) (18)
c1=d2-1.2*(cos(t*π)/Max_iter) (19)
in the formula, t and Max _ iter are respectively the current iteration times and the maximum iteration times; s is the S-th dimension in the S-dimensional solution space;
Figure BDA0003096553010000152
moving speed of the ith longicorn in the s-dimensional space for the t iteration;
Figure BDA0003096553010000153
the optimal position of the longicorn individual in the s-dimensional space for the ith iteration is determined;
Figure BDA0003096553010000154
and wjRespectively performing the ith iteration, the jth intra-cluster optimal position and the cluster optimal weight corresponding to the intra-cluster optimal position;
Figure BDA0003096553010000155
the position of the longicorn individual in the s-dimensional space for the ith iteration is determined; ω is the inertial weight, where ω isminAnd ωmaxRespectively is the minimum value and the maximum value of the initial preset inertia weight; c. C0And c1Respectively an individual learning factor and a social learning factor; d1And d2Is a constant value of r0And r1Are all [0,1]Random vector in between.
The difference between the formula (16) for updating the speed of the longicorn individual and the formula (3) is that the difference between the group optimal value used in each updating in the original formula and the position of the longicorn individual
Figure BDA0003096553010000156
Replacing the weighted average of the difference value between the optimal position in the cluster and the position of the longicorn individual
Figure BDA0003096553010000161
Because the improved formula uses the intra-cluster optimal value which comprises the group optimal value, the improvement effectively strengthens the effective information exchange between the longicorn individuals and between the groups on the basis of keeping the advantages of the original longicorn group algorithm, increases the group diversity and further improves the optimization performance of the algorithm.
S15, updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals, and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
wherein, the expression mode of the formula for updating the position increment of the longicorn individuals and the expression mode of the variables in the formula are respectively consistent with the expressions (6) to (10), and the difference is only that the variables are used in the formula
Figure BDA0003096553010000162
For adopting the long-horned beetleThe step of obtaining an updating formula (16) of the individual moving speed, namely updating the individual position increment of the longhorn beetle according to the individual moving speed of the longhorn beetle, and updating the individual position of each longhorn beetle of the longhorn beetle population according to the individual moving speed of the longhorn beetle and the individual position increment of the longhorn beetle, is consistent with the existing longhorn beetle population, and specifically comprises the following steps: updating the position of the left beard of the longicorn individual and the position of the right beard of the longicorn individual according to the formula (7) according to the moving speed of the longicorn individual and the position of the longicorn individual; updating the position increment of the longicorn individual according to the moving speed of the longicorn individual, the position of the left beard of the longicorn individual and the position of the right beard of the longicorn individual and the formulas (6) to (10); and updating the position of the longicorn individual according to the formula (5) according to the moving speed of the longicorn individual and the position increment of the longicorn individual.
S16, comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the population optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, if so, stopping the iteration update of the longicorn population, otherwise, entering the iteration update of the longicorn population of the next wheel.
The principle of updating the optimal position of each celestial cow individual and the optimal position of the population after the celestial cow population is updated is that the position with the minimum fitness value is used as the corresponding optimal position by comparing the fitness values of the celestial cow individuals before and after the celestial cow population is updated, and the specific steps comprise: calculating the individual fitness value of each longicorn of the updated longicorn population; comparing the fitness value of each celestial cow individual with the fitness value of the optimal position of each celestial cow individual before updating, and updating each celestial cow individual position corresponding to the smaller value of the fitness values to be the optimal position of each celestial cow individual; and obtaining the optimal position of the group according to the minimum value of the fitness values of the optimal positions of all the longicorn individuals. In addition, after updating the individual optimal position and the group optimal position of each longicorn, whether the current iteration number reaches a preset maximum iteration number or not needs to be judged, if so, the iteration is stopped, otherwise, the clustering algorithm is adopted again to perform clustering analysis on the longicorn population, the steps of S12-S16 are executed to start the next iteration, the iteration is stopped until the preset maximum iteration number is reached, and the group optimal position, namely the global optimal solution, is output.
The clustering idea is applied to the longicorn cluster algorithm, namely, a basic longicorn cluster is classified into a plurality of longicorn clusters by adopting a method of determining the number of classified clusters through a contour coefficient method and combining a K-means clustering algorithm, corresponding weights are distributed according to target values corresponding to key individuals influencing the movement of the clusters, and global optimal individuals are replaced by weighted average of optimal individuals in the plurality of longicorn clusters, so that the influence range of the social learning part of the longicorn is expanded.
It should be noted that, although the steps in the above-described flowcharts are shown in sequence as indicated by arrows, the steps are not necessarily executed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise.
In order to test the algorithm performance of the KMBSO, the invention adopts the principle of testing diversification and adopts the following 8 international standard test functions to test the algorithm performance, wherein F1、F2、F3The method is a unimodal function, and a local optimal point and a global optimal point exist in a function image; f4、F5、F6The method is a multi-peak function, a plurality of local optimal points exist in a function image, but only one global optimal point exists; f7、F8For a fixed-dimension multi-peak function, a plurality of local optimal points and a global optimal point also exist, but the solution space dimension is fixed. The function chosen is shown in table 1 below:
TABLE 1 Standard test function
Figure BDA0003096553010000181
The experimental part of the invention carries out simulation test on MATLAB 2018a software, and in order to ensure the fairness of the experiment, the KMBSO algorithm is consistent with the BSO algorithm and the PSO algorithm in the parameter value setting. The related parameters are initially set as follows: setting delta for influence factors eta and c of the movement step delta of the longicorn and the distance d between two whiskersmin=0.2,δmax0.9, η is 0.95, and c is 2; for the inertia factor ω, ω is setmin=0.4,ωmax0.9; for the policy weight coefficient α, α is set to 0.4. In the experiment, the population scale is set to be 300, the running algebra is 1000, and the solution space dimension D is selected to be 5. The experimental results obtained after all functions were performed repeatedly 30 times are shown in table 2 below:
TABLE 2 Performance of different algorithms on test functions
Figure BDA0003096553010000182
Figure BDA0003096553010000191
The above experimental result comparison uses three indexes, namely, the average value, the standard deviation and the minimum value are obtained after 30 times of experiments are repeated. The average value can be used for measuring the quality of a result obtained by the algorithm on the problem solving, and the smaller the average value is, the better the result is; the standard deviation is an important standard for measuring the stability of the algorithm, the oscillation degree of the result near the average value is shown, and the smaller the standard deviation is, the more stable the algorithm is; the minimum value represents the optimal result of the algorithm in the experiment, and the optimization capability of the algorithm can be represented from the side.
As can be seen from Table 2, on the unimodal function problem, the KMBSO algorithm is at function F1And F2The performance of (1) is better than that of the BSO algorithm, the average value and standard deviation are higher than those of the BSO algorithm, and the performance of (F) is higher than that of the BSO algorithm2And F3In contrast, KMBSO also compares to PSOThis is the case. However, since the unimodal function image only has one extreme point caused by continuous reduction of the function value, a clustering strategy is not needed, and a good result is also searched by only using the global optimal point as a guide, such as BSO and PSO in F1、F2And F3Minimum results obtained above. On multimodal problems, data were obtained with the exception of F7In other data aspects, the results obtained by using the KMBSO algorithm show that the performance of the algorithm using the clustering strategy is greatly improved no matter the average result or the stability of the values or the minimum value which can be searched. For a fixed-dimension multi-peak function F8The total number of the global minimum values is 5, and due to the fact that the local depths of the global minimum values are large, the BSO and the PSO use the searched global optimal point as guidance to easily cause the result to be trapped in a local optimal solution, which is also the reason that the experimental result is poor, and the KMBSO can jump out of the local optimal point and is beneficial to jointly making a decision by utilizing a plurality of extreme points obtained after clustering.
The optimizing performance and robustness of the clustered skyhook herd optimization method (KMBSO) is verified by the application example of the KMBSO in the design problem of the pressure vessel.
The pressure vessel design problem, originally addressed by Sandgren, describes how to design a minimum cost and acceptable finished product in accordance with ASME (american society of mechanical engineers) specifications, taking into account the combined costs of welding, materials and forming. As shown in FIG. 8, the pressure vessel is a cylindrical vessel with hemispherical heads at both ends, operating pressure of 3000psi, minimum volume of 750ft3Wherein, ThIndicating the thickness, T, of the ball headsAnd L represents the thickness and length of the cylindrical shell and R represents the inside radius of the vessel. T ishAnd TsThe value of (A) is specified as an integer multiple of 0.0625, while R and L are continuous variables. The optimization problem can be expressed as:
Minimize f(Ts,Th,R,L)=0.6224TsRL+1.7781ThR2+3.1661Ts 2L+19.84Ts 2R
and the constraint conditions are as follows:
g1=-Ts+0.0193R≤0
g2=-Th+0.00954R≤0
Figure BDA0003096553010000201
g4=L-240≤0
wherein, the variable value range is as follows: 1 x 0.0625 ≤ Ts≤99×0.0625,1×0.0625≤Th≤99×0.0625,10≤R≤200,10≤L≤200。
In order to solve the problems, the KMBSO algorithm is used for solving the problems, and meanwhile, common intelligent optimization algorithms such as a Particle Swarm Optimization (PSO), an artificial bee colony Algorithm (ABC), a tree-seed algorithm (TSA) and a Gravity Search Algorithm (GSA) are used for solving the problems. The experiment is also subjected to simulation test on MATLAB 2018a software, wherein the population number is set to be 40, the iteration times are 1000, and the result with the minimum function value is obtained after the experiment is repeatedly run for 30 times. The specific experimental results are shown in table 3 below:
TABLE 3 representation of various algorithms on pressure vessel design issues
Figure BDA0003096553010000202
Figure BDA0003096553010000211
As can be seen from table 3, the results obtained by experimental tests when the KMBSO of the present invention solves the above problems are significantly better than those of the other four algorithms, and the KMBSO algorithm is also shown from the lateral side to be equally effective in solving the multi-objective problem while the design problem of the pressure vessel can be better solved.
In one embodiment, as shown in fig. 9, there is provided a clustered skyhook population optimization system, the system comprising:
the initialization module 1 is used for presetting skynet herd algorithm parameters and randomly initializing a skynet herd according to a particle swarm strategy;
the clustering module 2 is used for clustering and analyzing the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
the cluster priority calculation module 3 is used for acquiring the intra-cluster optimal position of each longicorn cluster and acquiring the cluster priority weight corresponding to the intra-cluster optimal position;
the speed updating module 4 is used for searching and obtaining the optimal position of each longicorn individual of the longicorn population, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual;
the population updating module 5 is used for updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
and the group optimization calculating module 6 is used for comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the population optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, stopping the iterative update of the longicorn population if the current iteration number reaches the preset maximum iteration number, and otherwise, entering the iterative update of the longicorn population of the next wheel set.
For the specific limitation of the clustering longicorn group optimization system, reference may be made to the above limitation on the clustering longicorn group optimization method, which is not described herein again. All modules in the clustering longicorn herd optimization system can be completely or partially realized through software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 10 shows an internal structure diagram of a computer device in one embodiment, and the computer device may be specifically a terminal or a server. As shown in fig. 10, the computer apparatus includes a processor, a memory, a network interface, a display, and an input device, which are connected through a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a clustered longicorn herd optimization method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those of ordinary skill in the art that the architecture shown in FIG. 10 is merely a block diagram of some of the structures associated with the present solution and is not intended to limit the computing devices to which the present solution may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a similar arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the steps of the above method being performed when the computer program is executed by the processor.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
To sum up, the clustering longicorn population optimization method, the system, the computer device and the storage medium provided by the embodiments of the present invention obtain a longicorn population by presetting longicorn population algorithm parameters and randomly initializing according to a particle swarm strategy, then perform clustering analysis on the longicorn population by using a clustering algorithm to obtain a specific number of longicorn clusters, and obtain the intra-cluster optimal position and the corresponding cluster optimal weight of each longicorn cluster, and update the longicorn individual moving speed, the longicorn individual position increment in sequence by combining the searched and obtained longicorn individual optimal position of the longicorn population, and compare the fitness values before and after the longicorn population is updated, update the individual optimal position and the population optimal position of each longicorn until reaching the preset maximum iteration number, and stop iteration to obtain the population optimal position. Compared with the prior art, the clustering longicorn group optimization method based on the weight distribution strategy not only overcomes the defects of the existing longicorn group algorithm in the aspects of optimizing accuracy and convergence precision, but also reasonably and effectively utilizes the local optimal solution in the longicorn exploration process to strengthen the information exchange among groups, increase the diversity of the groups and further improve the optimizing performance and the robustness of the algorithm.
The embodiments in this specification are described in a progressive manner, and all the same or similar parts of the embodiments are directly referred to each other, and each embodiment is described with emphasis on differences from other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. It should be noted that, the technical features of the embodiments may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express some preferred embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for those skilled in the art, various modifications and substitutions can be made without departing from the technical principle of the present invention, and these should be construed as the protection scope of the present application. Therefore, the protection scope of the present patent shall be subject to the protection scope of the claims.

Claims (10)

1. A clustered longicorn herd optimization method is characterized by comprising the following steps:
presetting parameters of a longicorn swarm algorithm, and randomly initializing a longicorn swarm according to a particle swarm strategy;
performing clustering analysis on the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
acquiring the intra-cluster optimal position of each longicorn cluster, and acquiring the cluster optimal weight corresponding to the intra-cluster optimal position;
searching the optimal position of each longicorn individual of the longicorn population, and updating the individual moving speed of the longicorn according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual;
updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals, and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
and comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the population optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, if so, stopping the iterative update of the longicorn population, and otherwise, entering the iterative update of the longicorn population by the next wheel.
2. The method for optimizing a clustered longicorn population according to claim 1, wherein the step of performing cluster analysis on the longicorn population by using a clustering algorithm to obtain longicorn clusters with a specific number comprises:
determining the optimal K value of a K-means clustering algorithm by adopting a contour coefficient method;
performing K-means cluster analysis on the longicorn population according to the optimal K value to obtain longicorn clusters with specific numbers; the particular number is consistent with the optimal K value.
3. The method of claim 1, wherein the step of obtaining an intra-cluster optimal position of each longicorn cluster and obtaining a cluster priority weight corresponding to the intra-cluster optimal position comprises:
calculating individual fitness value of each longicorn in each longicorn cluster, and taking the individual position of the longicorn corresponding to the minimum value of the individual fitness value of each longicorn as the optimal position in the cluster;
determining the cluster priority weight of each cluster internal optimal position according to the positive and negative distribution conditions of the fitness value corresponding to each cluster internal optimal position, wherein the cluster priority weight is expressed as:
Figure FDA0003096553000000021
in the formula, the set K comprises a set of K optimal positions in clusters; x is the number ofjJ is more than or equal to 1 and less than or equal to K and is the optimal position in the cluster of the jth longicorn cluster in the set K; w (x)j) Corresponding cluster priority weight to the optimal position in the jth cluster; f (x)j) The fitness value of the optimal position in the jth cluster is obtained; y ismaxThe maximum value of the fitness value of the optimal position in all the clusters in the set K.
4. The method for optimizing a clustered longicorn herd according to claim 1, wherein the step of obtaining the optimal position of each longicorn individual of the longicorn herd by searching and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual comprises the following steps:
calculating different searching position adaptability values of each longicorn individual, and taking the position of the longicorn individual corresponding to the minimum value of the different searching position adaptability values as the optimal position of each longicorn individual;
updating the individual moving speed of the longicorn according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual according to the following formula:
Figure FDA0003096553000000022
ω=ωmax-(ωmaxmin)*t/Max_iter
c0=d1+1.2*(cos(t*π)/Max_iter)
c1=d2-1.2*(cos(t*π)/Max_iter)
in the formula, t and Max _ iter are respectively the current iteration times and the maximum iteration times; s is the S-th dimension in the S-dimensional solution space;
Figure FDA0003096553000000031
respectively determining the moving speed of the longicorn individual, the position of the longicorn individual and the optimal position of the longicorn individual in the s-dimensional space of the ith longicorn of the t iteration;
Figure FDA0003096553000000032
and wjRespectively performing the ith iteration, the jth intra-cluster optimal position and the cluster optimal weight corresponding to the intra-cluster optimal position; ω is the inertial weight, where ω isminAnd ωmaxRespectively is the minimum value and the maximum value of the initial preset inertia weight; c. C0And c1Respectively an individual learning factor and a social learning factor; d1And d2Is a constant value of r0And r1Are all [0,1]Random vector in between.
5. The method for optimizing a cluster longicorn herd according to claim 1, wherein the step of updating the position increment of the longicorn individual according to the movement speed of the longicorn individual and the step of updating the position of each longicorn individual in the longicorn herd according to the movement speed of the longicorn individual and the position increment of the longicorn individual comprises the following steps:
updating the position of the left whisker of the longicorn individual and the position of the right whisker of the longicorn individual according to the moving speed of the longicorn individual and the position of the longicorn individual and the following formulas:
Figure FDA0003096553000000033
in the formula (I), the compound is shown in the specification,
Figure FDA0003096553000000034
and
Figure FDA0003096553000000035
the positions of the left beard and the right beard of the longhorn beetle are respectively the position of the left beard and the position of the right beard of the longhorn beetle;
Figure FDA0003096553000000036
respectively determining the position and the moving speed of the longicorn individual in the s-dimensional space of the ith longicorn in the t iteration; dtThe distance between the left and right whiskers of the t-th iteration longicorn;
updating the position increment of the longhorn beetle individual according to the moving speed of the longhorn beetle individual, the position of the left whisker of the longhorn beetle individual and the position of the right whisker of the longhorn beetle individual according to the following formula:
Figure FDA0003096553000000037
δt+1=η*δt
dt=δt/c
η=δmin*(δmaxmin)(1/(1+10*t/Max_iter))
in the formula (I), the compound is shown in the specification,
Figure FDA0003096553000000038
position increment of the ith longicorn in the s-dimensional space for the t +1 iteration; deltatFor the t-th iteration of the longicorn movement step, deltaminAnd deltamaxRespectively setting the minimum value and the maximum value of the initial preset longicorn moving step length;
Figure FDA0003096553000000039
in the s-dimensional space for the ith longicorn in the t-th iterationThe moving speed; sign (·) is a sign function; eta is an adaptive variable related to the current iteration time t and the maximum iteration time Max _ iter; c is [0,2 ]]A constant of (d);
Figure FDA0003096553000000041
and
Figure FDA0003096553000000042
respectively representing the adaptability value of the left beard of the longhorn beetle individual and the adaptability value of the right beard of the longhorn beetle individual;
updating the position of the longicorn individual according to the movement speed of the longicorn individual and the position increment of the longicorn individual and the following formula:
Figure FDA0003096553000000043
where t represents the current iteration number and S represents the S-th dimension in the S-dimensional solution space.
Figure FDA0003096553000000044
And
Figure FDA0003096553000000045
respectively determining the movement speed and position increment of the longicorn individual in the s-dimensional space of the ith longicorn of the tth iteration; alpha is a weight coefficient between the moving speed of the longicorn individual and the position increment of the longicorn individual.
6. The method for optimizing a clustered longicorn herd according to claim 1, wherein the step of comparing the fitness values before and after the update of the longicorn herd to update the individual optimal position and the population optimal position of each longicorn comprises:
calculating the individual fitness value of each longicorn of the updated longicorn population;
comparing the fitness value of each celestial cow individual with the fitness value of the optimal position of each celestial cow individual before updating, and updating each celestial cow individual position corresponding to the smaller value of the fitness values to be the optimal position of each celestial cow individual;
and obtaining the optimal position of the group according to the minimum value of the fitness values of the optimal positions of all the longicorn individuals.
7. The method for optimizing a clustered longicorn population according to claim 1, wherein the step of determining whether the current iteration number has reached a preset maximum iteration number, and if so, stopping the iterative update of the longicorn population, otherwise, entering the iterative update of the next set of longicorn population comprises:
and if the current iteration times do not reach the preset maximum iteration times, clustering analysis is carried out on the longicorn population again by adopting a clustering algorithm, and the next iteration is started until the preset maximum iteration times are reached, and the iteration is stopped.
8. A clustered longicorn herd optimization system, the system comprising:
the initialization module is used for presetting skynet herd algorithm parameters and randomly initializing a skynet herd according to a particle swarm strategy;
the clustering module is used for carrying out clustering analysis on the longicorn population by adopting a clustering algorithm to obtain longicorn clusters with specific numbers;
the cluster priority calculation module is used for acquiring the intra-cluster optimal position of each longicorn cluster and obtaining a cluster priority weight corresponding to the intra-cluster optimal position;
the speed updating module is used for searching and obtaining the optimal position of each longicorn individual of the longicorn population, and updating the moving speed of the longicorn individual according to the optimal position in the cluster, the cluster priority weight and the optimal position of each longicorn individual;
the population updating module is used for updating the position increment of the longicorn individuals according to the movement speed of the longicorn individuals and updating the positions of the longicorn individuals of the longicorn population according to the movement speed of the longicorn individuals and the position increment of the longicorn individuals;
and the group optimization calculation module is used for comparing the fitness values before and after the update of the longicorn population, updating the individual optimal position and the group optimal position of each longicorn, judging whether the current iteration number reaches the preset maximum iteration number, stopping the iterative update of the longicorn population if the current iteration number reaches the preset maximum iteration number, and otherwise, entering the iterative update of the next wheel set of the longicorn population.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110617692.4A 2021-06-02 2021-06-02 Clustering longicorn herd optimization method, system, computer equipment and storage medium Pending CN113255873A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110617692.4A CN113255873A (en) 2021-06-02 2021-06-02 Clustering longicorn herd optimization method, system, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110617692.4A CN113255873A (en) 2021-06-02 2021-06-02 Clustering longicorn herd optimization method, system, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113255873A true CN113255873A (en) 2021-08-13

Family

ID=77186332

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110617692.4A Pending CN113255873A (en) 2021-06-02 2021-06-02 Clustering longicorn herd optimization method, system, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113255873A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946429A (en) * 2021-11-03 2022-01-18 重庆邮电大学 Kubernetes Pod scheduling method based on cost benefit
CN113985922A (en) * 2021-11-10 2022-01-28 浙江建德通用航空研究院 Unmanned aerial vehicle hierarchical path planning method under multi-target constraint
CN117115754A (en) * 2023-10-23 2023-11-24 贵州省种畜禽种质测定中心 Intelligent duck shed monitoring method based on computer vision

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113946429A (en) * 2021-11-03 2022-01-18 重庆邮电大学 Kubernetes Pod scheduling method based on cost benefit
CN113985922A (en) * 2021-11-10 2022-01-28 浙江建德通用航空研究院 Unmanned aerial vehicle hierarchical path planning method under multi-target constraint
CN113985922B (en) * 2021-11-10 2023-11-17 浙江建德通用航空研究院 Unmanned aerial vehicle hierarchical path planning method under multi-target constraint
CN117115754A (en) * 2023-10-23 2023-11-24 贵州省种畜禽种质测定中心 Intelligent duck shed monitoring method based on computer vision
CN117115754B (en) * 2023-10-23 2023-12-26 贵州省种畜禽种质测定中心 Intelligent duck shed monitoring method based on computer vision

Similar Documents

Publication Publication Date Title
Chiroma et al. Bio-inspired computation: Recent development on the modifications of the cuckoo search algorithm
CN113255873A (en) Clustering longicorn herd optimization method, system, computer equipment and storage medium
CN108108762B (en) Nuclear extreme learning machine for coronary heart disease data and random forest classification method
Feng et al. A novel intelligence algorithm based on the social group optimization behaviors
CN112052948B (en) Network model compression method and device, storage medium and electronic equipment
Nadimi-Shahraki et al. A systematic review of the whale optimization algorithm: theoretical foundation, improvements, and hybridizations
Cao et al. A PSO-based cost-sensitive neural network for imbalanced data classification
Zadeh et al. An efficient metamodel-based multi-objective multidisciplinary design optimization framework
Zhang et al. A novel fuzzy hybrid quantum artificial immune clustering algorithm based on cloud model
Mai et al. RETRACTED ARTICLE: Research on semi supervised K-means clustering algorithm in data mining
Qiu et al. A fuzzy rough set approach to hierarchical feature selection based on Hausdorff distance
Yao et al. Clustering of typical wind power scenarios based on K-means clustering algorithm and improved artificial bee colony algorithm
Li et al. Adaptive dimensional learning with a tolerance framework for the differential evolution algorithm
Wang et al. Cooperative velocity updating model based particle swarm optimization
CN114912195A (en) Aerodynamic sequence optimization method for commercial vehicle
Han et al. An efficient genetic algorithm for optimization problems with time-consuming fitness evaluation
Hu et al. An enhanced hybrid seagull optimization algorithm with its application in engineering optimization
Li et al. Boost particle swarm optimization with fitness estimation
CN109934344A (en) A kind of multiple target Estimation of Distribution Algorithm of improved rule-based model
Sun et al. An evolutionary many-objective algorithm based on decomposition and hierarchical clustering selection
Yang et al. Efficient resource-aware neural architecture search with dynamic adaptive network sampling
Davarynejad et al. Accelerating convergence towards the optimal pareto front
CN111860755A (en) Improved particle swarm algorithm based on regression of support vector machine
Ma et al. Multi-spatial information joint guidance evolutionary algorithm for dynamic multi-objective optimization with a changing number of objectives
Zhang et al. A meta-heuristic feature selection algorithm combining random sampling accelerator and ensemble using data perturbation

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210813