OPTIMAL PLANNING AND DESIGN OF A MICROGRID WITH INTEGRATION OF ENERGY