Economic dispatch for a regionally integrated heat and electricity system with variable pipeline flow direction. (December 2021)