Swarm intelligence methods for mobile ad hoc networks