The Microgrid controller has been designed and developed to optimize the overall microgrid operations by integrating with grid, solar, batteries and DG. Algorithms are configurable to prioritize different applications to support specific use cases for front of the meter and behind the meter applications.