In this paper, a day-ahead profit-maximizing energy management scheme for a grid-tied microgrid operation is proposed. The microgrid contains various types of distributed energy resources (DERs) and an inverter-interfaced battery-bank storage system. The average of day-ahead hourly forecasted data for loads, wind speed, and solar radiation are inputted into the framework of energy management (EMF). To optimize the microgrid performance, EMF determines the hourly dispatch of reactive and active power for each DER. Also, it specifies the discharging and charging times of the energy storage system and the onload tap changer position setting of the transformer connected to the main grid. The main aim is to maximize the revenue of microgrid meeting all technical limitations. The main grid can sell/buy reactive and active powers to/from the microgrid with a variable daily energy price of the market. A collective rule base-BAT algorithm is implemented as a solver of the energy management optimization problem for a grid-tided microgrid. Furthermore, the ability of the suggested EMF is proved in comparison with recent approaches.