This code is adapted from the energy-model-example to have to two receiving nodes and to end the simulation when the energy source is depleted