Engineering energy flexibility into buildings: development and evaluation of a model-predictive control strategy for demand response with space-heating