fillipe-gsm / python-tsp

Library to solve Traveling Salesperson Problems with pure Python code
MIT License
174 stars 28 forks source link

Can't import a couple of functions. #48

Closed pepeto closed 9 months ago

pepeto commented 10 months ago

After pip installed the library, I was trying all the functions in order to process a distance matrix but when I tried to import a couple of them (the commented # ones), an error appeared:

ImportError: cannot import name 'solve_tsp_lin_kernighan' from 'python_tsp.heuristics' (M:\Working- ENVS\python3.9\lib\site-packages\python_tsp\heuristics__init__.py)

from python_tsp.exact import solve_tsp_brute_force
from python_tsp.exact import solve_tsp_branch_and_bound
from python_tsp.exact import solve_tsp_dynamic_programming

from python_tsp.heuristics import solve_tsp_local_search 
#from python_tsp.heuristics import solve_tsp_lin_kernighan                                   
#from python_tsp.heuristics import solve_tsp_record_to_record
from python_tsp.heuristics import solve_tsp_simulated_annealing
fillipe-gsm commented 9 months ago

Sorry, this was my mistake.

These two methods were added right after my last publish to PyPI and they got left out...

I republished version 0.4.1 fixing that, can you update it and try again?

Two relevant points:

fillipe-gsm commented 9 months ago

I think this problem got solved, right?

I am going to close this issue. Feel free to open a new one if you find another problem.