PDF OPTIMAL ALLOCATION OF ENERGY STORAGE CAPACITY IN MICROGRIDS