UNIFIED DISPATCH OF GRID CONNECTED AND ISLANDED MICROGRIDS