Smart control of heat pumps in future district heating systems and energy use in buildings