A data mining model of Energy management system for a micro-grid