Optimizing supply temperatures in district heating grids