A non-linear convex cost model for economic dispatch in microgrids. (15th July 2018)