The interconnection of buildings/energy networks is currently evolving: intermittent renewable production and energy-producing buildings. Network flexibility is a key issue. It makes it possible to orchestrate production and consumption in order to limit the risks of congestion and minimize the CO2 cost of the energy mix. LELA has developed a methodology to estimate the heating profile of a collective building. The objective of this internship is to study the robustness of this methodology and to extend its scope to several buildings: Bibliographic study: scientific monitoring of building flexibility tools, Getting to grips with the current algorithm: structuring of the PYTHON code, Evaluation of its robustness: study of the influence of certain factors on the quality of estimation, Improvement of the current algorithm: modifications to be proposed and tested, Expansion to the neighborhood scale: tests for represent several buildings.