## 2 Materials and Methods
Results obtained demonstrated the effectiveness of the LSE in maximizing end user gains including through augmenting consumer demand through PEV utilization during peak energy pricing periods. An end user-friendly, 'prosumer'-based economic energy model was proposed in [18]. This model was based on the constant elasticity of substitution utility function, which allowed demand flexibility based on end user consumption preference. In particular, the proposed model was based on three types of consumer behaviour: highly flexible, semi-flexible, and low-flexibility. Two control parameters were used to describe the DR model for the consumers. One measured the willingness of the consumer to actually participate in DR, while the other considered the lifestyle of the consumer. Unit energy pricing was based on a residential sector in North Dakota, USA. From results obtained, the two control parameters utilized during the shoulder period between peak and off-peak periods resulted in a flattened demand profile for consumers participating in DR. Finally, in [19], a multi-objective energy management system was modelled for a single-house residential microgrid based on DR considering smart appliances. This case study was based on a single-zone, low energy house in Sydney, Australia. This grid-connected microgrid was controlled by the utility (as the master) with distributed energy resources (DERs) as the slave. Three DER sources were considered, namely solar PV, wind turbine, and battery energy storage system (BESS). Simulation was done using real-time pricing (RTP). From the obtained results, the proposed model improved demand profile by 33% and 40% for hot and cold weather conditions, respectively, compared to the conventional energy management system. Similar research can be found in [20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31]. The main contribution of this research involves the combination of both DR and RES through the use of aggregators. In the context of the South African energy distribution system, the penetration of renewable energy sources (such as wind and solar photovoltaics (PV)) is minimal compared to the contribution of conventional sources. However, in the past 2 years since January 2018, up to 1000 electric vehicles (EVs) have been sold across South Africa. This accounts for a 167% increase in EV sales since January 2018 [32]. The province of Gauteng (where Johannesburg is located) accounts for half of the total number of EVs on South African roads. Also, with over 90 EV charging stations currently in Gauteng (with plans by both government and automotive companies to further increase this number), the authors are of the opinion that a combination of EVs and DR is one promising solution to the ailing energy distribution network in South Africa. It is clear that the concept of smart grids has led to the possibility of maximizing gains and incentives to all three levels of the power system supply chain. Also, the role of DR aggregators is vital in ensuring that a system is realised in which end users play an active role in power system optimization. This paper proposes a three-level framework with competition among DR aggregators with the most cost-effective cluster emerging the winner, while considering the benefits of utilization of RES on both the DSO and end user levels.