Coordinated management of aggregated electric vehicles and thermostatically controlled loads in hierarchical energy systems. (October 2021)