The energy management system is executed in microgrids for optimal integration of distributed energy resources (DERs) into the power distribution grids. To this end, various strategies have been more focused on cost reduction, whereas effectively both economic and technical indices/factors have to be considered simultaneously. Therefore, in this paper, a two-layer optimization model is proposed to minimize the operation costs, voltage fluctuations, and power losses of smart microgrids. In the outer-layer, the size and capacity of DERs including renewable energy sources (RES), electric vehicles (EV) charging stations and energy storage systems (ESS), are obtained simultaneously. The inner-layer corresponds to the scheduled operation of EVs and ESSs using an integrated coordination model (ICM). The ICM is a fuzzy interface that has been adopted to address the multi-objectivity of the cost function developed based on hourly demand response, state of charges of EVs and ESS, and electricity price. Demand response is implemented in the ICM to investigate the effect of time-of-use electricity prices on optimal energy management. To solve the optimization problem and load-flow equations, hybrid genetic algorithm (GA)-particle swarm optimization (PSO) and backward-forward sweep algorithms are deployed, respectively. One-day simulation results confirm that the proposed model can reduce the power loss, voltage fluctuations and electricity supply cost by 51%, 40.77%, and 55.21%, respectively, which can considerably improve power system stability and energy efficiency.Energies 2020, 13, 1706 2 of 25 microgrids is evolving quickly [1]. The advanced structure of the microgrids allows the distribution network operators (DSOs) to consider the EV battery, either as a load or distributed generator [2]. However, deployment of RESs and EVs creates some challenges, e.g., poor reliability and power quality problems. One of the most effective ways to mitigate these challenges is the deployment of energy storage systems (ESSs) in distribution grids. ESSs can alleviate the negative effects of uncertainties in RESs production [3]. On the other hand, despite the remarkable advantages of these units, there are some challenges in terms of adequate DERs capacity requirement, system configuration, and energy management and control. One of the most challenging issues is the optimal coordination of both supply and demand sides in microgrids with the main grid, while satisfying system constraints.Currently, extensive studies have been done on the impacts of the RESs, EVs, and ESSs on the network operation . In [4], a smart home energy management strategy is proposed to realize cost-effective energy systems for customers and provide reactive power compensation for home appliances using EV and ESS. In this paper, network-level studies are limited to investigating the power factor indicator, while the potential role of EVs and ESSs in distribution networks has not been considered. Researchers in [5] presented the centralized control strategy to manag...