Optimization of a Distributed Cogeneration System with solar district heating