Optimal replacement policy based on number of failures for a system with multiple attempt minimal repairs