Optimal allocation of resources for life-cycle management of structures and highway networks