Combining different types of energy storage