Development of optimization algorithms for the Leaf Community microgrid. (February 2015)