In this paper, an algorithm for energy management system (EMS) based on multi-layer ant colony
optimization (EMS-MACO) is presented to find energy scheduling in Microgrid (MG). The aim of study
is to figure out the optimum operation of micro-sources for decreasing the electricity production cost
by hourly day-ahead and real time scheduling. The proposed algorithm is based on ant colony optimization
(ACO) method and is able to analyze the technical and economic time dependent constraints. This
algorithm attempts to meet the required load demand with minimum energy cost in a local energy
market (LEM) structure. Performance of MACO is compared with modified conventional EMS (MCEMS)
and particle swarm optimization (PSO) based EMS. Analysis of obtained results demonstrates that the
system performance is improved also the energy cost is reduced about 20% and 5% by applying MACO
in comparison with MCEMS and PSO, respectively. Furthermore, the plug and play capability in real time
applications is investigated by using different scenarios and the system adequate performance is
validated experimentally too.