## 4 Results and Discussion
A steady reduction in distance is an indication of good performance by the GA.  
Figure 4: Unit energy savings for end users and the DR aggregator (**a**) when the DSO utilizes RES and (**b**) when end users utilize RES. Figure 3: Comparison of cost of end user demand incurred by the DSO under various RES and DR conditions. In order to further investigate the maximization of compensation benefits to both end users and aggregators by utilization of RES, we use the following approach: we model the DSO operation cost \((c_{t,DSO}(P_{op}(\omega,t)))\) and the financial reward to each one of the five aggregators as a Bayesian network (Figure 6). With respect to the DSO, aggregators are considered to be independent of each other since user demand is mutually exclusive for each aggregator cluster. However, the interconnectedness with regard to financial reward for each aggregator is as a result of the competition among the DR aggregators in the day-ahead market. We therefore assume parameter independence according to  
\[\mathbf{P}=(\mathbf{\Theta},\mathbf{\Theta_{1}},\mathbf{\Theta_{2}},\mathbf{\Theta_{3}},\mathbf{\Theta_{4 }},\mathbf{\Theta_{5}}) \tag{45}\]  
Equation (45) describes the Bayesian hypothesis prior of all parameters within the network. The probability of maximum aggregator reward \((r_{AGG,max,j})\) with respect to the DSO cost savings is determined as  
\[P(\mathbf{\Theta}\big{|}\mathbf{\Theta}_{j})=\theta_{j} \tag{46}\]  
Equation (46) is used to generate a plot of maximum aggregator reward for both cases involving utilization of RES, and is shown in Figure 7. From the results obtained, it can be seen that the probability of maximum aggregator reward is higher for every hour within the winter day when RES are utilized by the end user, as compared to when renewable sources are utilized by the DSO. Figure 5: Convergence characteristic for the genetic algorithm (GA) showing the variation of particles with respect to the global optimum. The DSO's operations cost determines the financial reward to each aggregator. The aim of this work is to demonstrate that aggregation maximizes benefits to end users by maximizing benefits to the DSO. In other words, minimizing operating cost of the DSO maximizes its financial benefits, which in turn results in maximal reward to the aggregators, and consequently the end users. The Bayesian network shown in Figure 6 represents an estimation of the probability of maximal financial reward to  
Figure 6: Bayesian network showing DSO and aggregator parameters (AGG means ‘aggregator’). Figure 3.0 Plot of probability of maximum aggregator reward based on the Bayesian network for DSO and end user utilization of RES. the end users through the maximization of the parameters \(\mathbf{\Theta_{1},\Theta_{2},\Theta_{3},\Theta_{4}}\), and \(\mathbf{\Theta_{5}}\). The results of this estimation are shown in Figure 3.1  
With respect to the parameter \(\mathbf{\Theta}\), the cost function utilized is based on the life cycle cost of the battery energy storage system (BESS) used for DR by the DSO. It is assumed that all batteries in the bank are manufactured by the same source. The relationship used to describe \(\mathbf{\Theta}\) is as below:  
Figure 3.2  
where \(c_{TLC}\) is the total lifetime cost of the BESS, \(c_{i}\) is the initial capital cost of the BESS, \(c_{m}\) is the battery bank maintenance cost, \(c_{r}\) is the cost of replacement of the batteries in the bank, \(c_{d}\) is the disposal cost of batteries in the bank, \(c_{e}\) is the energy cost. With respect to \(c_{e}\) (energy cost parameter), we consider the cost of energy based on time-of-use as provided by City Power for a typical winter day [37]. For each of the aggregator parameters \((\mathbf{\Theta_{1},\Theta_{2},\Theta_{3},\Theta_{4},\Theta_{5}})\), we consider the utilization of RES by end users within each aggregator cluster. In particular, we consider battery degradation cost \(C_{deg,m,j}\) for the EVs in each cluster.