District-heating and -cooling, demand management and thermal energy storage