Improving optimization using adaptive algorithms

,


INTRODUCTION
In research works, logistic problems are solved many times, which are not only nonlinear, but discrete, some are non-continuous, and cannot be represented in diagrams, only with matrix forms.In one of previous research, the problem of adaptive optimization has been employed using evolutionary programming in the optimization of large-scale maintenance systems [1].If the optimization problem is complex, it is hard to find the global minimum or maximum [2,3].In this paper, the firefly algorithm has been applied to a logistic problem with a large variable count.The firefly algorithm is a swarm-based heuristic algorithm presented by Xin-She Yang [4], inspired by the mating behavior of fireflies.The firefly algorithm based on three rules: All fireflies are attracted by each other; Attractiveness is proportioned by brightness, the less brilliant move towards the brighter one; If there is no more luminous firefly than the selected one, that will move randomly in the state space.
Code 1. Pseudo-code of the firefly algorithm, (on the basis of [4]) The firefly algorithm has several control parameters, for example, the absorption coefficient, the randomization control factor, and the firefly population size.The values of these control parameters significantly affect the quality of the achieved solution and the efficiency of the algorithm.It is a problem depends on selecting suitable control parameters for the actual algorithm.Hard to deal with complex issues with many local optima where the most algorithms are trapped.Although it is highly important, there is no consistent methodology for determining the control parameters of the applied firefly algorithm variant.Mostly, the settings are fixed throughout many experiments or set arbitrarily within some predefined ranges [5].

THE PROBLEM
The problem to be optimized is a supply chain optimization problem based on the olive oil production by the company Taris ¸in Turkey described in [6].The whole problem cannot be described within the framework of this article, so the core function ( 1) is needed to be optimized here.The main objective function is the profit maximization, as in many other cases: where p i is the product price; c ik is the transportation cost; Y ik is the produced quantity; oc is the oil cost (1 L); oil i is the required oil quantity; pc i is the packaging cost; X is the total produced quantity of the given packaging unit; t 3 toil is the transportation cost of the oil used; and the constraints are: The total produced quantity must less than the entire amount required (1); the oil used must less than the total oil available (2); the amount provided for each region must be less than the required quantity of the given region (3); and the variables must be integers (5), (6).
In the model 10 packaging units (p), and 13 regions (r) have been used, so the matrix (Y) to be optimized, which is the produced quantity matrix, will contain 130 variables.

DISTANCE AND MOVEMENT
In the research, the swarm methods like the Particle Swarm Optimization (PSO) [7] and the Firefly Algorithm (FA) [8] are very often used; both of them are common and widely used to solve a wide range of problems.However, until now they were not used for a large number of variables.The firefly algorithm is working well with various test functions, a lot of general problems [9], but how it performs on a large variable count problem.
The first problem was the discrete nature of the problem.The original firefly algorithm was developed to optimize continuous problems and not just continuous problems, but problems where the directions have meaning, so the moving toward have meant so that the fireflies can move toward each other.Thus, the first task was to define the distance of the fireflies and define the movement function.In some articles, they followed that way [10,11].The distance of two fireflies (F1, F2) is: where F1 and F2 are the two fireflies whose distance we want to define; y ik is the decision variable the manufactured quantity of the packaging unit i in the region k.
The movement function is: executed on every matrix element, where b ¼ e −g*r , gamma was set to 1; a 5 range 0.05 randomization component where the range is the range of interpretation, in this case, it was a set to 30,000 as the upper limit of the decision variables.When there is no brighter firefly the firefly moves randomly: First, the random movement parameter has been fixed, which was selected by guesswork; the firefly count was 5.All runs were done in an average office computer, a 1st generation Intel Core I7-870 processor, 6 GB RAM, the algorithm was programmed in C# .NET and all the test runs were limited 10 min.The first run, with the usual parameters, as mentioned in the literature [6], gave the following result.
Figure 1 shows the convergence of the solution.In the figure, it is visible when the algorithm jumps out in a local optimum, and the function does not start to flatten during the limited 10 min of the run.The best fitness value was: 11579252.39.

MODIFIED RANDOM MOVEMENT WITH SELF-ADAPTIVE VALUES
The random movement function (9) moves that firefly, which is not moved in the actual iteration because there was no brightest firefly than him.Several parameters have been tried instead of the first guess ±50 value in the random movement function; the increase was slight.Then a proportional equation has been used where the random movement is proportional to the actual value therefore, the random movement will adapt to the scale of the actual problem.
The proportional value equation is the following: The algorithm was run at different proportional values (n) (Table 1).These values show that the target function value is not improved after it reached the 25,000 dividers, because the highest value of the product matrix is about 30,000 so the 25,000 and the 50,000 gives the same random movement value of 1.This modified firefly algorithm with this method of here its brightness improves.So, we generate N random movement variants and choose the best solution; if the solution improves the solution, the firefly will move in that  direction, if not, it will stay there.In this case, this firefly program acts as an elitist entity algorithm, because its value does not change; it will go unmodified to the next generation of the fireflies.Several proportional numbers have been tried: the 5, 10, 50, 100, 500 and 1,000 random solutions and selected the best; which has the minimum value of the objective function.Do not forget that the running time is limited, so higher cycle number (N) results in a lower iteration count.Experimental runs have been carried out for all proportional values.The results (Table 2) show that the modified random movement improved the solution in every case.The higher randomization values were better to avoid the local optima or jump out if stuck in a local optimum, but it cannot be too big, because it moves in the state space too far.The best solution was at ±y F1 ik =100 and N 5 500, but a lot of other values are close to this solution.This method also greatly improved the convergence (Fig. 2); the difference can be noticed compared to Fig. 1.

ADAPTIVE FIREFLY COUNT
Another critical parameter of the algorithm is the firefly count, which is constant in standard algorithms.The main idea was to improve the search power of the algorithm when the convergence was starting to flatten.So, it was decided to use a simple adaptive method to increase the firefly count.If there is no increase in the global optimum, then the algorithm adds new random initialized fireflies to the state space, Code 2.  This improved method has been tested with N 5 1, 5, 10 new additional fireflies combined with the self-adaptive random movement method.Table 3 shows the solution.The improvement percentage based on Table 2 improved values with modified random movement and the firefly count at the end of the limited run.According to the results, there is a slight improvement in the results using this method, but at two values/5 and/5,000, there are some minor negative values where the improved method failed.The additional firefly count is a good indicator of the continuous convergence.If it is small it shows that the result gets better and better in every iteration, like at the /5,000 case where the result is worse than the other values, but the firefly count is smaller, so the function has a slow but continuous convergence in the calculated time window.

CONCLUSIONS
In this article, some improvement methods have been shown, which have been extensively tested on a large-scale logistic problem, and the combination of these methods has been checked.In discrete logistic problems, where lots of decision variables exist, it is essential to determine the distance metric and the movement function or functions.However, these functions are not precisely specified when to use them and the use of which one from the available variety is appropriate, usually the most straightforward and fastest functions have been used.Several distance metrics can be used, and the movement in most cases in huge state space has to be defined by one or occasionally more matrices, which makes the task even more complicated.These choices can significantly affect the quality of the solution.Because heuristics are used, it is not sure, if the global optimum reached or not and whether the selected movement function for the actual problem is useful or not.The applied improvement methods can help, whether the firefly algorithm or other heuristic methods have been used, and their combination also can be used.Still, it needs serious testing, to determine which helps a lot, and which improves a little and which method did not work in this case.
ObjecƟve funcƟon f(x), x=(x1,……, Xd) T A general iniƟal populaƟon of fireflies xi (i=1,2,…….., n) Light intensity Ii at xi is determined by f(xi) Define light absorpƟon coefficient γ while (t < MaxGeneraƟon) for i = 1 : n all n fireflies for j = 1 :n all n fireflies (inner loop) if (Ii < Ij), Move firefly I towards j; end if Vary aƩracƟveness with distance r via exp[-γ r] Evaluate new soluƟons and update light intensity end for j end for i Rank the fireflies and find the current global best g* end while Postprocess results and visualizaƟon Pollack Periodica 16 (2021) 1, 14-18

Fig. 1 .
Fig. 1.The target function, firefly algorithm first run without any adjustment

Table 1 .
Proportional values at random movement

Table 2 .
Modified random movement with proportional movement (best values are marked)

Table 3 .
Improvement on the initial solution with adaptive firefly count