  One of the main concerns in traditional Wireless Sensor Networks (WSNs) is
energy efficiency. In this work, we analyze two techniques that can extend
network lifetime. The first is Ambient \emph{Energy Harvesting} (EH), i.e., the
capability of the devices to gather energy from the environment, whereas the
second is Wireless \emph{Energy Transfer} (ET), that can be used to exchange
energy among devices. We study the combination of these techniques, showing
that they can be used jointly to improve the system performance. We consider a
transmitter-receiver pair, showing how the ET improvement depends upon the
statistics of the energy arrivals and the energy consumption of the devices.
With the aim of maximizing a reward function, e.g., the average transmission
rate, we find performance upper bounds with and without ET, define both online
and offline optimization problems, and present results based on realistic
energy arrivals in indoor and outdoor environments. We show that ET can
significantly improve the system performance even when a sizable fraction of
the transmitted energy is wasted and that, in some scenarios, the online
approach can obtain close to optimal performance.
