A Control Methodology for Building Energy Management Systems (BEMS) in Heat Networks with Distributed Generation. (October 2018)