Design of a polygeneration system with optimal management for a DHC network