Text this: Optimal Algorithms for Energy Storage Systems in Microgrid Applications: An Analytical Evaluation Towards Future Directions