The deregulation of the electricity industry in many countries has created a number of marketplaces in which producers and consumers can operate in order to more effectively manage and meet their energy needs. To this end, this thesis develops a new model for electricity retail where end-use customers choose their supplier from competing electricity retailers. The model is based on simultaneous reverse combinatorial auctions, designed as a second-price sealed-bid multi-item auction with supply function bidding. This model prevents strategic bidding and allows the auctioneer to maximise its payoff. Furthermore, we develop optimal single-item and multi-item algorithms for winner determination in such auctions that are significantly less complex than those currently available in the literature. Nevertheless, the consumption of the energy of each singular auctioneer has to be regulated and adapted to the submitted bids in order to maximise the payoff. To this extent, this work models the constellation of energy consuming devices as a distributed constraint optimisation problem (dCOP). However, to operate within this problem domain, dCOP algorithms must be complete, work with global cost functions and complete solutions, and, currently, there are no dCOP algorithms that fulfil these conditions. Therefore, this thesis develops a novel optimal dCOP algorithm, called COBB (constraint optimisation by broadcasting), and, additionally, adapt state-of-the-art counterparts to our domain. Empirical comparisons show that COBB clearly outperforms all of them. Finally, this work outlines effective strategies to reduce the network overload caused by broadcasting to maintain it into a range where it is a reasonable trade-off for COBB's efficiency.