ACO-AFSA Algorithm in Function Optimization and Its Application

. ACO and AFSA as two kinds of new intelligent bionic algorithm, has better robustness, and the design method is simple and easy to understand. At present, in many engineering fields, they have been a pivotal position, but there are some defects in solving function optimization problems. Because of the lack of pheromone in the initial stage of ACO, the speed of the solution is relatively slow, and AFSA has the advantages of strong global convergence ability and fast speed. In this paper, based on the advantages and disadvantages of ACO and AFSA, two kinds of algorithms are integrated, and the advantage is enhanced, a better optimization algorithm is put forward: ACO-AFSA. The initial solution and improved state transition probabilities are obtained by AFSA, and the basic ACO is improved, the congestion degree of AFSA is introduced in the algorithm, makes most of ants’ initial optimization will not be randomly selected at a strong crowding restrictions. Experimental results show that the new algorithm can get the optimal solution with less number of iterations, which greatly saves computation time, and has higher accuracy and better convergence performance. Engineering, computing the shortest distance between the surface and plane of the problem has also been good results, the experimental results are satisfactory.


Introduction
Optimization of the 21st century, most of the combination is computer and mathematical theory, when it comes to mathematics, most of the issues will relate to the function.In many fields, many problems are solved by mathematical modelling.This requires professional staff to optimize the function, so that the results can achieve the best, so as to find out the optimal solution to the problem.The optimization is to "take the essence, to its dregs".The optimization of the function problem is as follows: Given a function ( ) F x , the domain is D and range is R.  Y ).The traditional optimization algorithm of the function itself requires more things.For example, the function can be satisfied with the derivative, also can differentiate, etc.In recent years, many scholars have been inspired by the behaviour of many kinds of creatures in nature, and the bionic optimization algorithm is applied to function optimization.Zhao Hui [1] uses distributed artificial bee colony algorithm for solving function optimization problems, makes the outer layer sub-bee colony can quick search.Zhang Yuli [2] uses the GSO algorithm to solve the problem of function optimization, fixed step size and motion mechanism, increase the self discovery mechanism of firefly by using the value of smaller decision range.Chen Liang, Lu Houqing [3] uses the cuckoo algorithm to achieve self adaptive adjustment, improve the performance of the continuous function optimization problem.Ye Wen [4] use the technique of memory operator, restrain operator and recombination operator to simulate the optimization problem of multi peak function, the optimization effect is obvious.Zhang Xinming [5] improves its local search capabilities, more effective find the global optimal solution for the low dimensional complex functions.But the single bionic optimization algorithm is more complex, and still has many shortcomings.
Therefore, in many bionic algorithms, select the ant colony algorithm and artificial fish swarm algorithm, according to their respective advantages and disadvantages, two kinds of algorithms are integrated, the advantages of the disadvantages are complementary, and the advantage of the algorithm is enhanced.The authors propose a better optimization algorithm ACO-AFSA.The initial solution and improved state transition probabilities are obtained by AFSA, and the basic ACO is improved, the congestion degree of AFSA is introduced in the algorithm, in the initial optimization, the majority of ants are not randomly selected by the strong crowding degree.Experimental results show that the new algorithm can get the optimal solution with less number of iterations, which greatly saves computation time, and has higher accuracy and better convergence performance.Engineering, computing the shortest distance between the surface and plane of the problem has also been good results, the experimental results are satisfactory.swarm algorithm

Ant colony algorithm
Colony is also called ant colony optimization, the earliest proposed is by the Italy Dorgio and its research team in early 1990s [6,7].Since then, the algorithm has been concerned by many scholars and experts, and has been systematically studied by many people.The basic model of ant colony algorithm is as follows: Ants from position i to j , at the beginning, the path node can be chosen for Initially, the ants number are m ; the information inspire factor is D , relative importance of the trajectory of representation, reflecting the ants in motion the process of accumulation of pheromones in ants sports role, D is larger, the greater the probability description ants choose this path back; inspired desired factor is E , indicating the relative importance of visibility, reflecting the ants during exercise in inspiration factor D importance in the whole path; pheromone evaporation coefficient is U , is a constant, represents the weight; the number of iterations for c N , and have a tabu list.Initialization set I , select the starting point S and the destination point F , let the ants start walking at the starting point S .Ants from i to j of the probability are , Otherwise 0.
Among them, 1 ( ) distance from i to j , ij W expresses the pheromone, every time the ant k is transferred, the node j is added to the tabu list until all the ants in the loop reach the destination, each ant is calculated by taking the path length at the finish line, saved.Update pheromone is ; in formula when an ant k from i through j , ( )

Artificial fish swarm algorithm
In 2002, Dr. Li Xiaolei proposed a new bionic optimization algorithm by simulating four kinds of behavior of fish in water--Artificial fish swarm algorithm [8,9].The algorithm provides a top-down design idea.Starting from the individual, shoal of fish was observed, the local optimization of the individual in the fish stocks reached the final global optimization.The basic idea of artificial fish swarm algorithm is: In a space, there are N artificial fish, they form a group, and the state of one of the artificial fish is 1 2 ( , , , ), 1,2 , . The food concentration of artificial fish is used as the fitness value of the objective function, a single fish state as optimization variables, the adaptation value can be obtained by the optimization variable, that is Y f X .The distance of artificial fish i X and . Congestion factor is G , it indicates the degree of congestion near.Congestion formula is 2 ( ) . Artificial fish can feel the range is visual, according to the behavior of other fish in the perception range, the direction of movement is determined.The step size of the artificial fish was step, and the number of the feeding process was try-number.

Fusion of ant colony algorithm and artificial fish swarm algorithm
The parameters of artificial fish swarm algorithm are more, but the influence of the number of artificial fish and the congestion factor on the performance of the algorithm is not obvious.The global search ability of artificial fish swarm algorithm is very strong, and the search speed is fast, but when it encounters a flat search range, search speed will become slow, the search ability will be weakened and easy to fall into local optimum in the flat area, which can not get the real optimal solution.Ant colony algorithm has better robustness, parallelism, and many other advantages.But the basic ant colony algorithm has less pheromonen in the early period of the initial period, resulting in the slow speed of searching for the search optimization, according to their respective advantages and disadvantages, two kinds of algorithms are integrated, the advantages of the disadvantages are complementary, and the advantage of the algorithm is enhanced.The author propose a better optimization algorithm ACO-AFSA.The steps of the algorithm are as follows: Step 1: Ant colony initialization settings.
Step 2: The artificial fish swarm algorithm is used to initialize the individual optimal state.
Step 3: The direction of the movement of ants from position i to position j is determined by the concentration of pheromone.
Step 4: The artificial fish swarm algorithm is introduced to calculate the congestion degree of the current ant on the path.If it is not crowded, the ants continue to walk on the path.Otherwise, select a path to walk in the feasible range.
Step 5: Updated information element ij W .
Step 6: Do not change the initialization settings, repeat the Step 3 -Step 5, when all ants choose the same path as the path to find the optimal solution.
Step 7: Output results.Ant colony algorithm and artificial fish swarm algorithm are swarm intelligence algorithm, when the function is optimized, the crowding degree of the fish swarm algorithm is put into the ant colony algorithm, if the number of ants in a path beyond the allow crowded range, even if this path pheromone concentration is high, ants do not choose this path to walk, but in the vicinity to elect a path walk.Such an approach can avoid the local optimal solution in the initial stage of the ant colony algorithm, and then improve the algorithm's ability to find the optimal results and the accuracy of the results.The detailed flow chart of the ant colony algorithm is shown in Figure 1.

Numerical experiments
In order to further prove the combination of the two algorithms can make the effect better, the result is better, in this paper, the author uses the standard test function in the literature [10].Because of the limited time, only four functions are tested.Four functions are: ( sin 0.5 ( ) 0.5 1 0.001( ) Use Windows 7 operating system, Matlab 7.0 simulation platform for testing.Set the parameters as follows: D =1.0, E =5.0, U =0.55, the number of ants is 60, congestion factor is G =0.62.The algorithm runs 30 times continuously, the global minimum and the number of iterations are used as the standard.The results of the tests are shown in Table 1.

Examples of application
The shortest distance of free surface to plane is a common problem in geometric modeling.The traditional algorithms are often dependent on the form of the surface and the plane, and the robustness is not strong.In this paper, the fusion algorithm is applied to the analysis of the shortest path in the surface to the plane, and can find the optimal solution, and the calculation process is very simple.Take the surface  2 is the shortest distance between the coordinate points.Figure 2 is an initial set of paths.Figure 3 is the global optimal solution for the path group approximation.

Conclusion
The two basic algorithms have shortcomings in solving function optimization problems.Fusion algorithm in solving this problem is very easy to make up the shortcoming of the single algorithm stagnation.Through numerical experiments, we can see that the convergence and convergence speed of the algorithm can be improved by the fusion algorithm, so that the optimal value can be obtained in the case of less iteration number, and the convergence of the algorithm is still 100%.In addition, the fusion algorithm has some effect on the shortest path analysis of engineering application surface to the plane, and can find the optimal solution, and the calculation process is very simple.In this paper, the advantages of the two basic algorithms are enhanced, make up two basic algorithms of their respective shortcomings.For function optimization problems, the convergence speed and accuracy of the algorithm is better than the basic algorithm, and in engineering application, the experimental results are satisfactory.

StartFigure 1 .
Figure 1.Flow chart of ACO-AFSA as an example.Find the shortest distance coordinate and the shortest distance.The shortest distance is 0.2571.Table

Figure 2 .
Figure 2. Initial set path group

Figure 3 .
Figure 3. Global optimal solution of the path group

Table 1 .
Comparison of simulation results

Table 2 .
The shortest distance points coordinate