Automated adaptation via Quantitative Partial Model Checking