Intelligent Energy Management for Microgrids with Renewable Energy, Storage Systems, and Electric Vehicles