Simultaneous Determination of Optimal Repair Policy and Service Life