Economics of energy sources and the optimal integration of renewable energies and energy conservation measures