Firefly Algorithm Applied to Integer Programming Problems
Total Page:16
File Type:pdf, Size:1020Kb
Recent Advances in Mathematics Firefly Algorithm Applied to Integer Programming Problems Nebojsa BACANIN, Ivona BRAJEVIC, Milan TUBA Faculty of Computer Science Megatrend University Belgrade Bulevar umetnosti 29, N. Belgrade SERBIA [email protected], [email protected], [email protected], Abstract: - Firefly algorithm is a recently added member of the swarm intelligence heuristics family. In this paper the firefly algorithm is adjusted and applied to integer programming problems. In order to deal with integer programming problems, firefly algorithm rounds the parameter values to the closest integer after producing new solutions. The performance of firefly algorithm is tested on seven problems widely used in the literature. Artificial bee colony algorithm is also implemented for comparison with the results of the firefly algorithm. Experimental results show that the firefly algorithm proved to be superior in almost all tested problems. Key-Words: - Firefly algorithm, Optimization metaheuristics, Integer programming, Swarm intelligence 1 Introduction Delaunay triangulation of the free configuration Linear programming optimization can find optimal space [3] are also solvable by integer programming solution to problems with hundreds of thousands of method. The entire class of problems referred to as constraints and variables. Modeling strength and sequencing, scheduling and routing is inherently solvability makes linear programming technique integer programs. This class of problems might for applicable in real life problems. Integer example deal with the scheduling of students and programming is a form of mathematical classrooms in such a way that the number of optimization program where some or all employed students who cannot take their first choice of classes variables are required to have integer values. This is minimized [2]. method adds additional constraints to linear There are many variants of integer programming programming. This change increases the number of methods. In pure integer programming problems, all problems that can be modeled, but also makes the variables are integers. These problems can be models more difficult to solve [1]. One interesting formulated as follows: aspect of integer programming is that two similar minimize f(x), x F Zn (1) formulations of the same problem can produce different computational results – one formulation where F is the feasible region of the search space, can quickly converge to the optimal solution, while and Z is the set of integer values. One instance of the other may take long time to solve the problem in integer programming programs, where the integer hand [1]. variables can be only 0 or 1 is called binary integer Integer programming models arise in almost every programming [3]. There are also mixed binary area of applied mathematical programming [2]. integer programming problems where some decision Warehouse location problem deals with the variables are binary, and other variables are either tradeoffs between transportation costs and general integer or continuous valued. operational costs of distribution centers. Capital Exact integer programming techniques such as budgeting problem refers to the assessment of long Branch and Bound or dynamic programming have term investments, such as new machinery, new high computational cost, since they explore a search plants, products, etc. VLSI (very large scale tree containing hundreds or more nodes on large- integration) circuits design problems and robot path scale real-life problems [4]. On the other side planning problems with variables taken from heuristic methods can be used for solving integer programming problems. Swarm intelligence metaheuristics [5], among which ant colony This research is supported by Ministry of Education and optimization [6], [7], artificial bee colony Science, Republic of Serbia, Project No. III-44006 ISBN: 978-1-61804-158-6 143 Recent Advances in Mathematics optimization [8], [9], [10] and cuckoo search [11] 3. The brightness of a firefly is affected or are prominent and were used successfully for determined by the landscape of the objective similar problems. Heuristics typically have function to be optimized. polynomial computational complexity, but they do not guarantee that the optimal solution will be The attractiveness of the firefly and the movement captured. In order to solve integer programming towards the attractive firefly are two significant problems, the most of heuristics truncate or round points in the firefly algorithm. Suppose there are n the real valued solutions to the nearest integer fireflies and that xi corresponds to the solution for values. Particle swarm optimization (PSO) firefly i. The brightness of the firefly i, is associated algorithm, inspired by the social behavior of birds or with the objective function f (xi ) . The brightness I fishes and artificial bee colony (ABC) algorithm, of a firefly is chosen to reveal its recent position of based on honey bee foraging behavior were its fitness value or objective function f (x) : successfully applied in solving integer programming problems [5], [6], [14]. Ii f (xi ) (2) Firefly Algorithm (FA) is a very promising recent developed metaheuristic algorithm inspired by the The less bright (attractive) firefly is attracted and flashing behavior of fireflies [15]. The basic firefly moved to the brighter one. At the source, the algorithm is proposed to solve unconstrained brightness is higher than at some distant point. Also, optimization problems. There are object-oriented the brightness decreases while environment absorbs software implementations [16], as well as the light while it is travelling. Therefore the parallelized versions for unconstrained optimization attractiveness of firefly is relative. Therefore, it problems of the FA [17]. Since its invention will vary with the distance between firefly i and different variants of FA have been developed and firefly j. In addition it should be allowed the used in many practical fields [18], [19], [20]. In this attractiveness to vary with the degree of absorption paper, firefly algorithm is applied to integer because light intensity decreases with the distance programming problems. The performance of the from its source, and light is also absorbed in the proposed firefly algorithm was compared with those media. It is known that the light intensity I(r) of ABC algorithm. varies following the inverse square law: This paper is organized as follows. Section 2 presents firefly algorithm. A brief description of I ABC is provided in Section 3. Section 4 describes I(r) 0 (3) r 2 seven benchmark problem formulations. Section 5 presents the experimental setup adopted and where I 0 represents the light intensity at the source. provides an analysis of the results obtained from our The combined effect the inverse square law and empirical study. Our conclusions and some possible absorption can be approximated using the following plans for future research are provided in Section 5. Gaussian form: 2 Firefly algorithm r2 I(r) I0e (4) The Firefly algorithm proposed by Xin-She Yang is based on the idealized behavior of the flashing As a firefly’s attractiveness is proportional to the characteristics of fireflies [15]. These flashing light intensity seen by adjacent fireflies, the characteristics can be summarized by the following attractiveness function of the firefly is established three rules: by: 1. All fireflies are unisex so that one firefly will be 2 (r) e r (5) attracted to other fireflies regardless of their sex. 0 2. Attractiveness is proportional to firefly where is the firefly attractiveness value at r = 0 brightness. For any couple of flashing fireflies, 0 the less bright one will move towards the and is the media light absorption coefficient. brighter one. The brightness decreases when the Fireflies movement is based on the principles of distance between fireflies is increased. The attractiveness: when firefly j is more attractive than brightest firefly moves randomly, because there firefly i the movement is determined by the is no other bug to attract it. following equation: ISBN: 978-1-61804-158-6 144 Recent Advances in Mathematics 2 rij Initialize algorithm's parameters , , xik xik 0 e (xik x jk ) (6) 1 while (t <MaxGeneration) S k randik 2 for i = 1 : n for j = 1 : i where k 1,2,..., D (D is dimension of problem). In if ( ( ) ){move firefly i towards j} Eq. (6) third term is randomization term where xi [0,1], S are the scaling parameters and Obtain attractiveness which varies with k distance r via exp[- r] by Eq.(5) rand is random number between 0 and 1. In our ik firefly algorithm employed for integer programming Move firefly i towards j in all D dimensions by Eq.(6) problems, as in the version of FA proposed to solve structural optimization problems [19], it was found Evaluate and update the new solution that the solution quality can be improved by end if reducing the randomization parameter with a end for j geometric progression reduction scheme similar to end for i the cooling schedule of simulated annealing which can be described by: Reduce the randomization parameter by Eq.(7) t Rank the fireflies and find the current best 0 (7) end while where 0 1 is the reduction factor of randomization. In addition, the scaling parameters in all D dimensions are determined by: 3 Artificial bee colony algorithm In ABC algorithm the colony of artificial bees S k uk lk (8) consists of three groups of bees: employed bees, onlookers and scouts Error! Reference source not where and are the lower and upper bound of found.. The number of the employed bees is equal the parameter xik . to the number of food sources and an employed bee is assigned to one of the sources. The employed Distance r between fireflies i and j is obtained by ij bees search the food around the food source in their Cartesian distance form by: memory and also they share their food information with onlookers. The onlookers tend to select good D 2 food sources from those founded by the employed rij xi,k x j,k (9) bees and then they calculate a new solution from the k1 selected food source.