Agent Based Modeling of Smart Grids in Smart Cities