A service-life cycle approach to maintenance and energy retrofit planning for building portfolios