Selective maintenance optimization for systems operating missions and scheduled breaks with stochastic durations