TWO STAGE OPTIMIZATION STRATEGY FOR MANAGING ELECTROCHEMICAL ENERGY