Gửi tin nhắn: A modeling framework for optimal energy management of a residential building