Optimum preventive maintenance and repair limit