A dynamic putty-semi-putty model of aggregate energy demand