Demand side management has been proposed as one means to improve integration of high shares of nondispatchable renewables-based electricity generation. Among other technologies, residential heat pumps are seen as suitable application for demand side management. Thus, we present a model of an air-water heat pump combined with a thermal energy storage. This heating system supplies heat to a floor-heated building. All subsystem dynamics (thermal energy storage, heating zone, water circuit of the floor heating, heated floor) are modeled in detail. That is dynamics are described by differential equations which are based on thermodynamic first principles. In terms of heat pump operation, we derive several model-predictive control strategies following different objectives. These strategies aim at the minimzation of electricity consumption, procurement prices or operational costs. The difference in operational costs of the flexible operation and of the non-optimized operation represents the value of this flexibility option. The model is designed to assess manifold technical setups and economic conditions and, thereby, lays the foundation for further detailed analyses.