COST OPTIMIZATION IN MICROGRIDS ARTIFICIAL INTELLIGENCE POWERED