Optimal allocation of resources for increasing the seismic reliability of lifelines