Model-driven quality and resource management for CPSs