Text this: Cost Optimization of AC Microgrids in Grid-Connected and Isolated Modes Using a Population-Based Genetic Algorithm for Energy Management of Distributed Wind Turbines