scieee AI-readable full text Open interactive document viewer

Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation

Fernández Valderrama, Daniel; Ferro, Giulio; Guerrero Alonso, Juan Ignacio; León de Mora, Carlos; Parodi, Luca; Robba, Michela

Abstract

This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used.

Full text

IFAC PapersOnLine 58-2 (2024) 112–117 ScienceDirect Available online at www.sciencedirect.com 2405-8963 Copyright © 2024 The Authors. This is an open access article under the CC BY-NC-ND license . Peer review under responsibility of International Federation of Automatic Control. 10.1016/j.ifacol.2024.07.100 10.1016/j.ifacol.2024.07.100 2405-8963 Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap . The ongoing energy transition presents both a great challenge and a n opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally , the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variabl e renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems , reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation , implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. T hese methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). I t belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011) . Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multienergy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixedinteger linear programming (MILP) . The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic O ptimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Copyright © 2024 The Authors. This is an open access article under the CC BY-NC-ND license ( https://creativecommons.org/licenses/by-nc-nd/4.0/ ) Daniel Fernández Valderrama et al. / IFAC PapersOnLine 58-2 (2024) 112–117 113 Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Smart Grid Stochastic Optimization with Ant Colony-based Scenario Generation Daniel Fernández Valderrama* Giulio Ferro* Juan Ignacio Guerrero Alonso** Carlos León de Mora** Luca Parodi* Michela Robba* * Department of Informatics, Bioengineering, Robotics and Systems Engineering (DIBRIS), University of Genoa, Genoa, Italy (email: [email protected]; [email protected]; [email protected]; [email protected]) ** Department of Electronic Technology, Escuela Politecnica Superior, Universidad de Sevilla, Sevilla Spain (email: [email protected]; [email protected]) Abstract: This paper presents a stochastic optimization approach for the operational management of sustainable energy districts and polygeneration microgrids. Stochastic operation optimization allows for an uncertain approach to deal with imprecise variables. A new approach is here presented for generating scenarios based on Ant Colony Optimization (ACO) to assess the uncertainties related to inexact data, renewable energy sources and power demand. In fact, due to the uncertainties related to forecasting loads and renewables, it is necessary to analyze the probability of occurrence of the prediction and the different scenarios that could be faced. Then, based on the generated scenarios and probabilities, a scenario-based two-stage stochastic optimization approach has been formulated to optimize the operation strategies of the various technologies and solve the unit commitment problem under uncertainty. The developed models have been applied to the Savona Campus Smart Polygeneration Microgrid, and historical data from 2018 have been used. Keywords: ACO; forecasting; scenario generation; stochastic optimization; unit commitment problem. 1. INTRODUCTION The European Union (EU) has set an ambitious target of achieving carbon neutrality by 2050. To this end in 2019, the European Commission presented the European Green Deal as a roadmap. The ongoing energy transition presents both a great challenge and an opportunity to promote a stable, reliable and sustainable energy system. The main objectives for achieving decarbonization are the large-scale deployment of distributed generation and the evolving role of the energy consumer, as stated by Di Somma & Graditi (2022). The adoption of renewable energy sources (RES) to supply buildings, transport, and industry presents significant challenges for the operation of the electricity system during this transition. This includes the need for increased flexibility and new investments in reinforcing transmission and distribution networks. Additionally, the growing integration of intermitted RES into the power system and the evolving role of final users, who are becoming active participants by producing and consuming their energy and injecting it into the grid, are causing an increase of attention on reliability and stability issues. The effective management of multiple energy elements that interact with each other on a daily basis is essential for achieving economic benefits and power saving. This task is challenging due to the fluctuating user demand, the uncertainties associated with variable renewable energy sources, and their potential impact on the market. Scenario generation is a powerful method for dealing with uncertainties in stochastic programming of energy systems, reviewed by Li et al. (2020). However, traditional methods such as Monte Carlo simulation, implemented for example in Wang et al. (2012), have some drawbacks, as they require a prior Probability Density Function (PDF) to generate the samples. Therefore, new machine learning approaches, such as Generative Adversarial Networks, or improved versions like the one proposed by Wei et al. (2019) have emerged. These methods generate random samples from noise input. The ACO algorithm is explained by Colson, Nehrir, & Wang (2009). It belongs to the swarm intelligence family and has various applications in solving optimization problems with large search spaces. It is therefore suitable for finding scenario curves, a novel application of this algorithm. Accurately assessing related uncertainties is crucial to ensure that optimized operational strategies are not affected by uncertain variables such as renewables or demand. Correct assessment of these variables allows better decision-making for the operational management of the power system. This kind of problem is known in the literature as a stochastic optimization problem, deeply studied by Birge (2011). Various works evaluate the integration of these uncertain variables. A stochastic optimization problem was formulated by Yan et al. (2020) to determine the optimal operation strategies for multiple interconnected multi-energy hubs. The study takes into account both the energy and carbon emission costs and utilizes the Markovian approach to model uncertainties related to RES. Di Somma et al. (2022) present a stochastic formulation using mixed-integer linear programming (MILP). The roulette wheel method is used to generate an initial set of scenarios for solar irradiance and then apply the fast-forward selection algorithm to preserve the most representative scenarios. However, this paper does not propose Copyright © 2024 The Authors. This is an open access article under the CC BY-NC-ND license ( https://creativecommons.org/licenses/by-nc-nd/4.0/ ) any new approach to scenario generation. Furthermore, the stochastic model presented does not provide a deterministic solution, it is just a ponderation for all the scenarios. In this work, attention is focused on the Unit Commitment Problem, as described by Wang et al. (2012), which is an optimization problem aimed at finding the optimal schedule for generating units that minimizes the total operating costs. A stochastic optimization problem is formulated, which includes an innovative method for scenario generation and related probabilities of occurrence. The model has been applied to a real case study of the Savona Campus, Italy, studied in different works such as Bracco et al. (2018); Delfino et al. (2021). In summary, the contributions of the paper are: • A new approach for scenario generation, named Ant Colony Optimization Scenario Generation (ACOSG), is proposed. This approach can generate a predefined number of curves, eliminating the need of scenario reduction. Moreover, PDF is not required for generating scenarios. • The curve's probability and daily power output are linked to similar weather conditions, making it a useful forecasting tool for upcoming days with comparable weather. • A two-stage stochastic model of the SPM of the Savona Campus has been formulated through MILP formalization and applied to generated scenarios for the unit commitment problem. The rest of the manuscript is structured as follows: the techniques used for generating scenarios are explained in Section 2. Section 3 formulates the stochastic optimization problem based on the Savona Campus. Simulation results are given in Section 4 and conclusions are drawn in Section 5. 2. SCENARIO GENERATION This work is based on hourly historical data from 2018 to 2023. Data related to PV generation and load consumption were collected from the Savona Campus SCADA of the SPM. Daily weather conditions, namely temperature (°C), precipitation (mm), and radiation (W/m2), were obtained from the public web “Consultazione dati meteoclimatici: ricerca avanzata” (2024) which allows access to historical data in the Liguria region. The following subsections provide a detailed explanation of the method developed to generate scenarios. The algorithm needs historical data curves and their corresponding weather conditions. As it is forecasting, the algorithm needs input data to generate the curves according to those weather conditions input. Preprocessing is necessary in all formal data analysis before getting into the method. It should be noted that there may be instances of missing data in the dataset, and data availability needs to be filtered. Daily data with incomplete hourly data have been eliminated instead of being interpolated. 2.1 Probability The daily data have been analyzed to determine power consumption, rather than hourly data. Various daily data are available for consultation by date, with the goal of creating a weather-based forecast. A window of historical data is created based on the input data provided, which includes: • The season of the year. • Weekday or weekend. If it is relevant for the data considered. It should be noted that PV production is not affected by the day of the week, as it produces the same quantity regardless. However, this is not the case for the load from the building. • Temperature has a range of ± 5ºC. • Precipitation (mm) has varying ranges. • If precipitation < 5: o Min = 0 o Max = precipitation*2 • If precipitation > 5 and precipitation < 30: o Min = precipitation - 5 o Max = precipitation + 5 • If precipitation > 30: o Min = 30 • Sunny, partially cloudy or cloudy will vary depending on the season chosen, due to the variability of radiation of a kind of day in different periods of the year. Radiation is a special case because there is no available data about radiation magnitude predictions. Predictions are limited to determine the kind of day, such as sunny, cloudy, etc. To address this, the historical radiation data was divided into three equal parts within the season-filtered dataset, as shown in Figure 1. This is because other weather conditions also impact radiation levels, for example, rainy days have less radiation than sunny days. Therefore, attempting to distinguish between sunny and cloudy periods during a rainy day is illogical. This distribution enables the correlation between the nature of the day and its radiation to be established using a range of values, avoiding the use of specific numbers such as temperature or precipitation cases. Once input data is introduced, they must be compared with the recorded historical data. To address this issue, the concept of proximity is introduced to quantify the similarity between the historical data and the input data using (1). 222 dd d Pr T P R= ++ (1) Figure 1. Representation of the division of radiation based on the type of day. 114 Daniel Fernández Valderrama et al. / IFAC PapersOnLine 58-2 (2024) 112–117 where d T , d P and d R are temperature, precipitation and radiation difference, respectively, between the input data and the historical data. Equation (1) quantifies the likelihood of the desired forecast based on historical data. As proximity to the historical data decreases, the probability increases, and vice versa. However, to make this useful, a weight is required that increases as proximity to the historical data grows. This can be achieved through the use of an inverse function, such as equation (2). 1 1 WPr =+ (2) To obtain the final normalised probability that associates each historical data with the weather conditions, the historical data is reordered based on total consumption, from low to high. The individual weights are divided by the sum of all weights, ensuring that the sum is equal to 1, representing a probability distribution. The weights can be accumulated in this order, indicating the probability equal to any other probability distribution Alessandrini et al. (2015). To enhance the algorithm's flexibility and cover all possible values, a dynamic range of probabilities and scenarios based on the number of scenarios is employed. Thus, the number of scenarios to be generated must be determined first. The consumption range will be divided into equal parts based on the desired number of scenarios, with the median value of each range selected as the generated scenario. 2.2 Scenario generation based on ACO ACO is a class of metaheuristic optimization algorithm modelled on the actions of an ant colony. The classic algorithm has been modified for generating scenarios. This work applies ACO to the scenario generation problem for the first time. Consequently, it is necessary to define the search of space, how ants will traverse that space, and how to evaluate the solution found by ants Colson et al. (2009). The ants determine their next move based on probability, which considers the heuristic that guides their behaviour as well as the artificial pheromone. Each ant moves from state x to state y, so each ant k computes a set () k Ax of feasible next jumps from its current state in each iteration and moves accordingly based on probability. The probability k xy p of ant k moving from state x to state y is determined by equation (3). ( )( ) ( )( ) y xy xy k xy xz xz z allowed p      = (3) where xy  is the attractiveness that corresponds to the defined heuristic. And xy  is the trail level, the amount of artificial pheromone between states, which indicates how proficient it has been in the past in making this movement. Where  controls the influence of xy  , and  controls the influence of xy  . To extract the features of the curves, it is essential to use an automated approach that can divide the available curves and group the shapes accordingly. The daily data comprises 24- hourly points that can be categorised into distinct clusters based on their features. To achieve this, k-means algorithm Bahri et al. (2023) was used to generate the clustered curves and the number of clusters was determined using the elbow method. These clusters represent the centroids of the curves. Artificial ants construct solutions by traversing a graph ( ) , C G VE , where V represents a set of vertices and E represents a set of edges. In order to adapt ACO to this particular application case, vertices V correspond to the registered points, which are 24-hourly points from the historical data, and E represents all the possible movements between the current point at time t and the possible points in t+1. This perfectly defines the search of space, the possible points where the ants can pick up are those previously registered in the historical data. Using the centroids obtained during the pre-processing, it is possible to subtract new curves that conform to the desired total amount of power per day, as determined in the previous step. The new centroid is calculated using expression (4). 0 T cD t sc t PP PP T = − =−  (4) where c P is one of the clusters obtained from the k-means algorithm with a length of T, T is the total interval time considered. The resulting s P is the new curve with the desired power and with the centroid shape c P , with a length of T. The ants are guided by a defined heuristic that rewards the closest point given on the new curve obtained from expression (4). Therefore, the attractiveness  must reward the closest points of each time t and penalise the furthest points, the resulting heuristic is expressed by (5). () as tt abs P P  =− (5) where a t P is the evaluated point by the ant at time t and s t P is the centroid point in a given time t. It is important to note that the points are evaluated independently at each time, and the centroid point changes accordingly. The fitness function aims to minimise the difference between the desired power and the power generated by the result of the algorithm, as expressed in equation (6). ( ) 2 min DS f PP  =−   (6) where D P is the desired overall power and s P is the total power output generated by the algorithm. In summary, Algorithm 1 illustrates the process for generating scenarios. The algorithm’s stopping criteria is determined by the following equation (7), whereby the total power error must be below the predetermined level. If this condition is satisfied, the algorithm will continue executing all previously defined epochs, resulting in a scenario that approaches the desired power. If the condition is not fulfilled, the algorithm will restart to identify the scenario. DS S PPError P − (7) Daniel Fernández Valderrama et al. / IFAC PapersOnLine 58-2 (2024) 112–117 115 where d T , d P and d R are temperature, precipitation and radiation difference, respectively, between the input data and the historical data. Equation (1) quantifies the likelihood of the desired forecast based on historical data. As proximity to the historical data decreases, the probability increases, and vice versa. However, to make this useful, a weight is required that increases as proximity to the historical data grows. This can be achieved through the use of an inverse function, such as equation (2). 1 1 WPr =+ (2) To obtain the final normalised probability that associates each historical data with the weather conditions, the historical data is reordered based on total consumption, from low to high. The individual weights are divided by the sum of all weights, ensuring that the sum is equal to 1, representing a probability distribution. The weights can be accumulated in this order, indicating the probability equal to any other probability distribution Alessandrini et al. (2015). To enhance the algorithm's flexibility and cover all possible values, a dynamic range of probabilities and scenarios based on the number of scenarios is employed. Thus, the number of scenarios to be generated must be determined first. The consumption range will be divided into equal parts based on the desired number of scenarios, with the median value of each range selected as the generated scenario. 2.2 Scenario generation based on ACO ACO is a class of metaheuristic optimization algorithm modelled on the actions of an ant colony. The classic algorithm has been modified for generating scenarios. This work applies ACO to the scenario generation problem for the first time. Consequently, it is necessary to define the search of space, how ants will traverse that space, and how to evaluate the solution found by ants Colson et al. (2009). The ants determine their next move based on probability, which considers the heuristic that guides their behaviour as well as the artificial pheromone. Each ant moves from state x to state y, so each ant k computes a set () k Ax of feasible next jumps from its current state in each iteration and moves accordingly based on probability. The probability k xy p of ant k moving from state x to state y is determined by equation (3). ( )( ) ( )( ) y xy xy k xy xz xz z allowed p      = (3) where xy  is the attractiveness that corresponds to the defined heuristic. And xy  is the trail level, the amount of artificial pheromone between states, which indicates how proficient it has been in the past in making this movement. Where  controls the influence of xy  , and  controls the influence of xy  . To extract the features of the curves, it is essential to use an automated approach that can divide the available curves and group the shapes accordingly. The daily data comprises 24- hourly points that can be categorised into distinct clusters based on their features. To achieve this, k-means algorithm Bahri et al. (2023) was used to generate the clustered curves and the number of clusters was determined using the elbow method. These clusters represent the centroids of the curves. Artificial ants construct solutions by traversing a graph ( ) , C G VE , where V represents a set of vertices and E represents a set of edges. In order to adapt ACO to this particular application case, vertices V correspond to the registered points, which are 24-hourly points from the historical data, and E represents all the possible movements between the current point at time t and the possible points in t+1. This perfectly defines the search of space, the possible points where the ants can pick up are those previously registered in the historical data. Using the centroids obtained during the pre-processing, it is possible to subtract new curves that conform to the desired total amount of power per day, as determined in the previous step. The new centroid is calculated using expression (4). 0 T cD t sc t PP PP T = − =−  (4) where c P is one of the clusters obtained from the k-means algorithm with a length of T, T is the total interval time considered. The resulting s P is the new curve with the desired power and with the centroid shape c P , with a length of T. The ants are guided by a defined heuristic that rewards the closest point given on the new curve obtained from expression (4). Therefore, the attractiveness  must reward the closest points of each time t and penalise the furthest points, the resulting heuristic is expressed by (5). () as tt abs P P  =− (5) where a t P is the evaluated point by the ant at time t and s t P is the centroid point in a given time t. It is important to note that the points are evaluated independently at each time, and the centroid point changes accordingly. The fitness function aims to minimise the difference between the desired power and the power generated by the result of the algorithm, as expressed in equation (6). ( ) 2 min DS f PP  =−   (6) where D P is the desired overall power and s P is the total power output generated by the algorithm. In summary, Algorithm 1 illustrates the process for generating scenarios. The algorithm’s stopping criteria is determined by the following equation (7), whereby the total power error must be below the predetermined level. If this condition is satisfied, the algorithm will continue executing all previously defined epochs, resulting in a scenario that approaches the desired power. If the condition is not fulfilled, the algorithm will restart to identify the scenario. DS S PPError P − (7) Algorithm 1: The procedure of ACO-SG Algorithm Begin Initialize() KMeans_clustering() While stopping criterion not satisfied and m < maximum_iterations do Ant position <- Initial_point() For loop k from 1 to Number_ants do For loop t from 1 to Time do For loop p from 1 to points considered in time t do Ant k choose point p on time t based on probability rule End for End for End for Update_best_solution() Update_pheromone() End While End 3. THE MATHEMATICAL MODEL The paper employs a one bus version of the Savona campus model. Two-stage stochastic programming is one of the most commonly used types of stochastic programming where the decision maker has to make decisions in two stages (two different times) for a fixed phenomenon with uncertainty. According to Ahmed et al. (2019), “the first stage plays a vital role due to decisions need to be taken with anticipation based on random parameters obtained from past experience or some sort of survey. And the second stage decision is based on experiment results”. Typically, decisions for conventional generators, such as coal power plants and nuclear generators are made beforehand (1st stage), as the start-up and shutdown times for these generators are not immediate. Therefore, the uncertainties and quality in forecasting play a significant role in stochastic optimization as they impact the prior decision that must be made. The two-stage stochastic program formulated is interconnected by a bus with access to the medium voltage distribution grid. The model considers PV generation and power demand as uncertain variables. The model includes the solar PV plant, a traditional generator (TG) and an electrical storage system. 3.1 Decision variables The optimization problem’s decision variables consist of both binary and continuous variables: • The binary variable  related to the on/off status of the traditional generator (TG), which was discussed previously and affects every scenario. Moreover, more binary variables were added to control different powers, G  and S  . • Power provided by the traditional generator TP p . • Power withdrawn ,G in p or given ,G out p to the distribution network. • Electric power for charging ,S ch p and discharging ,S dch p the storage system. • State of charge (SOC) of the storage system S x . 3.2 The optimization model The stochastic objective function aims to minimise the economic power cost. It comprises two distinct parts: the part that affect all scenarios (1st stage), where activation and deactivation of the TG will be decided. And another that is weighted by each scenario’s probability of occurrence (2nd stage), where the remaining variables will be fixed depending on the specific scenario. Sets S and T correspond to the scenario and time. ( ) ( ) ( ) ( ) ,, ,, , 1 2 , ,0 11 11 11 min 11 T buy G in sell G out TP TP t st t st st t s sS SS sT s TT off on t t tt tt C p C p Cp J xx CC     =  −− ++ ==  − +   =+   +−  −+ −    0, , 1,s tS T= − (8) Where: s  is the probability of the scenario, , , G in st p [kW] and , , G out st p are the power taken and provided from the distribution network, respectively; and buy t C and sell t C [€/kW] are the cost related to those power; , TP st p [kW] is the power provided by the TG where TP C [€/kW] corresponds to its cost; , S st x is the SOC where the square term forces to reach the level at the end of the time considered to the one it had at the beginning, expressed as a percentage; t  is the binary variable at time t. The final terms add an additional cost for activating and deactivating the TG, where on C and off C represent these additional costs. The stochastic optimization problem is subject to the next constraints. ,, ,, , , , ,, , , 0 PV S ch S dch TP G in G out L st st st st st st st P p p pp p P− + + + − −= 0, , 1,s tS T= − (9) , ,, 0 G in G G st st pP   0, , 1,s tS T= − (10) ( ) , ,, 01 G out G G st st pP   − 0, , 1,s tS T= − (11) , ,, 0 S ch S S st st pP   0, , 1,s tS T= − (12) ( ) , ,, 01 S dch S S st st pP   − 0, , 1,s tS T= − (13) , SS S st Xx X 0, , 1,s tS T= − (14) ( ) ,, , , ,1 , , , S S S ch S ch S dch S dch st st st st S t xx p p CAP +  = +  − 0, , 1,s tS T= − (15) , TP TP TP t st t Pp P   0, , 1,s tS T= − (16) Where: (9) corresponds to the power balance; (10) and (11) set the limit of the power exchanged with the distribution network and G P [kW] is its limit; (12) and (13) mark the limit of the electric power for charging and discharging the storage system where S P [kW] is that limit; (14) establishes the power 116 Daniel Fernández Valderrama et al. / IFAC PapersOnLine 58-2 (2024) 112–117 storage limit with S X and S X as those percentage limits; (15) stablishes the dynamic expression that links the storage capacity ( , S st x ) with the power used for charging or discharging such system ( , , S ch st p and , , S dch st p [kW]); S CAP [kWh] is the capacity of the storage system, while ,S ch  and ,S dch  are the rates for charging and discharging the storage system. Finally, (16) express the power limits for the TG; while , PV st P and , L st P [kW] correspond to the stochastic variables modelled by the ACO-SG. 4. RESULTS The historical data available from the Savona Campus are from 2018 to 2023. The data is treated on an hourly basis, resulting in an array of 24-hour variables per day. The approach presented in Section II has been applied to the uncertain variables considered in this work, PV production and load consumption. To provide a case study, specific conditions have been established to subtract scenarios. The selected case has been in spring, with a temperature of 20ºC, no precipitation and a sunny day. A total of 36 scenarios were generated for the stochastic problem, with 6 scenarios per variable due to their combination. The specifications of the elements that compose the model are: the solar PV production with a maximum production of 95 kW; 100 kW of maximum production for the TG; and a capacity of 148 kWh for the storage system. Figure 2 represents the PV production scenarios obtained, while Figure 3 represents the load consumption scenarios. The corresponding probabilities are expressed in the legend. It is important to note that PV scenarios have a higher probability of producing more energy on sunny days with good weather conditions. Conversely, the probability of low load consumption is also higher under these conditions as it is reflected in the graphs. To test the validity of these scenarios the average error between the required total power and the generated total power is 1.66% for the PV generation and 0.56% for building consumption. Furthermore, the Euclidean distance can be used to determine the proximity between the generated scenarios and the historical data. In the case of PV generation, the distance of the closest scenario is 15.93 kW, and the furthest proximity is 64.35 kW from its closest real data. Similarly, for the building consumption case, the distance of the closest scenario is 4.2 kW 1 and the furthest is 16.54 kW from its closest real data. These distances are relatively small considering the 24 dimensions of time. The distinction between the two cases is due to the special case presented by the PV curves. The curves’ extremes are zero and the reference in the heuristic is displaced. As a result, these curves tend to have more errors during the central hours compared to the building consumption. Nevertheless, the error remains negligible, and all curves closely align with the real data. The two-stage stochastic model presented in Section III was used to test these scenarios. The unit commitment model considers uncertain variables while maintaining the system reliability in case of sudden fluctuations. The system operators can refine the unit commitment solution by defining appropriate attitudes toward risk and cost Miranda & Hang (2005). The model was tested with the solver CPLEX, taking 1.56s to solve the problem considering the 36 scenarios. Table 1 presents the optimal unit commitment, the result for the 1st stage. , , G in st p and , , G out st p have been restricted to 500 kW to ensure sufficient capacity to supply the entire system. Figure 4 represents the power taken from the distribution network for the different scenarios, while Figure 5 shows the power produced by the generator to minimise the total cost. Both solutions are deterministic for each scenario. In particular, Figure 6 represents a scenario with a 5.04% probability, demonstrating compliance with power balance. Figure 3. Load consumption scenarios generated and their probability associated. Table 1. Optimal unit commitment (1-24 hours). Figure 4. P ower needed to supply the demand taken from distribution grid for every scenario. Figure 2. PV production scenarios generated and their probability associated. Daniel Fernández Valderrama et al. / IFAC PapersOnLine 58-2 (2024) 112–117 117 storage limit with S X and S X as those percentage limits; (15) stablishes the dynamic expression that links the storage capacity ( , S st x ) with the power used for charging or discharging such system ( , , S ch st p and , , S dch st p [kW]); S CAP [kWh] is the capacity of the storage system, while ,S ch  and ,S dch  are the rates for charging and discharging the storage system. Finally, (16) express the power limits for the TG; while , PV st P and , L st P [kW] correspond to the stochastic variables modelled by the ACO-SG. 4. RESULTS The historical data available from the Savona Campus are from 2018 to 2023. The data is treated on an hourly basis, resulting in an array of 24-hour variables per day. The approach presented in Section II has been applied to the uncertain variables considered in this work, PV production and load consumption. To provide a case study, specific conditions have been established to subtract scenarios. The selected case has been in spring, with a temperature of 20ºC, no precipitation and a sunny day. A total of 36 scenarios were generated for the stochastic problem, with 6 scenarios per variable due to their combination. The specifications of the elements that compose the model are: the solar PV production with a maximum production of 95 kW; 100 kW of maximum production for the TG; and a capacity of 148 kWh for the storage system. Figure 2 represents the PV production scenarios obtained, while Figure 3 represents the load consumption scenarios. The corresponding probabilities are expressed in the legend. It is important to note that PV scenarios have a higher probability of producing more energy on sunny days with good weather conditions. Conversely, the probability of low load consumption is also higher under these conditions as it is reflected in the graphs. To test the validity of these scenarios the average error between the required total power and the generated total power is 1.66% for the PV generation and 0.56% for building consumption. Furthermore, the Euclidean distance can be used to determine the proximity between the generated scenarios and the historical data. In the case of PV generation, the distance of the closest scenario is 15.93 kW, and the furthest proximity is 64.35 kW from its closest real data. Similarly, for the building consumption case, the distance of the closest scenario is 4.2 kW 1 and the furthest is 16.54 kW from its closest real data. These distances are relatively small considering the 24 dimensions of time. The distinction between the two cases is due to the special case presented by the PV curves. The curves’ extremes are zero and the reference in the heuristic is displaced. As a result, these curves tend to have more errors during the central hours compared to the building consumption. Nevertheless, the error remains negligible, and all curves closely align with the real data. The two-stage stochastic model presented in Section III was used to test these scenarios. The unit commitment model considers uncertain variables while maintaining the system reliability in case of sudden fluctuations. The system operators can refine the unit commitment solution by defining appropriate attitudes toward risk and cost Miranda & Hang (2005). The model was tested with the solver CPLEX, taking 1.56s to solve the problem considering the 36 scenarios. Table 1 presents the optimal unit commitment, the result for the 1st stage. , , G in st p and , , G out st p have been restricted to 500 kW to ensure sufficient capacity to supply the entire system. Figure 4 represents the power taken from the distribution network for the different scenarios, while Figure 5 shows the power produced by the generator to minimise the total cost. Both solutions are deterministic for each scenario. In particular, Figure 6 represents a scenario with a 5.04% probability, demonstrating compliance with power balance. Figure 3. Load consumption scenarios generated and their probability associated. Table 1. Optimal unit commitment (1-24 hours). Figure 4. Power needed to supply the demand taken from distribution grid for every scenario. Figure 2. PV production scenarios generated and their probability associated. 5.CONCLUSIONS This paper presents a two-stage stochastic unit commitment optimization. The case study analysed is the Smart Savona Campus microgrid of the University of Genoa. The objective of the study is to determine the optimal use of the TG, taking into consideration uncertainties of load and RES production. A MILP approach is used to formulate the stochastic model, which determines the operation of the TG activation and deactivation (1st stage) and the rest of the variables are deterministic by each scenario (2nd stage). The uncertain variables are modelled and generated using a new method introduced in this work. ACO-SG is presented as a new approach based on an evolutive algorithm for generating scenarios. As described in Section IV, this methodology can generate new scenarios based on the total power and it is able to reproduce characteristics and nonlinearities from the historical data. Furthermore, a methodology based on weather conditions proximity has been developed to determine the probability of scenarios based on the power provided or consumed each day. This can be used as a forecast for upcoming days and to solve the unit commitment problem. This initial approach has opened up several avenues for future research. The algorithm used to generate scenarios is innovative and requires further investigation. It may be worthwhile to extend the search space beyond historical data, as was done in this case study, exploring new codifications of the problem. Constructing scenarios based on weather conditions could enhance scenario approximations, rather than relying solely on total power. This approach could be a potential area of research. ACKNOWLEDGEMENT The work has been done thanks to the NEST project, funded under the National Recovery and Resilience Plan (PNRR), and to the DER4ALL project. And to the project TED2021-129702B-I00, financed by MCIN/AEI/10.13039/501100011033 and by European Union "NextGeneration EU"/PRTR. REFERENCES Ahmed, H. (2019). Formulation of Two-Stage Stochastic Programming with Fixed Recourse. doi:10.31219/osf.io/w9y67 Alessandrini, S., Delle Monache, L., Sperati, S., & Cervone, G. (2015). An analog ensemble for short-term probabilistic solar power forecast. Applied Energy, 157, 95–110. doi:10.1016/j.apenergy.2015.08.011 Bahri, R. S., Sudirman, I. D., Utama, I. D., & Susanto, R. H. (2023). Data Mining Techniques To Uncovering Customer Segments: K- Means Clustering Using The Elbow Method Approach In Medium-Scale Grocery. 2023 International Conference on Computer Science, Information Technology and Engineering (ICCoSITE). IEEE. doi:10.1109/iccosite57641.2023.10127826 Birge, J. R. (2011). Introduction to stochastic programming (p. 485). Springer. Bracco, S., Brignone, M., Delfino, F., Pampararo, F., Rossi, M., Ferro, G., & Robba, M. (2018). An Optimization Model for Polygeneration Microgrids with Renewables, Electrical and Thermal Storage: Application to the Savona Campus. 2018 IEEE International Conference on Environment and Electrical Engineering and 2018 IEEE Industrial and Commercial Power Systems Europe (EEEIC / I&CPS Europe). IEEE. doi:10.1109/eeeic.2018.8493965 Colson, C. M., Nehrir, M. H., & Wang, C. (2009). Ant colony optimization for microgrid multi-objective power management. 2009 IEEE/PES Power Systems Conference and Exposition. IEEE. doi:10.1109/psce.2009.4840070 Consultazione dati meteoclimatici: ricerca avanzata. (2024, January). Retrieved from https://ambientepub.regione.liguria.it/SiraQualMeteo/script/PubA ccessoDatiMeteo.asp Delfino, F., Ferro, G., Parodi, L., Robba, M., Rossi, M., Caliano, M., Di Somma, M., et al. (2021). A multi-objective Energy Management System for microgrids: minimization of costs, exergy in input, and emissions. 2021 International Conference on Smart Energy Systems and Technologies (SEST). IEEE. doi:10.1109/sest50973.2021.9543247 Di Somma, M., Buonanno, A., Caliano, M., Graditi, G., Piazza, G., Bracco, S., & Delfino, F. (2022). Stochastic Operation Optimization of the Smart Savona Campus as an Integrated Local Energy Community Considering Energy Costs and Carbon Emissions. Energies, 15(22), 8418. doi:10.3390/en15228418 Di Somma, M., & Graditi, G. (2022, March). Challenges and Opportunities of the Energy Transition and the Added Value of Energy Systems Integration. Technologies for Integrated Energy Systems and Networks. Wiley. doi:10.1002/9783527833634.ch1 Li, J., Zhou, J., & Chen, B. (2020). Review of wind power scenario generation methods for optimal operation of renewable energy systems. Applied Energy, 280, 115992. doi:10.1016/j.apenergy.2020.115992 Miranda, V., & Hang, P. S. (2005). Economic Dispatch Model With Fuzzy Wind Constraints and Attitudes of Dispatchers. IEEE Transactions on Power Systems, 20(4), 2143–2145. doi:10.1109/tpwrs.2005.857930 Wang, Q., Guan, Y., & Wang, J. (2012). A chance-constrained two-stage stochastic program for unit commitment with uncertain wind power output. 2012 IEEE Power and Energy Society General Meeting. IEEE. doi:10.1109/pesgm.2012.6345252 Wei, H., Hongxuan, Z., Yu, D., Yiting, W., Ling, D., & Ming, X. (2019). Short-term optimal operation of hydro-wind-solar hybrid system with improved generative adversarial networks. Applied Energy, 250, 389–403. doi:10.1016/j.apenergy.2019.04.090 Yan, B., Di Somma, M., Graditi, G., & Luh, P. B. (2020). Markovian-based stochastic operation optimization of multiple distributed energy systems with renewables in a local energy community. Electric Power Systems Research, 186, 106364. doi:10.1016/j.epsr.2020.106364 Figure 5. Power produced by the generator for every scenario. Figure 6. Power balance of a particular scenario with a 5.04% of probability.