Model-Based Design of Resilient Systems Using Quantitative Risk Assessment