An adaptive leader election protocol (LEP) was developed to control both stationary and mobile generation assets (generators and vehicles), achieved using an energy management system (EMS). The LEP algorithm adapts to changes in both topology and the asset inventory using the longevity criterion (available fuel, future availability), used to compute a desirability index, for election of a leader. The leader then implemented an optimal power flow EMS to ensure sufficient and optimal power flow within the electrical network was maintained in the presence of a complex electrical load, regardless of the asset mix. Both the LEP and EMS algorithms were distributed to the generation assets. This capability supports stationary grid-tied, vehicle-to-grid, and mobile vehicle-to-vehicle-based applications. Simulated case studies illustrate that the adaptive LEP was resistive to deterministic events (maintenance, available fuel), which could yield an inoperable asset, compromising grid stability. The use of the adaptive LEP resulted in a communication complexity of at most [Formula: see text]; in contrast, a fully connected communication system requires [Formula: see text] communications, limiting the scalability of the network. The EMS was optimized, resulting in a computationally efficient and scalable optimal power flow algorithm that can be extended for more general stationary or mobile energy networks.