A simulation tool (EcoSim) has been developed to analyse the economic and environmental aspects of the integration of several energy conversion units. For a given investment over 25 years, the tool calculates the self-consumption rate, the autonomy level, the levelized cost of energy (LCOE) and the CO2 emissions. A neighbourhood is modelled using the Rhino software. Then the dynamic simulation software, CitySim Pro, determines the hourly energy demand and solar PV generation. Finally, the techno-economic and environmental parameters are calculated using EcoSim. For this neighbourhood located in Basel, the self-consumption rate is maximised by combining solar PV and battery. With the sale of locally produced electricity to the residents of the neighbourhood, we have shown that the implementation of such a self-consumption community leads to a more economically profitable situation as compared to the current case where electricity is bought from an industrial company.