Analysis and optimisation in wireless energy harvesting networks