Integrated management of cogeneration plants and district heating networks