  The substantial growth in wireless data traffic, and the emergence of
delay-sensitive application/services requiring ultra-low latency, has resulted
into a new Mobile Network (MN) design paradigm called Multi-access Edge
Computing (MEC). In this, the Base Stations (BSs) are empowered with computing
capabilities, and they are densely deployed in order to increase network
coverage and provide high throughput to mobile users. These developments
require energy self-sustainability in order to minimize the carbon emission
into the atmosphere and the dependence on the power grid. As a solution to
this, we advocate for the integration of Energy Harvesting (EH) systems, e.g.,
solar panels or wind turbines (together with energy storage devices), into
future BSs and edge computing systems (i.e., MEC servers). However, due to
traffic load and harvested energy variations within a coverage area, the stored
energy levels will also vary. To compensate for green energy imbalance within
the network, energy cooperation (transfer) can be enabled by an energy trading
application hosted in the MEC platform, and the energy packets traverse over
the Power Packet Grid (DC power lines and switches) from the source BS(s) to
the energy-deficient BS(s). In this paper, we jointly perform energy allocation
and energy routing using an online algorithm based on Lyapunov
drift-and-penalty optimization theorem (named Lyapunov) for enabling energy
cooperation, leveraging the MEC Location Service (LS) Application Programmable
Interface (API). Our numerical results reveal that the Lyapunov algorithm is
able to deliver sufficient amount of energy under normal solar irradiance
without the effects of the control parameter
