Yes, I have used it in my recent works. You can refer one of my papers: S. Misra, S. Bera, and T. Ojha, "D2P: Distributed Dynamic Pricing Policy in Smart Grid for PHEVs Management", IEEE Trans. on Parallel and Distributed Systems; in which we propose PHEVs' energy management in a dynamic pricing scenario.
In order to support various networks (such as home area networks, WMN), NS3 is quite better among the network simulations (to me). I believe that you have preliminary concepts about NS3 (how it works, how to install different layered architecture). Once you have implemented your required network environment, then rest of things (mathematical calculations and your proposed algorithms) can be done easily.