Thermal request optimization in district heating networks using a clustering approach