In this paper a comprehensive model for optimally operating amicrogrid has been presented. By managing the demands at consumerside as well as Distributed Generation (DG) sources, in a 24 hours span,the microgrid is able to maximize its revenue through participating inenergy and reserve market in this model. Here, the effect of real timeelectricity price for consumers is considered as an effective incentivefor controlling energy demands and operation costs of microgrid. Inproposed model, in ...