ENERGY STORAGE CONFIGURATION COST ALGORITHM