def generate(self):
        temp_cost = 0
        temp_route = []

        # GREEDY SOLUTION
        if self.__gen_type == Type.Greedy:
            greedy = GreedySearch(self.__file)
            temp_cost, temp_route = greedy.calculate()

        elif self.__gen_type == Type.GreedyOne:
            greedy = GreedySearch(self.__file)
            temp_cost, temp_route = greedy.calculate_one(
                random.randrange(self.__data.__len__()))

        # RANDOM SOLUTION
        elif self.__gen_type == Type.Random:
            cities = list(range(self.__data.__len__()))
            first_index = random.randrange(self.__data.__len__())
            temp_route.append(cities.pop(first_index))
            while cities:
                index = random.randrange(cities.__len__())
                temp_route.append(cities.pop(index))
            temp_route.append(temp_route[0])
            for i in range(1, temp_route.__len__()):
                temp_cost += self.__data[temp_route[i - 1]][temp_route[i]]

        return [temp_route, round(temp_cost, 2)]