A method of controlling the heating, ventilation and air conditioning (HVAC) system of a building, the method comprising the steps of: (a) developing an initial thermal model of the building, and continuously updating the thermal model over time; (b) utilising the thermal model to continuously develop a daily HVAC operating plan for the building; and (c) continuously examining a current HVAC operating plan and optimising the alignment of the current HVAC operation with the current HVAC operating plan.