def generateRoutes(self, ammount=20000, alpha=0.2, maxLoops =300000 ):
        'gera N rotas randomicas'
        random.seed(42)
        self.routes = []
        randomRange = int((len(self.customers)-1) * alpha)
        customers = self.customers[1::]
        customersIgnored = []
        route = Route(self.customers[0])
        def sortFunc(c): return c.distanceOf(route.customers[-1])
        customers.sort(key=sortFunc)
        it = 0
        while(len(self.routes) < ammount):
            it += 1
            if it == (maxLoops/2):
                print "Atingindo numero maximo de execucoes. abrindo alpha"
                randomRange = len(customers)-1
            if it > maxLoops:
                print "Maximo de execucoes sem resultados atingido.", len(self.routes), "rotas geradas"
                break

            i = random.randint(
                0, randomRange)
            nextCustomer = customers[i % len(customers)]
            if(route.canAddCustomer(nextCustomer, self.capacity)):
                route.addCustomer(nextCustomer)
                customers.remove(nextCustomer)
                customers.extend(customersIgnored)
                customersIgnored = []
                customers.sort(key=sortFunc)
            else:
                customersIgnored.append(nextCustomer)
                customers.remove(nextCustomer)

            if(len(customers) == 0):
                route.closeRoute()
                if(self.addRoute(route, it=it)):
                    it = 0
                route = Route(self.customers[0])
                customers.extend(customersIgnored)
                customersIgnored = []

                if(len(customers) == 0):
                    customers = self.customers[1::]
                customers.sort(key=sortFunc)