How to minimize the energy consumption in mobile ad-hoc networks