An optimal replenishment strategy in energy harvesting wireless networks with a mobile charger