A probabilistic dynamic energy model for ad-hoc wireless sensors network with varying topology