Paper deep dive
A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling
Ousmane Tom Bechir, Adán José-García, Zaineb Chelly Garcia, Vincent Sobanski, Clarisse Dhaenens
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 96%
Last extracted: 3/31/2026, 1:31:03 AM
Summary
The paper introduces FAmv, an adaptation of the Firefly Algorithm (FA) designed for mixed-variable optimization problems (MVOPs). It addresses the challenge of heterogeneous search spaces (continuous, ordinal, and categorical variables) by proposing a hybrid distance-based attractiveness mechanism (using Euclidean-Hamming or Gower distance) and a type-aware movement mechanism that decouples continuous and discrete updates. The method is evaluated on the CEC2013 benchmark and engineering design problems, demonstrating competitive performance.
Entities (5)
Relation Signals (3)
FAmv → isadaptationof → Firefly Algorithm
confidence 100% · In this paper, we propose an adaptation of the Firefly Algorithm for mixed-variable optimization problems (FAmv).
FAmv → evaluatedon → CEC2013
confidence 95% · The proposed method is evaluated on the CEC2013 mixed-variable benchmark
FAmv → uses → Gower distance
confidence 95% · We consider the Gower distance... to measure similarity between data points with heterogeneous variable types.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract: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.
Tags
Links
- Source: https://arxiv.org/abs/2603.26792v1
- Canonical: https://arxiv.org/abs/2603.26792v1
Trouble viewing inline? Open PDF directly →
Full Text
80,949 characters extracted from source content.
Expand or collapse full text
A FIREFLY ALGORITHM FOR MIXED-VARIABLE OPTIMIZATION BASED ON HYBRID DISTANCE MODELING PREPRINT Ousmane Tom Bechir 1 , Adán José-García 1,2,‡ , Zaineb Chelly Garcia 1,2 ,Vincent Sobanski 2,3 , andClarisse Dhaenens 1 1 Univ. Lille, CNRS, Inria, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France 2 Univ. Lille, Inserm, CHU Lille, U1286 – INFINITE, Lille, France 3 Institut Universitaire de France (IUF), Paris, France ‡ Corresponding author: adan.josegarcia@univ-lille.fr ABSTRACT 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 Algo- rithm 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 het- erogeneous search spaces while maintaining a balance between exploration and exploitation. The proposed method is evaluated on the CEC2013 mixed-variable benchmark, which includes uni- modal, multimodal, and composition functions. The results show that FAmv achieves competitive, and often superior, performance compared with state-of-the-art mixed-variable optimization algo- rithms. In addition, experiments on engineering design problems further highlight the robustness and practical applicability of the proposed approach. These results indicate that incorporating ap- propriate distance formulations into the Firefly Algorithm provides an effective strategy for solving complex mixed-variable optimization problems. Keywords Firefly Algorithm· Mixed-Variable Optimization· Metaheuristics. 1 Introduction Optimization plays a key role across many domains, including energy systems, logistics, healthcare, and finance [2]. Real-world optimization problems often involve different types of decision variables, including continuous, discrete, and categorical variables. Such problems, commonly referred to as mixed-variable optimization problems (MVOPs), introduce additional challenges for modeling and computation [25]. While classical mathematical programming can solve some structured problems, many real-world cases are nonconvex, large-scale, or too complex to solve directly [3]. In such cases, metaheuristic algorithms offer a flexible and robust alternative. Among them, nature-inspired meta- heuristics such as the Firefly Algorithm (FA) [28] have demonstrated good performance across a wide range of appli- cations, including engineering design optimization, energy management, and parameter tuning [7]. However, despite their success across many application domains, most metaheuristics were originally developed for either continuous or discrete problems (e.g., PSO, DE, GA) [13, 24, 19], making their direct application to mixed- variable optimization problems nontrivial. In particular, FA [28] was originally designed for continuous optimization, relying on a distance-based attractiveness mechanism defined using Euclidean distance, which does not naturally extend to heterogeneous variable types. As a result, its standard formulation is not well-suited to mixed-variable problems and requires more appropriate representations and interaction mechanisms. arXiv:2603.26792v1 [cs.NE] 25 Mar 2026 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling Relaxation and discretization strategies are frequently used to adapt optimization algorithms for mixed-variable or discrete optimization problems. For instance, Gandomi et al. [9] applied the classical FA to mixed-variable opti- mization using a relaxation approach, while in [12], a discretized FA variant was proposed for the travelling salesman problem (TSP). Conversely, algorithms originally developed for discrete optimization are often extended to continu- ous or mixed-variable settings via discretization, such as the genetic algorithm (GA) [19], a widely used evolution- ary algorithm that typically relies on binary encoding. These approaches, however, exhibit several limitations. In relaxation-based methods, discrete variables are embedded in a continuous space and subsequently mapped back us- ing rounding or integer operators, which may lead to precision loss and suboptimal solutions. Similarly, discretization strategies may fail to adequately capture the structure of categorical variables. In the case of FA, existing adaptations remain limited to specific variable types (e.g., integer variables) and do not naturally extend to fully heterogeneous search spaces, including categorical variables. To the best of our knowledge, a general and unified adaptation of FA for mixed-variable optimization remains limited in the literature. In this context, we propose an adaptation of FA for MVOPs based on type-aware movement mechanisms. Specif- ically, we extend the distance metric used in the attractiveness computation to combine continuous and discrete com- ponents. In addition, the random movement phase is modified to handle categorical variables, ensuring that candidate solutions remain valid within their respective domains. Furthermore, a parameter adaptation strategy is introduced to regulate the exploration–exploitation trade-off during the search process. These modifications enable efficient explo- ration of mixed-variable search spaces while preserving solution feasibility and precision. The main contributions of this paper are as follows. First, we propose a type-aware adaptation of the FA for mixed-variable optimization. Second, we introduce mixed-distance formulations, including Euclidean–Hamming and Gower-based measures, to model interactions between solutions in heterogeneous search spaces. Third, we incorporate a parameter adaptation strategy to regulate the exploration-exploitation trade-off during the optimization process. Finally, we provide an experimental evaluation on synthetic and real-world mixed-variable optimization problems, including an ablation study that investigates the contribution of each component. 2 Related Work 2.1 Mixed-Variable Optimization Problem A mixed-variable optimization problem (MVOP) involves heterogeneous decision variables within a single optimiza- tion framework. The goal is to find a candidate solution that minimizes the objective function. We can formulate the problem as follows: min x∈Ω f(x) Where Ω is the search space, and f is the objective function. When the search space Ω is heterogeneous, the decision vector can be expressed as: X = (x (c) ,x (d) ) where x c ∈R n c represents the continuous component and x d denotes the discrete component, which may include integer, binary, or categorical variables. 2.2 The Firefly Algorithm The Firefly Algorithm (FA) is a population-based metaheuristic inspired by the flashing behavior of fireflies, where each firefly represents a candidate solution in the search space [28]. The algorithm assumes that all fireflies are unisex and attracted to one another. The attractiveness of the firefly is proportional to its brightness, and it decreases with distance. The brightness of a firefly is determined by the landscape of the objective function. The main FA’s steps are explained below, whereas its pseudo-code 1 is summarized later in Algorithm 2. Let us consider a population of N firefliesX i N i=1 . The attractiveness between two fireflies X i and X j (i ̸= j) in a continuous space is defined as in [28]: β(r i,j ) = β 0 e −γr 2 i,j (1) where β 0 is the attractiveness at r = 0, γ is the light absorption coefficient, and r i,j denotes the distance between two fireflies, typically defined as the Euclidean distance: 1 A minimization problem is considered; for maximization problems, it suffices to minimize g = −f. 2 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling r i,j = v u u t D X k=1 X (k) j −X (k) i 2 (2) where D denotes the dimension of the problem. The movement of a firefly X i attracted to a brighter firefly X j is defined as in [28]: X i (t +1) = X i (t) +β(r i,j ) X j (t) −X i (t) +α rand − 1 2 (3) In Eq. (3), the second term represents the attraction toward brighter fireflies, while the third term introduces a random perturbation controlled by the parameter α, where rand is a random number uniformly distributed in [0,1]. 2.3 Variants of the Firefly Algorithm Several discrete versions of the Firefly Algorithm (FA) have been proposed to tackle combinatorial optimization prob- lems. For example, the Discrete FA (DFA) from [22] uses the Hamming distance instead of the traditional Euclidean distance to better capture differences in discrete solution spaces. The movement process has two phases: a β-step, based on Durkota’s discrete movement strategy [6], which attracts fireflies toward brighter ones through guided combi- natorial changes, and an α-step that introduces random changes through discrete moves. This approach helps maintain structural validity while balancing exploration and exploitation. In addition to structural changes, researchers have investigated methods to automatically adjust parameters. Fister et al. [8] introduced a memetic self-adaptive Firefly Algorithm in which control parameters adjust automatically during optimization to improve robustness and balance exploration and exploitation. In addition to discrete and parameter-adaptive versions, some methods focus on improving FA efficiency while preserving diversity. For example, the Neighborhood Enhanced FA (NEFA) [21] decreases computational cost by limiting interactions to a random subset of individuals rather than checking all pairs. In this direction, Kamran et al. [23] introduced INEFA, which incorporates clustering by grouping fireflies so they move toward those in other clusters. This helps maintain diversity, prevents early convergence, and enhances exploration. These methods are especially helpful when optimization algorithms reach the maximum number of function eval- uations quickly. We face the same challenge, which motivates us to develop more efficient search methods for mixed- variable optimization rather than only improving population interaction strategies. 2.4 Evolutionary Approaches for MVOPs Mixed-Variable Optimization Problems (MVOPs) include decision variables of various types, such as continuous, integer, and categorical. This variety makes it hard to apply standard evolutionary algorithms directly. Recently, classical metaheuristics have been extended to better handle mixed search spaces. The most straightforward approach to MVOPs using evolutionary algorithms is to consider Genetic Algorithms (GA) [19] with a binary encoding of all heterogeneous variables [18]. This unified approach simplifies operator design since standard crossover and mutation can be applied directly. However, binary encoding can introduce bias, especially when applied to continuous variables that require discretization. The precision depends on the encoding length, thereby increasing the search space and the computational cost. In this sense, specialized metaheuristic approaches to MVOPs have been proposed [17, 18, 27]. Tianjun et al. [17] proposed an extension of the Ant Colony Optimization (ACO) algorithm to work in search spaces with different types of decision variables. The proposed ACO algorithm introduced mechanisms to simultaneously explore continuous, ordinal, and categorical components. Similarly, Ying Lin et al. [18] extend Differential Evolution (DE) [24] to address mixed-variable problems (DEmv). DEmv uses a hybrid encoding: continuous variables evolve via standard mutation and crossover, while discrete or categorical variables change via specialized operators. The differences between in- dividuals depend on mutation behavior rather than on a clear measure for mixed spaces. Although DEmv retains the simplicity and power of classic DE, it doesn’t alter how different variable types interact, which may limit its ability to capture relationships among mixed types. Recently, Feng et al. [27] have extended the Particle Swarm Optimization (PSO) [13] algorithm to mixed-variable problems (PSOmv). PSOmv represents particles by a combined encoding of continuous and discrete components. Continuous variables are updated according to classical PSO rules, while dis- crete components are updated by random choices based on an elite. However, like many hybrid methods, it typically 3 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling expands classical operators without reconsidering how the population interacts or how diversity is managed in mixed- variable contexts. Furthermore, the correlation between continuous and discrete variables has also been ignored by the PSOmv reproduction methods. In the context of the economic market, Feng Wang et al. [26] addressed the newsvendor problem (maximal profit by determining the optimal order quantity of products). The authors reformulated this problem as a mixed-variable nonlinear programming problem and proposed an evolutionary model-based estimation-of-distribution algorithm that operates in mixed-variable search spaces. Finally, to the best of our knowledge, no extension of the FA has been proposed to MVOPs. Existing FA approaches address this problem partially and typically use relaxation methods [22, 23, 6], which are inapplicable to categorical variables and degrade performance as the search space complexity increases [25]. 3 Proposed Approach We propose a Firefly Algorithm for mixed-variable optimization problems, named FAmv. In this approach, a solution is represented as a structured vector comprising continuous and discrete components, with heterogeneous dimensions handled using type-specific operators. Unlike existing approaches that adapt the representation to fit classical opera- tors [15, 27], FAmv preserves the original firefly dynamics and introduces dedicated update rules for each variable type. This decoupled design allows precise control of both continuous and discrete movements while maintaining struc- tural feasibility. More specifically, the proposed approach introduces the following components: (i) a mixed-variable distance model to guide interactions between solutions, (i) a discrete movement mechanism based on probabilistic attraction and exploration, and (i) a unified interaction framework integrating continuous and discrete components within a single search process. The proposed FAmv is outlined in Algorithm 1, and each component is detailed in the following sections. 3.1 Attractiveness Modeling The original FA [28, 12] considers the Euclidean distance in Eq. (1) as a component to compute the attractiveness between fireflies, which is well-suited to numeric search spaces. However, in discrete-dimensional search spaces, the original formulation can be misleading, degrading the algorithm’s performance when exploring such heterogeneous, complex spaces. In particular, Euclidean distance does not account for the structural differences induced by categor- ical or discrete variables, which may lead to inappropriate similarity measures between candidate solutions. In this direction, we present two new strategies to better model the attraction between fireflies in heterogeneous search spaces. Attractiveness based on Hamming distance We propose a unified mixed distance that operates across both sub- spaces (numeric and discrete spaces). This distance is defined as follows: r i,j = 1 D (d E (x (c) i ,x (c) j ) +d H (x (d) i ,x (d) j ))(4) where d E is the Euclidean distance over continuous, numeric variables; d H is the Hamming distance over discrete, categorical variables; and D is the total number of dimensions. The normalization by D is introduced to ensure that the resulting distance remains bounded and comparable across problems of different dimensionalities. However, this formulation does not explicitly balance the relative contributions of continuous and discrete components, leading to different interaction behaviors depending on the scale of the variables. Attractiveness based on Gower distance We consider the Gower distance, a well-established mixed-variable met- ric widely used in cluster analysis, to measure similarity between data points with heterogeneous variable types. It is particularly well-suited to mixed-variable optimization problems, as it normalizes each variable’s contribution inde- pendently before aggregation. The Gower distance between two fireflies X i and X j is defined as follows [10]: r i,j = 1 D D X k=1 δ k i,j ,(5) where δ k i,j represents the normalized contribution of the k-th variable to the overall distance, and is defined according to the data type of the k-th variable as: 4 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling Algorithm 1: FAmv: Firefly algorithm for mixed variables 1 Randomly initialize the population of N fireflies, X 1 ,X 2 ,...,X N 2 Compute the fitness value of each firefly using f 3 Initialize the personal and global best positions and fitness values 4 t← 1 5 while t⩽ MAX_ITER do 6Update parameters α and γ if an adaptive strategy is used 7for i← 1 to N do 8updated← false 9for j← 1 to N do 10if f(X j ) < f(X i ) then 11Compute distance R i,j using Eq. (4) or Eq. (5) 12Extract the continuous components x (c) i and x (c) j from X i and X j 13Extract the discrete components x (d) i and x (d) j from X i and X j 14Compute attractiveness β(r i,j ) for the continuous position using Eq. (1) 15Compute attractiveness probability β prob (r i,j ) for the discrete position using Eq. (6) 16x (c) i ← x (c) i +β(r i,j )(x (c) j −x (c) i ) +α rand − 1 2 17Move x (d) i toward x (d) j using the β-step and α-step rules 18X i ← x (c) i ,x (d) i // combine continuous and discrete components 19Compute the fitness value of the new X i 20Update the personal and global best positions and fitness values 21updated← true 22if updated = false then 23x (c) i ← x (c) i +α rand − 1 2 // random walk in the continuous space 24Add a random walk to x (d) i using the α-step rules 25X i ← x (c) i ,x (d) i // combine continuous and discrete components 26Compute the fitness value of the new X i 27Update the personal and global best positions and fitness values 28 t← t +1 // stopping criterion can also be defined based on function evaluations (FE) δ k i,j = |x (k) i −x (k) j | range k if k is continuous, 1if k is discrete (categorical or integer), 0otherwise, if x (k) i = x (k) j , where range k denotes the range of the k-th variable. This formulation ensures that each variable contributes to the overall distance in proportion to its scale or type, leading to a more balanced interaction among heterogeneous com- ponents. Beyond their role in computing attractiveness, these two proposed distance functions directly influence the inter- action dynamics of our proposed FA framework. Since FA is inherently distance-based, the proposed mixed-distance formulations implicitly allow information exchange across continuous and discrete components during attraction. Thus, by aggregating contributions from both subspaces within a unified metric, the movement intensity reflects vari- ations occurring in either part of the solution. This unified formulation enables the attraction mechanism to jointly account for heterogeneous components when guiding the search process. We therefore hypothesize that this mecha- nism better reflects the joint influence of continuous and discrete variables, leading to more coherent search trajectories in heterogeneous landscapes. 5 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 3.2 Mixed-Variable Movement Mechanism We propose movement mechanisms for fireflies that are particularly suited to mixed-variable optimization problems. These mechanisms are introduced to ensure safe and coherent handling of heterogeneous variables. We decouple the movement mechanisms into continuous and discrete updates, allowing each variable type to be updated according to its intrinsic structure while maintaining a unified interaction process. First, for continuous variables, the update is performed identically to that in the original FA: attractiveness using Eq. (1) based on Euclidean distance, followed by the standard update rule Eq. (3). Then, for discrete variables, we propose an update mechanism (inspired by the strategy introduced in [22]) that comprises a two-phase process: a guided attraction phase (β-step) and a random exploration phase (α-step), which respectively promote exploitation and exploration in the discrete search space. β-Step Its objective is to move the discrete part of a firefly x (d) i toward a brighter firefly x (d) j . The attraction strength (r i,j ) is computed using one of the proposed distances, Eq. (4) or Eq. (5). Therefore, the attractiveness coefficient is defined as: β = exp(−γr 2 i,j )(6) This value is interpreted as the probability of exchange between the discrete components of the two interacting fireflies, thereby extending the FA attraction mechanism to discrete variables in a probabilistic manner. For each discrete dimension k, such that x (d) i,k ̸= x (d) j,k , the value of x (d) i,k may be replaced by x (d) j,k with probability β. This probabilistic replacement can be interpreted as a distance-guided discrete movement operator, where the intensity of the modification is controlled by the relative proximity between solutions. When two fireflies are close in the mixed search space, the distance r i,j tends to be small, leading to a large value of β; therefore, more discrete components are likely to be exchanged. On the contrary, when two fireflies are far apart, r i,j increases, β decreases, and, therefore, fewer discrete components are modified. Finally, discrete components that are already identical between x i and x j remain unchanged. Only differing components are subject to probabilistic exchange. α-Step The objective of the α-step is to introduce a random movement in order to promote exploration in the search space. To preserve the FA’s original dynamics, we reuse the α-step mechanism from the original work. However, in our mixed-variable setting, we divide the discrete α-step into two cases depending on the nature of the variable. This distinction is introduced to ensure that the exploration mechanism remains consistent with the variable domain’s structure. First, for integer variables defined over compact intervals (i.e., consecutive integer values), we directly adopt the perturbation mechanism used in the discrete firefly formulation. The update is defined as: x (d) i,k = INT(x (d) i,k +α·ε) ,(7) where ε is a random value sampled from a given interval. This formulation preserves local exploration by generating small perturbations around the current solution. Secondly, for discrete variables not belonging to compact integer intervals (e.g., categorical variables or integer domains with gaps), we redefine the α-step as a probabilistic random replacement mechanism, using the following function: p α = 1 1 + exp −k α − α init 2 ,(8) where k is a control hyperparameter. This formulation maps the exploration parameter α to a probability of re- placement, allowing a smooth transition between low and high exploration states. When a constant α is used, the transformation becomes: p α = 1 1 + exp −k α 2 .(9) The parameter k controls the transition behavior between exploration and exploitation. Larger values of k yield a sharper transition, whereas smaller values yield a smoother transition. Figure 6 shows the influence of k on the transition from exploration to exploitation. Using this probability, each non-compact discrete variable is randomly replaced, with probability p α , by another value sampled from its corresponding distribution, thus enabling global exploration in discrete domains where local perturbations are not meaningful. 6 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 3.3 Parameter Adaptation FA explores the search space using the parametersγ andα, for exploration and exploitation, respectively. On one hand, the parameter γ controls the decay of attractiveness. A small value leads to strong exploitation, meaning that fireflies are strongly influenced by others even at relatively large distances. Conversely, for large γ, the influence decreases rapidly with distance, thereby reducing the intensity of exploitation. On the other hand, the α parameter controls the perturbation level. Large α values introduce stronger noise in both continuous and discrete updates, leading to greater exploration. On the contrary, smaller α values reduce the magnitude (or probability) of random movements, thus limiting exploration. In the context of mixed-variable optimization, these parameters jointly regulate the interaction between continuous and discrete components, influencing how the search process balances global exploration and local refinement across heterogeneous spaces. In this work, we investigate adaptive parameter strategies for both α and γ. Their adaptation is based on infor- mation about the optimization progress. This choice is motivated by the need to dynamically balance exploration and exploitation in mixed-variable search spaces, where different variable types may require different search behaviors during the optimization process. The parameters α and γ are updated at each iteration as follows: α = max ( 0.01,α init · (1 − progress) ) ,(10) and γ = max ( 0.01,γ init · (1 − progress) ) ,(11) where progress = FE /FE max is defined as the ratio between the number of consumed function evaluations (FE) and the maximum evaluation budget (FE max ). The lower bound (0.01) is introduced to prevent the exploration level from be- coming zero, which could lead to premature convergence. This schedule ensures that a minimum level of stochasticity is maintained throughout the search process. Both parameters α and γ are therefore initialized to typical values and then progressively decreased during opti- mization. The underlying idea is to encourage stronger exploration at the beginning of the search, when the available budget is mostly unused, and to gradually increase exploitation as the algorithm approaches the maximum evaluation limit. In particular, decreasing α reduces random perturbations, while decreasing γ increases the locality of interac- tions, thereby jointly enabling a transition from global exploration to local refinement. 4 Experimental Setup In this section, we present the experimental settings used to evaluate the effectiveness of our proposed FAmv compared with three baseline algorithms. 4.1 Baseline Algorithms We considered three state-of-the-art MVO algorithms in our experiment: DEmv [15], based on differential evolution; GA [20], based on a binary-encoded genetic algorithm; and PSOmv [27], from the swarm optimization family. These algorithms were implemented according to their original papers. Four variants of our proposed FAmv algorithm are evaluated in order to investigate the impact of certain design choices: FAmv H is based on the mixed Euclidean-Hamming as defined in Eq. (4), and FAmv G is based on the Gower distance as defined in Eq. (5). In these two versions, the control parameters α and γ are fixed. Similarly, we also evaluate their respective adaptive versions, FAmv ∗ H and FAmv ∗ G , indicating that α and γ are adapted as detailed in Section 3.2. These four configurations allow us to analyze the influence of the proposed attractiveness functions and the impact of parameter adaptation separately. A detailed justification of these design choices is provided after analyzing the impact of the mixed-variable movement mechanism in FA in Section 5.3. Parameter Settings The FAmv population size was set to 25 individuals across all variants, where the attractiveness at zero distance (β 0 ) was set to 1.5. The versions FAmv H and FAmv G considered α = 1.5 and γ = 0.1. In the adaptive versions, FAmv ∗ H and FAmv ∗ G , the parameter α init starts at 2, whereas γ init starts at 0.05. For DEmv, PSOmv and GA, the population size was set to 100 individuals. In DEmv, the crossover rate C and the differential weight F are set to 0.2 as indicated in the original paper [15]. Similarly, for PSOmv, we followed the configuration settings specified in [27]. Finally, GA used the one-point crossover operator, the tournament selection mechanism, and an elitist strategy: the crossover and mutation probabilities were set to 0.9 and 0.01, respectively, and the tournament 7 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling size was three [20]. All algorithms are compared under the same function-evaluation (FE) budget, providing a fair comparison of computational cost despite differences in population sizes. 4.2 Benchmark Problems In our experiments, we used the CEC 2013 benchmark suite [16], a widely used benchmark for continuous optimiza- tion, comprising 28 mathematical functions. Additionally, we considered three engineering design problems with mixed-variable formulations of varying complexity: VESSEL [29], BEAM [4], and CSD [1]. CEC Synthetic Benchmark This benchmark suite comprises 28 continuous optimization functions [16]. The suite includes five unimodal functions, fifteen basic multimodal functions, and eight composition functions. Originally, all variables in this benchmark are continuous. Therefore, to assess the algorithms’ performance in a mixed-variable setting, we transformed the original formulation into a 50-dimensional mixed-variable search space, as in [15, 27]. Among the 50 variables, the first 25 variables remain continuous and preserve exactly the same properties, ranges, and numerical characteristics as defined in the CEC specification. The remaining 25 variables are forced to take integer values; therefore, the MVO algorithms are restricted to exploring only integer values along those dimensions. This transformation follows previous works [15, 27] and provides a controlled setting to analyze the behavior of algorithms in the presence of heterogeneous variable types. As this construction represents a synthetic mixed-variable scenario, we complement this evaluation with real mixed-variable engineering problems. The characteristics of these functions are presented in Table 1, whereas the mathematical definitions can be found in [16]. Table 1: The 28 benchmark functions from CEC 2013 and their main characteristics. The presence or absence of a characteristic is identified with✔or✕, respectively. CategoryFunction ID Function NameContinuous Separable Symmetric Optimum Unimodal F1Sphere Function✔-1400 F2Rotated High Conditioned Elliptic Function✔✕✔-1300 F3Rotated Bent Cigar Function✔✕-1200 F4Rotated Discus Function✔✕-1100 F5Different Powers Function✔-1000 Multimodal F6Rotated Rosenbrocks Function✔✕-900 F7Rotated Schaffers F7 Function✔✕-800 F8Rotated Ackleys Function✔✕-700 F9Rotated Weierstrass Function✔✕-600 F10Rotated Griewanks Function✔✕✔-500 F11Rastrigins Function✔✕-400 F12Rotated Rastrigins Function✔✕-300 F13Non-Continuous Rotated Rastrigins Function✕-200 F14Schwefel’s Function✔✕-100 F15Rotated Schwefel’s Function✔✕100 F16Rotated Katsuura Function✔✕200 F17Lunacek-Bi-Rastrigin Function✔✕300 F18Rotated Lunacek Bi-Rastrigin Function✔✕400 F19Expanded Griewanks plus Rosenbrocks Function✔✕✔500 F20Expanded Scaffers F6 Function✔✕600 Composition F21Composition Function 1 (n=5, Rotated)✔✕700 F22Composition Function 2 (n=3, Unrotated)✔✕800 F23Composition Function 3 (n=3, Rotated)✔✕900 F24Composition Function 4 (n=3, Rotated)✔✕1000 F25Composition Function 5 (n=3, Rotated)✔✕1100 F26Composition Function 6 (n=5, Rotated)✔✕1200 F27Composition Function 7 (n=5, Rotated)✔✕1300 F28Composition Function 8 (n=5, Rotated)✔✕1400 8 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling Pressure Vessel design (VESSEL) This is a four-dimensional constrained optimization problem [29]. Two variables correspond to discrete thickness parameters that must be multiples of 0.0625, while the remaining two variables are continuous. The decision vector is x = (d s ,d h ,r,L), where d s and d h denote shell and head thicknesses (discrete), and r and L represent the inner radius and the length of the cylindrical section (continuous). The objective function minimizes the total fabrication cost and is defined as: f(x) = 0.6224rd s L +1.7781d h r 2 +3.1661d 2 s L +19.84d 2 s r. The problem is subject to four inequality constraints related to stress limits, volume requirements, and geometric limitations; therefore, a penalty-based constraint-handling approach is adopted. When constraint violations occur, a large penalty term is added to the objective function. The complete mathematical formulation of the objective and constraints is summarized in Table 2. Table 2: Mathematical formulation of the Pressure Vessel design problem. VariableDescriptionDomain d s Shell thickness (discrete variable)multiple of 0.0625 d h Head thickness (discrete variable)multiple of 0.0625 rInner radius of the pressure vessel10⩽ r⩽ 200 LLength of the cylindrical section10⩽ L⩽ 200 Constraints g 1 (x)−d s +0.0193r⩽ 0 g 2 (x)−d h +0.00954r⩽ 0 g 3 (x)−πr 2 L − 4 3 πr 3 +1296000⩽ 0 g 4 (x) L −240⩽ 0 Welded Beam Design (BEAM) This is a four-dimensional constrained optimization problem involving only con- tinuous variables [4]. The objective is to minimize the fabrication cost of a welded beam subject to stress, buckling, and deflection constraints. The objective function is defined as: f(x) = 1.10471x 2 1 x 2 +0.04811x 3 x 4 (14 +x 2 ), where the variables represent: weld thickness (x 1 ), weld length (x 2 ), beam height (x 3 ), and beam thickness (x 4 ). Sev- eral nonlinear constraints are imposed, including shear stress limits, normal stress limits, geometric relations, buckling load constraints, and maximum deflection requirements. Constraint violations are handled using a penalty formula- tion that combines the violation magnitude with the number of violated constraints. The mathematical description is provided in Table 3. Coil Spring Design (CSD) This is a three-dimensional constrained optimization problem involving two continuous variables and one discrete variable [1]. The decision vector is defined as x = (d,D,N), where d is the wire diameter, D is the mean coil diameter, and N is the number of active coils. The objective function minimizes the weight of the spring and is defined as: f(x) = (N +2)d 2 D. The problem includes multiple nonlinear inequality constraints on shear stress, surge frequency, minimum de- flection, geometric ratios, and maximum allowable deflection. A penalty method is used to incorporate constraint violations into the objective value. The complete mathematical formulation is summarized in Table 4. 4.3 Evaluation Protocol The results reported in Section 5 are statistics computed from 30 independent executions for each MVO algorithm considered in our study. The performance of each algorithm is evaluated by the absolute error between the function’s theoretical optimum and the best objective value achieved by the algorithm. For the synthetic benchmark functions in the CEC2013 suite, a computational budget of 100 000 objective function evaluations (FEs) was set per execution, whereas a smaller budget of 10 000 FEs was used for the engineering design problems due to their lower dimension- ality. All algorithms were evaluated under the same FE budget per problem. In our experiments, to provide a statistical interpretation of the significance of the comparison results, we use the following statistical measures. First, the non-parametric Kruskal-Wallis test [14] is used to investigate the overall 9 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling Table 3: Mathematical formulation of the Welded Beam design problem. VariableDescriptionDomain x 1 Weld thicknesscontinuous x 2 Weld lengthcontinuous x 3 Beam heightcontinuous x 4 Beam thicknesscontinuous Constraints g 1 (x) τ(x) −τ max ⩽ 0 g 2 (x) σ(x) −σ max ⩽ 0 g 3 (x) x 1 −x 4 ⩽ 0 g 4 (x) 0.10471x 2 1 +0.04811x 3 x 4 (14 +x 2 ) −5⩽ 0 g 5 (x) 0.125 −x 1 ⩽ 0 g 6 (x) δ(x) −δ max ⩽ 0 g 7 (x) P −P c (x)⩽ 0 Table 4: Mathematical formulation of the Coil Spring design (CSD) problem. VariableDescriptionDomain dWire diametercontinuous, d⩾ 0.2 DMean coil diametercontinuous, D⩽ 3.0 NNumber of active coilsdiscrete Constraints g 1 (x) 8C f P max D πd 3 −S⩽ 0 g 2 (x) δ max +1.05(N +2)d −L free ⩽ 0 g 3 (x) 0.2 −d⩽ 0 g 4 (x)(d +D) −3.0⩽ 0 g 5 (x) 3 − D d ⩽ 0 g 6 (x) δ max −δ pm ⩽ 0 g 7 (x) δ w −δ max +δ load ⩽ 0 differences among the algorithms. Then, if significant differences are observed, the Holm correction [11] procedure is applied to control the family-wise error rate. Pairwise comparisons between algorithms were then performed using Dunn’s post-hoc test [5]. All statistical tests are conducted at a significance level of α = 0.05. 5 Results This section discusses the results of a series of experiments conducted to investigate the performance of our mixed- variable optimization algorithm, FAmv. First, Section 5.1 presents an overall evaluation of the performance and robustness of our algorithm and the baseline approaches when dealing with the CEC2013 benchmark. Then, the effectiveness of our FAmv variants in engineering design problems is studied in Section 5.2. Finally, Section 5.3 explores the impact of the main design components of FAmv through an ablation analysis. 5.1 Results on Benchmark Functions This section analyzes the results on the CEC2013 benchmark obtained by our FAmv algorithm and compares its performance with a set of mixed-variable reference approaches (see Section 4.1). The results of this comparison are summarized in Table 5 and Figure 1 (left). Figures of performance with specific results for separate problem categories are also presented: unimodal (Figures 2), multimodal (Figures 3), and composition (Figures 4) functions, providing a more detailed analysis of algorithm behavior across different landscape characteristics, and the respective convergence plots are presented in the Additional Material (Appendix B). 10 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 0.02.55.07.510.012.515.017.520.0 Number of results statistically similar to the best 0 2 4 6 8 Number of best results PSOmv DEmv GA FA FAmv H FAmv * H FAmv G FAmv * G 05101520 Number of results statistically similar to the best 0 2 4 6 8 Number of best results FA FAmv H FAmv H FAmv H FAmv H FAmv G FAmv G FAmv G FAmv G FAmv D G 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 Tables5 and 7 for details. PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 10 4 Absolute Error F1 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 8 Absolute Error F2 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 9 10 10 10 11 Absolute Error F3 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 5 6 × 10 4 2 × 10 5 Absolute Error F4 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 10 4 Absolute Error F5 Algorithm Mean PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G Figure 2: Performance in terms of the absolute error (the lower the better) scored by the seven mixed-variable opti- mization methods on the CEC benchmark for the unimodal functions. As shown in Figure 1 (left) and Table 5, FAmv H , DEmv, and GA exhibit the strongest overall performance in terms of optimality and robustness. It can be observed that the proposed FAmv variants, and particularly the FAmv H variant based on the Hamming distance, achieve lower absolute error (AE) values than the competing approaches in terms of optimality (see at the bottom of Table 5). Specifically, FAmv H obtained the best results for 7 functions (F2, F3, F4, F5, F19, F24 and F27), whereas DEmv performed better in six functions (F6, F10, F11, F13, F17 and F18) and GA in four cases (F7, F12, F22 and F25). In terms of robustness, measured as the number of functions for which an algorithm is statistically equivalent to the best, GA performed best on 17 functions, followed by DEmv and FAmv with 13 each. These overall performances in terms of optimality and robustness are shown in Figure 1(left). Unimodal functions (F1–F5). In particular, FAmv H achieves the best results on functions F2, F3, F4, and F5. These observations are also supported by the convergence curves shown in Figure 7. For functions F1 and F2, the proposed FAmv variants exhibit faster convergence and reach lower final errors than the other algorithms. Furthermore, the boxplots presented in Figure 2 illustrate the stability of the proposed approaches. Compared to other algorithms, the FAmv variants exhibit lower solution dispersion, indicating greater stability across independent runs. For functions F1 and F5, the proposed methods exhibit reduced variability, whereas for F2, F3, and F4, the Hamming-based FAmv variants maintain consistently stable performance. 11 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. FunctionStatisticPSOmvDEmvGAFAFAmv H FAmv ∗ H FAmv G FAmv ∗ G Unimodal functions (F1–F5) F1Mean1.19e+045.76e+021.93e+031.71e+054.81e+024.47e+02*5.16e+024.79e+02 STD3.03e+032.13e+024.95e+021.92e+045.60e+018.43e+01*5.69e+017.92e+01 F2Mean3.87e+083.31e+081.25e+087.10e+092.43e+07*2.92e+073.08e+073.46e+07 STD1.26e+084.92e+073.04e+071.98e+095.69e+06*8.08e+068.63e+068.99e+06 F3Mean1.49e+114.77e+092.39e+101.60e+211.63e+09*2.07e+092.25e+094.14e+09 STD2.67e+102.06e+095.05e+093.08e+215.47e+08*8.97e+081.23e+094.55e+09 F4Mean1.77e+051.43e+057.18e+045.15e+065.75e+04*6.79e+049.68e+041.12e+05 STD2.41e+041.44e+041.05e+041.30e+075.46e+03*1.26e+041.95e+042.99e+04 F5Mean3.91e+038.50e+022.56e+032.78e+054.50e+02*6.87e+025.52e+028.64e+02 STD1.76e+036.01e+024.32e+038.13e+045.97e+01*1.15e+028.21e+011.41e+02 Multimodal functions (F6–F20) F6Mean7.89e+026.87e+01*2.00e+023.34e+041.65e+022.04e+021.57e+021.71e+02 STD2.23e+027.72e+00*4.80e+016.74e+033.11e+013.96e+015.45e+015.43e+01 F7Mean5.62e+053.31e+053.02e+05*3.68e+103.02e+053.27e+054.27e+054.60e+05 STD4.89e+042.61e+043.13e+04*4.54e+103.18e+044.89e+045.82e+047.19e+04 F8Mean2.12e+012.12e+012.12e+012.11e+012.12e+012.12e+012.12e+012.12e+01* STD3.00e-025.00e-024.00e-025.00e-024.00e-023.00e-024.00e-027.00e-02* F9Mean7.41e+016.99e+014.64e+018.56e+014.82e+014.63e+01*5.16e+015.06e+01 STD1.23e+001.49e+005.91e+001.67e+003.84e+003.54e+00*3.50e+003.41e+00 F10Mean3.00e+039.93e+01*7.53e+022.75e+041.03e+021.31e+021.18e+021.83e+02 STD6.07e+023.51e+01*2.39e+024.31e+031.48e+013.08e+012.12e+014.34e+01 F11Mean4.13e+029.17e+01*1.49e+022.74e+036.84e+026.17e+027.77e+027.65e+02 STD3.71e+011.33e+01*1.98e+013.83e+024.72e+015.30e+018.75e+011.14e+02 F12Mean6.45e+024.14e+023.79e+02*2.46e+036.04e+025.59e+026.32e+025.94e+02 STD5.58e+011.49e+013.54e+01*3.38e+024.78e+016.24e+016.59e+017.16e+01 F13Mean6.09e+024.02e+02*4.11e+022.25e+035.80e+025.79e+025.99e+026.19e+02 STD4.81e+011.66e+01*3.04e+013.08e+023.43e+014.27e+014.22e+017.71e+01 F14Mean2.00e-02*2.00e-024.00e-028.95e+035.41e+033.93e+034.23e+033.30e+03 STD1.00e-02*2.00e-024.00e-027.19e+028.71e+021.08e+031.17e+031.96e+03 F15Mean9.11e+039.47e+037.03e+031.05e+048.46e+036.94e+037.09e+035.52e+03* STD7.04e+025.89e+021.34e+037.18e+028.05e+021.16e+031.01e+031.10e+03* F16Mean3.80e+003.76e+003.79e+003.42e+003.79e+003.74e+003.75e+003.42e+00* STD3.80e-012.80e-012.90e-014.00e-012.90e-013.00e-013.80e-013.60e-01* F17Mean7.96e+021.99e+02*3.55e+025.39e+036.42e+026.58e+026.69e+027.10e+02 STD1.10e+022.63e+01*4.11e+013.88e+023.88e+015.87e+013.33e+015.91e+01 F18Mean9.03e+021.54e+02*3.30e+027.29e+037.29e+028.47e+027.75e+027.82e+02 STD1.38e+022.08e+01*4.84e+017.63e+026.18e+019.59e+015.71e+011.18e+02 F19Mean3.45e+034.65e+017.37e+012.08e+073.48e+01*4.96e+014.91e+015.05e+01 STD2.49e+032.21e+002.34e+011.22e+071.49e+00*3.59e+002.73e+004.46e+00 F20Mean2.45e+012.39e+012.31e+012.50e+012.36e+012.30e+01*2.41e+012.41e+01 STD4.80e-012.60e-017.40e-010.00e+008.20e-015.40e-01*6.20e-015.90e-01 Composition functions (F21–F28) F21Mean3.05e+037.03e+029.78e+021.22e+045.60e+025.49e+02*6.07e+026.79e+02 STD4.54e+025.82e+013.19e+021.30e+038.36e+009.66e+00*2.14e+023.62e+02 F22Mean7.00e-023.00e-023.00e-02*1.26e+041.08e+041.04e+048.31e+037.08e+03 STD1.00e-014.00e-024.00e-02*6.44e+021.10e+031.20e+031.62e+032.11e+03 F23Mean9.66e+039.98e+037.14e+031.21e+041.06e+049.50e+038.71e+036.82e+03* STD8.00e+027.72e+022.01e+036.86e+021.02e+039.89e+021.23e+031.18e+03* F24Mean3.77e+023.57e+023.76e+021.71e+033.19e+02*3.72e+023.69e+023.63e+02 STD6.75e+004.34e+001.26e+024.22e+029.44e+00*1.02e+021.87e+011.61e+01 F25Mean3.91e+023.77e+023.46e+02*7.70e+024.06e+024.11e+024.31e+024.15e+02 STD1.11e+014.40e+001.16e+01*6.41e+011.69e+011.43e+011.57e+011.87e+01 F26Mean4.71e+024.51e+024.12e+022.20e+034.90e+024.30e+025.28e+023.29e+02* STD1.63e+011.41e+021.26e+011.53e+033.82e+021.06e+023.79e+026.26e+01* F27Mean2.05e+031.94e+031.49e+036.28e+031.47e+03*1.61e+031.88e+031.79e+03 STD7.64e+013.88e+011.18e+021.75e+033.53e+02*2.47e+021.41e+021.37e+02 F28Mean4.89e+034.74e+032.61e+034.64e+045.51e+031.45e+03*5.77e+034.61e+03 STD6.01e+026.52e+024.56e+029.05e+045.21e+021.19e+02*7.57e+021.12e+03 Count results2 (1)13 (6)17 (4)2 (0)13 (7)11 (5)6 (0)8 (5) 12 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 2 10 3 Absolute Error F6 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 3 × 10 5 4 × 10 5 6 × 10 5 Absolute Error F7 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 2.1 × 10 1 2.105 × 10 1 2.11 × 10 1 2.115 × 10 1 2.12 × 10 1 2.125 × 10 1 Absolute Error F8 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 4 × 10 1 5 × 10 1 6 × 10 1 7 × 10 1 Absolute Error F9 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 2 10 3 Absolute Error F10 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 2 10 3 Absolute Error F11 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 3 × 10 2 4 × 10 2 6 × 10 2 Absolute Error F12 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 4 × 10 2 5 × 10 2 6 × 10 2 7 × 10 2 8 × 10 2 Absolute Error F13 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 4 10 2 10 0 10 2 10 4 Absolute Error F14 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 4 4 × 10 3 6 × 10 3 Absolute Error F15 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 3 × 10 0 4 × 10 0 Absolute Error F16 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 Absolute Error F17 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 Absolute Error F18 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 2 10 3 10 4 Absolute Error F19 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 2.15 × 10 1 2.2 × 10 1 2.25 × 10 1 2.3 × 10 1 2.35 × 10 1 2.4 × 10 1 2.45 × 10 1 2.5 × 10 1 Absolute Error F20 Algorithm Mean PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G Figure 3: Performance in terms of the absolute error (the lower the better) scored by the seven mixed-variable opti- mization methods on the CEC benchmark for the multimodal functions. Multimodal functions (F6–F20). The results reported in Table 5 show a more heterogeneous behavior across the compared algorithms. Nevertheless, the proposed FAmv variants remain competitive in several functions of this category. In particular, the proposed approaches achieve the best results on functions F8, F9, F15, F16, F19, and F20. For these functions, the FAmv variants outperform all baseline algorithms in terms of mean error. Furthermore, for functions such as F7 and F10, the results remain statistically similar to those of the best-performing algorithms, indicating competitive performance compared to the considered state-of-the-art approaches. The boxplots shown in Figure 3 provide additional insight into the distribution of the obtained solutions. For several functions, including F8, F10, and F19, the FAmv variants exhibited low solution dispersion across independent runs. This indicates consistent performance across multiple runs on these multimodal problems. Composition functions (F21–F28). We observed strong performance of the proposed FAmv-based variants. In particular, the proposed methods achieve the best results on six out of the eight composition functions, namely F23, F24, F26, F27, and F28. In addition to achieving the best mean performance on most of these functions, the obtained results also exhibit low dispersion across independent runs, as reflected by the standard deviation values and illustrated in the boxplots in Figure 4. 13 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 6 × 10 2 2 × 10 3 3 × 10 3 4 × 10 3 Absolute Error F21 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 10 2 10 1 10 0 10 1 10 2 10 3 10 4 Absolute Error F22 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 4 3 × 10 3 4 × 10 3 6 × 10 3 Absolute Error F23 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 3 × 10 2 4 × 10 2 6 × 10 2 Absolute Error F24 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 3.2 × 10 2 3.4 × 10 2 3.6 × 10 2 3.8 × 10 2 4 × 10 2 4.2 × 10 2 4.4 × 10 2 4.6 × 10 2 Absolute Error F25 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 Absolute Error F26 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 10 3 6 × 10 2 2 × 10 3 Absolute Error F27 PSOmv DEmv GA FAmv H FAmv * H FAmv G FAmv * G 2 × 10 3 3 × 10 3 4 × 10 3 6 × 10 3 Absolute Error F28 Algorithm MeanPSOmvDEmvGA FAmv H FAmv * H FAmv G FAmv * G 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. 5.2 Results on Engineering Design Problems To further investigate the performance of the proposed algorithm on real-world mixed-variable optimization problems, three engineering design problems of varying complexity are considered. These results are summarized in Table 6 and Figure 5. From Table 6, we observe that the proposed FA variants achieve the best performance on two out of the three considered problems, namely the BEAM and Vessel design problems. For the BEAM design problem, the FAmv variant, FAmv H , achieves the best result. In addition, the boxplot in Figure 5 illustrates a very small dispersion of the obtained solutions, indicating a stable optimization behavior across independent runs. For the Pressure Vessel problem, the mixed-variable Firefly FAmv G achieves the best performance among the compared algorithms. For the CSD problem, DEmv achieves the best result, while the FAmv variants obtain slightly higher mean errors but remain close in performance with low variability across runs, as indicated by their standard deviation values. These results further demonstrate the competitiveness of the proposed mixed-variable Firefly variants in real-world engineering design problems. 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. FunctionPSOmvDEmvGAFAmv H FAmv G BEAM0.85 ± 0.300.51 ± 0.181.11 ± 0.640.49* ± 0.180.51 ± 0.27 CSD1.13 ± 0.051.08* ± 0.031.74 ± 0.811.18 ± 0.051.18 ± 0.06 Vessel6363.68 ± 1978.774331.97 ± 2040.482724.67 ± 2055.744283.55 ± 2164.541903.08* ± 2090.71 5.3 Ablation Study of the Proposed FAmv Components This section presents an ablation study to analyze the contribution of the main components of FAmv, namely the mixed- variable movement mechanism and the parameter adaptation strategy as detailed in Sections 3.2 and 3.3, respectively. In total, eight FA-based variants were tested to investigate the impact of certain design choices. Four FA-variants based on mixed Euclidean-Hamming (FAmv H , FAmv α H , FAmv αγ H and FAmv γ H ) and four variants based on the Gower distance (FAmv G , FAmv α G , FAmv αγ G and FAmv γ G ). In these definitions, the superscript indicates the parameter or parameters that are adapted. For example, αγ indicates both parameters are adapted simultaneously, whereas the superscript α 14 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling PSOmv DEmv GA FAmv H FAmv G 10 1 10 0 Absolute Error BEAM PSOmv DEmv GA FAmv H FAmv G 10 0 2 × 10 0 3 × 10 0 4 × 10 0 Absolute Error CSD PSOmv DEmv GA FAmv H FAmv G 10 3 10 4 Absolute Error Vessel Algorithm PSOmv DEmv GA FAmv H FAmv G Mean 025005000750010000 FEs 10 0 10 2 10 4 10 6 10 8 Error |f - f*| BEAM 025005000750010000 FEs 10 1 10 3 10 5 10 7 10 9 10 11 Error |f - f*| CSD 025005000750010000 FEs 10 1 10 2 10 3 10 4 10 5 10 6 Error |f - f*| Vessel Algorithm PSOmv DEmv GA FAmv H FAmv G 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. indicates that only α is adapted and therefore γ remains fixed. Additionally, the original FA algorithm is considered as a baseline to assess the necessity of the proposed mixed-variable adaptations. The results of this study are summarized in Figure 1 (right) and Table 7 (in the Additional Material). Addition- ally, detailed performance and convergence analyses for separate problem categories, unimodal (Figures 10 and 13), multimodal (Figures 11 and 14), and composition (Figures 12 and 15), are provided in the Additional Material (Ap- pendix C). First, it can be observed that all the proposed FA-variants consistently outperform the classical FA algorithm on the CEC2013 mixed-variable benchmark. The proposed FA variants achieve strictly better results on almost all functions, except for function F8, where all algorithms are statistically similar. The results indicate that the Hamming-based variants provide consistently strong performance across most function categories, regardless of whether fixed or adaptive parameters are used. Interestingly, the variant using fixed control parameters remains frequently among the best or statistically competitive approaches, suggesting that the proposed mixed-variable movement mechanism alone contributes significantly to performance improvements. At the same time, variants employing adaptive parameters FAmv α,γ H also demonstrate strong performance on more complex multimodal and composition functions, indicating that parameter adaptation further enhances performance in more challenging landscapes. Regarding the Gower-based distance, the most competitive variants are those that employ adaptive control parameters, which appear more frequently among the best-performing algorithms than those using fixed parameters, highlighting the importance of parameter adaptation when using more general mixed-variable distance measures. These results are explained by the fact that in the original Firefly algorithm, distance directly influences the attrac- tiveness term via the exponential decay function. Because the Gower distance remains bounded between 0 and 1, the exponential term tends to remain relatively large, leading to consistently strong attraction between individuals and, consequently, stronger exploitation of the search space. On the other hand, the Hamming-based distance can yield larger values, leading to stronger decay of the attractiveness term and allowing a wider range of movement behaviors during the search. This difference in scale provides a more effective modulation of the attraction mechanism when using the Hamming-based distance. Consequently, the Hamming-based variants often exhibit strong and consistent performance across the benchmark functions. In contrast, variants that rely on the Gower distance may require appro- priate tuning of the γ parameter to compensate for the bounded nature of the distance and achieve a similar balance between exploration and exploitation. 15 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 6 Discussion The experimental results reveal distinct behaviors of the proposed algorithm across benchmark function categories. In particular, the proposed FA variants show strong dominance over unimodal and composition functions, whereas performance is more heterogeneous on classical multimodal functions. For unimodal functions, the optimization landscape typically contains a single global optimum and relatively smooth gradients. In such cases, strong exploitation capabilities are generally sufficient to guide the search process toward the optimum. The proposed Firefly Algorithm (FA) variants, especially those based on the Hamming distance, exhibit strong exploratory behavior when individuals are distant in the search space, while maintaining efficient lo- cal exploitation as they become closer. This balance allows the algorithm to efficiently converge toward the global optimum, which explains the strong performance observed on these functions. In contrast, classical multimodal functions contain many local optima distributed across the search space. In such landscapes, maintaining a careful balance between exploration and exploitation becomes significantly more challeng- ing. The proposed variants may sometimes operate in two extreme regimes depending on the distance formulation. Variants using the Hamming distance tend to produce stronger exploration due to potentially large distance values, while variants relying on the Gower distance often lead to stronger exploitation because the distance is normalized to [0,1]. This behavior can explain the more heterogeneous results observed on multimodal functions. For composition functions, which combine multiple landscape characteristics and are typically more complex, the algorithm’s exploitation capability becomes particularly important. In these cases, variants based on the Gower distance tend to perform better, as the bounded nature of the distance leads to stronger attraction between individuals and thereby promotes the exploitation of promising regions in the search space. This behavior is consistent with the experimental results for the benchmark’s composition functions. Another important aspect of the proposed approach is its sensitivity to hyperparameters. This sensitivity mainly originates from the exponential attractiveness function used in the FA. The attractiveness between individuals is mod- eled using an exponential decay function that depends directly on the distance between solutions and the parameter gamma, which controls the rate of decay. Due to the nature of the exponential function, small variations in the distance or in the parameter gamma can produce significant variations in the attractiveness value. As a result, the balance between exploration and exploitation may vary substantially depending on the parameter values chosen. This characteristic explains why different variants of the algorithm may exhibit different search behaviors depending on the distance formulation and parameter settings. Although adaptive parameters partially mitigate this issue by allowing the algorithm to dynamically adjust its search behavior during optimization, achieving a perfectly balanced exploration- exploitation trade-off remains challenging due to the intrinsic sensitivity of the exponential decay mechanism. Main limitations. Despite the encouraging results obtained in this study, some limitations should be acknowl- edged. One important limitation arises from the mixed-variable distance formulation, particularly when using the Hamming-based distance. Since this distance is not normalized, the continuous component of the solution may domi- nate the overall distance value when continuous variables span very large intervals. In such situations, the contribution of discrete variables to the distance computation may become relatively less significant, potentially affecting the al- gorithm’s search dynamics. Another limitation concerns the difficulty of achieving a stable exploration-exploitation balance within the FA framework. Because the search dynamics heavily rely on the exponential attractiveness function, the algorithm can sometimes operate in regimes that favor either strong exploration or strong exploitation. Although the introduction of random movements controlled by the alpha parameter partially compensates for this behavior, identifying robust parameter settings remains challenging. 7 Conclusions In this paper, we proposed an adaptation of the Firefly Algorithm (FA) to optimization problems defined over mixed- variable search spaces. The proposed approach explicitly considers heterogeneous decision variables, including con- tinuous, ordinal, discrete, and categorical variables. To achieve this, we introduced a mixed-variable movement mech- anism and a distance-based modeling strategy that integrates both continuous and discrete components of candidate solutions into the FA’s attractiveness mechanism. These adaptations allow the algorithm to operate more effectively in mixed-variable optimization settings by respecting the intrinsic structure of the search space. In addition, a parameter- adaptation strategy was incorporated to balance exploration and exploitation during the search. In particular, the proposed formulation enables joint integration of dimensions of different types, allowing the algorithm to respond to interaction structures through a unified distance-based interaction mechanism. 16 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling The experimental results demonstrate the effectiveness of the proposed approach. Extensive experiments on the CEC2013 mixed-variable benchmark show that the proposed algorithm achieves competitive performance, with sev- eral variants achieving superior results across multiple functions compared to several baseline algorithms. The results highlight both the accuracy and the robustness of the proposed method across different categories of benchmark func- tions. In addition, the proposed algorithm was evaluated on three engineering design problems, further validating its performance on real-world optimization tasks. The results obtained on these engineering problems are consistent with the overall trends observed on the synthetic benchmark, confirming the practical applicability of the proposed approach. Despite these encouraging results, several directions remain open for future research. In particular, future work will focus on improving the distance formulation to better balance the contributions of continuous and discrete vari- ables, especially when continuous variables span large ranges. Another promising direction is to develop more ad- vanced adaptive mechanisms that automatically regulate the exploration–exploitation trade-off during the optimization process. Regarding the applicability of FAmv to real-world optimization problems with mixed variables, potential application domains include clustering of mixed-variable data and AutoML (automatic parameter configuration of algorithms). Acknowledgment This work was supported by the French government through the Programme d’Investissement d’Avenir (I-SITE ULNE / ANR-16-IDEX-0004 ULNE), managed by the Agence Nationale de la Recherche (No. I-KUL-22-005-ARCHIE- INFINITE); by a grant from Inserm and the French Ministry of Health within the MESSIDORE 2023 call operated by IReSP (AAP-2023-MSDR-341423); and by the European Union’s Horizon Europe Research and Innovation Pro- gramme under the Marie Skłodowska-Curie Actions (MSCA), Grant Agreement No. 101236749. References [1] A.D. Belegundu and T.R. Chandrupatla. Engineering Optimization: Theory and Practice. Prentice Hall, 1982. [2] Stephen Boyd and Lieven Vandenberghe. Convex optimization. Cambridge university press, 2004. [3] Samuel Burer and Adam N Letchford. Non-convex mixed-integer nonlinear programming: A survey. Surveys in Operations Research and Management Science, 17(2):97–106, 2012. [4] Carlos A Coello Coello. Use of a self-adaptive penalty approach for engineering optimization problems. Com- puters in Industry, 41(2):113–127, 2000. [5] Olive Jean Dunn. Multiple comparisons using rank sums. Technometrics, 6(3):241–252, 1964. [6] Karel Durkota. Implementation of a discrete firefly algorithm for the qap problem within the sage framework. Technical report, Czech Technical University, 2011. [7] Iztok Fister, Iztok Fister Jr, Xin-She Yang, and Janez Brest. A comprehensive review of firefly algorithms. Swarm and evolutionary computation, 13:34–46, 2013. [8] Iztok Fister, Xin-She Yang, Janez Brest, and Iztok Jr Fister. Memetic self-adaptive firefly algorithm. In Swarm intelligence and bio-inspired computation, pages 73–102. Elsevier, 2013. [9] Amir Hossein Gandomi, Xin-She Yang, and Amir Hossein Alavi. Mixed variable structural optimization using firefly algorithm. Computers & Structures, 89(23-24):2325–2336, 2011. [10] John C Gower. A general coefficient of similarity and some of its properties. Biometrics, pages 857–871, 1971. [11] Sture Holm. A simple sequentially rejective multiple test procedure. Scandinavian journal of statistics, pages 65–70, 1979. [12] Gilang Kusuma Jati and Suyanto. Evolutionary discrete firefly algorithm for travelling salesman problem. In International conference on adaptive and intelligent systems, pages 393–403. Springer, 2011. [13] James Kennedy and Russell Eberhart. Particle swarm optimization. In Proceedings of ICNN’95-international conference on neural networks, volume 4, pages 1942–1948. ieee, 1995. [14] William H Kruskal and W Allen Wallis. Use of ranks in one-criterion variance analysis. Journal of the American statistical Association, 47(260):583–621, 1952. [15] Jouni Lampinen and Ivan Zelinka. Mixed integer-discrete-continuous optimization by differential evolution. In Proceedings of the 5th international conference on soft computing, volume 71, page 76. Citeseer Princeton, NJ, USA, 1999. 17 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling [16] Xiaodong Li, Andries Engelbrecht, and Michael G Epitropakis. Benchmark functions for cec’2013 special ses- sion and competition on niching methods for multimodal function optimization. RMIT University, evolutionary computation and machine learning Group, Australia, Tech. Rep, 2013. [17] Tianjun Liao, Krzysztof Socha, Marco A. Montes de Oca, Thomas Stützle, and Marco Dorigo. Ant colony optimization for mixed-variable optimization problems. IEEE Transactions on Evolutionary Computation, 18 (4):503–518, 2014. doi: 10.1109/TEVC.2013.2281531. [18] Ying Lin, Yu Liu, Wei-Neng Chen, and Jun Zhang. A hybrid differential evolution algorithm for mixed-variable optimization problems. Information Sciences, 466:170–188, 2018. [19] Zbigniew Michalewicz. Genetic algorithms+ data structures= evolution programs. springer science & business media, 1996. [20] Melanie Mitchell. An introduction to genetic algorithms. MIT press, 1998. [21] Xiuqin Pan, Limiao Xue, and Ruixiang Li. Retracted article: A new and efficient firefly algorithm for numerical optimization problems. Neural Computing and Applications, 31(5):1445–1453, 2019. [22] N Poursalehi, A Zolfaghari, and A Minuchehr. Multi-objective loading pattern enhancement of pwr based on the discrete firefly algorithm. Annals of Nuclear Energy, 57:151–163, 2013. [23] Kamran Rezaei and Hassan Rezaei. An improved firefly algorithm for numerical optimization problems and it’s application in constrained optimization. Engineering with Computers, 38(4):3793–3813, 2022. [24] Rainer Storn and Kenneth Price. Differential evolution–a simple and efficient heuristic for global optimization over continuous spaces. Journal of global optimization, 11(4):341–359, 1997. [25] El-Ghazali Talbi. Metaheuristics for variable-size mixed optimization problems: A unified taxonomy and survey. Swarm and Evolutionary Computation, 89:101642, 2024. [26] Feng Wang, Yixuan Li, Aimin Zhou, and Ke Tang. An estimation of distribution algorithm for mixed-variable newsvendor problems. IEEE Transactions on Evolutionary Computation, 24(3):479–493, 2019. [27] Feng Wang, Heng Zhang, and Aimin Zhou. A particle swarm optimization algorithm for mixed-variable opti- mization problems. Swarm and Evolutionary Computation, 60:100808, 2021. [28] Xin-She Yang. Firefly algorithms for multimodal optimization. In International symposium on stochastic algo- rithms, pages 169–178. Springer, 2009. [29] Xin-She Yang. Firefly algorithm, stochastic test functions and design optimisation. International journal of bio-inspired computation, 2(2):78–84, 2010. 18 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling A FA Pseudocode Algorithm 2: Firefly algorithm 1 Randomly initialize the population of N fireflies, X 1 ,X 2 ,...,X N 2 Compute the fitness value of each firefly using f 3 t← 1 4 while t⩽ MAX_ITER do 5for i← 1 to N do 6for j← 1 to N do 7if f(X j ) < f(X i ) then 8Move X i toward X j according to Eq. 3 9Compute the fitness value of the new X i 10t← t +1 Figure 6: The influence of the control parameter k on the probability function p α B Convergence plots: Benchmark functions This section presents complementary convergence plots of the results on the CEC2013 benchmark obtained by our FAmv algorithm, compared with a set of mixed-variable reference approaches (see Section 4.1). The results of this comparison are summarized in Table 5. Figures of convergence with specific results for separate problem categories are presented: unimodal (Figure 7), multimodal (Figure 8), and composition (Figure 9) functions. C Full results on the impact of the mixed-variable movement mechanism in FA variants This section presents the results obtained by the FA-based variants that investigate the proposed mixed-variable move- ment mechanism and the parameter adaptation strategy, as detailed in Sections 3.2 and 3.3, respectively. In total, eight FA-based variants were tested to investigate the impact of certain design choices. Four FA-variants based on mixed Euclidean-Hamming (FAmv H , FAmv α H , FAmv αγ H and FAmv γ H ) and four variants based on the Gower distance (FAmv G , FAmv α G , FAmv αγ G and FAmv γ G ). In these definitions, the superscript indicates the parameter or parameters that are adapted. For example, αγ indicates both parameters are adapted simultaneously, whereas the superscript, α, 19 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. 20 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling Figure 9: Convergence curves of the MVO methods on composite functions in the CEC benchmark. indicates that only α is adapted and therefore, γ remains fixed. Additionally, the original FA algorithm is considered to investigate whether these FA variants for MVO problems are needed. The results on the CEC benchmark functions are summarized in Table 7. Additionally, figures of performance and convergence plots with specific results for separate problem categories are presented: unimodal (Figures 10 and 13), multimodal (Figures 11 and 14), and composition (Figures 12 and 15). From the results reported in Table 7, it can be observed that all the proposed mixed-variable variants of the Firefly Algorithm consistently outperform the classical version of the algorithm on the CEC2013 mixed-variable benchmark. In fact, the proposed variants achieve strictly better results on almost all functions. The only exception is function F8, where all algorithms, including the classical Firefly version, are statistically similar. A more detailed analysis of the results shows that, for the unimodal functions (F1–F5), variants based on the Hamming distance are often the best-performing approaches. In particular, the Hamming-based variants (FAmv H ) achieve the best results on functions F2, F3, F4, and F5. On function F1, the variants (FAmv H ) are statistically similar to the best-performing algorithm. For the multimodal functions (F6–F20), the (FAmv H ) also appear frequently among the best-performing methods. In this group of functions, the variant using the Hamming distance with adaptive control parametersα andγ, FAmv α,γ H , tends to appear more often among the best or among results that are statistically similar. In particular, this variant achieves the best results on functions such as F11, F12, and F13, and remains statistically competitive on many other functions within this category. This behavior suggests that the adaptive parameter mechanism provides additional flexibility when dealing with the more complex landscapes typically associated with multimodal problems. Finally, for the composition functions (F21–F28), the Hamming-based variants continue to show strong perfor- mance overall. However, the variants based on the Gower distance appear more frequently among the best-performing approaches in this group of functions, particularly when adaptive control parameters FAmv α G and FAmv α,γ G are em- ployed. This observation suggests that these variants may offer competitive alternatives in more complex, highly composite optimization landscapes. 21 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. Func. StatisticFAFAmv G FAmv α G FAmv αγ G FAmv γ G FAmv D G FAmv H FAmv α H FAmv αγ H FAmv γ H F1 Mean1.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 STD1.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 Mean7.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* STD1.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 Mean1.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 STD3.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 F4 Mean5.15e+06 9.68e+04 1.14e+05 1.12e+05 9.78e+04 1.41e+05 5.75e+04* 6.79e+04 6.75e+04 5.78e+04 STD1.30e+07 1.95e+04 1.76e+04 2.99e+04 2.14e+04 2.84e+04 5.46e+03* 1.26e+04 1.21e+04 9.94e+03 F5 Mean2.78e+05 5.52e+02 8.05e+02 8.64e+02 5.62e+02 8.63e+02 4.50e+02* 6.87e+02 6.70e+02 4.91e+02 STD8.13e+04 8.21e+01 1.19e+02 1.41e+02 1.03e+02 1.17e+02 5.97e+01* 1.15e+02 1.15e+02 7.77e+01 Basic multimodal functions (F6–F20) F6 Mean3.34e+04 1.57e+02 1.81e+02 1.71e+02 1.65e+02 1.68e+02 1.65e+02 2.04e+02 1.92e+02 1.57e+02* STD6.74e+03 5.45e+01 6.22e+01 5.43e+01 4.24e+01 5.37e+01 3.11e+01 3.96e+01 3.57e+01 3.49e+01* F7 Mean3.68e+10 4.27e+05 4.56e+05 4.60e+05 4.21e+05 3.98e+05 3.02e+05* 3.27e+05 3.16e+05 3.17e+05 STD4.54e+10 5.82e+04 6.79e+04 7.19e+04 5.68e+04 8.36e+04 3.18e+04* 4.89e+04 4.22e+04 3.22e+04 F8 Mean2.12e+01 2.12e+01 2.12e+01 2.12e+01* 2.12e+01 2.12e+01 2.12e+01 2.12e+01 2.12e+01 2.12e+01 STD5.00e-02 4.00e-02 4.00e-02 7.00e-02* 4.00e-02 3.00e-024.00e-023.00e-023.00e-024.00e-02 F9 Mean8.56e+01 5.16e+01 4.92e+01 5.06e+01 5.20e+01 5.11e+01 4.82e+01 4.63e+01* 4.73e+01 4.91e+01 STD1.67e+00 3.50e+00 4.23e+00 3.41e+00 2.68e+00 2.83e+00 3.84e+00 3.54e+00* 3.77e+00 3.06e+00 F10 Mean2.75e+04 1.18e+02 1.67e+02 1.83e+02 1.32e+02 1.78e+02 1.03e+02* 1.31e+02 1.40e+02 1.18e+02 STD4.31e+03 2.12e+01 4.91e+01 4.34e+01 2.25e+01 3.28e+01 1.48e+01* 3.08e+01 2.97e+01 2.07e+01 F11 Mean2.74e+03 7.77e+02 7.63e+02 7.65e+02 7.62e+02 6.83e+02 6.84e+02 6.17e+02 6.04e+02* 6.71e+02 STD3.83e+02 8.75e+01 1.03e+02 1.14e+02 8.51e+01 6.66e+01 4.72e+01 5.30e+01 5.77e+01* 4.36e+01 F12 Mean2.46e+03 6.32e+02 5.94e+02 5.94e+02 6.00e+02 6.20e+02 6.04e+02 5.59e+02 5.26e+02* 5.82e+02 STD3.38e+02 6.59e+01 6.01e+01 7.16e+01 4.76e+01 3.62e+01 4.78e+01 6.24e+01 4.68e+01* 5.58e+01 F13 Mean2.25e+03 5.99e+02 6.21e+02 6.19e+02 6.22e+02 5.98e+02 5.80e+02 5.79e+02 5.69e+02* 5.88e+02 STD3.08e+02 4.22e+01 7.09e+01 7.71e+01 4.14e+01 3.60e+01 3.43e+01 4.27e+01 4.13e+01* 4.46e+01 F14 Mean8.95e+03 4.23e+03 3.13e+03* 3.34e+03 4.08e+03 4.74e+03 5.41e+03 3.93e+03 3.97e+03 5.58e+03 STD7.19e+02 1.17e+03 1.11e+03* 1.89e+03 9.70e+02 1.16e+03 8.71e+02 1.08e+03 1.20e+03 7.81e+02 F15 Mean1.05e+04 7.09e+03 5.53e+03 5.52e+03* 7.35e+03 8.08e+03 8.46e+03 6.94e+03 6.77e+03 8.01e+03 STD7.18e+02 1.01e+03 1.34e+03 1.10e+03* 8.84e+02 9.90e+02 8.05e+02 1.16e+03 1.01e+03 7.64e+02 F16 Mean3.24e+00 3.75e+00 3.80e+00 3.42e+00* 3.72e+00 3.78e+00 3.79e+00 3.74e+00 3.81e+00 3.81e+00 STD4.00e-01 3.80e-01 3.10e-01 3.60e-01* 3.20e-01 3.60e-012.90e-013.00e-013.20e-013.00e-01 F17 Mean5.39e+03 6.69e+02 7.00e+02 7.10e+02 6.69e+02 6.18e+02* 6.42e+02 6.58e+02 6.62e+02 6.57e+02 STD3.88e+02 3.33e+01 6.06e+01 5.91e+01 3.81e+01 4.01e+01* 3.88e+01 5.87e+01 5.54e+01 4.26e+01 F18 Mean7.29e+03 7.75e+02 8.12e+02 7.82e+02 7.73e+02 6.38e+02* 7.29e+02 8.47e+02 7.58e+02 7.62e+02 STD7.63e+02 5.71e+01 6.78e+01 1.18e+02 5.84e+01 4.57e+01* 6.18e+01 9.59e+01 7.27e+01 5.54e+01 F19 Mean2.08e+07 4.91e+01 5.25e+01 5.05e+01 4.98e+01 4.81e+01 3.48e+01* 4.96e+01 4.86e+01 4.76e+01 STD1.22e+07 2.73e+00 5.46e+00 4.46e+00 3.07e+00 2.74e+00 1.49e+00* 3.59e+00 2.73e+00 2.77e+00 F20 Mean2.50e+01 2.41e+01 2.40e+01 2.41e+01 2.42e+01 2.42e+01 2.36e+01 2.30e+01* 2.33e+01 2.36e+01 STD0.00e+00 6.20e-01 6.70e-015.90e-01 6.00e-01 5.40e-018.20e-01 5.40e-01* 5.80e-017.10e-01 Composition functions (F21–F28) F21 Mean1.22e+04 6.07e+02 6.79e+02 6.79e+02 5.72e+02 7.15e+02 5.60e+02 5.49e+02* 5.59e+02 5.70e+02 STD1.30e+03 2.14e+02 3.65e+02 3.62e+02 9.50e+00 3.65e+02 8.36e+00 9.66e+00* 1.27e+01 9.67e+00 F22 Mean1.26e+04 8.31e+03 7.15e+03 7.08e+03* 8.45e+03 8.39e+03 1.08e+04 1.04e+04 9.89e+03 1.05e+04 STD6.44e+02 1.62e+03 2.15e+03 2.11e+03* 1.72e+03 1.33e+03 1.10e+03 1.20e+03 1.29e+03 1.78e+03 F23 Mean1.21e+04 8.71e+03 7.07e+03 6.82e+03* 8.55e+03 8.62e+03 1.06e+04 9.50e+03 8.16e+03 9.93e+03 STD6.86e+02 1.23e+03 1.73e+03 1.18e+03* 1.14e+03 1.54e+03 1.02e+03 9.89e+02 1.80e+03 1.16e+03 F24 Mean1.71e+03 3.69e+02 3.60e+02 3.63e+02 3.70e+02 3.57e+02 3.19e+02* 3.72e+02 3.46e+02 3.45e+02 STD4.22e+02 1.87e+01 1.53e+01 1.61e+01 1.64e+01 1.43e+01 9.44e+00* 1.02e+02 1.44e+01 1.32e+01 F25 Mean7.70e+02 4.31e+02 4.10e+02 4.15e+02 4.29e+02 4.08e+02 4.06e+02 4.11e+02 4.06e+02 4.03e+02* STD6.41e+01 1.57e+01 1.76e+01 1.87e+01 1.85e+01 1.31e+01 1.69e+01 1.43e+01 1.98e+01 1.58e+01* F26 Mean2.20e+03 5.28e+02 4.59e+02 3.29e+02* 4.51e+02 4.30e+02 4.90e+02 4.30e+02 4.30e+02 4.09e+02 STD1.53e+03 3.79e+02 1.52e+02 6.26e+01* 1.69e+02 9.71e+00 3.82e+02 1.06e+02 9.19e+01 4.01e+01 F27 Mean6.28e+03 1.88e+03 1.79e+03 1.79e+03 1.92e+03 1.79e+03 1.47e+03* 1.61e+03 1.69e+03 1.64e+03 STD1.75e+03 1.41e+02 1.19e+02 1.37e+02 1.22e+02 1.32e+02 3.53e+02* 2.47e+02 1.32e+02 1.32e+02 F28 Mean4.64e+04 5.77e+03 4.63e+03 4.61e+03 5.71e+03 3.97e+03 5.51e+03 1.45e+03* 4.60e+03 5.19e+03 STD9.05e+04 7.57e+02 1.12e+03 1.12e+03 6.24e+02 1.50e+03 5.21e+02 1.19e+02* 4.91e+02 3.30e+02 Count2 (0)8 (0)11 (2)12 (6)5 (0)7 (2)19 (8)18 (4)20 (3)17 (3) 22 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. 23 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. 24 A Firefly Algorithm for Mixed-Variable Optimization Based on Hybrid Distance Modeling 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. 25