This is an example of thermostatically controlled heating. It demonstrates the use of the on-off controller with an electrical heater and thermal components to model a living space that is heated by a furnace. The external temperature is modeled by a data file with temperatures over a 24-hour period, and the programmable set points are provided by another data file. By integrating the heat input to the space, it is possible to compute the cost of heating the space over the 24-hour period.