Resilient energy systems in the built environment