Design of a polygeneration system with optimal management for a district heating and cooling network