## 1 Introduction  
Climate change and greenhouse gas emissions are currently a primary global concern. The European Union has set out an ambitious plan to combat global warming, aiming for a 45% reduction in greenhouse gas emissions by 2030 and the complete climate neutrality by 2050 [1]. One of the main approaches to achieve this goal is decarbonizing energy systems by integrating renewable energy sources, such as solar and wind, into the energy mix [2]. This energy trend significantly increases the intermittency of electricity supply due to the variable nature of these sources [3]. Fluctuation in renewable energy production can lead to supply gaps when demand exceeds production capacity, or on cloudy or windless days, necessitating a more flexible and resilient energy system to maintain grid stability. Demand response mechanisms have been implemented to mitigate this challenge, taking advantage of the flexibility of energy consumption [4]. Demand flexibility allows consumers, belonging from different sectors, residential [5], commercial [6], and industrial [7], to adapt their consumption to the electricity system's needs, either in the case of energy shortages or in situations of risk to grid reliability due to unexpected failures [3; 8]. The industrial sector is one of the main consumers of electricity. Consequently, demand-side flexibility holds a unique potential for its stability and flexibility that can be implemented directly by modifying factories' operating hours [9]. Instead, in the residential sector, demand-side management does not still have a clear application due to the uncertainty of the end user consumption patterns and the lack of regulations and smart energy infrastructure [10]. Furthermore, the analysis of flexibility in a factory differs substantially from that of a household, where home energy management systems (HEMS) can provide more granular control over appliance consumption but must be easily integrated into daily life without disrupting daily activities [11]. Residential flexibility is mainly achieved through connected devices and task automation. It allows households to decrease their consumption at times of high demand or taking advantage of periods of lower energy cost for activities such as charging electric vehicles or scheduling heating and cooling. In the residential sector, HEMS act as innovative platforms to optimize the consumption of household appliances such as washing machines [12], electric water heaters [13], ovens [14], dryers [15], dishwashers [16], lighting systems [17], and heating, ventilation, and air conditioning (HVAC) equipment [18]. These systems allow users to reduce their consumption during peak hours, predict consumption patterns, and adjust to real-time electricity market conditions. Furthermore, heat pumps represent a flexible solution to decarbonize residential heating systems and increase energy efficiency [19]. They harness energy from air, water, or ground for heating or cooling, making them a key technology for the homes of the future [20]. In this way, they not only help to reduce CO\({}_{2}\) emissions but also contribute to improving the overall energy efficiency of households, reducing dependence on non-renewable energy sources [21]. Private car parks equipped with charging stations for electric vehicles (Evs) also expand the flexibility potential of households [22]. Evs can store large amounts of energy, which can be used to balance demand on the electricity grid. As households adopt more Evs, the impact of their charging and discharging can be harnessed as a distributed storage tool, allowing vehicle owners to offer charging capacity to the grid at times of high demand, thus, contributing to more excellent grid stability [23]. Transitioning to a decarbonized energy system also demands reevaluating existing energy market structures [24]. Traditional electricity markets were designed around centralized power plants and predictable demand patterns, fundamentally different from renewable energy systems of decentralized and variable nature.