A hierarchical Building Management System for temperature's optimal control and electric vehicles' integration. (January 2023)