Next Article in Journal
Comparative Analysis of Air Pollutant Emissions of Hybrid, Conventional, and Electric Vehicles Considering the Changing Electricity Production Sources in Poland
Previous Article in Journal
Frequency Regulation of Renewable Energy Plants in Regional Power Grids: A Study Considering the Frequency Regulation Deadband Width
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Distributed Multi-Agent Energy Management for Microgrids in a Co-Simulation Framework

by
Janaína Barbosa Almada
1,
Fernando Lessa Tofoli
2,
Raquel Cristina Filiagi Gregory
1,
Raimundo Furtado Sampaio
1,
Lucas Sampaio Melo
1 and
Ruth Pastôra Saraiva Leão
2,*
1
Department of Electrical Engineering, Federal University of Ceará, Fortaleza 60455-760, Brazil
2
Department of Electrical Engineering, Federal University of São João del-Rei, São João del-Rei 36307-352, Brazil
*
Author to whom correspondence should be addressed.
Energies 2025, 18(17), 4620; https://doi.org/10.3390/en18174620 (registering DOI)
Submission received: 29 July 2025 / Revised: 27 August 2025 / Accepted: 28 August 2025 / Published: 30 August 2025

Abstract

The diversity of energy resources in distribution networks requires new strategies for planning and operation. In this context, microgrids are solutions that can integrate renewable energy sources, energy storage systems (ESSs), and demand response (DR), thereby decentralizing operations and utilizing digital technologies to create more proactive energy markets. Given the above, this work proposes a distributed optimal dispatch strategy for microgrids with multiple energy resources, with a focus on scalability. Simulations are performed using agent modeling on the Python Agent Development (PADE) platform, leveraging distributed computing resources and agent communication. A co-simulation environment, coordinated by Mosaik, synchronizes data exchange, while a plug-and-play system allows dynamic agent modification. The main contribution of the present study relies on a system integration approach, combining a multi-agent system (MAS) and Mosaik co-simulation framework with plug-and-play agent support for the very short-term (five-minute) dispatch of energy resources. Optimization algorithms, namely particle swarm optimization (PSO) and multi-agent particle swarm optimization (MAPSO), are framed as an incremental improvement tailored to this distributed architecture. Case studies show that distributed MAPSO performs better, with lower objective function values and a smaller relative standard deviation (15.6%), while distributed PSO had a higher deviation (33.9%). Although distributed MAPSO takes up to three times longer to provide a solution, with an average of 9.0 s, this timeframe is compatible with five-minute dispatch intervals.

1. Introduction

1.1. Problem Statement and Literature Overview

Modern power systems worldwide are increasingly integrating variable renewable energy sources, dispatchable distributed generators, energy storage systems (ESSs), and demand response (DR) programs into distribution networks [1]. In this scenario, the large-scale adoption of distributed energy resources (DERs) and the shift in load demand driven by more proactive consumers have also introduced a new electricity production–consumption paradigm, incorporated into traditional grid topologies. This poses significant operational challenges for maintaining balance, stability, predictability, and efficiency in power grids [2].
To address these issues, distribution networks have required advanced frameworks to optimize energy management and integrate diverse generation sources, such as microgrids [3]. Microgrids can enhance grid reliability by seamlessly switching between grid-connected and islanded modes. They also coordinate stakeholder interests and improve overall system performance, offering several advantages such as load relief, voltage control, and loss mitigation [4].
In addition to embedded component-level control approaches that ensure smooth transition to islanded operation and stability maintenance, microgrids require energy management systems (EMSs) to execute critical functions [5]. These architectures integrate two core functions: economic dispatch optimization and dynamic power flow regulation within the microgrid [6]. Unlike transmission-level EMSs, microgrid EMS applications must reconcile economic optimization objectives with stricter operational constraints, including grid stability and greenhouse gas emission limits [6]. Furthermore, optimal dispatch in microgrids requires considering heterogeneous resources, such as ESSs and controllable loads, while also addressing the intermittency of renewable energy sources and advanced modeling requirements [7].
According to [8], the main challenges in achieving optimal dispatch in microgrids stem from the complex multi-energy coupling relationships and the high heterogeneity of sources and energy equipment. Furthermore, the training of optimal dispatch models for microgrids often faces difficulties related to non-convergence or over-convergence. In this context, a distributed optimal control strategy is proposed in [9] for hybrid microgrids, enabling optimal power dispatch, frequency regulation, and dc voltage control while minimizing the total operating cost. A similar framework combining forecasting, optimal dispatch, and management planning in microgrids is introduced in [10].
The authors in [11] state that the optimal power scheduling of microgrids involves single-objective and multi-objective optimization approaches. In this context, metaheuristics can benefit from parallelization, enabling distributed computation across processors/nodes, as demonstrated in [12]. Notably, this scalability accelerates optimization for large real-world problems [13].
According to [14], parallel metaheuristics have been extensively investigated for their powerful optimization potential, which is expected to significantly impact future computing. In this scenario, several studies have explored parallel metaheuristics for power system optimization. For instance, differential evolution algorithms with multiple subpopulations that dynamically exchange information each iteration were employed in [15] to optimize reactive power flow and reduce electrical losses. Furthermore, the adaptive parallel seeker optimization algorithm solved the optimal power flow problem in [16], integrating series compensators, reducing costs, and minimizing reactive power flow. The exchange of information between subpopulations occurs at each iteration through random selection, where the worst element of one subpopulation may receive values from the best element of another. A parallel computing implementation of a multi-agent coordination optimization (MCO) algorithm was also developed in [17], leveraging swarm intelligence and a consensus protocol to address load balancing problems.
Managing ESSs in dc microgrids has been investigated in [18], which uses particle swarm optimization (PSO) with parallel processing. Meanwhile, the parallel vortex search algorithm (PVSA) and parallel ant lion optimizer (PALO) have been compared in [19]. All techniques were implemented using a hierarchical processor configuration. Similarly, the optimal allocation of distributed generation (DG) units and battery energy storage systems (BESSs) was addressed in [20], combining a bi-level optimization approach and multi-objective mixed integer nonlinear programming. Another solution is reported in [21], where the authors derived a mathematical model with three objective functions based on multi-objective algorithms.
Day-ahead energy market dispatch optimization has been widely studied in the literature, typically performed in hourly intervals over a 24-h horizon [22]. However, due to innovations from major energy companies, such as the California Independent System Operator (CAISO), which offers flexible ramping reserve products, recent studies have focused on optimizing dispatch based on these rules, using intervals of 5 to 15 min [23]. In this context, the optimal dispatch of BESSs and DERs in distribution networks while accounting for reactive power capacity has been formulated as an optimization problem in [24]. The authors demonstrate the model’s superior performance compared to other solutions, such as the vortex search algorithm (VSA), parallel PSO (PPSO), and a genetic algorithm. The master–slave methodology proposed in [25] relies on the parallel discrete VSA (PDVSA) to provide optimal dispatch of BESSs, yielding reduced losses.
The multi-objective PSO (MOPSO) algorithm proposed in [26] enables proper energy management of BESSs connected to a dc microgrid with photovoltaic (PV) generators, minimizing operating costs and energy losses. Considering a broader scenario, the master–slave framework described in [27] relies on the non-dominated genetic algorithm (NSGA-II) and aims to solve the energy coordination problem in ESSs in the context of active distribution networks. Conversely, the two-level energy management approach presented in [28] can provide optimal coordination and dispatch of a multi-microgrid system. The results show that it is possible to achieve a decentralized architecture capable of minimizing overall costs while improving the accuracy of load demand forecasting.

1.2. Research Gaps, Contributions, and Organization

Despite significant advances in parallel metaheuristics and distributed optimization for microgrid dispatch, several research gaps remain. Existing studies rarely propose unified frameworks that ensure the scalability of adaptive, self-tuning parallel algorithms, particularly in environments where additional devices contribute processing power without increasing central unit requirements. Moreover, there is a lack of standardized benchmarks for comparing parallel optimization methods, and limited investigation into approaches capable of very short-term dispatch, which is increasingly critical in networks with high penetration of stochastic renewable sources and rapid variability in wind and solar generation.
Given the above, the main objective of this work is to propose an energy management model for microgrids to optimize energy resources and reduce overall costs, using a multi-agent system (MAS) and distributed metaheuristics in a co-simulation environment. Parallel metaheuristics are used to leverage commonly available hardware in devices, distributing optimization to ensure scalability. As new devices are added, their processing power contributes to problem-solving without requiring an increase in central unit capacity. Additionally, this approach must support very short-term dispatch, a key trend in networks with a high penetration of stochastic renewable sources. Some studies define very short-term as ranging from a few minutes up to a few hours, which was common when power systems had a hydrothermal profile. However, very short-term might be defined differently in modern power systems, which increasingly integrate large amounts of intermittent renewable energy. In contemporary systems, very short-term often refers to much shorter intervals (e.g., minutes to a few hours) due to the need to manage the rapid variability of wind and solar power.
A brief comparison of the proposed approach with similar research is provided in Table 1. In this scenario, the proposed framework aims to
-
Model cost functions for energy resources by category, including dispatchable and variable sources, energy storage, and DR, as well as the objective function of the problem;
-
Utilize a multi-agent system and a centralized and distributed metaheuristic optimization algorithm in a co-simulation environment;
-
Calculate very short-term resource dispatch every five minutes to manage uncertainties related to energy sources and loads;
-
Implement a plug-and-play feature in the dispatch system, allowing energy resources to enter or exit spontaneously or on demand;
-
Develop quasi-dynamic simulation input states with five-minute intervals;
-
Evaluate the functionality of centralized and distributed dispatch methods;
-
Define test case scenarios for validating the energy resource management model.
The main contributions of the present study include the following topics:
(a)
Development of a plug-and-play system for integrating energy resources into an agent-based environment for very short-term optimization.
(b)
Analysis and parameterization of objective functions for key energy resources using the per unit (pu) representation.
(c)
The distribution of metaheuristics among agents, which contributes to increasing the fault tolerance of the system.
(d)
Using different metaheuristics in parallel at the algorithm level, incorporating competition and cooperation steps to leverage distributed hardware through MASs.
The remainder of this work is organized as follows. Section 2 describes the proposed framework, including its formulation as an optimization problem. Section 3 presents three case studies, also comprising a thorough discussion, followed by a comprehensive analysis of execution time and convergence of the algorithms. Section 4 concludes the study and outlines future research directions.

2. Methods and Computational Tools for Microgrid Resource Management

The transition from traditional power systems to smart grids is advancing through automation and control, especially at the distribution level. This shift enables the development of microgrids in medium- and low-voltage networks, which rely on features such as automatic control, smart metering, and renewable energy integration. Effective resource management is crucial for reducing costs, enhancing reliability, and meeting consumer needs. In this context, this section explores the simulation environment, modeling tools, and the use of distributed metaheuristic algorithms for optimizing DERs.

2.1. Co-Simulation

Designing and implementing solutions for complex systems like microgrids requires multifunctional platforms that integrate various aspects for realistic analysis. Both static analysis, comprising power flow and short circuit studies, and dynamic analysis, related to electromechanical transients and control systems, involve complex nonlinear and differential equations, implying a significant computational burden when using a single solver [29].
Co-simulation approaches enable interoperability between models and solvers across various developers and platforms, enhancing reusability and extending project lifespans as technologies evolve. Frameworks such as Mosaik simplify co-simulation by focusing on tools rather than application programming interfaces (APIs). Mosaik supports functional mock-up unit (FMU) models through adapters and, since version 3.0, allows simulator interaction based on time, events, or a hybrid approach, making it versatile for smart grid co-simulation [32].
In this study, metaheuristic algorithms are implemented through smart agents within a co-simulation environment. The environment utilizes the API introduced in [33], facilitating integration between the Python Agent Development Framework (PADE) and Mosaik. Each energy resource is linked to an intelligent agent, with each agent set up as an independent simulator within Mosaik. At the current development stage, the only data exchanged between the agents and Mosaik is the simulation time, ensuring synchronized message exchange aligned with the study’s objectives.

2.1.1. MAS

Using MASs enables distributed control, offering an attractive alternative for managing microgrid resources. A MAS consists of three layers: the physical layer, where energy is generated and consumed with sensors and actuators providing data and control; the agent interaction layer, where agents communicate, exchange information, and optimize microgrid costs through synergy and proactive behavior; and the data analysis and decision layer, which stores data, enhances forecasting models, and allows decision-makers to adjust agent parameters for improved flexibility. In this work, the agent environment is modeled in PADE, which supports real-world applications and uses communication protocols based on the Foundation for Intelligent Physical Agents (FIPA) standard. In PADE, the three main FIPA protocols are implemented:
(a)
FIPA-Request: manages the sending of simple requests and responses.
(b)
FIPA-Subscribe: enables broadcast messaging to multiple agents subscribed to a “publisher” agent.
(c)
FIPA-Contract-Net: supports negotiation between agents.

2.1.2. Time Settings in Co-Simulation

This work utilizes Mosaik’s time-based simulation, which mirrors real-world system behavior by using discrete time steps. The step size is chosen based on study needs and computational power, with Mosaik automatically matching it to the smallest interval among connected simulators for synchronization [32]. For the analysis, a 500 ms time resolution was set, meaning 600 steps simulate five minutes of system behavior. Mosaik effectively manages time coordination, allowing the simulation to be shorter than the actual physical phenomena. Crucially, it ensures all agents progress synchronously: a new step only begins once every agent has reported its current simulation time, preventing any agent from advancing prematurely.

2.1.3. Communication Protocols and Plug-and-Play Function

The simulations are implemented using both centralized and distributed optimization algorithms. In the centralized approach, a coordinating agent, referred to as the plug-and-play agent AgPP, manages all input data. In the distributed approach, each energy resource agent runs its optimization. This dual implementation allows for comparison between the two methods.
In the distributed setup, optimization algorithms are embedded within the agents themselves, and two FIPA-standard communication protocols are employed for message exchanges:
(1)
FIPA-Subscribe: used to identify and announce which agents are available and ready to participate in the optimization process.
(2)
FIPA-Request: used during the execution of the distributed optimization.
Figure 1 illustrates the message exchange required to establish and initiate distributed optimization. It shows three equipment agents (AgEQ1, AgEQn, and AgEQn+1), representing energy resources in the microgrid. The AgPP, which coordinates resource integration, also implements the centralized PSO and multi-agent particle swarm optimization (MAPSO) algorithms, enabling comparison with the distributed approach. Message colors indicate which protocol is used at each step. FIPA-Subscribe messages (yellow, numbered 1, 2, 3, and 8) handle the plug-and-play function. This enables the dynamic inclusion and exclusion of components in the optimization process, making the simulation flexible and adaptive. Optimization automatically adjusts to the resources available at each simulation step. FIPA-Request messages (purple, numbered 4, 5, 6, and 7) are used before the optimization begins. Messages 4 and 5 are relevant to both centralized and distributed methods, as they update equipment information. Messages 6 and 7 are specific to the synchronization of the distributed optimization process.
The plug-and-play function is essential for real-world applications and is common in intelligent devices. Figure 1 represents two full optimization intervals and the beginning of a third. This function starts when agents request subscription to the list of active agents managed by the AgPP, which corresponds to message type 1. The AgPP responds with an acceptance message (type 2) within the same simulation step.
A new optimization interval begins when the AgPP sends the updated list of active agents to all participants (message type 3). It then sends REQUEST messages (type 4) to the agents on this list, requesting updates on their parameters and forecasts for variable renewable energy resources and loads during the upcoming interval. In response, agents send INFORM messages (type 5), which include updated forecasts and allow for adjustments in device parameters, such as load flexibility for DR or the maximum discharge power of ESSs. Messages 6 and 7 are used solely for synchronizing all agents to the same simulation step. These are required only in the distributed simulation; centralized optimization algorithms do not need this synchronization mechanism.
The following message exchanges, which are responsible for distributing the algorithm itself, will be detailed later. However, if the number of agents changes during these exchanges, such updates only take effect in the next optimization interval, as shown in Figure 1. For example, during the first interval, a new agent (EQn+1) joins, but since optimization is already underway, the device will only participate in the next interval. In the second interval, the agent EQn sends a subscription cancellation request (message type 8), indicating its departure from the network. This change also takes effect in the subsequent interval.
Each agent determines its list of neighbors based on the list of active agents sent by the AgPP at the beginning of each new optimization interval (message type 3). This list is updated based on subscription and unsubscription requests from agents participating in the optimization. Figure 2 illustrates how neighbors are ordered by address. In this work, a ring topology is used, allowing each agent to have up to two neighbors. The agents’ addresses can be predefined (e.g., electric vehicles in a parking lot) or determined using geolocation. For simplicity, predefined addresses identified by letters are used in the example. A new agent (EQPV) sends a subscription request with its location in Figure 2a. The AgPP updates the list and sends the new order to all agents. The schematic shows both the address mapping and the updated positions after the new agent joins. Each agent then uses the updated list to identify its neighbors. The rule for forming communication links can be customized depending on the available network infrastructure.
Assuming a maximum of two neighbors for the example in Figure 2a, each agent identifies its neighbors according to (1).
l i s t V Z E Q F C = EQ FL , EQ BT ,   l i s t V Z E Q F L = EQ PL , EQ FC l i s t V Z E Q P L = EQ PV , EQ FL ,   l i s t V Z E Q P V = EQ TG , EQ PL l i s t V Z E Q T G = EQ BT , EQ PV ,   l i s t V Z E Q B T = EQ FC , EQ TG .
Figure 2b shows a change in neighbors due to the departure of agent EQTG. After unsubscribing, the list is updated, and a new neighbor arrangement is formed, according to (2). This neighbor list guides each agent in exchanging information during the competition and cooperation phase of the distributed optimization.
l i s t V Z E Q F C = EQ FL , EQ BT ,   l i s t V Z E Q F L = EQ PL , EQ FC l i s t V Z E Q P L = EQ PV , EQ FL ,   l i s t V Z E Q P V = EQ BT , EQ PL l i s t V Z E Q B T = EQ FC , EQ PV .

2.2. Distributed Parallelism of Metaheuristics in Intelligent Agent Environments

This section explores parallelism in metaheuristics, a technique for distributing algorithm processing to improve efficiency and solution quality, especially for large-scale or real-time problems. Parallelism can be implemented in two main ways: distributed and centralized. A distributed solution involves completely separate hardware that requires communication, making it ideal for computationally expensive tasks. Alternatively, a centralized approach is limited to the processing cores of a single machine with shared memory.
At the algorithm level, parallelism can occur independently or cooperatively. In independent parallelism, algorithms run separately with different parameters or initial solutions, without altering their behavior. In cooperative parallelism, algorithms exchange information during execution, changing their behavior. This requires defining what information is exchanged (solution, set of solutions, or parameter), when (synchronously or asynchronously), with whom (topology), and how it is used.
Other levels of parallelism include the iteration level and the solution level. The first focuses on distributing the computationally intensive evaluation of solutions across different hardware, without changing the algorithm behavior. The solution level divides large data sets for processing when the objective function or constraints can be partitioned.
This work implements distributed parallelism at the algorithm level in a cooperative manner. Unlike a centralized, non-parallel approach used for comparison, this setup involves synchronous information exchange at each iteration among agents. The parallel algorithms run within agents associated with energy resources, using a ring communication topology. They share the best solution from each algorithm, not just for updating, but for a competition and cooperation step based on the MAPSO algorithm, which generates a new, improved solution from neighbor interactions.
Figure 3 shows the flowchart of the steps for the algorithms used in this study, PSO and MAPSO, executed internally by the agents. The purple color highlights indicate the moment within the iteration when the competition and cooperation step occurs between agents in the distributed implementation. An optimization interval represents the calculations performed for the dispatch over the next five minutes, starting at t0. The first action, applicable to both centralized and distributed problems, is the transmission of the list of active agents. This message is sent by the AgPP to all agents who subscribed up to t0 − 1. Simultaneously, another message is sent by the AgPP, requesting parameter updates from agents participating in the optimization during the current interval.
The equipment agents (AgEQs) react to these two messages. For the first message, they determine their list of neighbors for interaction during parallel optimization. The number of neighbors can vary and is independently defined for each piece of equipment. Although simulations were performed with a simple ring communication topology, the plug-and-play functionality ensures that any network topology can be created and updated by adding new equipment.
The second message received by the AgEQ requires a response with updated parameters. This message includes forecasts for load and generation from variable sources, as well as the parameters of the objective function. Based on this information, resource owners can forward the necessary data to the AgPP for constructing a new cost function, including factors such as increased fuel costs, changes in load flexibility levels, and storage usage constraints.
Centralized metaheuristics were implemented within the AgPP, reducing the number of messages exchanged, speeding up execution, and increasing information confidentiality. On the other hand, distributed metaheuristics are implemented in each AgEQ. Initialization occurs only upon request from the AgPP, enabling synchronization across all agents.

2.3. Modeling of the DERs

In the problem addressed in this work, only the equality constraint associated with the power balance of resources must be satisfied. Thus, for the summation to be zero, energy production elements have a positive sign, while consumption elements have a negative sign. Equality constraints do not inherently exist in the problem and, therefore, must be modeled as penalties. There are various approaches to handling equality constraints, ranging from simple and intuitive methods to adaptive mechanisms.
The penalty incorporated into the objective function is the summation of the power values. If the constraint is satisfied, it does not affect the total cost Ctotal. However, if the constraint is not met, the cost function will increase, making the solution inappropriate. The constant m is always positive and greater than one, and it must be of the same order of magnitude as the cost of the most expensive resource in the problem. Thus, it is possible to write (3), subjected to the constraints given by (4).
C t o t a l = min Ξ i C i p i + m i p i .
P i min p i P i max ,   i ,
where C i is a cost function, specific to each type of resource i, which depends on the available power of the resource, p i ; P i min and P i max are the minimum and maximum power associated with a given resource i; and = p 1 , p 2 , , p i is the set of solutions obtained.
The two main dispatchable sources are thermoelectric and hydroelectric plants. The cost analysis for hydroelectric plants is based on the future cost and the immediate cost of energy when these units have a regulation reservoir. However, small-scale plants are generally run-of-river units and lack regulation capacity. Therefore, the modeling of these plants can follow that of stochastic sources. On the other hand, the cost for thermal resources ( C t h e r m i ) is widely represented as a quadratic function, expressed as (5) [34].
C t h e r m i p i = a i p i 2 + b i p i + c i ,
where p i stands for the power supplied by the source, while ai, bi, and ci are the coefficients assigned to each source i. The fixed cost is represented by ci, while bi and ai account for the linear and quadratic costs as a function of the power supplied, respectively. The maximum power provided by this source is the nominal power, while the minimum power depends on the resource utilized. For a fully flexible resource, the minimum power would be zero. However, certain resources have a degree of inflexibility that must be considered to establish operational limits.
It is necessary to represent (5) in pu, which requires adjusting the coefficients using base values for cost, Costi,base, and power, Pi,base. Thus, the original coefficients are modified as in (6)–(8).
a i , p u = a i P i , b a s e 2 C o s t i , b a s e ,
b i , p u = b i P i , b a s e C o s t i , b a s e ,
c i , p u = c i 1 C o s t i , b a s e ,
where the sum of the coefficients ai,pu, bi,pu, and ci,pu must equal 1.
The objective function for load management is a utility function, also known as social welfare. When optimized, the utility function should be maximized, resulting in the maximum benefit for the consumer. A mathematical formulation commonly adopted in the literature is presented in (9) [35].
U t i l i t y i p i = a i p i 2 + b i p i , if   0 p i b i 2 a i b i 2 4 a i , if   p i > b i 2 a i ,
where p i stands for the power consumed by the load, which, by convention, is always greater than zero. Therefore, the coefficients ai and bi must have opposite signs. Furthermore, since this is a maximization function, the coefficient ai must be negative. Therefore, the cost function, which depends on the load demand, is one of the terms in the optimization problem that aims to minimize the total cost, as shown in (10).
C l o a d i p i = U t i l i t y i .
ESSs lack a unanimous cost modeling approach in the literature, with some proposals even disregarding their costs entirely [30]. Since batteries are the most commonly used storage devices, various objective functions have been proposed for the economic dispatch or unit commitment of energy resources in microgrids, as discussed in [31]. For better management of ESSs, where the cost increases as the resource becomes scarcer, the modeling proposed in [36] was adopted. In this approach, costs are independent of the technology and different cost ranges are considered based on the variation in the state of charge (SoC), according to (11), subjected to the constraints given by (12).
C s a i p i = a i p i + n P i max ( 1 SoC i ) 2 + b i p i + n P i max ( 1 SoC i ) + c i ,
SoC i SoC max SoC max SoC min P i c h , max p i SoC i SoC min SoC max SoC min P i d c h , max ,
where C s a i is the cost for an ESS i considering a supplied power of pi; SoCi is the current SoC; P i max is the nominal maximum discharging power; SoC max and SoC min represent the maximum and minimum values for the SoC, respectively; P i c h , max and P i d c h , max denote the maximum permissible discharging and charging powers, respectively. The coefficients ai, bi, and ci play the same roles as the coefficients defined for other resources. To express (11) in pu, in addition to the considerations made in (6)–(8), it is necessary to divide P i max by the considered base power.
Non-dispatchable sources include wind, PV, and small hydroelectric plants without regulation capacity. None of these primary resources has variable costs associated with fuels, nor does their usage significantly impact the lifespan of the equipment, as is the case with batteries due to the number of charge and discharge cycles. In dispatch problems aimed at minimizing total cost, such as the one addressed in this study, it is feasible to assign zero cost to these non-dispatchable sources. However, for system reliability, it is essential to forecast these inherently stochastic sources and include them in the power balance constraint.
Since resource dispatch is performed every five minutes and very short-term forecasts generally have an error of less than 5%, the operational reserve was considered as a 3% error in forecasting systems for PV generation and load, always accounting for the underestimation of resources. Thus, the operational power reserve for the microgrid, R P O e M G , is given by (13).
R P O e M G = 3 % P l o a d f o r + P n d f o r
where P l o a d f o r and P n d f o r are the total forecasted load and non-dispatchable resources, respectively.
Thus, agents performing forecasts incorporate the required variation for operational reserve directly into their data. When submitting their information for algorithm processing, load agents and non-dispatchable resource agents provide power forecasts that already include these adjustments, as stated in (14) and (15).
P l o a d = 1.03 P l o a d f o r .
P n d = 0.97 P n d f o r ,
where P l o a d and P n d are the total power associated with load and non-dispatchable resources, respectively.
Table 2 summarizes the modeling of DERs considered in the present study. Notably, network losses and grid constraints were not included in the analysis.

3. Results and Discussion

3.1. Parameterization of Resources

In the context of increasingly dynamic electricity markets, the optimization problem addressed in this work can be analyzed from two operational perspectives. The first scenario corresponds to an islanded microgrid, operating independently of the main power grid, similar to the renewable energy communities in the European Union. The second scenario involves a connected and distributed microgrid, where resources such as loads, generators, and ESSs are managed by a retail aggregator, with zero-exchange contracts with the utility, resembling a virtual power plant (VPP). Notably, the resources considered in this study include a PV generator, two thermal generators, a BESS, and electrical loads with varying priority levels for participation in DR programs.
The selected thermal sources, biomass and natural gas, are chosen to distinguish between their associated costs, providing greater flexibility to the microgrid. The cost equation coefficients are expressed in pu relative to the nominal values of the resources. Additionally, a minimum cost of 10% was set for each component of these resources. Thus, the fixed, linear, and quadratic costs for biomass energy were set at 10%, 80%, and 10%, respectively. For natural gas generation, the coefficients were 10%, 40%, and 50%. A higher linear cost share was assigned to biomass due to the preprocessing required before combustion, which is proportional to the quantity and quality of the resources. For natural gas, the quadratic cost was set 10% higher than the linear one, reflecting risks such as supply shortages and/or fluctuations in international markets affecting domestic prices.
BESSs, which are more compatible with distribution systems and, consequently, with microgrids, have their lifespan limited by the number of charge/discharge cycles and high temperatures, which are linked to operating currents. For this reason, most of the cost is associated with the quadratic cost, with a coefficient of 90%. Another key aspect of these systems is their nominal characteristic, expressed by their capacity (Ah or MWh). Power limitations are also specified by manufacturers based on this capacity. While the typical charging rate is 20% of nominal capacity, discharging can reach up to 50%. Therefore, the system was designed for a maximum discharge power of up to 30 MW, resulting in a capacity of 60 MWh. The nominal cost for this resource was set at 10% higher than that of natural gas. Since typical remuneration values for storage systems are not yet established in Brazil, this cost was adopted to reflect the resource’s flexibility.
Loads are modeled based on their utility. As previously discussed, the coefficients of their objective function, in pu, are +1.0 and −2.0. Real values are calculated based on nominal power and nominal cost, which, in the case of loads, represents a hypothetical unmet demand cost. This value can vary depending on the priority of the load. For critical loads, this nominal cost should be significantly higher than the cost of other resources, whereas for more flexible loads, it can vary according to their availability for DR programs. The system exhibits high resilience by design, whereas a comprehensive fault tolerance analysis falls outside the scope of this study in particular.
Table 3 summarizes the parameters adopted for the simulations. The coefficients are provided in pu, based on the equipment’s specifications. To obtain the objective function in pu, these coefficients must be converted to a single base. Additionally, the maximum values of the variable resources are determined by the curves shown in Figure 4a,b, which indicate the values for each instant across the 288 optimization intervals simulated over a day.
The nominal costs for the thermal sources were based on their actual market costs. For the other resources, costs were determined based on practical estimates, as listed in Table 3. These values are provided in MWh but must be converted to USD/MW for base transformations. To perform this conversion, the energy consumed or generated by each resource during the five-minute dispatch interval was calculated, assuming the resources operate at their nominal values.
Table 4 presents the coefficient values calculated in real terms. The importance of first presenting these values in pu and only then transforming them lies in ensuring that the selection of these parameters during modeling is performed consciously and appropriately for the desired objectives.
Other relevant parameters for the simulations are listed in Appendix A. It is important to note that the results of the proposed framework are sensitive to the parameterization of resource cost functions and load utility functions. Small variations in the chosen coefficients may affect dispatch outcomes, including the balance between priority and flexible loads, the utilization of storage systems, and the relative competitiveness of different generation sources. Therefore, careful tuning of these parameters is essential to ensure that system behavior aligns with operational objectives, particularly in avoiding undesired curtailment of high-priority loads and promoting the efficient use of available resources.

3.2. Convergence of Variables in Distributed Metaheuristics

The first analysis conducted aims to assess whether the distributed metaheuristics, at the end of the iterations, converge to the same value for each of the problem’s variables. The parameter varied in the simulations to evaluate this characteristic is the number of competition and cooperation stages that must occur between the agents of the MAS. The first simulation was performed with message exchange at each iteration. Additional simulations were conducted with communication between agents at every 5, 10, 25, 50, and 100 iterations of the metaheuristic. All simulations were conducted for a total of 500 iterations. Therefore, in the last test, only five stages of competition and cooperation occurred.
Furthermore, three different distributed simulations were considered for each case study. Table 5 presents the first two simulations, where AgTB and AgTG represent the thermal biomass and natural gas sources, respectively, with identical metaheuristics adopted for all agents. In the last distributed simulation, the AgPL, AgFL, and AgBT agents executed the PSO algorithm, while the other agents ran the MAPSO algorithm. The parameters considered for all metaheuristics comprise 25 particles, 500 iterations, exploitation and exploration coefficients of 2, a penalty multiplier of 500, Cbase = USD 1000, and Pbase = 100 MW.
The simulation was conducted for a full day. For each of the 288 simulated dispatch intervals, variations in load and PV generation forecasts were considered. The BESS was initially assumed to have an SoC at its minimum value of 20%. Other assumptions included the arrival and departure of agents throughout the day. The AgFL agent starts participating in the tenth optimization interval, staying until the end of the day. The AgPV agent enters the optimization in the interval corresponding to 05:40 h, remaining until 17:10 h, participating in 138 optimization intervals.
Figure 5 and Figure 6 present the results for each of the optimized variables and the objective function for cases of high and low message exchange, respectively. Each column shows results for different parallelism configurations, while each row represents the output of the variables at the end of each iteration, for every five-minute interval throughout the day.
Figure 5 shows perfect convergence for all three simulations. In contrast, Figure 6 denotes differences in the final output values of each metaheuristic, although the variations are small. These variations were more significant between 08:00 h and 16:00 h, a period of high PV generation, which has the lowest cost and thus high priority for usage. These differences are noticeable only in Figure 6, where the competition and cooperation step occurs every 100 iterations, with a lower message exchange flow.
The plots evidence the entry of AgFL and AgPV into the optimization, demonstrating the plug-and-play feature for a system designed to operate in the short term. However, only numerical evaluation can appropriately assess the forms of distributed parallelism implemented in the metaheuristics. Thus, one optimization interval was highlighted as an example to evaluate convergence among the distributed metaheuristics. For this interval, each agent’s metaheuristic returns power values for each energy resource, which are the output variables of the optimization. The evaluation involves checking the maximum variation in these output variables at the end of the optimization for that interval.
Table 6, Table 7 and Table 8 correspond to the optimization interval at 15:25 h. At this time, the forecasts were 17.45 MW for the priority load, 27.24 MW for the flexible load, and 17.75 MW for PV generation, and the BESS’s SoC was 90.94%. Table 6 shows a case where the variables do not converge, but the objective function does, highlighting why the objective function can converge even when the variables do not.
Table 7 illustrates the most likely case, where the variables converge, ensuring that the objective function also converges. Table 8 presents a scenario where neither the variables nor the objective function converges. The construction of the tables considers rounding to four decimal places for the variables and six decimal places for the objective function. Additionally, the values in MW and USD were obtained from the pu values after rounding. The issue of rounding influenced the results, which will be revisited and adjusted in the following sections. In subsequent evaluations, rounding will not be considered, except for those automatically performed by Python version 3.8.18 when storing data, which returns values with up to 17 decimal places.
Table 9 presents the results for all simulated cases, including those not shown graphically, as they do not exhibit significant differences compared to the results shown in Figure 5 and Figure 6. The first column indicates the frequency at which the competition and cooperation steps should occur based on the number of iterations. The first row shows the simulation results represented in the graphs of Figure 5, while the last row corresponds to the values obtained from the simulations in Figure 6.
For each simulation, three columns are included. The column labeled “var” specifies the number of intervals during the day in which all output variables converged among the parallel metaheuristics. An interval is not counted if at least one output variable has different values at the end of the optimization interval across two or more running metaheuristics. The column “fobj” also reflects convergence but focuses on the final value of the objective function. Lastly, the column “Δmax” indicates the maximum absolute variation for any output variable during intervals where no convergence occurred.
Analyzing the results of a single simulation day, it is observed that distributed simulation #1, with information exchanged at every iteration, demonstrated the best performance. All variables converged in 280 out of the 288 simulated intervals, as it exhibited the smallest variation among the output variables, corresponding to only 0.2% of the nominal power of the smallest resource. It is worth noting that this initial evaluation does not assess the algorithm’s performance in achieving the best solution but rather focuses on the distributed nature of the implementation for the proposed application. This analysis highlights the potential for parallel metaheuristic implementation in distributed dispatch. While feasible, it requires ensuring reduced variation among the participants’ output variables. Adjustments to algorithm parameters, such as increasing the number of particles or using different characteristic coefficients across parallel metaheuristics, can help achieve lower variations with less frequent message exchanges.

3.3. Load Shedding

The simulated day in this section corresponds to the outputs shown in Figure 5 and Figure 6. For the models and methods applied, the observed outputs represent an optimal or near-optimal response, as the optimization is performed using metaheuristics. However, the goal of fully meeting the priority load is not achieved. It is evident that there is load shedding for both flexible and priority loads, as shown in Figure 7.
Regardless of the parallelism method or the metaheuristic used, there is always a reduction in the priority load. This occurs even with the storage system maintaining an SoC between 80% and 90% during the period from 20:00 h to 21:00 h where the priority load shedding is more significant. Figure 8 illustrates the SoC variation throughout the day. From this analysis, it can be concluded that the cost of unmet priority load is not sufficiently higher than the cost of other resources. Therefore, to model a load that must be fully met, it is necessary to either increase the cost of unmet priority load and/or reduce the cost of other resources, such as the battery.

3.4. Probabilistic Analysis

This section compares distributed methods with centralized ones to evaluate their performance. Additionally, the load objective function is modified to explore modeling options that ensure priority loads are fully met before other loads. Three case studies are established: the first modifies the cost function model for the load, the second adjusts parameterization based on the results of the first case, and the third alters the cost function parameterization for batteries to assess changes in resource behavior. The presented data reflect the results of 50 runs for each of the five evaluated methods, comprising two centralized ones (PSO and MAPSO) and three distributed ones.
Among the distributed methods, there are homogeneous approaches, where all agents execute the same metaheuristic (PSO or MAPSO), and a heterogeneous distributed method, where agents execute at least two different metaheuristics. In the simulated cases, distinct coefficients cv1 and cv2 were assigned to the distributed metaheuristics. For AgPL, AgPV, and AgBT, the coefficients were set to 2.2, while the other agents used values of 2. This variation is one of the advantages of parallelism, as it allows the use of different parameters to enhance the search for the optimal solution. The initial settings comprise a PV generation of 18.51 MW, a flexible load of 28.14 MW, a priority load of 15.2 MW, an initial SoC of 50%, 156 particles for the centralized method, 25 particles per agent for the distributed method, and 10 iterations per message in the distributed approach.

3.4.1. Case #1: Evaluation of the Exponential Load Model

This simulation was conducted by modifying the load modeling, using the exponential function given in (16), with the parameters summarized in Table 10. The values for βi,pu were selected so that, when normalized to the same base, they maintained a 5:1 ratio, with 5 corresponding to the highest-priority load. The costs remained as previously defined.
C l o a d i p i = K i 1 2 1 + e β i p i ,
where Ki adjusts the amplitude, while βi determines the decay of the cost function for load i.
Figure 9 illustrates the progress of the objective function over 500 iterations. Figure 10 provides a more detailed view of the iterations up to the 150th, where each of the 50 colored lines represents an individual execution, illustrating the convergence consistency for the PSO and MAPSO algorithms. Furthermore, a similar representation has been adopted for the forthcoming results. It is observed that, in most cases, MAPSO converges to the best solution in fewer than 50 iterations. Both algorithms yield solutions that do not reach the optimal value, exhibiting a consistent error throughout the execution. The execution time of the two algorithms, while seemingly close, shows a 21.26% increase per MAPSO execution compared to PSO.
Figure 11 illustrates the convergence of metaheuristics for each agent across the three parallelism models. The first and second columns represent exclusive parallelism for PSO and MAPSO, respectively. The third column displays the results for different algorithms running in parallel. In all three types of distributed parallelism, the influence of the competition and cooperation stages is more pronounced in PSO. This is evident through several steps of repeated width reductions, showing multiple decreases in the objective function every 10 iterations due to the frequency of message exchanges between agents.
Table 11 presents the output variables obtained for the best solution. As expected, there is no curtailment of the priority load. However, the flexible load is not met at any percentage, despite the objective function showing a non-supply cost higher than the operating cost of the biomass thermal plant. The model adopted for the priority load meets the requirements, but the parameters for the flexible load do not. Therefore, an alternative approach will be proposed for the new case.

3.4.2. Case #2: Adjustment of Parameters in the Exponential Load Model

In this simulation, only the coefficient βi,pu of the exponential function for the flexible load was modified, increasing to 1.5 pu. This is to ensure that, when normalized to the same base, the flexible load’s objective function has the same slope as the priority load. Thus, the prioritization of load supply is determined solely by the cost of non-supply, which is higher for priority loads. Figure 12 represents the behavior of PSO and MAPSO up to the 150th iteration. Not all iterations are shown, as the goal is to compare with distributed methods. MAPSO once again demonstrated better convergence across all executions.
Figure 13 presents the convergence of the distributed algorithms for each applied metaheuristic. Considering that the total number of particles in the centralized (156) and distributed (150) executions is nearly identical, the distributed PSO demonstrates superior performance compared to its centralized version. MAPSO, even in its centralized form, shows better performance, suggesting that the number of message exchanges in the distributed version can be reduced to ensure distributed optimization with minimal impact on the final result. The modification in the flexible load model’s parameterization had the desired effect, achieving the intended outcome. This demonstrates that the flexibility of the load can be adjusted by altering its nominal cost value. With an increase in this cost, the load tends to have its priority of supply enhanced, serving as a competition parameter in load modeling.
Table 12 provides the output variables for the best solution. The BESS in previous cases exhibited the same charging value, reaching its limit for the SoC. In the next case, the nominal cost of this resource will be modified to observe its response under the new condition.

3.4.3. Case #3: Modification of Battery Model Parameters and Initial SoC

In this case, the cost of the BESS was reduced to match the nominal cost of gas thermal generation, and the initial SoC was increased to 95%. The adjustment in nominal cost resulted in new coefficients in pu. However, the values of ai,pu, bi,pu, and ci,pu presented in Table 3 remained unchanged. Figure 14 and Figure 15 illustrate the convergence of the centralized and distributed optimization methods, respectively. In this scenario, the distributed MAPSO performed slightly better than its centralized counterpart, demonstrating the algorithm’s effectiveness in finding improved solutions. Therefore, in distributed applications, it is advisable to include at least one agent executing this metaheuristic. Regarding the distributed PSO, its performance can be enhanced by increasing the interaction between agents. In all three cases simulated in this section, the competition stage was set to occur every 10 iterations; however, this interval can be shortened depending on the available communication channels.
The best result obtained in the simulations is presented in Table 13. The BESS, which was charging in the previously proposed scenarios, started supplying energy to the system in this case, albeit with a reduced power output compared to its nominal power. Other scenarios, such as low PV generation or higher loading, require further investigation.
Another important analysis involves thermal generation. In the solution, the gas thermal generation, despite its higher cost, generates more energy than the biomass thermal source. The boxplot presented in Figure 16 is a useful tool for interpreting the results. Each graph displays the statistics of the output variables for all five simulated methods. The y-axis indicates the variable being evaluated. For the distributed model, the results of a single metaheuristic were chosen for presentation, as the data correspond to the final iteration and are all very close to one another.
Analyzing these results reveals that the algorithm showed little variation in the biomass thermal generation. Similar behavior was observed for the priority load and PV generation, whose models are expected to ensure a full supply of the load and no curtailment of PV generation. Thus, a new evaluation of the parameterization adopted for these resources may help determine whether there are issues with the models or whether the response is appropriate for the conditions and constraints of the problem.

3.4.4. Execution Time Evaluation

Distributed simulation #2 stands out among the three distributed methods. However, it has a higher execution time, with an average increase of 69.64% compared to distributed simulation #1, which exclusively uses PSO. This increase in execution time is understandable due to the implementation of self-learning and additional calculations. The self-learning stage implemented in MAPSO, although involving few calculations, is an iterative process nested within another, resulting in a significant computational burden. The method combining both metaheuristics, that is, distributed simulation #3, shows intermediate performance between the two exclusive methods. This is also reflected in its execution time, with an average increase of 38% compared to the distributed PSO parallelism version.
The execution times for the three simulated cases are summarized in Table 14. These times are comprehensive, including the initialization of agents, forecast updates, and message exchanges before and during execution in the case of distributed methods. It is worth noting that the parallel execution of metaheuristics was carried out on the same machine with identical processing power. In real-world applications, one of the advantages of parallel metaheuristics is their ability to run distributed processes across different hardware, which is particularly useful when addressing scalability issues.

3.4.5. Convergence Analysis with Adjusted Models

This section reanalyzes the convergence of the algorithms, evaluating the behavior of the loads throughout the day when adopting the exponential model. All the other parameters remained unchanged. Table 15 presents the convergence results for the algorithms using the new load model, without considering rounding errors. In terms of convergence, the results reflect the data more accurately compared to cases #1 to #3, with the best performance recorded for the case where all algorithms use MAPSO, involving the highest number of message exchanges. In second place, the distribution of algorithms using MAPSO across three of the six agents stands out, highlighting that this algorithm is an interesting choice for the proposed problem.
The distributed method, with message exchange every 100 iterations, is not suitable, as the variations found are of the same magnitude as the resource capacities. With message exchange every 10 iterations, the distribution of the PSO metaheuristic alone should also not be adopted. Although the number of convergence intervals for the variables is higher, the absolute values of the variations were greater than those in simulation 2, with information exchange every 100 iterations.
The cases with the best results were those with message exchange at every iteration in distributed simulation #2, which achieved the smallest variation among the optimized variables. The convergence of the objective function over a larger number of intervals, compared to the convergence of the variables, suggests that implementations involving the exchange of the complete particle (not just the associated cost function value) may improve convergence in all cases.
Figure 17 shows the load shedding for the best convergence result, obtained with the implementation of distributed simulation #2 and message exchange at every iteration. The load model worked as expected, with no curtailment of the priority load across all 288 optimization intervals of the day. On the other hand, the flexible load had variable curtailment, depending on the availability of other sources and their respective costs.

4. Conclusions

This work evaluated the possibility of implementing distributed metaheuristics for optimizing energy resources, following the trend of dispatching every five minutes. The study was conducted in a co-simulation environment with agents associated with equipment that currently has interesting processing capacity for proposing metaheuristic parallelism. The results suggest that this approach is feasible, with the advantage of being fault-tolerant due to its distributed nature. The message exchange and the competition and cooperation phase added to the parallelism show improvements in the results with the application of the distributed PSO.
A key contribution of this work lies in the system integration and its practical engineering application, demonstrated through its implementation in a co-simulation environment featuring real-time, plug-and-play capabilities for agents to perform the dispatch of energy resources at five-minute intervals. Another relevant point is that the MAPSO algorithm, even in its centralized application, yields good results, suggesting that for larger networks with more resources, at least one of the algorithms implemented in distributed parallelism should be MAPSO.
In both the convergence analysis of optimization output variables and the probabilistic analysis, the MAPSO algorithm implemented with distributed parallelism presented the best results. In the convergence analysis, the maximum variation was less than 2% of the nominal power of the smallest resource, showing that the parallel metaheuristics converge without the need for communication at the end of the process. Meanwhile, in the probabilistic analysis, the MAPSO algorithm with exclusively distributed parallelism showed that, among the 50 executions performed for the same interval, the maximum relative standard deviation for the variables was 15.6%, compared to 33.9% for the distributed PSO, while the relative standard deviation of the objective function was only 0.42%. Although the resolution time for distributed MAPSO is longer, with an average of 9.0 s, it is still compatible with the typical five-minute dispatch interval in power systems, making it feasible for practical application. The second-best method analyzed was the distributed parallelism with PSO and MAPSO running on the agents. This method could be suitable when there are significant differences in the processing capacity of the distributed hardware, using the MAPSO algorithm on higher-capacity equipment and the PSO algorithm on more basic equipment.
Overall, it is reasonable to conclude that the proposed solution provides a straightforward method for optimizing distributed resources using distributed processing, thereby enhancing the robustness and competitiveness of microgrids. The distributed processing capability and the use of communication technologies make the distributed MAPSO feasible for application in real microgrid scenarios. In future work, the algorithm could be distributed across different hardware to examine how information exchange times and parallel execution would be affected. Additionally, energy exchange with the utility grid could be considered, taking into account the variable cost of energy for different DR programs. Models for electric vehicle (EV) charging could also be incorporated into this framework.

Author Contributions

Conceptualization, R.P.S.L.; methodology, J.B.A.; validation, J.B.A.; formal analysis, J.B.A.; investigation, J.B.A.; supervision, R.P.S.L.; visualization, R.C.F.G., R.F.S., and L.S.M.; writing—original draft preparation, F.L.T.; writing—review and editing, F.L.T., and R.P.S.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. Simulation Parameters and Initialization Settings

This appendix presents the necessary details to facilitate replication of the main trends reported in Section 3.

Appendix A.1. Parameters for Simulations in Section 3.2

The following parameters were used for the 24 h simulation scenarios.

Appendix A.1.1. Cost Function Coefficients

The quadratic cost functions a i P i 2 + b i P i + c i for each resource are defined by the coefficients in Table A1.
Table A1. Cost function coefficients.
Table A1. Cost function coefficients.
Resourceai
[USD/MW]
bi
[USD/MW]
ci
[USD]
Priority load0.07813−3.125000
Flexible load0.02315−1.388890
Gas thermal source0.016670.333342.08334
Biomass thermal source0.002400.383340.95834
BESS0.022920.068750.22917
The algorithm hyperparameters are provided in Table A2.
Table A2. Algorithm hyperparameters.
Table A2. Algorithm hyperparameters.
ParameterValue
Number of particles25
Number of iterations500
Exploration and exploitation coefficients (PSO/MAPSO) (cv1, cv2)2.0
Penalty multiplier500
Base cost (Cbase)1000 USD
Base power (Pbase)100 MW
Initial state of charge (SoC0)20%

Appendix A.1.2. Generation and Load Profiles

The PV generation and load curves are based on typical profiles with 15 min intervals. To achieve a higher resolution, each 15-min interval was subdivided into three five-minute intervals, for a total of 288 intervals over a 24-h period. To simulate realistic fluctuations and forecasting errors, the baseline values for each five-minute interval were multiplied by a random factor drawn from a uniform distribution in the range [0.97, 1.03]. This process generated the forecast curves for load and PV generation.

Appendix A.2. Parameters for Disconnection and Fault Simulations in Section 3.4

These simulations were conducted for a single five-minute interval with the following settings.

Appendix A.2.1. General Settings

  • For agents AgPL, AgPV, and AgBT, the cognitive and social coefficients ( c v 1 , c v 2 ) were set to 2.2. All other agents used a value of 2.0.
  • Initial Conditions:
    PV Generation: 18.51 MW
    Flexible Load: 28.14 MW
    Priority Load: 15.2 MW
    Initial State of Charge (SoC): 50%
  • Algorithm Execution:
    Centralized method: 156 particles
    Distributed method: 25 particles per agent
    Distributed method message frequency: The algorithm performs 10 iterations per message exchange.

Appendix A.2.2. Case Study #1

The base cost functions were modified for the loads, considering the parameters summarized in Table A3.
Table A3. Parameters of case study #1.
Table A3. Parameters of case study #1.
TypeKi.puβi.puCosti.basePi.baseKiβi
Priority load11USD 31.2520 MWUSD 31.250.05 MW−1
Flexible load10.3USD 20.8330 MWUSD 20.830.01 MW−1

Appendix A.2.3. Case Study #2

The setup is identical to that of case study #1, with the only modification being the exponential coefficient β i , p u increased to 1.5 pu for the flexible load.

Appendix A.2.4. Case Study #3

Case study #3 consists of some modifications made to case study #2. The BESS cost was reduced to match the nominal cost of the gas thermal source. The updated coefficients are given in Table A4. Additionally, the initial SoC of the BESS was increased to 95%.
Table A4. Parameters of case study #3.
Table A4. Parameters of case study #3.
Resourceai
[USD/MW]
bi
[USD/MW]
ci
[USD]
BESS0.020840.062500.20834

References

  1. Gulzar, M.M.; Sibtain, D.; Alqahtani, M.; Alismail, F.; Khalid, M. Load frequency control progress: A comprehensive review on recent development and challenges of modern power systems. Energy Strategy Rev. 2025, 57, 101604. [Google Scholar] [CrossRef]
  2. Cheng, Q.; Zhang, Z.; Wang, Y.; Zhang, L. A review of distributed energy systems: Technologies, classification, and applications. Sustainability 2025, 17, 1346. [Google Scholar] [CrossRef]
  3. Zidane, T.E.K.; Muis, Z.A.; Ho, W.S.; Zahraoui, Y.; Aziz, A.S.; Su, C.-L.; Mekhilef, S.; Elia Campana, P. Power systems and microgrids resilience enhancement strategies: A review. Renew. Sustain. Energy Rev. 2025, 207, 114953. [Google Scholar] [CrossRef]
  4. Correia, A.F.M.; Neves, M.A.G.; Reis, A.I.C.D.; Coimbra, A.P.; Almeida, T.R.d.O.d.; Moura, P.; de Almeida, A.T. Architecture and operational control for resilient microgrids—A university case study. IEEE Access 2025, 13, 51373–51387. [Google Scholar] [CrossRef]
  5. Horrillo-Quintero, P.; García-Triviño, P.; Ugalde-Loo, C.E.; Hosseini, E.; García-Vázquez, C.A.; Tostado, M.; Jurado, F.; Fernández-Ramírez, L.M. Efficient energy dispatch in multi-energy microgrids with a hybrid control approach for energy management system. Energy 2025, 317, 134599. [Google Scholar] [CrossRef]
  6. Li, L.-L.; Ji, B.-X.; Li, Z.-T.; Lim, M.K.; Sethanan, K.; Tseng, M.-L. Microgrid energy management system with degradation cost and carbon trading mechanism: A multi-objective artificial hummingbird algorithm. Appl. Energy 2025, 378, 124853. [Google Scholar] [CrossRef]
  7. Imtiaz, S.; Yang, L.; Munir, H.M.; Memon, Z.A.; Kilic, H.; Naz, M.N. DC-link voltage stability enhancement in intermittent microgrids using coordinated reserve energy management strategy. IET Renew. Power Gener. 2025, 19, e13197. [Google Scholar] [CrossRef]
  8. Yang, T.; Xu, Z.; Ji, S.; Liu, G.; Li, X.; Kong, H. Cooperative optimal dispatch of multi-microgrids for low carbon economy based on personalized federated reinforcement learning. Appl. Energy 2025, 378, 124641. [Google Scholar] [CrossRef]
  9. Salman, M.; Li, Y.; Xiang, J. A distributed consensus-based optimal dispatch control strategy for hybrid ac/dc microgrids. IEEE Access 2024, 12, 90997–91010. [Google Scholar] [CrossRef]
  10. Kumar, S.S.; Srinivasan, C.; Balavignesh, S. Enhancing grid integration of renewable energy sources for micro grid stability using forecasting and optimal dispatch strategies. Energy 2025, 322, 135572. [Google Scholar] [CrossRef]
  11. Zhao, G.; Luo, J.; Song, N.; Shu, J. Multi-objective optimal dispatch of island microgrid considering a novel scheduling resource. Electr. Power Syst. Res. 2025, 241, 111378. [Google Scholar] [CrossRef]
  12. Li, T.; Li, Y.; Wang, F.; Gong, C.; Zhang, J.; Ma, H. Improved parallel differential evolution algorithm with small population for multi-period optimal dispatch problem of microgrids. Energies 2025, 18, 3852. [Google Scholar] [CrossRef]
  13. Akter, A.; Zafir, E.I.; Dana, N.H.; Joysoyal, R.; Sarker, S.K.; Li, L.; Muyeen, S.M.; Das, S.K.; Kamwa, I. A review on microgrid optimization with meta-heuristic techniques: Scopes, trends and recommendation. Energy Strategy Rev. 2024, 51, 101298. [Google Scholar] [CrossRef]
  14. Rajwar, K.; Deep, K.; Das, S. An exhaustive review of the metaheuristic algorithms for search and optimization: Taxonomy, applications, and open challenges. Artif. Intell. Rev. 2023, 56, 13187–13257. [Google Scholar] [CrossRef]
  15. Zhang, X.; Chen, W.; Dai, C.; Cai, W. Dynamic multi-group self-adaptive differential evolution algorithm for reactive power optimization. Int. J. Electr. Power Energy Syst. 2010, 32, 351–357. [Google Scholar] [CrossRef]
  16. Shafik, M.B.; Chen, H.; Rashed, G.I.; El-Sehiemy, R.A. Adaptive multi objective parallel seeker optimization algorithm for incorporating TCSC devices into optimal power flow framework. IEEE Access 2019, 7, 36934–36947. [Google Scholar] [CrossRef]
  17. Zhang, H.; Hui, Q. Parallel multiagent coordination optimization algorithm: Implementation, evaluation, and applications. IEEE Trans. Autom. Sci. Eng. 2017, 14, 984–995. [Google Scholar] [CrossRef]
  18. Grisales-Noreña, L.F.; Montoya, O.D.; Ramos-Paja, C.A. An energy management system for optimal operation of BSS in DC distributed generation environments based on a parallel PSO algorithm. J. Energy Storage 2020, 29, 101488. [Google Scholar] [CrossRef]
  19. Grisales-Noreña, L.F.; Ocampo-Toro, J.A.; Montoya-Giraldo, O.D.; Montano, J.; Hernandéz, J.C. Optimal operation of battery storage systems in standalone and grid-connected DC microgrids using parallel metaheuristic optimization algorithms. J. Energy Storage 2023, 65, 107240. [Google Scholar] [CrossRef]
  20. Behbahani, F.M.; Ahmadi, B.; Caglar, R. Multi-objective multiverse optimization for optimal allocation of distributed energy resources: The optimal parallel processing schemes. Electr. Power Syst. Res. 2024, 231, 110298. [Google Scholar] [CrossRef]
  21. Montano, J.; Guzmán, J.P.; Garzón, O.D.; Barrera, A.M.R. Techno-economic approach for energy management system: Multi-objective optimization algorithms for energy storage in standalone and grid-connected DC microgrids. J. Energy Storage 2024, 102, 114069. [Google Scholar] [CrossRef]
  22. Chen, J.; Liu, X.; Karam, I. Short-term economic dispatch incorporating renewable power generations with plug-in electric vehicles considering emissions reduction. Environ. Dev. Sustain. 2024; early view. [Google Scholar] [CrossRef]
  23. Nadermahmoudi, E.; Amraee, T.; Oskouee, S.S. Stochastic very short-term economic dispatch for wind power operation using flexible ramp reserve. Int. Trans. Electr. Energy Syst. 2020, 30, e12454. [Google Scholar] [CrossRef]
  24. Garrido-Arévalo, V.M.; Gil-González, W.; Montoya, O.D.; Grisales-Noreña, L.F.; Hernández, J.C. Optimal dispatch of DERs and battery-based ESS in distribution grids while considering reactive power capabilities and uncertainties: A second-order cone programming formulation. IEEE Access 2024, 12, 48497–48510. [Google Scholar] [CrossRef]
  25. Grisales-Noreña, L.F.; Cortés-Caicedo, B.; Montoya, O.D.; Sanin-Villa, D.; Gil-González, W. Integration of BESS in grid connected networks for reducing the power losses and CO2 emissions: A parallel master-stage methodology based on PDVSA and PSO. J. Energy Storage 2024, 87, 111355. [Google Scholar] [CrossRef]
  26. Cortés-Caicedo, B.; Ocampo-Toro, J.; Bolaños, R.I.; Montoya, O.D.; Grisales-Noreña, L.F. A multi-objective PSO for DC microgrids: Efficient battery management to minimize energy losses and operating costs. J. Energy Storage 2024, 96, 112550. [Google Scholar] [CrossRef]
  27. Cortés-Caicedo, B.; Grisales-Noreña, L.F.; Montoya, O.D.; Bolaños, R.I.; Muñoz, J. A multi-objective optimization approach based on the non-dominated sorting genetic algorithm II for power coordination in battery energy storage systems for DC distribution network applications. J. Energy Storage 2025, 113, 115430. [Google Scholar] [CrossRef]
  28. Yin, L.; Li, S. Hybrid metaheuristic multi-layer reinforcement learning approach for two-level energy management strategy framework of multi-microgrid systems. Eng. Appl. Artif. Intell. 2021, 104, 104326. [Google Scholar] [CrossRef]
  29. Fernandes, D.L.; Leopoldino, A.L.M.; de Santiago, J.; Verginis, C.; Ferreira, A.A.; de Oliveira, J.G. Distributed control on a multi-agent environment co-simulation for DC bus voltage control. Electr. Power Syst. Res. 2024, 232, 110408. [Google Scholar] [CrossRef]
  30. Huo, Y.; Bouffard, F.; Joós, G. Integrating learning and explicit model predictive control for unit commitment in microgrids. Appl. Energy 2022, 306, 118026. [Google Scholar] [CrossRef]
  31. Premkumar, M.; Sowmya, R.; Ramakrishnan, C.; Jangir, P.; Houssein, E.H.; Deb, S.; Manoj Kumar, N. An efficient and reliable scheduling algorithm for unit commitment scheme in microgrid systems using enhanced mixed integer particle swarm optimizer considering uncertainties. Energy Rep. 2023, 9, 1029–1053. [Google Scholar] [CrossRef]
  32. OFFIS. Scheduling and Simulation Execution. 2025. Available online: http://mosaik.readthedocs.io/en/latest/scheduler.html#time-paradigms (accessed on 29 September 2024).
  33. Melo, L.S.; Sampaio, R.F.; Leão, R.P.S.; Barroso, G.C.; Bezerra, J.R. Python-based multi-agent platform for application on power grids. Int. Trans. Electr. Energy Syst. 2019, 29, e12012. [Google Scholar] [CrossRef]
  34. Wu, H.; Shahidehpour, M.; Alabdulwahab, A.; Abusorrah, A. Thermal generation flexibility with ramping costs and hourly demand response in stochastic security-constrained scheduling of variable energy sources. IEEE Trans. Power Syst. 2015, 30, 2955–2964. [Google Scholar] [CrossRef]
  35. Niromandfam, A.; Yazdankhah, A.S.; Kazemzadeh, R. Modeling demand response based on utility function considering wind profit maximization in the day-ahead market. J. Clean. Prod. 2020, 251, 119317. [Google Scholar] [CrossRef]
  36. Azevedo, R.d.; Cintuglu, M.H.; Ma, T.; Mohammed, O.A. Multiagent-based optimal microgrid control using fully distributed diffusion strategy. IEEE Trans. Smart Grid 2017, 8, 1997–2008. [Google Scholar] [CrossRef]
Figure 1. Types of messages and exchange between agents during optimization.
Figure 1. Types of messages and exchange between agents during optimization.
Energies 18 04620 g001
Figure 2. Active agents list update (a) with the entry of a new equipment agent and (b) with the departure of an equipment agent.
Figure 2. Active agents list update (a) with the entry of a new equipment agent and (b) with the departure of an equipment agent.
Energies 18 04620 g002
Figure 3. Detailed flowchart with the steps of the available optimization algorithms.
Figure 3. Detailed flowchart with the steps of the available optimization algorithms.
Energies 18 04620 g003
Figure 4. Forecast estimates of variable resources: (a) PV generation and (b) loads.
Figure 4. Forecast estimates of variable resources: (a) PV generation and (b) loads.
Energies 18 04620 g004
Figure 5. Convergence between distributed metaheuristics with message exchange at every iteration.
Figure 5. Convergence between distributed metaheuristics with message exchange at every iteration.
Energies 18 04620 g005
Figure 6. Convergence between distributed metaheuristics with message exchange every 100 iterations.
Figure 6. Convergence between distributed metaheuristics with message exchange every 100 iterations.
Energies 18 04620 g006
Figure 7. Load shedding.
Figure 7. Load shedding.
Energies 18 04620 g007
Figure 8. SoC as a function of time.
Figure 8. SoC as a function of time.
Energies 18 04620 g008
Figure 9. Response after 500 iterations for centralized algorithms in case #1: (a) PSO and (b) MAPSO.
Figure 9. Response after 500 iterations for centralized algorithms in case #1: (a) PSO and (b) MAPSO.
Energies 18 04620 g009
Figure 10. Detailed view of the objective function’s convergence for centralized algorithms in case #1: (a) PSO and (b) MAPSO.
Figure 10. Detailed view of the objective function’s convergence for centralized algorithms in case #1: (a) PSO and (b) MAPSO.
Energies 18 04620 g010
Figure 11. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #1.
Figure 11. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #1.
Energies 18 04620 g011
Figure 12. Convergence of the objective function for the centralized algorithms in case #2: (a) PSO and (b) MAPSO.
Figure 12. Convergence of the objective function for the centralized algorithms in case #2: (a) PSO and (b) MAPSO.
Energies 18 04620 g012
Figure 13. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #2.
Figure 13. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #2.
Energies 18 04620 g013
Figure 14. Convergence of the objective function for centralized algorithms in case #3: (a) PSO and (b) MAPSO.
Figure 14. Convergence of the objective function for centralized algorithms in case #3: (a) PSO and (b) MAPSO.
Energies 18 04620 g014
Figure 15. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #3.
Figure 15. Convergence of the objective function for 50 executions of distributed parallelism of metaheuristics in case #3.
Energies 18 04620 g015
Figure 16. Statistics of output variables and objective function for 50 executions of case #3.
Figure 16. Statistics of output variables and objective function for 50 executions of case #3.
Energies 18 04620 g016
Figure 17. Load shedding during the simulation over a day.
Figure 17. Load shedding during the simulation over a day.
Energies 18 04620 g017
Table 1. Summary of methods for economic dispatch in microgrids.
Table 1. Summary of methods for economic dispatch in microgrids.
Ref.MethodMain FocusLimitations/Gaps
[5]Fuzzy logic—model predictive control (MPC)/quadratic programmingEfficient dispatch in multi-energy microgrids
-
Implementation complexity.
-
Centralized control.
[6]Metaheuristic/artificial hummingbird algorithmMulti-objective optimization: total degradation cost and carbon trading
-
Optimization in 15-min intervals; centralized optimization.
[7]Scheme flowchart for coordinated reserve energy managementCoordinated reserve energy management and dc microgrid voltage stability
-
Applicable only to dc systems, specifically battery- and PV-powered ones.
[8]Heterogeneous multi-agent twin delayed deep deterministic (HMATD3) + neural networkOptimal low-carbon economic dispatch
-
Data privacy relies on neural network training through prior optimization.
[9]Consensus-based distributed secondary control strategyGlobal economic operation (GOP) and optimal active/reactive power dispatch for all participating ac/dc DG units
-
Limited scalability (control applied only to power electronic converters connecting dc/ac elements of the microgrid).
[10]Forecasting + optimal dispatchStability with renewable integration
-
Dependence on forecast accuracy.
-
The analysis does not incorporate uncertainties.
[11]Multi-objective optimal dispatchIsolated microgrids with new resources
-
Application restricted to islanded scenarios.
[12]Parallel differential evolution (DE) with reduced populationMulti-period dispatch
-
Risk of stagnation.
-
Sensitivity to parameterization.
[13]Review of metaheuristicsOptimization in microgrids
-
Lack of integration with real-time control.
[19]Parallel metaheuristic optimizationOptimal BESS operation in dc microgrids
-
Restricted to dc systems.
-
The study does not consider greenhouse gas emissions.
[20]Multiverse optimizationOptimal DER allocation
-
High complexity and limited scalability.
[21]Multi-objective optimizationEMS for BESSs in dc and grid-connected systems
-
Techno-economic analysis limited by the dc topology.
[22]Economic dispatch with plug-in electric vehiclesRenewable integration with emission reduction
-
Short-term focus.
-
Simplified modeling.
[24]Second-order cone programming (SOCP) for dispatchDERs with uncertainties and reactive power
-
High computational burden and high complexity.
[25]PSO combined with PDVSABESS integration and reduction in greenhouse gas emissions
-
Optimization separated from EMS operation.
[26]Multi-objective PSOBattery management in dc microgrids
-
Limited to dc microgrids.
-
Scalability issues.
[27]NSGA-IIBESS coordination in dc microgrids
-
The analysis does not address the integration of ac/dc microgrids nor multi-microgrid dispatch.
[28]Hybrid metaheuristic + reinforcement learning (RL)Two-level EMS in multi-microgrids
-
Complex implementation.
-
Long training time
[29]Distributed control in co-simulationDC bus voltage control
-
Limited to dc microgrids.
-
No energy optimization.
[30]Learning + MPCUnit commitment in microgrids
-
Complex training and modeling.
[31]Optimized multi-objective particle swarm optimization (MIPSO)Reliable scheduling considering uncertainties
-
High computational burden.
-
Limited real-time applicability.
Present StudyDistributed MAPSO utilizing an MASEconomic dispatch of energy resources, enabling distributed optimization to promote redundancy and scalability among agents for ultra-short-term dispatch
-
Data confidentiality.
-
Dependence on a communication network.
Table 2. Modeling of the DERs considered in the study.
Table 2. Modeling of the DERs considered in the study.
DERCost Function Principle and RationaleReference
Dispatchable generatorsA standard quadratic cost function is used to model fuel consumption and operational costs.Equation (5)
Renewable energy sourcesModeled with a zero marginal cost to prioritize their dispatch whenever available.N/A
Controllable loadsThe objective function relies on maximizing social welfare for consumers.Equation (9)
ESSsA dynamic cost function is associated with the SoC, penalizing discharging at low energy levels.Equation (11)
Table 3. Parameters of cost functions associated with the microgrid’s resources.
Table 3. Parameters of cost functions associated with the microgrid’s resources.
ResourcePnom
[MW]
Pmin
[MW]
Pmax
[MW]
ai
[pu]
bi
[pu]
ci
[pu]
Energy Cost
[USD/MWh]
Capacity Cost
[USD/MW]
Priority load200PPL1−2037531.25
Flexible load300PCF1−2025020.83
Gas thermal source250250.50.40.125020.83
Biomass thermal source202200.10.80.11159.58
BESS60 h−12300.90.090.0127522.92
PV system300PPV00000
Table 4. Objective function parameters in standard units.
Table 4. Objective function parameters in standard units.
Resourceai
[USD/MW]
bi
[USD/MW]
ci
[USD]
Priority load0.07813–3.125000
Flexible load0.02315–1.388890
Gas thermal source0.016670.333342.08334
Biomass thermal source0.002400.383340.95834
BESS0.022920.068750.22917
Table 5. Metaheuristic executed by each agent in the three distributed simulations implemented.
Table 5. Metaheuristic executed by each agent in the three distributed simulations implemented.
AgentDistributed
Simulation
#1
Distributed
Simulation
#2
Distributed
Simulation
#3
AgPLPSOMAPSOPSO
AgFLPSOMAPSOPSO
AgTGPSOMAPSOMAPSO
AgTBPSOMAPSOMAPSO
AgBTPSOMAPSOPSO
AgPVPSOMAPSOMAPSO
Table 6. Maximum variation in output variables for distributed simulation #1 with message exchange every five iterations.
Table 6. Maximum variation in output variables for distributed simulation #1 with message exchange every five iterations.
VariableAgPLAgFLAgTGAgTBAgBTAgPV∆max
PPL [MW]17.0117.0116.9517.0116.9516.950.06
PFL [MW]19.7019.7019.7019.7019.7019.700.00
PTG [MW]3.793.793.833.793.833.830.04
PTB [MW]16.2716.2716.2216.2716.2216.220.05
PBT [MW]0.520.520.480.520.480.480.04
PPV [MW]17.7517.7517.7517.7517.7517.750.00
fobj [USD]−34.976−34.976−34.976−34.976−34.976−34.9760.00
Table 7. Maximum variation in output variables for distributed simulation #2 with message exchange every five iterations.
Table 7. Maximum variation in output variables for distributed simulation #2 with message exchange every five iterations.
VariableAgPLAgFLAgTGAgTBAgBTAgPV∆max
PPL [MW]17.0717.0717.0717.0717.0717.070.00
PFL [MW]20.1220.1220.1220.1220.1220.120.00
PTG [MW]3.883.883.883.883.883.800.00
PTB [MW]16.7816.7816.7816.7816.7816.780.00
PBT [MW]0.440.440.440.440.440.440.00
PPV [MW]17.7517.7517.7517.7517.7517.750.00
fobj [USD]−34.904−34.904−34.904−34.904−34.904−34.9040.00
Table 8. Maximum variation in output variables for distributed simulation #3 with message exchange every five iterations.
Table 8. Maximum variation in output variables for distributed simulation #3 with message exchange every five iterations.
VariableAgPLAgFLAgTGAgTBAgBTAgPV∆max
PPL [MW]16.9216.9416.9516.9416.9416.940.03
PFL [MW]19.8919.9119.9119.9119.9119.910.02
PTG [MW]4.134.134.134.134.134.130.00
PTB [MW]16.5916.6816.6816.6816.6816.680.07
PBT [MW]0.350.310.310.310.310.310.04
PPV [MW]17.7517.7517.7517.7517.7517.750.00
fobj [USD]−34.971−34.970−34.970−34.970−34.970−34.9700.001
Table 9. Convergence of the output variables and the total objective function for the 288 optimization intervals.
Table 9. Convergence of the output variables and the total objective function for the 288 optimization intervals.
Number of
Iterations
Distributed
Simulation #1
Distributed
Simulation #2
Distributed
Simulation #3
varfobj∆maxvarfobj∆maxvarfobj∆max
12802860.04 MW2762840.90 MW2752870.04 MW
52382840.24 MW2372770.87 MW2442840.19 MW
101992800.46 MW2152591.42 MW2012860.22 MW
251192670.89 MW1672251.52 MW1482760.53 MW
50882300.89 MW1352011.30 MW1072452.08 MW
100651542.34 MW1031442.06 MW801642.50 MW
Table 10. Parameters of the exponential load model in base values.
Table 10. Parameters of the exponential load model in base values.
TypeKi.puβi.puCosti.basePi.baseKiβi
Priority load11USD 31.2520 MWUSD 31.250.05 MW−1
Flexible load10.3USD 20.8330 MWUSD 20.830.01 MW−1
Table 11. Output variables obtained after the optimization in case #1.
Table 11. Output variables obtained after the optimization in case #1.
VariableValue
Priority load15.20 MW
Flexible Load0
Gas thermal source1.97 MW
Biomass thermal source3.24 MW
BESS−7.5 MW
PV generation18.51 MW
Table 12. Output variables obtained after the optimization in case #2.
Table 12. Output variables obtained after the optimization in case #2.
VariableValue
Priority load15.20 MW
Flexible Load12.91 MW
Gas thermal source3.68 MW
Biomass thermal source14.82 MW
BESS−7.5 MW
PV generation18.51 MW
Table 13. Output variables obtained after the optimization in case #3.
Table 13. Output variables obtained after the optimization in case #3.
VariableValue
Priority load15.20 MW
Flexible Load12.73 MW
Gas thermal source3.78 MW
Biomass thermal source2 MW
BESS4.93 MW
PV generation18.51 MW
Table 14. Total execution time for 50 runs and average time per single execution.
Table 14. Total execution time for 50 runs and average time per single execution.
AlgorithmCase #1Case #2Case #3
Total
(min)
Average
(s)
Total
(min)
Average
(s)
Total
(min)
Average
(s)
Centralized PSO02:072.54 s02:152.7002:252.90
Centralized MAPSO02:343.08 s02:503.4002:383.16
Distributed PSO04:075.56 s04:165.1204:155.10
Distributed MAPSO06:598.38 s07:138.6606:588.36
Distributed MAPSO+PSO05:426.84 s06:137.4605:567.12
Table 15. Convergence of output variables and total objective function for 288 optimization intervals.
Table 15. Convergence of output variables and total objective function for 288 optimization intervals.
Number of IterationsDistributed
Simulation #1
Distributed
Simulation #2
Distributed
Simulation #3
varfobj∆maxvarfobj∆maxvarfobj∆max
12742832.32 MW2832880.42 MW2802880.45 MW
101882489.98 MW2392861.68 MW2262813.44 MW
100102915.54 MW632368.42 MW3016410.35 MW
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Almada, J.B.; Tofoli, F.L.; Gregory, R.C.F.; Sampaio, R.F.; Melo, L.S.; Leão, R.P.S. Distributed Multi-Agent Energy Management for Microgrids in a Co-Simulation Framework. Energies 2025, 18, 4620. https://doi.org/10.3390/en18174620

AMA Style

Almada JB, Tofoli FL, Gregory RCF, Sampaio RF, Melo LS, Leão RPS. Distributed Multi-Agent Energy Management for Microgrids in a Co-Simulation Framework. Energies. 2025; 18(17):4620. https://doi.org/10.3390/en18174620

Chicago/Turabian Style

Almada, Janaína Barbosa, Fernando Lessa Tofoli, Raquel Cristina Filiagi Gregory, Raimundo Furtado Sampaio, Lucas Sampaio Melo, and Ruth Pastôra Saraiva Leão. 2025. "Distributed Multi-Agent Energy Management for Microgrids in a Co-Simulation Framework" Energies 18, no. 17: 4620. https://doi.org/10.3390/en18174620

APA Style

Almada, J. B., Tofoli, F. L., Gregory, R. C. F., Sampaio, R. F., Melo, L. S., & Leão, R. P. S. (2025). Distributed Multi-Agent Energy Management for Microgrids in a Co-Simulation Framework. Energies, 18(17), 4620. https://doi.org/10.3390/en18174620

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop