Model predictive control for thermal comfort optimization in building energy management systems