Advanced methods for sustainable energy systems in operation and design of district heating networks