I. Introduction
Smart grid is an electricity network that can intelligently integrate the actions of all connected users in order to efficiently deliver sustainable, economic and secure electricity supply [1]. For achieving these goals one of the most important tasks is an optimization of the energy production and consumption of connected users to achieve the energy balance. Optimizing energy production and consumption is an economic part of the electric power system as producers sells their energy to consumers on the market. On the electric energy market consumers are divided into balance groups that are connected through power network with producers of electrical energy. Balance groups are a collection of metering points (presenting consumers and producers) used to calculate balance between consumption and production of electrical energy.