Agent based modeling of smart grids in smart cities