This study develops an Enhanced RIME Optimization (E-RIME) framework for the techno-economic optimal sizing of a standalone hybrid microgrid located at the Zafarana site, Gulf of Suez, Egypt. The proposed methodology integrates renewable-resource assessment, component modeling, lifecycle-cost analysis, operational and reliability constraints, and metaheuristic optimization. The sizing problem simultaneously considers photovoltaic modules, wind turbines, fuel cells, DC/DC converters, inverters, and battery energy storage systems. The objective is to identify a feasible system configuration that minimizes the total lifecycle cost over a 20-year project horizon while satisfying the specified technical and energy-adequacy requirements.

Site data and resource assessment

The Zafarana site, located in the Gulf of Suez region, Egypt, was selected as the case-study location for the standalone hybrid microgrid. Solar-resource data used in the model were obtained from the Global Solar Atlas, while the wind-resource data were obtained from the Global Wind Atlas. Monthly solar irradiation and temperature data over twelve representative months were considered to account for seasonal variations in solar-energy availability. The monthly solar irradiation values correspond to an annual global horizontal irradiation of approximately 2149.2 kWh/m2/year.

The available wind-speed data at a reference height of 10 m were extrapolated to the wind-turbine hub height of 18 m using the power-law relationship:

$$ V_{h} = V_{r} \left( {\frac{h}{{h_{r} }}} \right)^{ \propto } $$

(1)

where \(({V}_{h})\) is the estimated wind speed at the hub height \(h\), \(({V}_{r})\) is the wind speed at the reference height (\({h}_{r}\)), and (\(\propto \)) is the wind-shear exponent. In the present model, (\(\propto \)= 0.143) was adopted for the wind-speed extrapolation.

The annual electrical-energy demand considered for the investigated system is 1,804,811.2 kWh/year. The load data were obtained from the Canal Electricity Distribution Company and were used to establish the energy requirement of the investigated standalone system.

In addition to the annual energy requirement, four representative operating conditions were incorporated into the sizing formulation to assess system feasibility under different combinations of renewable-resource availability and load demand. These conditions represent: (i) high solar availability with high demand, (ii) nighttime operation with no solar contribution, (iii) reduced solar availability with moderate demand, and (iv) the maximum-demand operating condition. The representative operating conditions, together with the annual energy-adequacy requirement, are used to prevent the optimization process from selecting a low-cost configuration that is unable to satisfy the required electrical demand.

System modeling and problem rationale

The investigated standalone hybrid microgrid integrates photovoltaic (PV) modules, wind turbines (WTs), fuel cells (FCs), battery energy storage systems (BESSs), and the required power-electronic conversion stages through a common DC bus, as illustrated in Figure 1. The PV subsystem is connected to the DC bus through DC/DC converters, while the wind-turbine subsystem is interfaced through an AC/DC conversion stage. The battery bank is coupled to the DC bus to provide energy storage and backup capability, while the fuel-cell subsystem provides dispatchable generation when additional power support is required. A DC/AC inverter interfaces the common DC bus with the local AC load.

Fig. 1Fig. 1

Architecture of the investigated standalone hybrid microgrid showing the PV, wind-turbine, fuel-cell, battery-storage, power-conversion, common DC-bus, and AC-load subsystems.

The common DC-bus architecture was selected to provide a unified interface for coordinating the different generation, conversion, and storage technologies considered in the sizing problem. PV modules, batteries, and the DC output of the fuel-cell subsystem can be integrated through the DC link, while the final DC/AC conversion stage supplies the AC load. This configuration facilitates coordinated power exchange among the different subsystems and enables their capacities to be optimized simultaneously.

The selected combination of PV and wind generation exploits two renewable-energy resources with different availability characteristics, while the battery provides short-term energy buffering and backup capability. The fuel-cell subsystem provides an additional dispatchable generation option during renewable-generation deficits. Consequently, the investigated architecture enables the optimization framework to evaluate the techno-economic trade-off among renewable generation, dispatchable generation, energy storage, and power-electronic conversion when determining the minimum-lifecycle-cost configuration.

System modeling and problem formulation

The optimal sizing problem determines the number of units to be installed from six component categories: ten candidate wind-turbine types, ten PV-module types, two fuel-cell types, five DC/DC-converter types, five inverter types, and ten battery types. The resulting optimization problem therefore contains 42 integer decision variables and is evaluated over a 20-year project lifetime.

The decision vector is expressed as

$$ {\text{X }} = \left[ {x_{1} , x_{2} , \ldots \ldots ..x_{42} } \right] $$

(2)

where \({(x}_{1})-({x}_{10})\) denote the numbers of the ten candidate wind-turbine types, \(\left({x}_{11}\right)-({x}_{20})\) denote the numbers of the ten PV-module types, \(\left({x}_{21}\right)-({x}_{22})\) represent the two fuel-cell types, \(\left({x}_{23}\right)-({x}_{27})\) represent the five DC/DC-converter types, \(\left({x}_{28}\right)-({x}_{32})\) represent the five inverter types, and \(\left({x}_{33}\right)-({x}_{42})\) represent the ten battery types.

All decision variables are constrained to non-negative integer values. The corresponding search bounds are

$$ 0\, \le \,x_{i} \, \le \,300 ,\;i = 1,\, \ldots ,\,10 \left( {{\text{Wind}}\;{\text{Turbines}}} \right) $$

(3a)

$$ 0\, \le \,x_{i} \, \le \,200,\;i = 11,\, \ldots ,\,20 \left( {{\text{PV}}\;{\text{modules}}} \right) $$

(3b)

$$ 0\, \le \,x_{i} \, \le \,10,\;i = 21,\;22 \left( {{\text{Fuel}}\;{\text{cells}}} \right) $$

(3c)

$$ 0\, \le \,x_{i} \, \le \,10 ,\;i = 23,\, \ldots ,\,27 \left( {DC/DC\;{\text{converters}}} \right) $$

(3d)

$$ 0\, \le \,x_{i} \, \le \,60,\,i\, = \,28,\, \ldots ,\,32 \left( {{\text{Inverters}}} \right) $$

(3e)

$$ 0\, \le \,x_{i} \, \le \,100 ,\;i\, = \,33,\, \ldots ,\,42 \left( {{\text{Battery}}\;{\text{units}}} \right) $$

(3f)

With all decision variables restricted to non-negative integers:

$$ x_{i} \in Z_{ \ge 0} , i = 1, \ldots ,42 $$

(4)

Candidate solutions generated by the optimization algorithms are first restricted to the corresponding lower and upper bounds and then rounded to integer values before techno-economic and constraint evaluation. This formulation allows the optimization process to determine simultaneously the selected component technologies and their installed quantities.

Generation modeling

PV generation. The output power of a PV module is estimated according to the incident solar irradiance and cell temperature as

$$ P_{PV} \, = \,P_{STC} \left( { \frac{G}{{G_{STC} }}} \right)\left[ {1 + K\left( {T_{c} – T_{{{\text{ref}}}} } \right)} \right] $$

(5)

where (\({P}_{STC}\)) is the rated PV power under standard test conditions, (G) is the incident solar irradiance, (\({G}_{STC}\)=1000) W/m2 is the standard-test irradiance, (\(K\) =-3.7x \({10}^{-3}\)) is the adopted temperature coefficient, (\({T}_{c}\)) is the cell temperature, and \({(T}_{ref}\)= 25 \(^\circ{\rm C} \)) is the reference cell temperature.

For a candidate system configuration, the total PV generation is obtained from the output and installed quantity of each selected PV-module type.

Wind-turbine generation. The output of each wind-turbine type is determined from its corresponding power curve. The general turbine power characteristic is expressed as

$${P}_{WT,i \left(v\right)= }\left\{\begin{array}{c}0, v<{v}_{ci},i\\ {f}_{i}(v) { v }_{ci,i}\le v<{v}_{r,i}\\ { P}_{r,i} {v}_{r,i}\le v<{v}_{co.i}\\ 0, v\ge {v}_{co}\end{array}\right.$$

(6)

where (v) is the wind speed at the turbine hub height; (\({v }_{ci,i}\)), (\({v}_{r,i}\)), and (\({v}_{co.i}\)) are the cut-in, rated, and cut-out wind speeds of turbine type (i), respectively; (\({P}_{r,i}\)) is its rated power; and (\({f}_{i}(v)\))) represents the corresponding power-curve relationship between the cut-in and rated wind speeds.

The total wind-generation capacity and energy contribution are calculated according to the installed quantities of the selected turbine types and their corresponding power characteristics.

Fuel-cell generation. The fuel-cell subsystem is modeled as a dispatchable generation source constrained by the total installed fuel-cell capacity:

$$ 0\, \le \,P_{FC\left( t \right)} \; \le \;P_{{{\text{rated}}}}^{FC} $$

(7)

where (\({P}_{FC(t)}\)) is the fuel-cell output power at time (t), and \(({P}_{rated}^{FC}\)) is the total rated capacity of the selected fuel-cell units. Fuel-cell generation contributes to satisfying the electrical demand when additional dispatchable generation is required under the considered operating conditions.

Battery energy storage modeling

The battery energy storage system (BESS) is connected to the 48-V DC bus and is used to store surplus renewable energy and provide power during periods in which the available generation is insufficient to satisfy the load demand. The total nominal energy capacity of the battery bank is calculated as

$$ E_{BAT,\,max} = \sum\nolimits_{i = 1}^{{N_{BAT} }} {\eta_{BAT,i} V_{{{\text{bus}}}} AH_{i} } $$

(8)

where (\({\upeta}_{BAT,i}\)) is the number of installed batteries of type (i), \(({AH}_{i})\) is the corresponding battery capacity in Ah, \(({V}_{bus}=48)\) V is the DC-bus voltage, and (\({N}_{BAT}\)= 10) is the number of candidate battery types. When (\({E}_{BAT,max}\)) is expressed in Wh, division by 1000 gives the corresponding capacity in kWh.

An allowable depth of discharge (DoD) of 80% is adopted. Therefore, the minimum allowable stored energy is

$$ E_{{{\text{BAT,}}\,{\text{min}}}} = \left( {1 – DoD} \right)E_{{{\text{BAT,}}\,{\text{max}}}} $$

(9)

And the battery-energy operating limits are

$$ E_{{{\text{BAT,}}\,{\text{min}}}} \le E_{{{\text{BAT}}}} \left( t \right) \le E_{{{\text{BAT,}}\,{\text{max}}}} $$

(10)

where (\({E}_{BAT}\left(t\right)\)) denotes the stored battery energy at operating condition (t). For (DoD = 0.80), the minimum allowable energy corresponds to 20% of the nominal battery capacity.

The maximum battery charging and discharging power is limited to approximately 0.5C and is expressed as

$$ P_{{{\text{ch,}}\,{\text{max}}}} = P_{{{\text{dis,}}\,{\text{max}}}} = 0.5 E_{{{\text{BAT,}}\,{\text{max}}}} $$

(11)

When (\({E}_{BAT,max}\)) is expressed in kWh and the corresponding power is expressed in kW.

A round-trip battery efficiency of

$$ \eta_{rt} = 0.9 $$

(12)

Is considered in the energy-storage calculations. The battery-side inverter efficiency is taken as

$$ \eta_{inv} = 0.96 $$

(13)

The battery bank is additionally sized to provide three days of backup for the net electrical-energy requirement after accounting for the available fuel-cell contribution. The minimum battery-energy requirement is therefore represented by

$$ E_{BAT } \ge \frac{{E_{net } \left( \frac{3}{365} \right)}}{{\eta_{inv} DoD \eta_{rt} }} $$

(14)

where \({E}_{net}\) is the annual net electrical-energy requirement to be supplied by the battery after considering the contribution of the fuel-cell subsystem.

A fixed battery service life of five years is assumed in the lifecycle-cost model. Accordingly, battery replacements are considered at years 5, 10, and 15 over the 20-year project horizon, and the corresponding replacement expenditures are discounted to their present values. A detailed electrochemical degradation or cycle-aging model is not incorporated; therefore, the long-term battery economic effect is represented through the assumed fixed service life and scheduled replacements.

Power balance and energy adequacy

For each representative operating condition, the available power from the renewable-generation units, fuel-cell subsystem, and battery storage must be sufficient to satisfy the electrical load. The power-balance requirement is expressed as

$$ P_{PV} \left( t \right) + P_{WT} \left( t \right) + P_{FC} \left( t \right) + P_{BAT,dis} \left( t \right) \ge P_{L} \left( t \right) $$

(15)

where \({P}_{PV}(t)\),\({P}_{WT}(t)\),\({P}_{FC}(t)\), and \({P}_{BAT,dis}(t)\) represent the available power from the PV, wind-turbine, fuel-cell, and battery subsystems, respectively, and \({P}_{L}(t)\) is the required load power under operating condition t.

When renewable generation exceeds the instantaneous demand, the surplus power can be directed toward battery charging, subject to the battery charging-power and energy limits. The renewable surplus is expressed as

$$ P_{sur} \left( t \right) = \max \left[ {0,P_{pv} \left( t \right) + P_{wt} \left( t \right) – P_{L} \left( t \right)} \right] $$

(16)

where \({P}_{sur}(t)\) denotes the renewable power available for charging or other storage-related use after satisfying the load.

In addition to the representative-condition power constraints, an annual energy-adequacy condition is imposed to prevent the optimizer from selecting a configuration that satisfies only the representative operating points while providing insufficient energy over the year. The annual energy requirement can be expressed as

$$ E_{PV} + E_{WT} + E_{FC} \ge E_{L} $$

(17)

where \(E_{PV} ,\;E_{WT} ,\;{\text{and}}\;E_{FC} \ge\) are the annual electrical-energy contributions of the PV, wind-turbine, and fuel-cell subsystems, respectively, and \(E_{L}\) is the annual load demand. For the investigated Zafarana case, the annual electrical-energy demand is

$$ E_{L} = 1,804,811.2 \;kWh/year $$

Lifecycle-cost objective function

The objective of the optimization problem is to minimize the total lifecycle cost of the standalone hybrid microgrid over a project lifetime of 20 years. The lifecycle cost includes the initial capital investment, operation and maintenance (O&M) costs, discounted component-replacement costs, and the residual value of components remaining at the end of the project lifetime. The optimization objective is formulated as

$$ \mathop {\min }\limits_{x} C_{LC} \left( x \right) $$

(18)

where \({C}_{LC}\left(x\right)\) represents the total lifecycle cost associated with candidate configuration (x).

The lifecycle cost is calculated as

$$ C_{LC} = C_{CAP} + PV\left( {C_{O\& M} } \right) + PV\left( {C_{rep} } \right) – PV\left( S \right) $$

(19)

where \({C}_{CAP}\) is the initial capital cost, \({PV (C}_{O\&M}\)) is the present value of operation and maintenance costs, \({PV (C}_{rep}\)) is the present value of component-replacement costs, and (PV(S)) is the present value of the salvage value at the end of the project lifetime.

The initial capital cost is obtained from the quantities and unit costs of all selected components:

$$ C_{cap} = \sum\nolimits_{j = 1}^{42} {x_{j} C_{cap,j} } $$

(20)

where \({x}_{j}\) the number of units is associated with decision variable j, and \({C}_{cap,j}\) is the corresponding unit capital cost.

Future expenditures occurring during the project lifetime are converted to their present values using

$$ PV\left( {C_{t} } \right) = \frac{{C_{t} }}{{\left( {1 + r} \right)^{t} }} $$

(21)

where \({C}_{t}\) is a cost occurring in year t, and r is the real discount rate. A discount rate of 8% is adopted in the present study.

For a component requiring replacement during the project lifetime, the present value of its replacement expenditures is calculated as

$$ PV\left( {C_{rep,j} } \right) = \sum\nolimits_{k = 1}^{{N_{rep,\,j} }} {\frac{{C_{rep,j,k} }}{{\left( {1 + r} \right)^{{t_{j,k} }} }}} $$

(22)

where \({N}_{rep,j}\) the number of replacements of component j is, \({C}_{rep,j,k}\) is the cost of its k-th replacement, and \({t}_{j,k}\) is the year in which that replacement occurs.

Within the adopted 20-year economic model, fuel cells, DC/DC converters, and inverters are assigned a service life of 10 years and are therefore replaced at year 10. Batteries are assigned a service life of five years and are replaced at years 5, 10, and 15. Replacement expenditures are discounted to their present values using Eq. (21).

The salvage value accounts for the remaining useful value of components whose service life extends beyond the end of the project horizon. This value is deducted from the total lifecycle cost, as indicated in Eq. (19).

Therefore, the optimization problem searches for the integer decision vector x that minimizes \({C}_{LC}\) while satisfying the technical, energy-adequacy, battery-backup, and component-compatibility constraints.

Constraint handling

The optimization problem includes several technical and operational constraints that must be satisfied by each candidate microgrid configuration. These constraints include power-balance requirements, annual energy adequacy, PV/DC–DC converter compatibility, inverter-capacity adequacy, and the minimum battery-backup requirement.

Two constraint-handling procedures are employed. First, candidate decision variables generated outside their prescribed search bounds are restricted to the corresponding lower and upper limits. Because the decision variables represent physical numbers of installed components, they are subsequently rounded to integer values before evaluating the candidate configuration.

The remaining technical constraints are incorporated into the objective function using a quadratic penalty approach. Each inequality constraint is expressed in the general form

$$ g_{j} \left( x \right) \le 0\;j = 1,2, \ldots .,m $$

(23)

where \({g}_{i}\left(x\right)\) represents the j-th constraint and m is the total number of evaluated constraints.

The magnitude of violation of each constraint is calculated as

$$ v_{j} \left( x \right) = \max \left[ {0, g_{j} \left( x \right)} \right] $$

(24)

Therefore, \({v}_{i}\left(x\right)=0\) when the corresponding constraint is satisfied, whereas a positive value indicates the magnitude of the constraint violation.

The penalized objective function evaluated by the optimization algorithms is then defined as

$$ {\text{F}}\left( {\text{x}} \right) = C_{LC} \left( x \right) + \lambda \sum\nolimits_{j = 1}^{m} {v_{j}^{2} \left( x \right)} $$

(25)

where \({C}_{LC}\left(x\right)\) is the lifecycle cost defined in Eq. (19), and \(\lambda \) is the penalty coefficient. A large penalty coefficient of

is employed to strongly discourage the optimization algorithms from retaining infeasible configurations.

For a feasible candidate solution,

$$ v_{j} \left( x \right) = 0 $$

and consequently,

$$ F\left( x \right) = C_{LC} \left( x \right) $$

In contrast, violation of one or more technical constraints increases the penalized objective value according to the squared magnitude of the violations, thereby reducing the likelihood that infeasible configurations are retained during the optimization process.

The principal constraint groups considered in the optimization are:

1.

Power-balance constraint: the available generation and storage support must be sufficient to satisfy the load under the considered representative operating conditions.

2.

Annual energy-adequacy constraint: the annual energy supplied by the generation system must satisfy the specified annual electrical-energy demand.

3.

PV/DC–DC converter compatibility constraint: the installed DC/DC converter capacity must be adequate for the selected PV capacity.

4.

Inverter-capacity constraint: the installed inverter capacity must be sufficient for the required AC-side power conversion.

5.

Battery-backup constraint: the installed battery-energy capacity must satisfy the specified three-day backup requirement while respecting the adopted DoD and efficiency assumptions.

Thus, the optimization objective is to determine the feasible integer decision vector that minimizes the lifecycle cost while satisfying all technical and operational constraints.

Optimization algorithms

Three population-based metaheuristic algorithms are considered for solving the formulated discrete microgrid sizing problem: Particle Swarm Optimization (PSO), the baseline RIME algorithm, and the proposed Enhanced RIME Optimization (E-RIME) algorithm. For a fair comparison, the algorithms employ the same decision-variable bounds, objective function, constraint-handling procedure, and population size. Candidate solutions are restricted to the predefined bounds and converted to integer values before objective-function evaluation.

Particle swarm optimization

Particle Swarm Optimization (PSO) is employed as a benchmark algorithm because of its widespread application to renewable-energy sizing and planning problems. In PSO, each particle represents a candidate microgrid configuration defined by the 42-dimensional decision vector.

The velocity of particle i is updated according to

$$ v_{i}^{t + 1} = \omega \,v_{i}^{t} + c_{1} r_{1} \left( {p_{i}^{{{\text{best}}}} – x_{i}^{t} } \right) + c_{2} r_{2} \left( {g^{{{\text{best}}}} – x_{i}^{t} } \right) $$

(26)

where \({v}_{i}^{t}\) and \({x}_{i}^{t}\) are the velocity and position of particle i at iteration t, respectively; ω is the inertia weight;\({c}_{1}\) and \({c}_{2}\) are the cognitive and social acceleration coefficients; \({r}_{1}\) and \({r}_{2}\) are random numbers uniformly distributed in [0,1]; \({p}_{i}^{best}\) is the best position previously obtained by particle i and \({g}^{best}\) is the best position identified by the swarm.

The particle position is subsequently updated as

$$ x_{i}^{t + 1} = x_{i}^{t} + v_{i}^{t + 1} $$

(27)

After each update, the resulting candidate solution is restricted to the specified search bounds and converted to integer values before evaluation using the penalized objective function defined in Eq. (25).

Baseline RIME optimization algorithm

The RIME optimization algorithm is a physics-inspired population-based metaheuristic based on the growth behavior of rime ice. The algorithm employs two principal search mechanisms, namely soft-rime search and hard-rime puncture, to balance global exploration and local exploitation.

During the soft-rime stage, candidate solutions are perturbed around the current best solution to explore different regions of the search space. As the optimization progresses, the search behavior gradually shifts toward exploitation around promising solutions. The hard-rime puncture mechanism further updates candidate variables according to their normalized fitness values, increasing the probability of exploiting high-quality regions of the search space.

For the present microgrid-sizing problem, each RIME agent represents one 42-dimensional candidate configuration:

$$ R_{i} = \left[ {R_{i,1} ,R_{i,2} , \ldots ,R_{i,42} } \right] $$

(28)

where each dimension represents the installed quantity of one candidate component type. After each RIME position update, the solution is restricted to its corresponding lower and upper bounds and converted to integer values before evaluation.

The baseline RIME algorithm is retained without the additional mechanisms introduced in the proposed E-RIME method, thereby providing a direct reference for evaluating the effect of the proposed enhancements.

Proposed enhanced RIME optimization (E-RIME)

The proposed E-RIME algorithm retains the fundamental soft-rime exploration and hard-rime exploitation mechanisms of the baseline RIME algorithm while introducing four modifications intended to improve population diversity and regulate the exploration–exploitation process. These modifications are Tent chaotic initialization, Opposition-Based Learning (OBL), adaptive nonlinear parameter control, and a conditional stagnation-restart mechanism.

The E-RIME procedure consists of two main stages. First, an enhanced initialization stage generates and improves the initial population using the Tent chaotic map and OBL. Second, the iterative search stage applies the RIME search operators together with adaptive nonlinear control and conditional restart.

A. Tent Chaotic Initialization

Instead of conventional random initialization, E-RIME employs a Tent chaotic map to generate the initial population. The normalized chaotic sequence can be expressed as

$$ z_{k + 1} = \left\{ {\begin{array}{*{20}c} {2z_{k} , \;0 \le z_{k} < 0.5} \\ {2\left( {1 – z_{k} } \right), \;0.5 \le z_{k} \le 1} \\ \end{array} } \right. $$

(29)

where \({z}_{k}\in \) [0,1] represents the chaotic variable.

The normalized chaotic values are mapped onto the allowable range of each decision variable according to

$$ x_{i,j} = lb_{j} + z_{i,j} \left( {ub_{j } – lb_{j } } \right) $$

(30)

where \({x}_{i,j}\) represents dimension j of candidate solution i, while \({lb}_{j}\) and \({ub}_{j}\) are its corresponding lower and upper bounds. The generated values are subsequently rounded to satisfy the integer nature of the component-sizing problem.

The purpose of Tent initialization is to provide a more systematically distributed initial population than conventional purely random initialization, thereby supporting broader initial coverage of the 42-dimensional search space8,12.

B. Opposition-Based Learning

After Tent initialization, OBL is applied to the initial population. For each candidate solution, its opposite solution is generated as

$$ x_{i,j}^{opp} = lb_{j } + ub_{j } – x_{i,j} $$

(31)

where \({x}_{i,j}^{opp}\) denotes the opposite value of \({x}_{i,j}\).

The original and opposite candidate solutions are evaluated using the same penalized objective function. The better candidate is retained:

$$ x_{i} = \left\{ {\begin{array}{*{20}c} {x_{i,j}^{opp} ,} & { f\left( {x_{i,j}^{opp} } \right) < f\left( {x_{i} } \right)} \\ {x_{i} ,} & { {\text{otherwise}}} \\ \end{array} } \right. $$

(32)

This mechanism improves the quality of the starting population by simultaneously considering candidate solutions and their opposite counterparts before the main RIME iterations begin.

C. Adaptive Nonlinear Parameter Control

During iteration t, the normalized search progress is defined as

$$ r = \frac{t}{T} $$

(33)

where T is the maximum number of iterations.

The attachment coefficient used in the search process is calculated as

$$ E\left( t \right) = \sqrt{\frac{t}{T}} $$

(34)

and the angular parameter is defined as

$$ \theta \left( t \right) = \frac{t\pi }{{10T}} $$

(35)

To provide a smooth nonlinear reduction in search amplitude, E-RIME introduces the adaptive decay coefficient

$$ \beta \left( t \right) = {\text{exp}}\left[ { – \left( {\frac{{\left( \frac{t}{T} \right)^{2} }}{0.25}} \right.} \right] $$

(36)

Unlike a discrete parameter schedule, this formulation continuously changes the search amplitude as the optimization progresses.

For the soft-rime search, the candidate position is updated around the current global best solution according to

$$ x_{i,j}^{{{\text{new}}}} = x_{j}^{{{\text{best}}}} + r_{1} \cos \left[ {\theta \left( t \right)} \right]\beta \left( t \right)\left[ {h\left( {ub_{j – } lb_{j } } \right) + lb_{j } } \right] $$

(37)

where \({r}_{1}\) is a random number in [-1,1], h is a random number in [0,1], and \({x}_{j}^{best}\) is dimension j of the current global best solution.

The probability of activating the soft-rime update is controlled by E(t).

D. Fitness-Guided Hard-Rime Exploitation

The fitness values of the population are normalized as

$$ F_{i}^{{{\text{norm}}}} = \frac{{F_{i} – F_{{{\text{min}}}} }}{{F_{{{\text{max}}}} – F_{{{\text{min}}}} + \varepsilon }} $$

(38)

where \({F}_{i}\) is the penalized objective value of candidate (i), \({F}_{min}\) and \({F}_{max}\) are the minimum and maximum fitness values of the current population, respectively, and \(\varepsilon \) is a small positive value used to prevent division by zero.

According to the resulting probability, the hard-rime operation moves the corresponding decision variable directly toward the current best solution:

$$ x_{i,\,j}^{{{\text{new}}}} = x_{j}^{{{\text{best}}}} $$

(39)

After the soft-rime and hard-rime operations, the candidate solution is restricted to the predefined variable bounds and rounded to integer values. The new solution replaces the previous solution only when it produces a lower penalized objective value.

E. Conditional Stagnation Restart

E-RIME monitors improvement in the global best objective value during the iterative search. If the best solution improves, the stagnation counter is reset. Otherwise, the counter is incremented:

$$ S_{t + 1} = \left\{ {\begin{array}{*{20}c} {0, \;\left( {F_{best}^{t + 1} } \right) < \left( {F_{best}^{t} } \right) – \varepsilon_{s} } \\ {S_{t} + 1, \;{\text{otherwise}}} \\ \end{array} } \right. $$

(40)

where \({S}_{t}\) the stagnation counter and \({\varepsilon}_{s}\) is a small improvement tolerance.

When the predefined stagnation criterion is reached, poorly performing candidate solutions are reinitialized while preserving the current best solution. The restart mechanism is intended to restore population diversity when the search ceases to improve and thereby provide additional opportunities to explore alternative regions of the solution space.

Together, the four mechanisms modify different stages of the RIME search process: Tent initialization increases initial diversity, OBL improves the initial candidate set, adaptive nonlinear control regulates the search amplitude throughout the iterations, and conditional restart restores diversity when stagnation occurs. Their individual contributions are subsequently examined through an ablation analysis rather than assuming that every mechanism independently improves optimization performance (Figs. 2, 3).

Fig. 2Fig. 2

Initialization phase of the proposed E-RIME algorithm, including Tent chaotic population generation, Opposition-Based Learning, integer/bound handling, fitness evaluation, and initialization of the global best solution.

Fig. 3Fig. 3

Main iterative procedure of the proposed E-RIME algorithm, including adaptive nonlinear parameter control, soft-rime and hard-rime updates, integer/bound handling, fitness evaluation, global-best updating, conditional stagnation restart, and termination.

Experimental and statistical evaluation

To provide a statistically reliable comparison of the stochastic optimization algorithms, PSO, RIME, and E-RIME were evaluated using identical population and search-budget settings. A population size of 60 search agents was employed, and three maximum iteration budgets of 20, 100, and 300 iterations were investigated to assess algorithm performance under limited, moderate, and extended search conditions.

For each iteration budget, each algorithm was executed independently 30 times using different random seeds. The resulting lifecycle-cost values were evaluated using the best, mean, worst, and standard deviation (SD) over the independent runs. In addition, the 95% confidence interval (CI) of the mean objective value was calculated as

$$ CI_{95\% } = \overline{F} \pm t_{0.975,\,n – 1} \frac{s}{\sqrt n } $$

(41)

where \(\overline{F }\) is the sample mean lifecycle cost, s is the sample standard deviation, n = 30 is the number of independent runs, and \({t}_{0.975,n-1}\) is the corresponding critical value of Student’s t-distribution.

To evaluate convergence behavior without relying on a single stochastic trajectory, the mean best-so-far convergence curve over the 30 independent runs was used for each algorithm and iteration budget.

Because E-RIME introduces additional operations compared with baseline RIME, computational effort was also evaluated using the number of objective-function evaluations (FEs) and wall-clock execution time. These indicators complement the iteration-based comparison by accounting for the additional evaluations associated with OBL and the conditional restart mechanism.

An ablation analysis was additionally performed to examine the individual contribution of the four proposed E-RIME enhancement mechanisms. Four variants were evaluated by individually removing Tent chaotic initialization, OBL, adaptive nonlinear parameter control, and the stagnation-restart mechanism while retaining the remaining E-RIME components. The resulting variants were compared with the complete E-RIME algorithm under equivalent optimization conditions.

Finally, a sensitivity analysis was conducted to examine the dependence of the optimized lifecycle cost on major technical and economic assumptions. Variations in solar-resource availability, wind-resource availability, electrical demand, PV cost, wind-turbine cost, battery cost, discount rate, battery lifetime, and component efficiencies were considered. Each sensitivity scenario was independently re-optimized using E-RIME with 60 search agents and 300 iterations, and the resulting lifecycle costs were compared with the nominal case.