Dynamic modelling and operational optimization of district heating systems