Lifetime-Aware ISP Networks: Optimal Formulation and Solutions