HOW DOES ENERGY STORAGE OPTIMIZATION WORK