1. A controller for an HVAC system of a building, the controller comprising: an input for receiving a forecast of an ambient temperature outside of the building; a memory for storing measures of past operational costs of the HVAC system in conjunction with past operating conditions; an output for setting a set-point of the HVAC system; a control unit coupled to the memory, the input and the output, the control unit including an optimizer for a regression model that uses the forecast of the ambient temperature and at least some of the measures of past operational costs of the HVAC system in conjunction with past operating conditions to produce a temperature profile that includes one or more future temperature set-points for the HVAC system, wherein the one or more temperature set-points are set to occur at predefined future times, and the optimizer calculates the temperature set-point values at each of the predefined future times but the optimizer does not itself calculate the predefined future times; and wherein the control unit forwards the one or more temperature set-points to the HVAC system via the output of the controller.