A Tri-Layer Optimization Framework for Day-Ahead Energy Scheduling Based on Cost and Discomfort Minimization

Over the past few decades, industry and academia have made great strides to improve aspects related with optimal energy management. These include better ways for efficient energy asset management, generating great opportunities for optimization of energy distribution, discomfort minimization, energy production, cost reduction and more. This paper proposes a framework for a multi-objective analysis, acting as a novel tool that offers responses for optimal energy management through a decision support system. The novelty is in the structure of the methodology, since it considers two distinct optimization problems for two actors, consumers and aggregators, with solution being able to completely or partly interact with the other one is in the form of a demand response signal exchange. The overall optimization is formulated by a bi-objective optimization problem for the consumer side, aiming at cost minimization and discomfort reduction, and a single objective optimization problem for the aggregator side aiming at cost minimization. The framework consists of three architectural layers, namely, the consumer, aggregator and decision support system (DSS), forming a tri-layer optimization framework with multiple interacting objects, such as objective functions, variables, constants and constraints. The DSS layer is responsible for decision support by forecasting the day-ahead energy management requirements. The main purpose of this study is to achieve optimal management of energy resources, considering both aggregator and consumer preferences and goals, whilst abiding with real-world system constraints. This is conducted through detailed simulations using real data from a pilot, that is part of Terni Distribution System portfolio.


Introduction
Multi-objective optimization in the energy sector is a demanding problem, involving many real-world parameters, such as flexibility and demand response (DR) management. These may pose as dependent, or conflicting objective problems. Addressing such problems with techniques such as scalarization that transforms multi-objective into single-objective problems is quite common [1]. Other ways involve multiple objective functions that describe problems in detail. Optimization problems generate research challenges based on the solving approach. For example, real-world optimization problems are usually modelled as non-linear programming problems with many objectives. Conversions of such problems to single objective ones may cause practical issues, since they output a single optimal solution considering trade-offs identified on a single, transformed problem. In such cases, a certain degree of detail is omitted, rendering the approach non-realistic.
New trends in multi-objective optimization attempt to retain compulsory problem details defining multiple objective functions to be solved in parallel. Solutions are formulated as optimal Pareto fronts, generating many options for the best solution, each acting as a trade-off for another. The state-of-the-art aims to develop methods that improve efficiency and speed of finding optimal solutions for forming Pareto fronts. Exhaustive approaches involve implementation of repetitive algorithms having each iteration output a solution closer to the optimal one, making such problems time complexity dependent. On the other hand, heuristic approaches, such as evolutionary algorithms that introduce population approaches, mitigate the issue of time complexity, offering optimal solutions on a single run. Any decision making related with multi-objective problems should focus on efficient and timely solutions integrating fine-tailored algorithmic implementations based on problem complexity. Single-objective optimization finds one optimal solution optimizing only one objective function. Multi-objective optimization finds two or more optimal solutions optimizing many objective functions at the same time, while many optimal solutions derive from the objective space. Optimal solutions are often visualized, by forming a Pareto front aiding an enhanced decision making process [2].
In this paper, the conception of a tri-layer optimization framework is elaborated. To achieve day-ahead optimal energy scheduling, the energy load for two actors (consumer, aggregator) is optimized, while managing their interaction with a Decision Support System (DSS). The aggregator's problem poses as a single-objective optimization problem while the consumer's poses as a bi-objective optimization problem. The aggregator's optimization is expanded to implement a DR signal scheme that aims to optimize portfolio energy management, while reducing overall cost. Therefore, after performing an analysis, cost is minimized, whereas comfort is maximized, considering the profiles of all consumers involved, while offering optimization options for both consumers and aggregators.
The purpose of the proposed tri-layer optimization framework is to offer autonomous consumer and aggregator optimization and the possibilities to collaborate, in case it is deemed profitable for either of them. It highlights consumer capabilities allowing the optimization of assets, without the need of DR signals from the aggregator. This approach generates new options to relax the energy contract (between consumer and aggregator) and introduce elasticity on DR signal acceptance. It also increases the prospects for autonomous peer-to-peer (P2P) level energy optimization [3]. The proposed framework's validation on real-world pilots, showcases optimization minimizing the cost, while keeping occupant discomfort at acceptable levels, through a flexible DR scheme enforcement.
The remaining of this paper is structured as follows: Section 2 reviews the stateof-the-art, Section 3 states the problem, while Section 4 analyzes the developed concepts/methodology of the proposed bi-layer optimization framework. Section 5 presents the results of experiments conducted on pilots. The paper concludes with Section 6, discussing final thoughts, limitations, implications and prospects for this work.

Background
This section reviews the state-of-the-art on energy optimization and commonly utilized methods for minimizing variables, such as operational costs whilst including models such as microgrids, renewable energy sources, or parameters, such as flexibility.
Multi-objective optimization problems usually involve many objectives with many inter-dependencies. It is hard to discover optimal solutions that satisfy all objectives. Analytical and classic numerical methods entail mathematical calculations and search values that are clearly defined. On the other hand, heuristic methods negate these requirements attempting to find global optimal solutions. Real-world multi-objective optimization problems may require a variety of methods to provide optimal solutions. These include apriori, Pareto-dominated, interactive and new dominance methods. Multi-objective optimization is quite common in the energy sector for solving problems in environmental protection, energy saving, cost reduction, emissions reduction and more. For each case, multi-objective optimization methods yield benefits and drawbacks, generating prospects for future work [4].
Global warming and environmental parameters introduce various constraints regarding the absorption of distributed energy resources (DER) as well as in the economic aspects. A multi-objective optimization model is developed to analyze the optimal operating strategy of a DER system, while combining minimizations of energy cost and environmental impact with the latter assessed in terms of CO 2 emissions. The pilot for validating this model is an eco-campus in Japan and the Pareto front of optimal solutions results from the compromise programming method. The electrical and thermal demands of the eco-campus consider the existence of photovoltaics (PVs), fuel cells and gas engines. Results showcase that when minimizing energy costs, the CO 2 emissions increase, while the DER system functionality becomes sensitive when more weight is applied to the environmental objectives. In addition, considering options, such as bilateral electricity exchange (buy-back programs), utilization of biogas or taxation on carbon emissions, affects the DER system's operation accordingly [5].
On the consumer side, the concept of zero/low energy consumption buildings has become a research field with many applications and ecological benefits. Both researchers and practitioners agree that the effectiveness of these structures is often defined by the level of renewable energy resources (RES) utilization. A comparative study deals with the design optimization techniques for integrating RES systems in such structures. The research approach considers genetic algorithms (GA) for solving a single objective optimization problem and non-dominated sorting genetic algorithm (NSGA-II) for a multi-objective optimization problem. Principles and parameters of building energy and renewable energy systems interact with one another, generating variables and constraints for the optimization process. The pilot building for this approach is the Hong Kong Zero Carbon building. The results from optimization improvements showcase that when a RES system exists, the optimization process yields better results than the current configuration of the pilot building. Furthermore, when a single objective needs to be strictly fulfilled, the single objective optimization yields the best results. When a variety of design options with or without compromises should be presented, the multi-objective optimization becomes ideal [6].
Continued supply and fulfilment of local requirements in heating, cooling and electricity demand plays a vital role in modern energy management systems. This should happen in an environmentally friendly and economic manner. DER systems, if efficiently utilized, may output great results in terms of carbon emissions reduction and optimal energy management, aiding to address climate change. A novel multi-objective framework compares two methods for effective design of DER systems, considering total annual cost (TAC) and carbon emissions. The first method yields a parallel sizing of the two objectives, while the second method incorporates predefined technologies and system capacity. The optimization process is evaluated by three scenarios integrating technologies, the two methods and a case study. Findings reveal that when a DER system connects with a microgrid, energy storage and a heating network outperforms the other two scenarios. Furthermore, the first method yields better results regarding environmental emissions and cost reduction, while offering more options in problem design [7].
Modern buildings integrate many intelligent control systems, enhancing the household occupant's experience and comfort. The main issue regarding the best possible occupant experience includes the correlation of energy consumption with discomfort. Each of these two variables counterbalances the other. A multi-agent based control framework attempts to enhance smart building management, defining energy consumption and occupant comfort levels as the two objective functions of the problem. The results form Pareto optimal solutions utilizing multi-objective particle swarm optimization (MOPSO) and weighted aggregation (WA). The variety of trade-off options with regards to energy cost and occupant comfort generate opportunities for making better decisions on building design and management [8].
Microgrid operation often involves the existence of RES. A scalable quantitative framework attempts to deal with the intermittent nature of RES on microgrid integration. When RES are heavily utilized a novel chance-constrained stochastic programming model considers three policies. One of the policies utilizes a fixed amount of RES output during the whole time of examination, while the other two utilize certain hours and all operating hours. A combined sample average approximation (SAA) algorithm solves the problem, showcasing that the policy utilizing all operating hours introduces more restrictions for optimization, although there is peak RES utilization. In addition, this research presents possible energy management improvements, when PVs are combined with or covering demands of other fuel-based, or DER units in power outage periods. The minimization of operational cost results from sending dispatch signals to each existent resource (s, fuel-based or any DER units) [9].
Energy optimal scheduling on microgrids is a topic that lately attracts much research attention. Important issues related with that topic include power balance on normal and peak demand periods (outages). A novel approach considers the intermittency of RES generation and that of the demand, outages of distributed generators and cases of islanding. The problem is solved with a multiple chance-constrained scheduling model. The model along with the parameters mentioned, also considers outages on energy storage mediums, such as batteries. Chance-constraints transform utilizing control variables attempting to decrease the model complexity, while probability distribution functions handle the available energy reserve in a variety of conditions. For example, when there is battery outage, or islanding. These functions introduce an index for probability of reserve sufficiency (PRS). The model is validated and evaluated for a microgrid under different conditions recording PRS readings [10].
Introducing storage in microgrids plays a paramount role in generating a variety of extra services. Yet, offering such storage services along with effective grid management is a demanding task. A chance constrained optimization approach considers electrical and thermal battery sources for improving grid reliability. Testing incorporates loads of 5-min intervals for introducing randomness in energy loads/fluctuations. Batteries can charge and discharge fast. This characteristic makes them appropriate for managing energy flexibility constraints that may involve PV generation or random peak demand. Chance constraints mitigate issues with flexibility reducing errors, while common variables state dependencies of thermal and electrical storage systems. Findings show that this approach manages energy fluctuations taking advantage of flexibility for a more reliable grid operation [11].
Extensive usage of RES, such as PV or wind power are essential for the transition to a more sustainable microgrid operation. A novel probabilistic optimization framework envisions a more efficient microgrid management. It utilizes chance constrained programming and a bi-objective approach involving RES integration and customer load profiles. Jointly-distributed arbitrary variables capture the probabilities of reaching the expected energy load while forcing the operational cost below a certain threshold. This approach utilizes an improved hybrid artificial bee colony (ABC) and differential evolution (DE) algorithm to optimize energy management of a microgrid. Results are validated with a sample average approximation technique that compares findings with a scenario and Monte Carlo stochastic programming approaches [12].
Pollution distribution and reduction are parameters that should be optimally handled in hybrid energy systems. Economic and other environmental aspects can be enhanced with the incorporation of a DR program. The cost minimization of a hybrid energy system constitutes an objective function, while minimization of CO 2 emissions constitutes another. Common constraints or variables in functions may cause counterbalancing effects on the final optimization process. A multi-objective optimization problem is solved by outputting the most efficient solutions considering trade-offs. These may be reported in the form of DR signals. To validate the results and expose the benefits of this approach, a fuzzy satisfying technique chooses the optimal solution, and a DR program outputs possible benefits with environmental and economic indicators [13].

Problem Statement
Due to the heavy penetration of RES in energy grids, the flexibility parameter plays a paramount role for improving energy distribution, stability and reliability. Flexibility enables an improved management of any type of energy transfer related with the grid, according to an initiation signal. Such transfers include energy loads, energy generation within the grid or incoming and outgoing from the grid. It also creates new opportunities for energy profiling and portfolio management, offering new capabilities for both consumers and aggregators who may monitor power exchanges and interactions more efficiently, optimizing the performance of the power grid.
Flexibility depends on various factors, such as DR programs, RES, and resource scheduling. DR programs should be enforced rigorously, since non-compliance penalties render this energy concept inefficient. Triggering flexibility resources without strict scheduling leads to non-viable costs. DR programs should be enforced in a way that energy sector stakeholders, such as the aggregator, can effectively handle available energy resources/reserves. That way, aggregated monitoring and adjustment of flexibility aids improving the exploitation and application of DR programs and the benefits they yield.
There are various studies that contemplate the matter at hand. There are those that include battery energy storage systems (BESS) that are managed by aggregators with the consent of the end users [14]. The use of BESS has the added benefit of not interfering with the end user's consumption and therefore not requiring any consideration on their comforts. Additionally, in this case the prosumers' view is included only as an input for the aggregator's portfolio optimization, mainly considering the aggregator's view. This view is adopted again in [15], where the uncertainty of the load is examined, when an aggregator participates in the DR market. In other cases, although the end user's view is considered, this is done at the expense of reducing the role of the aggregator to just sending the electricity price signals [16]. There are also cases where the collaboration of the aggregator with Microgrid clusters incorporates multi-level chance-constrained programming [17]. However, the main focus of that study is the transactive energy management trading among microgrids.
In this study, both the view of the aggregator and the end-user is examined in equal terms, conducting the optimization for each one semi-autonomously. While the objective remains the best outcome for each, the interests of the other are still taken into consideration. Especially, in the case of the end-user adopting a human-centric approach. Furthermore, since the energy consumption of the end user is implicated, not only its uncertainty is considered, but also the comfort of the user by managing his/her energy consumption. Moreover, this study uses pilot site real data regarding an aggregator's portfolio.
For addressing, fine-tuning and combining these concepts, a multi-objective optimization problem may concurrently handle the parameters of flexibility, consumer discomfort, energy cost and more. Solutions provide data for creating services that enable aggregators to post flexibility/DR signals or participate in electricity markets on a more informed manner.
This study integrates both concepts of flexibility and DR, and provides a solution in the form of an optimization problem for consumers and aggregators. It enables a DR strategy, subject to specific constraints, to generate objective functions before running optimization algorithms for day-ahead energy scheduling. The algorithms tackle the issue of optimal energy distribution, based on the combination of a single-objective and a bi-objective optimization. The single-objective optimization minimizes the portfolio cost for the aggregator, while the bi-objective optimization optimizes cost minimization along with discomfort for the consumer. This problem approach generates a framework for multi-objective analysis. The envisioned optimization framework improves portfolio management and DR functionality/efficiency. Furthermore, while minimizing consumer costs it offers acceptable counterbalancing options for consumer discomfort. It poses as a long-term improvement for the applied DR strategies and optimal energy management, highlighting an autonomous optimization for consumers and aggregators. It elaborates on possibilities for their collaboration, if it is deemed profitable. The consumer can optimize assets without the need of aggregator DR signals. That way, new capabilities for relaxing the contract and DR scheme arise, as well as autonomous optimization on the P2P level, envisioning an automated DR optimization and scheduling framework.

Methodology
In this section, the goals of our methodology are stated and the utilized methods/algorithms. An overview of the steps of our methodology is also presented.
The topic of advanced DR optimization is addressed, by introducing a methodology and testing the validity of its results. Tasks such as the distinction of optimal load dispatch can be quite demanding, as they involve great randomness of events. For that reason, this optimization issue is contemplated, by decomposing the initial problem and distinguishing two scenarios of functionality for the optimization methodology. The first scenario explores the possibilities of cost minimization along with maintaining acceptable levels of discomfort for the consumers. The second scenario enables portfolio cost minimization for the aggregators.
Multi-objective optimization problem solutions should depend on the type of problem and the envisioned output. In case problems are small and can be expressed in a linear way, any solver can compute the optimal solution relatively quickly. If that applies, a good practice is to search for precise solutions. If all the non-dominated outputs can be retrieved, e-constraint method [18] is an appropriate choice, otherwise, an algorithm with weighted sums can be used instead. On the other hand, if problems are large and can be expressed in a non-linear way, solvers take too long and it becomes difficult and slow to extract the optimal solution, even for single-objective problems. To address these issues, metaheuristics come into play, such as MOPSO [19], Non-Sorted GA type three (NSGA-III) [20], or Strength Pareto Evolutionary Programming (SPEA2+) [21].
In this study, methods/algorithms are utilized depending on the Scenario considered and that way the results are achieved and verified. For Scenario #1 Interior Point Optimizer (Ipopt (https://coin-or.github.io/Ipopt/ (accessed on 23 April 2021))) is used, that is an open source software package for large-scale nonlinear optimization. For Scenario #2 the GNU Linear Programming Kit package (glpk (https://www.gnu.org/software/glpk/ (accessed on 29 April 2021))) is used, as a Mixed Integer Programming (MIP) solver. These scenarios deal with consumers and aggregators, respectively.
The usage of metaheuristics and evolutionary approaches for the problem at stake has also been examined, yet it was concluded that using mixed integer programming and large scale nonlinear programming solvers is more appropriate, since they produce optimal solutions in a quick and precise manner. Furthermore, the fine-tuning of parameters such as population size and number of function evaluations, commonly required in metaheuristic approaches, is also avoided.
The proposed optimization engine consists of two optimization problems. The optimization engine takes as input historical time series data regarding consumers and outputs a day-ahead optimized energy schedule. (1) Consumer that poses as a bi-objective minimization problem. The minimization of cost and the minimization of consumer discomfort; (2) Aggregator that is a single-objective minimization problem. The minimization of portfolio cost.

Dataset & Preprocessing
This section, presents the dataset for development, operation and testing the proposed approach. It is a timeseries dataset and contains rows of attributes representing entries for consumers that belong to a portfolio of an aggregator. Various data pre-processing techniques are utilized, such as handling missing values, or data transformation and reduction, as needed to normalize the dataset.
Experimentation data refer to 348 consumers with both energy prediction and flexibility readings over one-hour time intervals retrieved from ASM Terni pilot (https://www. wisegrid.eu/pilot-sites/terni (accessed on 5 May 2021)) in Italy. ASM Terni S.p.A. is an Italian multi-utility, operating in the centre of Italy, notably it is the Distributed System Operator (DSO) of the city of Terni. The local power distribution network expands to a geosurface of 211 km 2 and delivers around 400 GWh to 65,500 customers annually. The ASM distribution network connects to the High Voltage (HV) grid through three primary substations and supplies electricity to residential and business customers with 60 Medium Voltage    In 2019 the total electric power generated from RES was as follows (energy mix variation is shown in Figure 4): • 34 GWh from Solar Energy; • 68 GWh from Hydropower; • eight GWh from Biomass and waste-to-energy.
For this paper the energy consumption and production of a cluster of 348 consumers have been used for the evaluation purposes. This cluster consists of residential, commercial and industrial end users, characterized by high level of auto-consumption rate. Although almost all the electricity users of the ASM's power distribution network have smart meters installed in their premises, for many of them monthly values are collected. On the other hand, the data of the cluster are collected every 15 min and aggregated in one-hour resolution for experimentation; these data are gathered through the Advanced Metering Infrastructure (AMI) which consists of a Smart Meter, Current Transformers and GPRS modem that enables data transfer to central servers. After a consistency check data are stored in ASM Terni servers for 5 years. For further enhancing our dataset, yet another consumer is added to the portfolio of consumers, that is the novel CERTH/ITI nZEB Smart Home (https://smarthome.iti. gr/ (accessed on 11 May 2021)) which is located in Thessaloniki, Greece. It is a rapid prototyping infrastructure incorporating various novel technologies. This structure imitates real domestic conditions experimenting on actual habitat conditions. Since it integrates a variety of Internet of Things (IoT) technologies and Information and Communication Technology (ICT) solutions, it stands as an ideal consumer pilot for this study, presenting its side and its interaction with the aggregator.
The data observations expand from 1 February 2019 up to 27 February 2019. Whenever timeseries are utilized, the timestamp is in coordinated universal time (UTC). System Marginal Price (SMP) is retrieved from the European Network of Transmission System Operators for Electricity (ENTSO-E) transparency platform (https://transparency.entsoe.eu (accessed on 3 April 2021)) for both pilot areas, Italy (348 consumers) and Greece (one consumer). Other important parameters that have been considered are temperature and operating reserves.
The energy load prediction is based on an ensemble of a set of weak learners, such as Multilayer Perceptron (MLP), Long Short-Term Memory (LTSM), Gradient Boosting trees (GBT) and Support Vector Regression (SVR) [22,23]. Their energy forecasting results are combined using a weighted average with the weights being dynamically computed as a function of the input features of the prediction process according to (1): The weights associated with the prediction results of each of the four weak learners (MLP, LSTM, GBT and SVR) are computed using a genetic algorithm. The solution is composed of the four weights and the fitness function is based on the prediction error obtained by applying the weights on the predictions according to the test data. Such an approach is presented in [24], allowing for a dynamic weight computation combined with a weak learner configuration.
The energy demand prediction considers both energy and contextual features. The energy features are determined from the historical energy data acquired by consumers on-site smart meters. The contextual features represent data that are not specific to power but is correlated to context, such as season, day of the week and day of the month. The energy flexibility prediction model uses two MLP neural networks to predict the flexibility lower bound (i.e., below the baseline demand) and upper bound (i.e., above the baseline demand) [24]. The baseline energy demand shows the electricity would have been consumed by a consumer in the absence of DR and to determine it the X of Y method was used. Flexibility prediction features reflect the differences between the monitored energy profiles and the baseline, either above or below. The neurons used are of type ReLU [25], the metric for training the network was MSE [26] and the optimizer used for determining the weights was ADAM [27]. The energy load and flexibility predictions have a good accuracy featuring a MAPE < 10% [26]. Table 1 offers a summary and a description of the data used for experimentation. For bi-objective optimization timeseries data per consumer are utilized. These include energy load forecasts and the SMP. For the single-objective optimization utilize timeseries data for portfolio load forecast are utilized, upper and lower bounds of flexibility and the SMP. A detailed presentation of data and the mathematical problem formation follows in Sections 4.2 and 4.3.

Optimization Type Data Description
Consumer Energy load forecast (kWh); System marginal price (€/kWh).

Aggregator
Portfolio load forecast (kWh); Portfolio upper bound flexibility of each consumer (kWh); Portfolio lower bound flexibility of each consumer (kWh); System marginal price (€/kWh).

Single-Objective Optimization-Aggregator
The optimal day-ahead schedule for the aggregator utilizes lower and upper bounds of flexibility for each consumer within the portfolio and the energy load forecast for a specific day and in one-hour resolution. Since, the aim is to minimize the aggregator's net cost for trading energy in the day-ahead market, the SMP per market (Italian and Greek) is also considered, exposing capabilities for optimizing overall portfolio economic benefits and the portfolio's day-ahead energy load forecast based on historical data. Therefore, this study considers a single-objective modeling approach for minimizing the operational costs for aggregators. Due to the abstract level of input data, a sub-process for testing and validation is exploited utilizing a single objective function for this use case. It yields the "on demand" algorithmic output and the optimal contribution of the consumer to the grid (for a specific timestamp) while abiding with design constraints.
Objective function (2) manages the aggregator's day-ahead optimal energy resource scheduling, aiming to reduce its overall operational costs and maximize profits.
Subject to constraints (3)-(5): With constraints (3) and (4), referring to the maximum and minimum amounts of energy that each consumer can reach individually and consequently the portfolio as a whole. Constraint (5) actually states that the sum of the optimized energy scheduling must be equal to that of the initially predicted one. Therefore, taking into account that the overall energy consumption does not change, regardless of the optimized schedule proposed to consumers, their daily consumption habits also do not change.

Bi-Objective Optimization-Consumer
For optimizing the day-ahead energy scheduling for the consumer, the day-ahead energy load forecast in one-hour resolution is utilized. That way the overall energy load consumption can be retrieved. Using historical data from the said pilots and the knowledge of SMP in both areas, the cost of imported energy for the consumer is calculated.
Bi-objective optimization refers to the consumer use case and the following objectives are considered: operation cost minimization resulting from reducing energy consumption at occupant acceptable levels, and consumer discomfort minimization. These two objective functions are solved simultaneously, considering constraints and common variables.
The objective function related to operation cost reduction is the following: Subject to constraints (7) and (8): Effective energy management involves a certain level of load manipulation for facilities. For households, consumer loads for home appliances are distinguished, which are categorized into fixed, regulatable and deferrable loads. Lightning, cooking and electronic devices belong to the fixed load that should be used anytime, on request. Water heaters and heat, ventilation and air-conditioning (HVAC) systems belong to the regulatable loads, being subjects to usage delay or rescheduling. Appliances, such as dishwashers and dryers, belong to the deferrable loads, since their operation can be deferred. Consumer thermal comfort considering these parameters poses a challenging task for effective and targeted DR scheme implementation [28].
Consumer comfort is subjective and poses significant difficulties for a realistic assessment and quantification. According to ISO7730 thermal comfort standard [29] the Predicted Mean Value (PMV) index is used to calculate human perception of comfort. The PMV index ranges between [−3, 3], where: 0 means neither hot, nor cold; +/−1 slightly warm (+), or slightly cold (−); +/−2 means heat (+), or cold (−); and +/−3 means very hot (+), or very cold (−). Yet, for retrieving PMV index values access to a certain number of data attributes is needed, such as air temperature, air velocity, air humidity, mean radiant temperature, clothing insulation and occupant activity. Since this study has no access to such data, consumer (occupant) discomfort is calculated adjusting a custom index that considers the PMV index value range and discomfort calculation, as presented in [30]. That way, the output of discomfort across all consumers is normalized between values [0, 1], distinguishing five discomfort profiles. An example of such profiles is presented in Section 5.1.
The objective function related to the minimization of the consumer discomfort is described as: Subject to constraints (7), (8), (10) and (11).
The minimization of consumer discomfort function (9) models the degree of discomfort a consumer feels when reducing the energy consumption. The greater the energy consumption reduction, the greater discomfort [31]. C pre f erence and aux coe f f icient pose as customer-specific variables. A high value of C pre f erence expresses a consumer's preference to lower energy consumption also decreasing discomfort, while a greater aux coe f f icient value infers to more discomfort [32].

Results
This section presents results as scenarios for the optimization actors. These are, consumers and aggregators. The two optimizations, single-and bi-objective, interact with each other, based on the following architectural scheme forming a tri-layer interaction.

Scenario #1: Consumer
The Consumer layer optimizes consumer's energy requirements for one day-ahead, while integrating five personalized options for occupant discomfort. For presentation clarity, the results for a single consumer are presented. The same optimization process, along with its results, applies to all the consumers in the aggregator's portfolio (as described in Section 4.1). Figure 5 shows the bi-objective optimization output of the consumer layer for a day-ahead scheduling, along with discomfort options and economic reduction solutions. These solutions are presented in Figure 6 in the Pareto front as the outcome of the bi-objective optimization approach. Appendix A (Table A1)

Scenario #2: Aggregator
As in the case of the consumer, cost minimization is the objective, differing only in scale, and constrained by the flexibility of the consumer portfolio, as detailed in Section 4.1. The DSS layer optimization outcome for the aggregator's consumer portfolio for the dayahead energy scheduling, can be seen in Figure 7. The upper and lower flexibility bounds can be seen, as a set for the whole portfolio in black, and the forecasted values in red. The orange dashed line depicts the SMP values, and grey bars show the final optimized per hour energy consumption of the portfolio. The way the actual energy consumption is modified is depicted by the forecasted red line to the grey bars according to the SMP values; whenever the SMP is high, the consumption is lowered to the lowest possible value; whenever the SMP is low, the energy consumption is regained, reaching the highest values possible, in order to have the same total daily energy consumption in the end. According to this scheme, the DR signals to be sent to each of the consumers are calculated. Every time a deviation between the forecasted energy consumption and the optimized one exists, DR signals are to be sent to the consumers. Since the whole DR portfolio is included, the idea is that each consumer should contribute according to his/her capabilities, that is their attributed flexibility, in order to have a fair strategy among them. First, their contribution to the total portfolio flexibility is calculated for every hour as formulated in the following equations: Then, this is applied to the difference between the optimized and originally forecasted energy consumption for that hour, and the required amount of energy in kWhs to be reduced, or increased, is it may be the case, is calculated for every consumer, as formulated in the following equations, that is: Figure 8 demonstrates an example, highlighting a single optimal solution for part of the portfolio posing as DR signals, e.g., four consumers out of the whole portfolio. Appendix A (Table A2) Figure 7. The aforementioned results for the same day period are presented, as those in Figures 5 and 7.
Finally, in Table 2 a representative sample of portfolio savings for the whole examined period between 1 February 2019 up to 7 February 2019 is presented.

Proposed Demand Response Scheme
The proposed DR scheme envisions an autonomous and dynamic improvement for optimal energy management involving two or more actors. At its current form, it utilizes the optimization outputs for consumer and aggregator attempting to enhance their collaboration while pertaining certain levels of freedom of choice for managing assets. Both the consumer and the aggregator may choose their own optimized schedules, according to the electricity price and in parallel. The conception of such a DR scheme generates new capabilities for energy contract relaxation, while allowing optimization on the P2P level. More specifically, since day-ahead energy load scheduling is considered, the aggregator publishes an hourly DR schedule for all portfolio assets, i.e., consumers, at a fixed timestamp the day before. For the examined use cases, this means on 6 February 2019 at 18:00, since in most markets the SMP for the day-ahead is determined around noon on the previous day. Then, the consumers have to accept the DR signals and a two-hour period is provided for them to respond, that is, 19.00-21.00. The decision of whether to accept or reject the DR signals received, is based mainly on their alignment with the optimized day-ahead schedule already selected by each consumer. Thus, some DR signals may only be rejected, while others may be either Accepted or Rejected. This scheme is implemented by the DSS layer and generates default options for the involved actors ( Figure 9). Next, three use cases of the proposed DR Scheme are presented for a single consumer (C1), considering the results from Appendix A (Tables A1 and A2). Tables 3-5, show the envisioned DR scheme functionality for consumer (No Opt, SD and HD) to aggregator interaction, allowing consumers to choose which DR signals to accept, or decline. This type of interaction allows a more dynamic adjustment of the energy load while retaining certain levels of discomfort or economical benefits.

Conclusions
This study envisions a DSS framework that optimizes day-ahead energy scheduling for aggregators and consumers. The goal is to produce material for academic and industrial reference, focusing on the concepts of multi-objective optimization, applied to demand-side management material, such as DR, flexibility, energy load forecasting and discomfort. An optimization architectural layer describes and solves an individualized problem for each actor, while actor interaction is managed by a third architectural DSS layer. The importance of effective energy management is highlighted and the benefits it yields, while envisioning a cooperative energy management between the aggregator and the consumer. Any improvements in this type of cooperation, generates new prospects for efficient energy monitoring and management for modern energy systems.
For presenting and validating findings, two distinct scenarios have been considered, one referring to consumer optimization and one to aggregator portfolio optimization. The first scenario models cost minimization offering acceptable options without violating the comfort of consumers, and addresses the problem with a large-scale nonlinear solver. The second scenario enables portfolio cost minimization for aggregators, and solves the problem using mixed integer linear programming. Both problem solutions utilize a common framework for communicating the results envisioning a DR scheme that improves prospects for their collaboration. An inclusive collaborative schema has been implemented enabling both the aggregator and the consumer to engage in DR events, yet retaining their autonomy, especially for the consumer, following a human-centric approach towards the end-user, who is the consumer. The results show significant gains in cost savings for both the aggregator and the consumer.

Limitations
The limitations of this optimization framework can be attributed to the fact that this research does not consider constraints, such as power transmission loss, heating losses, inventors and distances for calculating the objectives. That is because the final product of energy load forecast, flexibility, etc., it retrieved from API pilots. Therefore, this detail is already taken into consideration and pre-calculated, rendering our research design into a high-level experimental approach.
This study aims to optimize one day-ahead energy scheduling, incorporating a DR scheme and two system stakeholders: the consumer and the aggregator. For a more holistic approach, a framework that includes DSO as the third system stakeholder should be contemplated and elaborated on, experimenting on their possible interactions in different scenarios.
An analytical comparative analysis regarding the options of solvers for producing optimization results for each scenario is omitted, since it is considered out of our current research objectives. A large-scale nonlinear optimization and a mixed integer programming solver are utilized to outputting results for consumer and aggregator respectively. Metaheuristics involving genetic algorithms could be incorporated for both scenarios while offering a thorough comparative analysis on solvers. Such limitations generate directions for improvements and future work.

Implications
This study aims to produce a framework able to optimize the day-ahead energy load scheduling as a holistic approach, taking into account both the aggregator's and the consumer's view. Currently, it considers a DR scheme that manages the interaction of two stakeholders (aggregator and consumer). In its expanded version, it should be able to handle also the DSO and validate a three-stakeholder interaction through various use cases. In that case, the framework will be able to identify, test and evaluate a wider range of requirements for a modern energy distribution network. The proposed framework models and offers insights for optimal energy management, acknowledging the possible integratiofn among a variety of parameters, such as RES, and storage units. Integration of such parameters may offer enhanced energy grid elasticity, since there are more options for handling issues related with peak loads, broken power grid links, etc. Such parameters have been identified and presented in the literature, and can be added to an extended version of this work adjusting the objective functions per stakeholder.
Solving each problem in a stand-alone manner allows interactions between consumers (P2P level) while allowing DSO to validate DR programs for the aggregator. Constraints and constants are combined for each case affecting individualized solutions. Novel solutions for a more efficient monitoring and management of energy grid are important. Nowadays, aggregators have to manage hundreds of thousands of consumers constituting very large portfolios showcasing the importance for more efficient energy load scheduling. DSOs also need reliable tools for monitoring, validating and enforcing a constant and reliable energy grid functionality, when deemed necessary. In detail, aggregators should be able to efficiently broadcast a one day-ahead energy load schedule for their portfolios, based on SMP, flexibility setpoints for consumers and more. The consumers require 24/7 asset management and an efficient framework that enables a reliable DR signal confirmation scheme, ideally with dynamic participation. The DSO should retrieve that information from the aggregator and approve the DR portfolio schedule. In case of an energy grid issue, DSO should be able to identify the problem with the power distribution network and notify the aggregator in order to comply with the adjusted one day-ahead energy load and flexibility requests.
In that respect, this work will be able to assist or become a point of reference for both the industry and academia, when referring to DERs, P2P energy transfer models and multi-objective optimization on distribution of energy, considering multi energy assets and actors within an energy ecosystem.

Future Work
The proposed framework conceptualizes a DSS tool for energy stakeholders based on an optimization engine. It envisions multi-level, multi-factor and multi-objective problem modeling for solving practical problems in the energy sector. The aim is to improve this study according to the following points.

•
Continue monitoring the evolution of research on multi-objective optimization in the energy sector. Enforce improvements to the proposed methodology by tackling limitations, as explained in Section 6.1 and by enhancing the perception on objective functions. • Improve the proposed framework by further automating the methodology in a way that it can act as stand-alone software, which can be utilized given just the appropriate input datasets. • Add one more architectural layer, the DSO layer, leading to a tri-level optimization approach. The DSO layer is to be conceived as tri-objective optimization problem, considering three objective functions simultaneously. Minimization of grid energy losses, voltage profile improvement and cost reduction of environmental emissions. • Implement the proposed DR scheme in a more sophisticated way, including technologies, such as Blockchain [33]. This would enhance the business perspective of the proposed framework, while addressing more practical applications of this study.  Total time period considered, in this work a period of one day N tot_C Total number of consumers, in this work 349 ∆t Time interval considered f a cost (t) Objective cost function for the aggregator f p discom f ort_reduction (t) Objective function for the consumer thermal discomfort E i,imp (t) Imported energy at hour t for consumer i EIT(t) Imported energy tariff at hour t f lex i,lb (t) Flexibility lower bound at hour t, for consumer i f lex i,lb % (t) Consumer's i percentage lower bound flexibility contribution for aggregator's portfolio in time t f lex i,ub (t) Flexibility upper bound at hour t, for consumer i f lex i,ub % (t) Consumer's i percentage upper bound flexibility contribution for aggregator's portfolio in time t E i, f or (t) Forecasted energy load at hour t for consumer i E imp reduction Reduced imported energy at hour t E max reduction A user defined constant for setting the percentage of permissible energy reduction SMP(t) System marginal price at hour t f p cost Objective cost function for the consumer f p discom f ort reduction Objective discomfort function for the consumer C pre f erence A weighted variable for adjusting consumer discomfort aux coe f f icient An auxiliary coefficient variable acting as an estimator for consumer discomfort Appendix A  Table A2. Partial one day-ahead portfolio scheduling (10 consumers) with lower (l) and upper (u) bounds of flexibility contribution in kWh.