MULTIPURPOSE OPTIMIZATION METHOD FOR ENERGY STORAGE SYSTEM