A feasible approach to dynamic routing in networks based on distributed computation