*3.5. Energy Satisfaction*

Each user has a subset {*i* : *i* = 1, 2, . . . , *N*} of *N* participant devices. Following the well-known concept of electric energy, to find the energy satisfaction, *ES*, in time *t*, the previous 24 values of *PS* are required, i.e., {*PSi*[*t* − <sup>24</sup>],..., *PSi*[*t* − <sup>1</sup>]}. To compute the first *PS*, *PSi*[*t* − <sup>24</sup>], the past 24 h before this time are also required. Hence, to compute ES, 48 h of experiment are required. *ES* is defined as in Equation (5).

$$ES[t] = \frac{1}{N} \sum\_{i \in N} \sum\_{n=k} PS\_{i,n} \, \, \, \, \tag{5}$$

where *N* is the number of participant devices, *k* is the initial time of the experiment, *t* = *k* + 23 and <sup>Δ</sup>*i*,*<sup>t</sup>* is the device-based satisfaction.

Equation (5) is modified to include the concept of device-based satisfaction Δ. ES becomes a weighted summation and reflects the specific needs at that current time *t*. Subsequently, the average is computed to obtain the *ES* value at time *t*,

$$ES'[t] = \frac{1}{N} \left( \sum\_{i \in \ N} \Delta\_{i,t} PS\_{i,t} + \left( \sum\_{n=k}^{t-1} PS\_{i,n} \right) \right) \tag{6}$$

## **4. Problem Formulation**

#### *4.1. Electric Energy Function*

The energy consumption in an hour from time *t* until time *t* + 1 is defined as in Equation (7),

$$L[t] = \sum\_{i \in \mathcal{N}} e\_{i,t} u\_i[t] \quad \text{ \(\mathcal{T}\)}$$

where *ei*,*<sup>t</sup>* represents an usual energy consumption of device *i* in one hour and *ui* is the input vector for each device *i* with its operational status. It will be one (1) when 'ON' and zero (0) if it is 'OFF'.
