Abstract
The non-unicost Set Covering Problem is a well-known NP-hard problem with many practical applications. In this work, a new approach based on Binary Firefly Algorithm is proposed to solve this problem. The Firefly Algorithm has attracted much attention and has been applied to many optimization problems. Here, we demonstrate that is also able to produce very competitive results solving the portfolio of set covering problems from the OR-Library.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
The Set Covering Problem (SCP) is a class of representative combinatorial optimization problem that has been applied to many real world problems, such as crew scheduling in airlines [1], facility location problem [2], and production planning in industry [3]. The SCP is a well-known NP-hard in the strong sense [4]. Many algorithms have been developed to solve it has been reported to literature. Exact algorithms are mostly based on branch-and-bound and branch-and-cut [5, 6]. However, these algorithms are rather time consuming and can only solve instances of very limited size. For this reason, many research efforts have been focused on the development of heuristics to find good or near-optimal solutions within a reasonable period of time. Classical greedy algorithms are very simple, fast, and easy to code in practice, but they rarely produce high quality solutions for their myopic and deterministic nature [7]. An improved greedy algorithm by incorporating randomness and memory into it and obtained promising results [8]. Compared with classical greedy algorithms, heuristics based on Lagrangian relaxation with subgradient optimization are much more effective. The most efficient ones are those proposed in [9, 10]. As top-level general search strategies, metaheuristics were also applied to the SCP. An incomplete list of this kind of heuristics for the SCP includes genetic algorithm [11], simulated annealing algorithm [12], tabu search algorithm [13], evolutionary algorithms [14], ant colony optimization (ACO) [15], electromagnetism (unicost SCP) [16], gravitational emulation search [17] and cultural algorithms [18]. A deeper comprehension of most of the effective algorithms for the SCP can be found in [19].
In this paper, a new approach based on Binary Firefly Algorithm for the SCP is presented. Firefly Algorithm (FA) is a recently developed, population-based metaheuristic [20, 21]. So far, it has been shown that firefly algorithm is very efficient in dealing with multimodal, global optimization problems. For a deeper comprehension of review of firefly advances and applications please refer to [22, 23]. Researches on FA for SCP have not been seen to date.
This paper is organized as follows: In Sect. 2, we formally describe the SCP. The Sect. 3, we present the overview of FA. The description of the proposed approach is described in Sect. 3. In Sect. 5, we present experimental results obtained when applying the algorithm for solving the 65 instances different of SCP. Finally, in Sect. 6 we conclude the paper.
2 Problem Description
The Set Covering Problem (SCP) can be formally defined as follows. Let A = (a ij ) be an m-row, n-column, zero-one matrix. We say that a column j covers a row i if a ij = 1. Each column j is associated with a nonnegative real cost c j . Let I = {1, …, m} and J = {1, …, n} be the row set and column set, respectively. The SCP calls for a minimum cost subset S ⊆ J, such that each row i ∊ I is covered by at least one column j ∊ S. A mathematical model for the SCP is
subject to
The goal is to minimize the sum of the costs of the selected columns, where x j = 1 if the column j is in the solution, 0 otherwise. The restrictions ensure that each row i is covered by at least one column.
3 Overview of Firefly Algorithm
Nature-inspired methodologies are among the most powerful algorithms for optimization problems. The Firefly Algorithm (FA) is a novel nature-inspired algorithm inspired by the social behavior of fireflies. By idealizing some of the flashing characteristics of fireflies, a firefly-inspired algorithm was presented in [20, 21]. The pseudo code of the firefly-inspired algorithm was developed using these three idealized rules:
-
All fireflies are unisex and are attracted to other fireflies regardless of their sex.
-
The degree of the attractiveness of a firefly is proportional to its brightness, and thus for any two flashing fireflies, the one that is less bright will move towards the brighter one. More brightness means less distance between two fireflies. However, if any two flashing fireflies have the same brightness, then they move randomly.
-
Finally, the brightness of a firefly is determined by the value of the objective function. For a maximization problem, the brightness of each firefly is proportional to the value of the objective function and vice versa.
As the attractiveness of a firefly is proportional to the light intensity seen by adjacent fireflies, we can now define the variation of attractiveness β with the distance r by
where β 0 is the attractiveness at r = 0. The distance r ij between two fireflies is determined by
where x i k is the kth component of the spatial coordinate of the ith firefly and d is the number of dimensions. The movement of a firefly i is attracted to another more attractive (brighter) firefly j is determined by
where x ij is the firefly position of the next generation. \(x_{i}^{t}\) and \(x_{j}^{t}\) are the current position of the fireflies and \(x_{i}^{t + 1}\) is the ith firefly position of the next generation. The second term is due to attraction. The third term introduces randomization, with α being the randomization parameter and “rand” is a random number generated uniformly but distributed between 0 and 1. The value of γ determines the variation of attractiveness, which corresponds to the variation of distance from the communicated firefly. When γ = 0, there is no variation or the fireflies have constant attractiveness. When γ = 1, it results in attractiveness being close to zero, which again is equivalent to the complete random search. In general, the value of γ [20, 21] is in between [0, 10].
4 Description of the Proposed Approach
In this section, the FA is proposed to solve the SCP using binary representation.
-
Step 1
Initialize the firefly parameters (γ, β 0, size for the firefly population and the maximum number of generation, for the termination process).
-
Step 2
Initialization of firefly position. Initialize randomly M = [X 1; X 2; …; X m ] of m solutions or firefly positions in the multi-dimensional search space, where m represents the size of the firefly population. Each solution of X is represented by the d-dimensional binary vector.
-
Step 3
Evaluation of fitness of the population. For this case the function of fitness is equal to the objective function SCP (Eq. 1).
-
Step 4
Modification of firefly position. A firefly produces a modification in the position based on the brightness between the fireflies. The new position is determined by modifying the value (old firefly position) using Eq. 6 for each dimension of a firefly. The result of the new component of the firefly, is probable to be a real number, to fix this, apply a threshold of 0 and 1. If \(x_{p}^{\prime}\) is greater than the threshold, it is very likely to choose 1, otherwise 0. The threshold level can be made to range from 0 to 1, and in order to achieve this a tanh function is used as given in [24].
-
Step 5
The new solution is subjected to an evaluation, if is not a feasible solution generated then is repaired. To make feasible solution is to determine which rows have not yet been covered and choose the columns needed for coverage. The search for these columns is based in: cost of a column/number of rows not covered that cover the column j. Once the solution has become feasible applies optimization step to eliminate those redundant columns. A redundant column is that if removed, the solution remains feasible.
-
Step 6
Memorize the best solution achieved so far. Increment the generation count.
-
Step 7
Stop the process and display the result if the termination criteria are satisfied. Termination criteria used in this work are the specified maximum number of generations. Otherwise, go to step 3.
5 Experiments and Results
The performance of Binary Firefly Algorithm was evaluated experimentally using 65 SCP test instances from OR-Library of Beasley [25]. These instances are divided into 11 groups and each group contains 5 or 10 instances. Table 1 shows their detailed information where “Density” is the percentage of non-zero entries in the SCP matrix. The algorithm was coded in C in the development environment NetBeans 7.3 with support for C/C++ and run on a PC with a 1.8 GHz Intel Core 2 Duo T5670 CPU and 3.0 GB RAM, under Windows 8 system.
In all experiments, the Binary Firefly Algorithm is executed 50 generations, and 30 times each instance. This number was determined by the rapid convergence to a local optimal closest to global optimum. We used a population of 25 fireflies. The parameters γ, β 0 are initialized to 1. These parameters were selected empirically after a large number of tests and showed good results but may not be optimal for all instances.
Table 2 shows the results obtained of the 65 instances. Column “Optimum” reports the optimal or the best known solution value of each instance. Columns “Min. value found”, “Max. value found” and “Average” reports the minimum, maximum, and average of the best solutions obtained in the 30 executions.
In the Fig. 1 shows the evolution of mean best values for the instances 4.1, 4.2 and 4.3, which shows the rapid convergence of cost minimization.
6 Conclusions
As can be seen from the results obtained, the metaheuristic behaves of good way in almost all instances, with the first set columns instances between 1,000 and 2,000, there is a mean cost difference of 54 between the global optimum with the best optimum obtained, and starts to decrease. With a set of columns in 5,000, Firefly behaves very well coming to have a difference of 2 with respect to the best known solution value (NRF.2). This paper has demonstrated the Binary Firefly Algorithm is a valid alternative to solve the SCP, being that its main use is for continuous domains.
An interesting research direction to pursue in future work about the integration of autonomous search in the solving process, which in many cases has demonstrated excellent results [26–29].
References
Housos, E., Elmoth, T.: Automatic optimization of subproblems in scheduling airlines crews. Interfaces 27(5), 68–77 (1997)
Vasko, F.J., Wilson, G.R.: Using a facility location algorithm to solve large set covering problems. Oper. Res. Lett. 3(2), 85–90 (1984)
Vasko, F.J., Wolf, F.E.: Optimal selection of ingot sizes via set covering. Oper. Res. 35(3), 346–353 (1987)
Garey, M.R., Johnson, D.S.: Computers and Intractability: A Guide to the Theory of NP-Completeness. W. H. Freeman & Co, New York (1990)
Balas, E., Carrera, M.C.: A dynamic subgradient-based branch-and-bound procedure for set covering. Oper. Res. 44(6), 875–890 (1996)
Fisher, M.L., Kedia, P.: Optimal solution of set covering/partitioning problems using dual heuristics. Manage. Sci. 36(6), 674–688 (1990)
Chvatal, V.: A greedy heuristic for the set-covering problem. Math. Oper. Res. 4(3), 233–235 (1979)
Lan, G., DePuy, G.W.: On the effectiveness of incorporating randomness and memory into a multi-start metaheuristic with application to the set covering problem. Comput. Ind. Eng. 51(3), 362–374 (2006)
Ceria, S., Nobili, P., Sassano, A.: A Lagrangian-based heuristic for large-scale set covering problems. Math. Program. 81(2), 215–228 (1998)
Caprara, A., Fischetti, M., Toth, P.: A heuristic method for the set covering problem. Oper. Res. 47(5), 730–743 (1999)
Beasley, J.E., Chu, P.C.: A genetic algorithm for the set covering problem. Eur. J. Oper. Res. 94(2), 392–404 (1996)
Brusco, M.J., Jacobs, L.W., Thompson, G.M.: A morphing procedure to supplement a simulated annealing heuristic for cost- and coverage-correlated set-covering problems. Ann. Oper. Res. 86, 611–627 (1999)
Caserta, M.: Tabu search-based metaheuristic algorithm for large-scale set covering problems. In: Doerner, K., Gendreau, M., Greistorfer, P., Gutjahr, W., Hartl, R., Reimann, M. (eds.) Metaheuristics. Vol. 39 of Operations Research/Computer Science Interfaces Series, pp. 43–63. Springer, US (2007)
Crawford, B., Lagos, C., Castro, C., Paredes, F.: A evolutionary approach to solve set covering. In: Cardoso, J., Cordeiro, J., Filipe, J. (eds.) In: Proceedings of the 9th International Conference on Enterprise Information Systems (ICEIS '07), Vol. AIDSS, pp. 356-363. Funchal, Portugal. 12-16 June 2007
Ren, Z.G., Feng, Z.R., Ke, L.J., Zhang, Z.J.: New ideas for applying ant colony optimization to the set covering problem. Comput. Ind. Eng. 58(4), 774–784 (2010)
Naji-Azimi, Z., Toth, P., Galli, L.: An electromagnetism metaheuristic for the unicost set covering problem. Eur. J. Oper. Res. 205(2), 290–300 (2010)
Balachandar, S.R., Kannan, K.: A meta-heuristic algorithm for set covering problem based on gravity. J. Comput. Math. Sci. 4, 223–228 (2010)
Crawford, B., Soto, R., Monfroy, E.: Cultural algorithms for the set covering problem. In: Tan, Y., Shi, Y., Mo, H. (eds.) ICSI (2). Vol. 7929 of Lecture Notes in Computer Science, pp. 27–34. Springer, Berlin (2013)
Caprara, A., Toth, P., Fischetti, M.: Algorithms for the set covering problem. Ann. Oper. Res. 98, 353–371 (2000)
Yang, X.S.: Nature-Inspired Metaheuristic Algorithms. Luniver Press, UK (2008)
Yang, X.S.: Firefly algorithms for multimodal optimisation, In: Proceedings of the 5th International Conference on Stochastic Algorithms: Foundations and Applications. SAGA’09, pp. 169–178. Springer, Berlin (2009)
Fister, I., Fister Jr, I., Yang, X.S., Brest, J.: A comprehensive review of firefly algorithms. Swarm Evol. Comput. 13, 34–46 (2013)
Yang, X.S., He, X.: Firefly Algorithm: Recent Advances and Applications. The Computing Research Repository, abs/1308.3898 (2013)
Chandrasekaran, K., Sishaj, P.S., Padhy, N.P.: Binary real coded firefly algorithm for solving unit commitment problem. Inf. Sci. 249, 67–84 (2013)
Beasley, J.E.: A Lagrangian heuristic for set covering problems. Naval Res. Logistics 37(1), 151–164 (1990)
Crawford, B., Soto, R., Monfroy, E., Palma, W., Castro, C., Paredes, P.: Parameter tuning of a choice-function based hyperheuristic using particle swarm optimization. Expert Syst. Appl. 40(5), 1690–1695 (2013)
Soto, R., Crawford, B., Monfroy, E., Bustos, V.: Using autonomous search for generating good enumeration strategy blends in constraint programming. In: Proceedings of the 12th International Conference on Computational Science and Its Applications (ICCSA). Vol. 7335 of LNCS, pp. 607–617. Springer (2012)
Crawford, B., Soto R., Montecinos M., Castro C., Monfroy, E.: A framework for autonomous search in the eclipse solver. In: Proceedings of the 24th International Conference on Industrial Engineering and Other Applications of Applied Intelligent Systems (IEA/AIE). Vol. 6703 of LNCS, pp. 79–84. Springer (2011)
Crawford, B., Soto R., Castro C., Monfroy, E.: Extensible CP-based autonomous search. In: Proceedings of HCI International. Vol. 173 of CCIS, pp. 561–565. Springer (2011)
Acknowledgements
The author B. Crawford is supported by Grant CONICYT/FONDECYT/REGU- LAR/1140897. The author R. Soto is supported by Grant CONICYT/FON- DECYT/INICIACION/11130459. The author F. Paredes is supported by Grant CONICYT/FONDECYT/REGULAR/1130455.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Crawford, B., Soto, R., Olivares-Suárez, M., Paredes, F. (2014). A Binary Firefly Algorithm for the Set Covering Problem. In: Silhavy, R., Senkerik, R., Oplatkova, Z., Silhavy, P., Prokopova, Z. (eds) Modern Trends and Techniques in Computer Science. Advances in Intelligent Systems and Computing, vol 285. Springer, Cham. https://doi.org/10.1007/978-3-319-06740-7_6
Download citation
DOI: https://doi.org/10.1007/978-3-319-06740-7_6
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-06739-1
Online ISBN: 978-3-319-06740-7
eBook Packages: EngineeringEngineering (R0)