Design of the energy networks in a sustainable district