Energy Flexibility Management Based on Predictive Dispatch Model of Domestic Energy Management System

This paper proposes a predictive dispatch model to manage energy flexibility in the domestic energy system. Electric Vehicles (EV), batteries and shiftable loads are devices that provide energy flexibility in the proposed system. The proposed energy management problem consists of two stages: day-ahead and real time. A hybrid method is defined for the first time in this paper to model the uncertainty of the PV power generation based on its power prediction. In the day-ahead stage, the uncertainty is modeled by interval bands. On the other hand, the uncertainty of PV power generation is modeled through a stochastic scenario-based method in the real-time stage. The performance of the proposed hybrid Interval-Stochastic (InterStoch) method is compared with the Modified Stochastic Predicted Band (MSPB) method. Moreover, the impacts of energy flexibility and the demand response program on the expected profit and transacted electrical energy of the system are assessed in the case study presented in this paper.


Aims and Motivation
In the last decade, power systems have faced new challenges due to the increment of the distributed renewable energy resources.Renewable energy resources decrease the greenhouse gas emissions and costs related to electricity production [1].However, the integration of these intermittent energy resources leads to energy management problems based on the scale of the energy system [2].At a smaller scale, Domestic Energy Management Systems (DEMSs) enable the residential customers to manage their loads in order to minimize the electricity cost.Generally, there are two approaches for energy management of the DEMSs.These approaches consist of centralized and decentralized systems.Based on the approach of the system, different structures of the controlling and communicating systems are required [3].

Literature Review
Various research has been presented for optimal energy scheduling at the scale of the smart homes and smart grids that can be classified based on their goals, strategies, utilized technologies and software.In [4,5], the authors discussed the necessities of using computational intelligence in the DEMSs and a review of energy management systems based on multi-agent systems, respectively.On the other hand, in [6], the present and future perspectives regarding EVs and their operation modes in smart grids and smart homes have been discussed.In [7], the authors proposed a method to schedule the local energy resources optimally.Minimizing the loss of energy and purchasing electricity cost were the main goals of the authors.In [8], the authors defined the DEM problem in connection with local energy nodes.Furthermore, in [8], homes have a two-way communication with the market and can manage energy locally.In [9], a domestic demand response has been implemented in a distribution grid.The real-time price is the main goal of the demand response program based on the direct load control in [9].Furthermore, the uncertainty of the price and load has been considered in [9].Price prediction has been used instead of communication between homes in the distribution network.
In [10], a DEMS has been developed for day-ahead energy scheduling considering hourly pricing and the peak power constraint based on the demand response programs.The authors of [11] proposed a method to manage the energy of EV and energy storage systems according to the dynamic pricing, peak power limitation and demand response programs.The proposed Domestic Energy Management (DEM) problem has been modeled by mixed-integer linear programming.In [12], the authors propose a decentralize strategy for optimal energy scheduling under the large penetration of EVs.This interaction has been considered between consumers and the aggregator in [12].This way, end-users send their optimum demand decisions and reschedule their demands based on the signals of the aggregator.In [13], a rescheduling DEMS has been presented to make the optimum decisions through the day and avoid the negative impact of price uncertainty.
The authors of [14] presented a multi-time scale DEM problem that includes EV and different types of electrical loads.Furthermore, the authors introduced the improved optimization algorithm to solve the DEM problem.In [15], a chance constraint model has been presented to optimize the performance of the domestic devices.The improved particle swarm optimization method has been used to optimize the problem based on the proposed demand response program.In [16], the authors introduced the Stackelberg game-based method to maximize the profits of the costumers and retailers simultaneously.In the proposed home model of [16], electrical loads of customers are elastic based on EVs.Furthermore, the price-based DR has been implemented in [16].In [17], the DEM problem has been solved by stochastic dynamic programming considering EV.The authors proved that the EV is one source of uncertainty in the system due to the EV's plug-in time, plug-out time and charge demand for mobility.Hence, the plug-state of the EV has been modeled through a Markov chain in [17].In [18], a DEMS has been presented as part of an organization-based multi-agent system.Besides, the uncertainty of distributed energy resources has been considered through an Modified Stochastic Predicted Band (MSPB) method used to model the DEM problem.

Contributions
In the literature, several relevant advances have been accomplished in the DEMS domain.These mostly refer to the study and analysis of the several resources' impact on the management process, namely flexible loads, EVs, batteries and generation.The interaction with the electricity market and the participation in demand response programs has also been explored, and this research is leading to promising outcomes, but modeling the electricity market at the local level has not been of interest to the authors in the previous works.However, the local electricity market has been introduced in [18], but the impact of the flexibility has not been evaluated in [18].The research dealing with the uncertainty associated with the several resources is, however, still at an initial stage.Although some relevant works can be found in the literature, there are still many loose ends due to the difficulty in correctly identifying, measuring, modeling and representing the different sources of uncertainty, so that these can be correctly considered by DEMS scheduling, dispatch and management models.
In order to overcome the limitations in the field, this paper proposes a two-stage predictive dispatch model to manage energy flexibility in the domestic energy system.EV, battery and shiftable loads are in charge of providing the energy flexibility.A novel hybrid (InterStoch) method is defined for the first time in this paper to model the uncertainty of the PV power generation.In the first stage, the day-ahead stage, the uncertainty is modeled by interval bands.However, a stochastic scenario-based method is used to consider the uncertainty of PV power generation in the second stage, the real-time stage.Finally, the performance of the proposed hybrid Interval-Stochastic (InterStoch) method is compared with the MSPB method that was introduced in [18,19].
The rest of this paper is organized as follows.Section 2 introduces the proposed hybrid interval-stochastic method.Then, the domestic energy management problem is described in Section 3. Section 4 provides the simulation results.Finally, Section 5 summarizes the conclusions.

Data
In this paper, the predicted data from [18] have been used.For simplicity, only the uncertainty of PV power generation is considered.As shown in Table 1, the predicted data in each time step consist of the central forecasting and up/down deviation.Hence, the predicted data are limited to the upper/lower band based on the central forecasting and up/down deviation.It is noticeable that this paper concentrates only on modeling the uncertainty due to PV power prediction in the system.Hence, the forecasting system is not explained in this paper.The presented data of Table 1 are the inputs of the energy management system.Therefore, the energy management system makes optimum decisions through the InterStoch method.

Interval Model
In the day-ahead stage, PV system power generation is limited between bands according to the forecasting deviations.The minimum band represents the deviation below the central forecasting, and the maximum band represents the deviation above the central forecasting.P da pv t intends to converge to the maximum/minimum band in the best/worst case.Therefore, Equation (1) can be divided into Equations ( 2) and (3) in the best and worst cases, respectively.This way, an auxiliary parameter is added in these equations as a slack parameter for the decision-maker.This parameter is denoted as the Optimistic Coefficient (OC), α, which is between zero and one, and had been defined for the first time in [19].Hence, P da pv t converges to the best/worst case when the decision-maker has the pessimistic/conservative perspective by adding α to Equations ( 2) and (3) and summing over them, as seen in Equation (4).Then, Equations ( 4) and ( 5) are obtained through simplification of Equations ( 1)- (3). [H]P

Stochastic Model
In the real-time stage, stochastic programming is used to model the uncertainty of the PV power.Therefore, scenarios with their corresponding probabilities are defined in this section.This way, the prediction mean and deviation are defined as metric parameters by Equations ( 6) and (7), respectively.These are used to generate the scenarios of the PV power in the real-time stage.In this step, three scenarios are defined to model the uncertainty of the PV system's power generation.The first scenario, the up scenario, describes data that have a deviation above the central forecasting.The second scenario, the down scenario, represents data that have a deviation below the central forecasting.Then, the third scenario describes the central forecasting data.The amounts of these scenarios are determined through Equations ( 8)- (10).Moreover, the corresponding probabilities are obtained according to Equations ( 11)- (13).

Domestic Energy Management Problem
We consider that each smart home can participate in two different types of Local Electricity Market (LEM), not the wholesale market [18].These LEMs are called day-ahead and real-time markets.In practice, the proposed LEMs can be operated by distribution system operator or retailers.Hence, the distribution system operator or retailers are responsible for providing the local electricity market framework for their agents that are in their region or have contracts to transact energy with them.Besides, it is considered that smart homes are price-takers in the LEM, and they can buy electricity from the local electricity market based on the Time of Use (ToU) tariff.Furthermore, it is assumed that the sold/bought electricity prices to/from the local electricity market are different.The domestic energy management problem is modeled as a two-stage problem.The first stage is called the day-ahead stage, and the second stage is called the real-time stage.Here, the Expected Profit (EP) is defined by an Objective Function (OF) to maximize the profit of energy services.In Equation ( 14), EP is the sum of the day-ahead EP, EP da , and the real-time EP, EP rt , which are OFs of the day-ahead and real-time stages, respectively.

Day-Ahead Stage
The objective function of the domestic energy management system in the day-ahead local electricity market is defined in the Day-Ahead (DA) stage.The purpose is to make the best decisions in each of the time periods during the day d.However, the DA stage obtains optimum decisions for the system in day d-1.Hence, the objective function for the DA stage is represented in (15): EP da consists of three parts.The first and second parts represent the revenue of selling the electrical energy produced by PV and Energy Storage Systems (ESSs) to the local market.The third part states the costs of buying the electrical energy from the local market.It should be mentioned that participation factor, γ k , is a binary parameter that is defined for the first time in this paper in order to consider the participation of the ESSs in the DA stage.If the participation factor is equal to zero, ESSs are used to trade energy only in the real-time LEM.In other words, homes can utilize the full capacity of the ESSs in the day-ahead market if the participation factor equals one.The constraints of the DA stage are: Equation ( 16) establishes the power balance equation due to the power outputs of the PV, P da pv,in t , and ESSs, P da dis,in t (k), injected into the home, the grid power input, P da net t , electrical loads, L da j t , and the charged power of ESSs, P da ch t (k).In this paper, power loss is not considered for simplicity.Equation (17) represents the power flow limitation through the distribution line, which ends at the building.S max expresses the maximum power capacity of the distribution line that links the smart home with the distribution power network.Besides, there are some limitations corresponding to all appliances.Only the maximum and minimum limitations of the energy produced/consumed are defined in each device at this stage because the uncertainty is not considered in the DA stage.

P da
The total power generation of the PV is stated in (18).Equation ( 19) represents the power output limitations of the PV system.Besides, Equation ( 20) represents the total electrical power consumed.

Energy Storage Systems
ESSs can be utilized economically based on the charge and discharge strategies in the DEM problem.Mobility patterns and storage characteristics of the ESSs are different factors that should be considered in modeling the ESSs.However, the mobility pattern is only related to the EVs.
P da dis t (k) = P da dis,in t (k) + P da dis,out t (k) (27)

Real-Time Stage
In this stage, the objective function of the home due to participating in the RTLEM is defined.In addition, the uncertainties of decision-making variables are considered through a stochastic scenario-based method.These variables are determined based on the outputs of the first stage and the prediction engine.It is noticeable that the traded energy of the homes in the real-time market is different from their traded energy in the day-ahead market because of the PV power generation uncertainty.In other words, the traded energy of smart homes in real time can be positive or negative due to the prediction error of the PV power generation.The expected profit of the real-time stage, EP rt , is represented as: EP rt consisting of five parts.The first part represents the revenue for selling energy produced by PV to the real-time local electricity market.The total cost of electrical energy that is bought from the BLEMis represented in the second part.The third part expresses the profit due to selling the stored electrical energy of ESSs to the local market.The Value of Loss Load (VOLL) cost, VOLL j , is stated in the fourth part.Finally, the spillage cost of the PV system is represented in the last part.As seen in (28), it is proposed that if the PV power generation in the real-time stage, P rt pv,out t (ω), is more than the PV power generation in the DA stage, the DEMS can only sell its extra power at the net price, λ, that is less than the price that is established for the purchase of the power generated by the PV on the day-ahead local market, λ .Hence, the DEMS can increase its expected revenue if it has better day-ahead prediction accuracy of its PV power generation.
In the balancing stage, Equation (29) is the power balance equation, and (30) shows the power flow limitation in a distribution line.Besides, there are specific definitions for all appliances in the building energy system whose uncertainties are considered in the balancing stage.

PV System
The power output of PV in the real-time stage, P rt pv t , is obtained based on (31).
Here, P rt pv,p t (ω) is the potential power generation of PV in real time, and S pv t (ω) is the spillage power of the PV system.Equation (32) represents that the total power output of PV equals its power output consumed in the home, P rt pv,in t (ω), and the amount of power generation that is sold to the real-time local market, P rt pv,out t (ω).The PV spillage is the amount of power that is spilled in period t.This amount is positive or equal to zero and is limited to the actual power generation of PV as represented in (33).

Energy Storage Systems
ESSs can be utilized economically based on the charge and discharge strategies in the domestic energy management problem.
The power generation of ESSs, P rt dis t (ω), is expressed in (39).Equation (34) represents the state of charge balance equation in an ESS, where C i is the initial state of charge in the ESS.Maximum and minimum limitations of the ESSs' state of charge are represented in Equation (35).Ramping constraints of ESSs are represented in Equation (36).Moreover, Equations (37) and (38) express the constraints of ESS in the discharge and charge states, respectively.

Electrical Loads
Electrical loads include loads that can be controllable and/or shiftable.In this paper, three types of loads are modeled: the space heater, L sh t , which is a controllable load, the storage water heater, L swh t , which is a shiftable load, and the must-run services, L mrs t , which are non-controllable-shiftable loads.Equations ( 40) and (41) define total electrical load and total load shedding, respectively.These loads are described in the following.

Space Heater
The space heater provides the indoor temperature at the desired temperature.Equation (42) represents the relation between the indoor temperature and its power consumption.In Equation (42), θ 0 is the initial indoor temperature, which is assumed to be equal to the desired temperature.Equation (43) expresses that indoor temperature is limited to 1 • C more or less than the desired temperature.Furthermore, the maximum and minimum bands of the space heater load are represented in (44).In addition, the load shedding constraint of the space heater is represented in (45).

Storage Water Heater
The storage water heater stores the heat in the water tank.The maximum and minimum limitations of the storage water heater's load and energy consumption are represented in (46) and (47), respectively.The load shedding constraint of the storage water heater is expressed in (48).

Pool Pump
The maximum running hours of the pool pump equal T on hours per day.Equation (49) represents the limitations of the pool pump power consumption in each hour.Equation (50) represents the maximum hour constraint that that pool pump can be turned on.Moreover, the load-shedding constraint related to the pool pump is represented in (51).

Must-Run Services
Must-run services are defined as loads that should be provided quickly.In this paper, it is assumed that there is no uncertainty due to the prediction of must-run services as represented in Equation (52).Furthermore, the load shedding constraint is represented by (53).

Case Study
To evaluate the performance of the proposed DEMS, the modified test system from [19] is used for which the wind micro-turbine has been omitted from the test system in this paper.The maximum power produced by the PV system is 2 kW.The battery can store between 0.48 and 2.4 kWh, and the maximum charging/discharging rates are 400 W. Besides, the charging and discharging efficiencies are 90%.The maximum heating power of the Space Heater (SH) equals 2 kW to maintain the temperature of the house within ±1 of the desired temperature (23 • C).The thermal resistance of the building shell equals 18 • C/kW, and Cequals 0.525 kWh/ • C .The energy capacity of the Storage Water Heater (SWH) is 10.46 kWh, which has a 2-kW heating element.The rated power of the Pool Pump (PP) is 1.1 kW, and it can run for a maximum of 6 h during the day.The program implemented is solved in GAMS 23.7 [20].Table 2 gives the price data of the system.Moreover, VOLL and the spillage costs of PV-battery power generation are shown in Table 3.

Impact of Energy Flexibility
In this section, the energy flexibility of the proposed DEMS is assessed.Hence, four scenarios are defined to analyze the performance of the system.In Scenario 1, neither the battery nor the EV are defined in the day-ahead stage of the energy management problem (γ battery = γ EV = 0).In Scenario 2, only the battery is considered in the day-ahead stage (γ battery = 1, γ EV = 0).However, only the EV is considered in the day-ahead stage in Scenario 3 (γ battery = 0, γ EV = 1).In Scenario 4, both (battery and EV) are modeled in the day-ahead stage (γ battery = γ EV = 1).
The impact of ESSs on the total, day-ahead and real-time expected profits of the system is shown in Figure 1.Furthermore, the influence of the optimistic coefficient, α, is evaluated in Figure 1.From this figure, it is clear that an increment of α increases the total and day-ahead expected profits because α can directly affect the power produced by the PV system through interval bands in the day-ahead stage.Hence, α increases the power generated from the PV panels in the day-ahead stage and the day-ahead expected profit.However, α has a negative impact on the amounts of the real-time expected profit.Moreover, the expected profit of the system is maximum in Scenario 4. In other words, increasing the energy flexibility of the system increases the total, day-ahead and real-time expected profits of the system.Hence, the maximum and minimum amounts of the expected profit are in Scenarios 4 and 1, respectively.Furthermore, the expected profit in Scenario 3 is more than Scenario 2 because the ramping rate of the EV is more than the battery.Therefore, the EV can provide more energy flexibility than the battery in this proposed system.

Impact of Prediction Accuracy
The prediction accuracy due to the PV power generation and its influence on the total expected profit is analyzed in this section.It is noticeable that the prediction accuracy of the outdoor temperature of the home and must-run services is considered to be 100% in this paper in order to simplify the model.Besides, it is considered that the battery and EV are modeled in the day-ahead stage in this case.As mentioned before, α increases the amount of total expected profit of the system.
According to Figure 2, the impact of the prediction accuracy on the total expected profit is evaluated based on the optimistic coefficient.Furthermore, an increase in the prediction accuracy has a smooth negative effect on the expected profit.In other words, an increment in the prediction accuracy causes a decrease of the managed power of the PV in the proposed DEMS.Hence, this decreases the expected profit of the system.According to this assessment, the maximum amount of the total expected profit of the system is where α and the prediction accuracy equal one and zero, respectively.

Impact of Demand Response
In this section, the effect of the Demand Response Program (DRP) on the EPs and the home's electrical energy that is sold/bought to/from the local electricity market is assessed in four scenarios: with DRP, with only flexible VOLL, with only the ToU price and without DRP.Here, DRP consists of the flexible VOLL and ToU price.
As seen in Table 4, DRP causes a positive effect on the amount of total expected profit of the DEMS.In other words, while EP da is increased when DRP is not considered in the system, EP rt is decreased because electrical loads are not flexible when DRP is not considered in the DEMS.Furthermore, The sold/bought electrical energy of the DEMS considering DRP is more/less than without considering DRP because it makes DEMS able to shift the electrical load in the time horizon of the energy management problem and reduce the loads under some conditions.However, the impact of the flexible VOLL and ToU price are not the same.Although both of them increase the sold electrical energy, the total expected profit considering only flexible VOLL is more than considering only the ToU price.This is because of the positive effect of the flexible VOLL program in the real-time stage of the DEM problem.

Impact of Uncertainty Modeling
In this section, the modeling of uncertainty is evaluated through a comparison of the InterStoch method and MSPB.Although the InterStoch method has been defined in this paper, MSPB has been defined in [18,19].For simplicity, only the battery has been considered, and γ battery is equal to zero in this section.The amounts of total, day-ahead and real-time expected profits are compared in optimistic and conservative cases based on the InterStoch and MSPB methods.As seen in Table 5, the optimistic case of both methods is where α equals one.However, the pessimistic case based on the InterStoch and MSPB methods is where α equals zero and 0.4, respectively, as seen in Table 6.Tables 5 and 6 show that the difference between the amounts of the expected profits in the optimistic and conservative cases based on the InterStoch method is less than the MSPB method.Besides, Figure 3 shows the impact of α on the total expected profit in both methods.Figure 3 also illustrates that the worst case of the DEMS based on the InterStoch method is where α equals zero, and there is a linear pattern between the increment of the optimistic coefficient and the total expected profit when uncertainty is modeled by the InterStoch method.This point makes the system easier to analyze and more reliable, as it is able to further mitigate the uncertainty, dealing with it in away that its impact on the expected results is highly reduced.Moreover, the amount of the total expected profit in the worst case of the InterStoch is less than its amount in the worst case of the MSPB method.Hence, the InterStoch method is more robust than the MSPB method to model uncertainty in the proposed domestic energy management problem.

Conclusions
In this paper, the energy flexibility management of the home electricity system based on the predictive dispatch model has been introduced.Furthermore, the InterStoch hybrid method to model the uncertainty of the PV power generation has been defined for the first time in this paper.The proposed method consists of two stages.In the first stage, the day-ahead domestic energy management problem has been modeled by an interval method to consider the uncertainty due to the prediction error of PV power generation.However, a real-time problem has been represented based on the stochastic method to consider the uncertainty.The performance of the proposed domestic energy management problem has been evaluated based on a comparison between the proposed hybrid (InterStoch) and MSPB methods.Furthermore, the impact of the proposed energy flexibility model, prediction accuracy and demand response program on the expected profit and transacted electrical energy of the system and the reliability of the results has been assessed.From the simulation, it is concluded that:

•
Increasing the energy flexibility increases the total, day-ahead and real-time expected profits of the system.

•
The EV can provide more energy flexibility than the battery in the proposed system.

•
The increment of α increases the PV power produced in the day-ahead stage and day-ahead expected profit.However, α has a negative impact on the amounts of the real-time expected profit.

•
The increment of the prediction accuracy has a smooth negative impact on the expected profit.

•
For the considered case study, the demand response program has a positive effect on the amount of the DEMS's total expected profit.Furthermore, the demand response program decreases the domestic electrical energy load.

•
The amount of the total expected profit in the worst case of InterStoch is less than its amount in the worst case of the MSPB method.Hence, the InterStoch method is more robust than the MSPB method to model uncertainty in the proposed domestic energy management problem.
Finally, it should be mentioned that the uncertainty of electrical load, the EV mobility pattern and market prices have not been modeled in our proposed DEMS.Our future work will consist of modeling the uncertainty related to the EV and must-run services and to evaluate their impacts on the transacted energy of the homes for the local electricity market.

Expected profit EP da
Day-ahead expected profit EP rt Real-time expected profit P da pv t Day-ahead total power generation for the PV system in period t P da pv,out t Day-ahead power generation for the PV system that is injected to the power grid in period t P da pv,in t Day-ahead power generation for the PV system that is injected to the home in period t P da dis t (k) Day-ahead total discharged power for energy storage system k in period t P da dis,out t (k) Day-ahead discharged power for energy storage system k that is injected to the power grid in period t P da dis,in t (k) Real-time power generation for the PV system that is injected to the power grid in period t and in scenario ω P rt pv,in t (ω) Real-time power generation for the PV system that is injected to the home in period t and in scenario ω P rt dis t (k, ω) Real-time total discharged power for energy storage system k in period t and in scenario ω P rt dis,out t (k, ω) Real-time discharged power for energy storage system k that is injected to the power grid in period t and in scenario ω Real-time discharged power for energy storage system k that is injected to the home in period t and in scenario ω Real-time charged power for energy storage system k that is injected to the home in period t and in scenario ω P rt net t (ω)  Predicted electrical load of the must-run services in period t

Figure 1 .
Figure 1.Impact of energy flexibility on the amounts of total, day-ahead and real-time expected profits.

Figure 2 .
Figure 2. Impact of prediction accuracy on the total expected profit of the system.OC, Optimistic Coefficient.

Figure 3 .
Figure 3. Impact of uncertainty modeling on the total expected profit of the system.
for the space heater L min sh Minimum electrical consumption for the space heater R Thermal resistance of the building shell L max swh Maximum electrical consumption for the storage water heater L min swh Minimum electrical consumption for the storage water heater U swh Energy consumption for the storage water heater L max pp Maximum electrical consumption for the pool pump L min pp Minimum electrical consumption for the pool pump T on Maximum running hours for the pool pump L pred mrs t

Table 2 .
ToU Price data of the system.

Table 3 .
Value of Loss Load (VOLL) and spillage costs.SH, Space Heater; SWH, Storage Water Heater; PP, Pool Pump.

Table 4 .
Impact of demand response program on the amount of expected profit of the system and sold/bought electrical energy to/from the local electricity market.DRP, Demand Response Program.

Table 5 .
Impact of uncertainty modeling on day-ahead, real time and total expected profits under the optimistic case.InterStoch, Interval-Stochastic; MSPB, Modified Stochastic Predicted Band.

Table 6 .
Impact of uncertainty modeling on day-ahead, real time and total expected profits under the conservative case.
Real-time electrical load j in period t and in scenario ω Load shedding for load j in period t and in scenario ωS pv t (ω)Spillage amount for PV in period t and in scenario ω P rt pv,p t (ω) Potential power generation for PV in real time in period t and in scenario ω L rt sh t (ω) Real-time electrical load of the space heater in period t and in scenario ω L rt swh t (ω) Real-time electrical load of the storage water heater in period t and in scenario ω L rt pp t (ω) Real-time electrical load of the pool pump in period t and in scenario ω L rt mrs t (ω) Real-time electrical load of the must-run services in period t and in scenario ω C rt t (k, ω) Real-time state of charge for energy storage system k in period t and in scenario ω Real-time discharging commitment binary variable for energy storage system k in period t and in scenario ω L shed sh t (ω) Load shedding for the space heater in period t and in scenario ω L shed swh t (ω) Load shedding for the storage water heater in period t and in scenario ω L shed pp t (ω) Load shedding for the pool pump in period t and in scenario ω L shed mrs t (ω) Load shedding for the must-run services in period t and in scenario ω θ in t (ω) Indoor temperature in period t and in scenario ω z t (ω) Commitment binary variable for the pool pump k in period t and in scenario ω Central forecasting of the PV power generation in period t Down deviation of the PV power prediction in period t Up deviation of the PV power prediction in period t Mean of the PV power prediction in period t ∆ pv t Mean deviation of the PV power prediction in period t π(ω) Probability of the PV power generation in scenario ω λ t Sold electricity price to the local electricity market in period t λ net t Bought electricity price from the local electricity market in period t Initial state of charge for energy storage systems w max Maximum charging/discharging for energy storage systems w min Minimum charging/discharging for energy storage systems VOLL j Value of loss load for electrical load j V s pv Spillage cost for the PV system