Centralized and decentralized energy production