Energy Management of a Building Cooling System With Thermal Storage: An Approximate Dynamic Programming Solution