An agent-based model to support the preliminary design and operation of heating and power grids with cogeneration units and photovoltaic panels in densely populated areas. (15th December 2022)