Aggregation of distributed generations (DGs) along with energy storage systems (ESSs) and controllable loads near power consumers has led to the concept of microgrids. However, the uncertain nature of renewable energy sources such as wind and photovoltaic generations, market prices and loads has led to difficulties in ensuring power quality and in balancing generation and consumption. To tackle these problems, microgrids should be managed by an energy management system (EMS) that facilitates the minimization of operational costs, emissions and peak loads while satisfying the microgrid technical constraints. Over the past years, microgrids' EMS have been studied from different perspectives and have recently attracted considerable attention of researchers. To this end, in this paper a classification and a survey of EMSs has been carried out from a new point of view. EMSs have been classified into four categories based on the kind of the reserve system being used, including non-renewable, ESS, demand-side management (DSM) and hybrid systems. Moreover, using recent literature, EMSs have been reviewed in terms of uncertainty modeling techniques, objective functions (OFs) and constraints, optimization techniques, and simulation and experimental results presented in the literature.