OPTIMIZING CHARGE AND DISCHARGE CYCLES FOR ENERGY STORAGE