## 5 Results  
In Figure 7, the hourly prices for both pricing algorithms are presented. The price levels of both algorithms are within the bounds defined by the external grid (feed-in and feed-out tariffs); therefore, consumer participation in an LEM framework is beneficial under both pricing algorithms. In particular, the prices of our proposed algorithm are lower than those of the P2P approach during hours of high PV production. This is to be expected since, in the CDT-LEM pricing, no direct bids are submitted by the participants; the price behavior follows the pattern of residual load. Therefore, during time intervals with excess PV production, the community energy demand is lower and the prosumer is not adequately compensated. On the other hand, the prices of the proposed algorithm are significantly higher during the night hours of the day (7:00 p.m.-6:00 a.m.), as shown in Figure 7.  
In Table 1, it is evident that, without an LEM, the procurement daily costs are significantly higher. Specifically, employing the proposed algorithm without CDT, the cost is reduced by 20.7%, while the cost reduction with CDT is 27.8%. It is noticeable that, while P2P pricing also leads to cost reduction, the percentage drop is smaller compared to the respective one from our proposed algorithm. This is due to the different way, in which the LEM operates; under the P2P algorithm, there is a higher trade of energy with  
Figure 7: Hourly prices with the two (2) different pricing algorithms. the external grid, while the proposed algorithm seeks to optimize the energy within the LEM framework. In Table 2, consumer payments are the lowest under the proposed method with CDT. The producers' profit is also the highest under the same schema since the traded energy is higher with the proposed algorithm than with the P2P approach, which leads to profit maximization. In Table 3, the results for both pricing algorithms are displayed, with and without the utilization of the CDT. The results focus on two time periods, between 2:00 a.m. and 8:00 p.m. and between 2:00 p.m. and 8:00 p.m. These time periods are selected because the pricing algorithms generate different state-of-charge values during these time periods. In particular, under P2P pricing, the excess energy (during midday) is sold to the external grid, leading the batteries to reach their lowest accepted levels (20% state of charge) regardless of the CDT. On the other hand, with CDT-LEM pricing, this energy is used to charge the batteries, which is why there are no abrupt peaks. This fact leads to a more \"self-sufficient\" LEM since the interaction with the external grid is lower than in the P2P case. In the CDT-LEM pricing mechanism, the LEM prioritizes the local energy needs and then the energy trading with the external grid via the wholesale markets. Apparently, our algorithm leads to battery charging when there is a higher local generation while the P2P algorithm sells the excess capacity to the wholesale market. Figures 8 and 9 show how the probability of constraint violation affects the total operational LEM costs. As the probability decreases, the total expected cost increases due to the fact that the LEM operation becomes more \"conservative\" in order to respect the optimization constraints. Furthermore, the CDT-LEM pricing coupled with the CDT results in the lowest costs, regardless of the probability. Clearly, there is a trade-off between higher operating costs and low-risk scheduling, and the associated decision rests with the LEM operator and the specific pricing mechanism. In Figure 10, the energy exchange levels with the external grid are presented. Positive values represent the sale of energy to the grid and negative values represent the purchase of energy from the grid. As mentioned earlier and shown in Figure 10, the energy exchange is actually higher in the P2P approach, while our algorithm leads to lower dependence on the external grid. This is due to the fact that LEM first resolves its local imbalances and then interacts with the external grid.