Optimal design of a remote heating network