With the proliferation of distributed energy resources in the form of distributed generation, distributed storage and combination of these two concepts is micro grid more than ever before. For optimal utilization of micro grid, optimal management of distributed energy resources they need. that requires the use of artificial intelligence is sporadically. micro grid provide services that include new energy management and load response programs are. Consumers also need to manage time, save energy and economic exploitation involved. In many scenarios related to these services, energy management systems are a vital part of synchronizing multiple devices micro grid distribution. In this study micro grid a residential building. micro grid introduced and modeled components and aims to provide optimal strategy for managing energy resources in the next 24 hours micro grid considering the technical constraints and economic criteria. The impact of tariffs on the market price and the cost of operation micro grid exchange network can be evaluated in different ways.ways.ways