  Modern power systems integrate renewable distributed energy resources (DERs)
as an environment-friendly enhancement to meet the ever-increasing demands.
However, the inherent unreliability of renewable energy renders developing DER
management algorithms imperative. We study the energy-sharing problem in a
system consisting of several DERs. Each agent harvests and distributes
renewable energy in its neighborhood to optimize the network's performance
while minimizing energy waste. We model this problem as a bandit convex
optimization problem with constraints that correspond to each node's
limitations for energy production. We propose distributed decision-making
policies to solve the formulated problem, where we utilize the notion of
dynamic regret as the performance metric. We also include an adjustment
strategy in our developed algorithm to reduce the constraint violations.
Besides, we design a policy that deals with the non-stationary environment.
Theoretical analysis shows the effectiveness of our proposed algorithm.
Numerical experiments using a real-world dataset show superior performance of
our proposal compared to state-of-the-art methods.
