An Optimal Dispatch Framework of Electric and Heating Networks Based on Controllable Electric and Thermostatically Controlled Loads. (10th January 2022)