**3. The Proposed Day-Ahead GA Approach for Cost of Energy/Load Shifting Optimization Based on ANN Hourly Power Predictions**

The GA optimisation scheme is based on the developed mathematical model presented hereafter. The two criteria, namely the normalised cost of energy and load shifting, form the objective function as shown in Equation (1):

$$f = \min\left(w\_1 \frac{Cost\_E}{Cost\_{E\_{\max}}} + w\_2 \frac{Load\_{Shift}}{Load\_{Shift\\_max}}\right) \tag{1}$$

At building group level, the cost and load shift terms of the objective function in Equation (1), are given by Equations (2) and (6) which are further specified by Equations (3)–(5) and (7)–(9), respectively.

$$\text{Cost}\_{E} = \text{Cost}\_{E\\_Lab} + \text{Cost}\_{E\\_Summa} + \text{Cost}\_{E\\_Kite} \tag{2}$$

Terms in Equation (2) are calculated based on Equations (3)–(5), as shown below:

$$Cost\_{E\\_Lab} = \sum\_{h=1}^{24} X\_{E\\_Lab}^h \ast C\_{E\\_unit}^h \tag{3}$$

$$\text{Cost}\_{E\\_Sumum} = \sum\_{h=1}^{24} X\_{E\_{Sumum}}^h \ast C\_{E\\_unit}^h \tag{4}$$

$$\text{Cost}\_{E\\_Kitc} = \sum\_{h=1}^{24} X\_{E\\_Kitc}^{h} \ast \mathsf{C}\_{E\_{\text{unit}}}^{h} \tag{5}$$

$$Load\_{Shift} = Load\_{Shift\\_tab} + Load\_{Shift\\_Summa} + Load\_{Shift\\_Kite} \tag{6}$$

where:

$$Load\_{Slift\\_Lab} = \sum\_{h=1}^{24} abs(X\_{E\_{Lab}}^h - X\_{E\_{Lab\_{hankline}}}^h) \tag{7}$$

$$Load\_{Sulff\_{Samm}} = \sum\_{h=1}^{24} abs \left( X\_{E\_{Samm}}^{h} - X\_{E\_{Samm\_{hsending}}}^{h} \right) \tag{8}$$

$$Load\_{Shift\\_Kite} = \sum\_{h=1}^{24} abs(X\_{E\_{Kite}}^h - X\_{E\_{Kite\_{huseline}}}^h) \tag{9}$$

The following constraints in Equations (10)–(12) are applied to ensure that there is no deviation between the total daily energy consumed between baseline and the optimized solutions for each building:

$$\sum\_{h=1}^{24} X\_{E\_{Lab}}^h - \sum\_{h=1}^{24} X\_{E\_{Lab\_{hubble}}}^h = 0 \tag{10}$$

$$\sum\_{h=1}^{24} X\_{E\_{\text{Samm}}}^{h} - \sum\_{h=1}^{24} X\_{E\_{\text{Samm}\_{\text{basic}}}}^{h} = 0 \tag{11}$$

$$\sum\_{h=1}^{24} X\_{E\_{Kit}}^h - \sum\_{h=1}^{24} X\_{E\_{Kit\_{baseline}}}^h = 0 \tag{12}$$

Whether the optimization concerns a building or a building group analysis, for the evaluation of the GA based results, a comparison to baseline consumption, as obtained by the Artificial Neural Network day-ahead prediction, is conducted. The total cost linked to the genetic algorithm optimized solution is compared to the total cost of the baseline scenario, as evaluated by Equations (13) and (14) respectively:

$$Cost\_{E\\_opt} = \sum\_{h=1}^{24} X\_{E\_{opt}}^{h} \ast C\_{E\_{unit}}^{h} \tag{13}$$

$$\text{Cost}\_{E\\_bascline} = \sum\_{h=1}^{24} X\_{E\_{bubeline}}^{l\text{l}} \ast \mathbb{C}\_{E\_{uvi}}^{l\text{l}} \tag{14}$$

#### **4. Results and Discussion**

#### *4.1. ANN Based Predictions*

The results of ANN-based predictions for the period from 1 May 2017 to 1 August 2017 and from 1 December 2017 to 1 March 2018, for each building, are presented in Figures 4 and 5, respectively. Day-ahead predicted values for Leaf Lab, Summa, and Kite Lab appear to be, in most cases, very close to real values, featuring a Pearson's correlation coefficient R in the range 0.96–0.98 for training, validation, testing, and overall. Lower R values are observed for Summa during the winter period.

At the left column of Figure 6, predicted versus real values of consumption power for the 3 buildings under study, are presented. At the right column of Figure 6, predicted versus real values of power are presented for the period from 12 February 2018 to 16 February 2018. Mean Bias Error (MBE) and Mean Average Percentage Error (MAPE) values, for the ANN predicted versus actual values on 21 July 2017 and 16 February 2018 for Leaf Lab, Summa, and Kite Lab, are presented in Table 2.

 2017 to 1 March 2018.


**Table 2.** MBE and MAPE for ANN predictions on 21 July 2017 and 16 February 2018.
