A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling
Authors: Ousmane Tom Bechir, Adán José-García, Zaineb Chelly Garcia, Vincent Sobanski, Clarisse Dhaenens
Organizations: Univ. Lille, CNRS, Inria, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France · Univ. Lille, Inserm, CHU Lille, U1286 – INFINITE, Lille, France · Institut Universitaire de France (IUF), Paris, France
Several real-world optimization problems involve mixed-variable search spaces, where continuous, ordinal, and categorical decision variables coexist. However, most population-based metaheuristic algorithms are designed for either continuous or discrete optimization problems and do not naturally handle heterogeneous variable types. In this paper, we propose an adaptation of the Firefly Algorithm for mixed-variable optimization problems (FAmv). The proposed method relies on a modified distance-based attractiveness mechanism that integrates continuous and discrete components within a unified formulation. This mixed-distance approach enables a more appropriate modeling of heterogeneous search spaces while maintaining a balance between exploration and exploitation. The proposed method is evaluated on the CEC2013 mixed-variable benchmark, which includes unimodal, multimodal, and composition functions. The results show that FAmv achieves competitive, and often superior, performance compared with state-of-the-art mixed-variable optimization algorithms. In addition, experiments on engineering design problems further highlight the robustness and practical applicability of the proposed approach. These results indicate that incorporating appropriate distance formulations into the Firefly Algorithm provides an effective strategy for solving complex mixed-variable optimization problems.
Figures & tables
Category
Function ID
Function Name
Continuous
Separable
Symmetric
Optimum
Unimodal
F1
Sphere Function
✔
✔
✔
-1400
F2
Rotated High Conditioned Elliptic Function
✔
✕
✔
-1300
F3
Rotated Bent Cigar Function
✔
✕
✕
-1200
F4
Rotated Discus Function
✔
✕
✕
-1100
F5
Different Powers Function
✔
✔
✔
-1000
Multimodal
F6
Rotated Rosenbrocks Function
✔
✕
✕
-900
Table 1: The 28 benchmark functions from CEC 2013 and their main characteristics. The presence or absence of a property is indicated by ✔or ✕, respectively. Continuous denotes functions defined over continuous domains; separable indicates that the objective can be decomposed into independent contributions per variable; symmetric refers to invariance under permutation or sign changes of variables.
Variable
Description
Domain
ds
Shell thickness (discrete variable)
multiple of 0.0625
dh
Head thickness (discrete variable)
multiple of 0.0625
r
Inner radius of the pressure vessel
10≤r≤200
L
Length of the cylindrical section
10≤L≤200
Constraints
g1(x)
−ds+0.0193r≤0
Table 2: Mathematical formulation of the Pressure Vessel design problem.
Variable
Description
Domain
x1
Weld thickness
continuous
x2
Weld length
continuous
x3
Beam height
continuous
x4
Beam thickness
continuous
Constraints
g1(x)
τ(x)−τmax≤0
Table 3: Mathematical formulation of the Welded Beam design problem.
Variable
Description
Domain
d
Wire diameter
continuous, d≥0.2
D
Mean coil diameter
continuous, D≤3.0
N
Number of active coils
discrete
Constraints
g1(x)
πd38CfPmaxD−S≤0
g2(x)
δmax+1.05(N+2)d−Lfree≤0
Table 4: Mathematical formulation of the Coil Spring design (CSD) problem.
Figure 1: Overall performance of MVO-based methods on CEC benchmark functions: baseline algorithms (left) and FA-based variants (right). The x-axis shows the number of results statistically similar to the best, and the y-axis shows the number of best results. Algorithms in the top-right achieve the best performance. See Tables 5 and 7 for details.
Function
Statistic
PSOmv
DEmv
GA
FA
FAmv H
FAmv H∗
FAmv G
FAmv G∗
Unimodal functions (F1–F5)
F1
Mean
1.19e+04
5.76e+02
1.93e+03
1.71e+05
4.81e+02
4.47e+02 *
5.16e+02
4.79e+02
STD
3.03e+03
2.13e+02
4.95e+02
1.92e+04
5.60e+01
8.43e+01 *
5.69e+01
7.92e+01
F2
Mean
3.87e+08
3.31e+08
1.25e+08
7.10e+09
2.43e+07 *
2.92e+07
3.08e+07
3.46e+07
STD
1.26e+08
4.92e+07
3.04e+07
1.98e+09
5.69e+06 *
8.08e+06
8.63e+06
8.99e+06
F3
Mean
1.49e+11
4.77e+09
2.39e+10
1.60e+21
1.63e+09 *
2.07e+09
2.25e+09
4.14e+09
Table 5: Performance of the mixed-variable optimization methods evaluated on the 28 CEC benchmark functions. Performance is evaluated in terms of the absolute error (AE). The best value (lowest average) is indicated with (*), whereas statistically similar results are highlighted in bold .
Figure 2: Performance in terms of the absolute error (the lower the better) scored by the seven mixed-variable optimization methods on the CEC benchmark for the unimodal functions .
Figure 3: Performance in terms of the absolute error (the lower the better) scored by the seven mixed-variable optimization methods on the CEC benchmark for the multimodal functions .
Figure 4: Performance in terms of the absolute error (the lower the better) scored by the seven MVO methods on composite functions in the CEC benchmark.
Function
PSOmv
DEmv
GA
FAmv H
FAmv G
BEAM
0.85 ± 0.30
0.51 ± 0.18
1.11 ± 0.64
0.49 * ± 0.18
0.51 ± 0.27
CSD
1.13 ± 0.05
1.08 * ± 0.03
1.74 ± 0.81
1.18 ± 0.05
1.18 ± 0.06
Vessel
6363.68 ± 1978.77
4331.97 ± 2040.48
2724.67 ± 2055.74
4283.55 ± 2164.54
1903.08 * ± 2090.71
Table 6: Performance of MVO methods on the three engineering design problems, measured by the absolute error (AE). The best value (lowest) is indicated with (*), and statistically similar results are highlighted in bold .
Figure 5: Performance of MVO methods on the three engineering design problems (BEAM, CSD, and Vessel), measured by absolute error (top) and convergence curves (bottom). Lower values indicate better performance.
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 6: The influence of the control parameter k on the probability function pα presented in Section 3.2
Figure 7: Convergence curves of the MVO methods on unimodal functions in the CEC benchmark.
Figure 8: Convergence curves of the MVO methods on multimodal functions in the CEC benchmark.
Figure 9: Convergence curves of the MVO methods on composite functions in the CEC benchmark.
Func.
Statistic
FA
FAmv G
FAmv Gα
FAmv Gαγ
FAmv Gγ
FAmv GD
FAmv H
FAmv Hα
FAmv Hαγ
FAmv Hγ
F1
Mean
1.71e+05
5.16e+02
4.35e+02 *
4.79e+02
5.53e+02
6.42e+02
4.81e+02
4.47e+02
4.90e+02
5.31e+02
STD
1.92e+04
5.69e+01
7.08e+01 *
7.92e+01
6.57e+01
7.28e+01
5.60e+01
8.43e+01
7.80e+01
6.28e+01
F2
Mean
7.10e+09
3.08e+07
3.77e+07
3.46e+07
3.09e+07
4.89e+07
2.43e+07
2.92e+07
2.55e+07
2.30e+07 *
STD
1.98e+09
8.63e+06
1.25e+07
8.99e+06
6.51e+06
1.86e+07
5.69e+06
8.08e+06
7.25e+06
4.64e+06 *
F3
Mean
1.60e+21
2.25e+09
5.10e+09
4.14e+09
2.84e+09
3.68e+09
1.63e+09 *
2.07e+09
2.09e+09
2.12e+09
STD
3.08e+21
1.23e+09
5.22e+09
4.55e+09
1.07e+09
1.66e+09
5.47e+08 *
8.97e+08
9.82e+08
1.00e+09
Appendix
Table 7: Performance of the FA-based variants evaluated on the 28 CEC benchmark functions. Performance is evaluated in terms of the absolute error (AE). The best value (lowest average) is indicated with (*), whereas statistically similar results are highlighted in bold .
Figure 10: Performance scored by the FA-based variants on the CEC benchmark for the unimodal functions .
Figure 11: Performance scored by the FA-based variants on the CEC benchmark for the multimodal functions .
Figure 12: Performance scored by the FA-based variants on the CEC benchmark for the composition functions .
Figure 13: Convergence curves of the FA-based variants on unimodal functions in the CEC benchmark.
Figure 14: Convergence curves of the FA-based variants on multimodal functions in the CEC benchmark.
Figure 15: Convergence curves of the FA-based variants on composition functions in the CEC benchmark.
Large-scale multi-objective optimization problems (LSMOPs) are challenging due to their high-dimensional decision spaces. Fuzzy search is an effective technique for improving search efficiency, while decision variable analysis can reveal the distinct roles of variables in promoting convergence and maintaining diversity. However, existing fuzzy search methods generally employ a uniform search granularity for all variables, overlooking the heterogeneous search requirements implied by variable roles. To address this limitation, this paper proposes a Decision variable analysis-guided Differentiated Fuzzy Search method, termed DDFS. The proposed method establishes an explicit mapping between decision-variable roles and fuzzy search granularities. Decision variable analysis is employed to identify variable roles and search sensitivities, enabling different variable groups to adopt differentiated fuzzy search behaviors during offspring generation. Furthermore, a Dual-Indicator Stage Transition Mechanism is developed to dynamically adjust fuzzy-updating intensity throughout the evolutionary process, balancing early-stage search-space compression and late-stage convergence refinement. Extensive experiments on the LSMOP and UF benchmark suites with up to 1000 decision variables show that DDFS generally achieves competitive performance against several representative large-scale multi-objective evolutionary algorithms. The results suggest that explicitly incorporating decision-variable roles into fuzzy search can help improve optimization performance in high-dimensional decision spaces.
Boxi Xiao, Hui Bai, Jinhua Zheng +2
Key Laboratory of Hunan Province for Internet of Things and Information Security, Xiangtan University, Xiangtan 411105, China, and also with the Key Laboratory of Intelligent Computing and Information Processing, Ministry of Education, Xiangtan University, Xiangtan 411105, China
Mixed categorical-continuous optimization arises in many practical domains, yet remains challenging. In the black-box setting, evolution strategy-based approaches have shown promise in extending the efficiency and robustness of the CMA-ES to mixed-variable spaces. However, these methods exhibit worsened performance when strong categorical-continuous interactions are present, as their underlying search distributions assume independence between categorical and continuous variables. To address this limitation, we propose a bilevel optimization framework that explicitly captures such interactions by optimizing over categorical variables in an outer loop, and over continuous variables conditioned on each categorical configuration in an inner loop. We formulate each level of the bilevel problem as a stochastic relaxation under information-geometric optimization. To mitigate the high computational cost inherent to bilevel optimization, we introduce a warm-starting strategy that accelerates the lower-level search by selecting the best among multiple cached configurations and updating the cache after each iteration. Experimental results on binary-continuous domain demonstrate that the proposed method outperforms existing state-of-the-art approaches in interaction-handling capability while also being more computationally efficient across benchmarks encompassing both previously reported and newly proposed types of interaction.
Marc Ong, Shinichi Shirakawa, Youhei Akimoto
University of Tsukuba, Tsukuba, Japan · Yokohama National University, Yokohama, Japan · RIKEN Center for Advanced Intelligence Project, Tokyo, Japan
This paper presents the constrained Hybrid Metaheuristic (cHM) algorithm as a general framework for continuous optimisation. Unlike many existing metaheuristics that are tailored to specific function classes or problem domains, cHM is designed to operate across a broad spectrum of objective functions, including those with unknown, heterogeneous, or complex properties such as non-convexity, non-separability, and varying smoothness. We provide a formal description of the algorithm, highlighting its modular structure and two-phase operation, which facilitates dynamic adaptation to the problem's characteristics. A key feature of cHM is its ability to harness synergy between both candidate solutions and component metaheuristic strategies. This property allows the algorithm to apply the most appropriate search behaviour at each stage of the optimisation process, thereby improving convergence and robustness. Our extensive experimental evaluation on 28 benchmark functions demonstrates that cHM consistently matches or outperforms traditional metaheuristics in terms of solution quality and convergence speed. In addition, a practical application of the algorithm is demonstrated for a feature selection problem in the context of data classification. The results underscore its potential as a versatile and effective black-box optimiser suitable for both theoretical research and practical applications.
Piotr A. Kowalski, Szymon Kucharczyk, Jacek Mańdziuk
Faculty of Physics and Applied Computer Science, AGH University of Krakow, al. A. Mickiewicza 30, 30-059 Cracow, Poland. · Systems Research Institute, Polish Academy of Sciences, ul. Newelska 6, 01-447 Warsaw, Poland. · AGH Doctoral School, AGH University of Krakow, al. A. Mickiewicza 30, 30-059 Cracow, Poland. +2