Flexible energy systems