The penetration of intermittent energies in the energy system engenders grid power peak issues for the operators. The cost to reinforce the grid increases the electricity prices leading to a situation where consumers pay for the prosumers' grid usage. This socioeconomic problem drives the research towards new and fair tariff structures that impose fees in proportion to the power exported to the grid. This project aims to model and optimise the electrical and thermal loads of a set of buildings in the city of Rolle. The energy system includes photovoltaic panels, a battery, a heat pump and electric heaters. The tariff structure currently applied in Rolle is used. Once the model is built, new regulations are applied in the form of constraints on the model. The costs are optimised and the performances of the energy system are analysed. In a future work, other tariff structures will be applied with the regulations.