Abstract of the presentation and conference paper : With the diffusion of electric heating and cooling devices, coupling the electric and thermal systems in the residential sector is becoming attractive and could help to increase photovoltaic penetration. The heating and cooling needs of buildings correspond to an important component of the total energy consumption of the residential sector. Thus, it is important to properly design the thermal and electric systems accounting of the interactions from the first phases of the design process. In the design phase, detailed models implemented in dynamic simulation tools can be used for the sizing process of system components, but they hardly can be adopted in optimization algorithms due to the computational time required for each simulation. This is particularly true for multi-objective optimization algorithms, where usually a wide number of simulations is required. In this work, TRNSYS was used to train a machine learning model that is used in a multi-objective optimization with the final goal of improving the design of the thermal system and optimizing the KPIs of a coupled photovoltaic plus battery system.