## 4 Results and Validation  
### Use Case Description  
In this work, the CDT-LEM pricing is compared with P2P pricing [18]. The evaluation is conducted in terms of consumers' payment, prosumers' profit, and computational performance of both algorithms. To assess the applicability of LEM, both pricing algorithms are examined in a real-world test case: a residential community in central Germany. In particular, the total number of participants in the community is 27 residential members, 12 of them have installed PV systems on their rooftops, while the rest of them are solely energy consumers. The former group contributes to the LEM through their flexible loads, in our case their HVAC systems, via a DR scheme. This specific flexible load was chosen since it is the most energy-consuming appliance in households and, in our case, it is possible to control HVACs' operation through smart controllers. Moreover, the time period is a typical single day during summer, characterized by substantial PV production and high demand for HVAC load. The pricing algorithm and the optimal scheduling are calculated on the LEM operator's cloud platform. Additional critical services, such as load and generation forecasting, interaction with the wholesale energy market, and integration of meteorological data, are also deployed in LEM's cloud. Regarding the CDT implementation, each participant is equipped with a wrist-worn wearable device, which assesses and transmits the thermal comfort level. In addition, energy preferences have been provided by the consumer and processed by CDT, as described in Section 3.1. Based on this information, participants are classified into three classes. To simulate the participation of the consumers, the different classes of flexibility capacity stemming from each participant are considered to follow the normal distribution. The classes are derived based on the values provided by the flexibility and thermal comfort matrices. The first class contains the non-flexible consumers whose load profile cannot be altered. The second class contains low-flexibility participants, while the third class contains fully flexible participants with no constraints of adjusting their load. In all three classes, the thermal comfort limits of each user are not violated. These classes are formulated as parameters in the optimization problem and determine the allowed shiftable demand of each participant. In that context, CDT extends the flexibility capabilities of LEM by creating a more stable and fair cooperative energy scheme, since even the members who do not own any energy production assets can contribute to the energy community. Accordingly, all participants contribute to LEM for mutual benefit. Finally, CDT offers a seamless way of performing load shifting based on participants' preferences. The main advantage of the CDT-LEM pricing algorithm is that active engagement of participants is not required. Consumers are encouraged to participate, as the price results are always within the range of feed-in and feed-out tariffs. The inputs of the algorithm are consumption and generation forecasts, along with feed-in and feed-out tariffs, and the output is the resulting LEM clearing price. The LEM price curve is a representation of the local generation and demand, and is made available to all participants. It is depicted as a three-dimensional surface, as illustrated in Figure 6. The curve is generated for each hour, although it can be created for any other desired time horizon. On the contrary, in the case of P2P pricing, the price is calculated based on each participant's bidding strategy, which is prone to market manipulation, especially in the case of a single participant with significant market power (e.g., higher installed PV capacity). Hence, the adoption of the P2P algorithm requires a sufficient regulatory framework. Even so, both algorithms lead to lower energy costs, where consumers and prosumers interact with the external grid via feed-in and feed-out tariffs respectively.