Yes that is possible. I first put the example into a Jupyter notebook that you can also find in the KNWF file attached to this entry.
You need a working Python installation and make Python Known to KNIME, and also several packages.
This set of coordinates should be turned into an optimal way. The results should be stored and the image turned into a PNG.
I put the steps from the notebook into KNIME (since this is a KNIME forum) and made the necessary connections.
Also the optimal route (itinerary_rank) will be stored together with the coordinates for further reference.
Please note: at the heart of the operation is the mlrose package by Genevieve Hayes.
I implemented the ‘Example 3’ from this Jupyter notebook of examples. Other tasks might need other settings. You might adapt the other examples in the same manner and see if they can help you.
kn_example_traveling_salesman_problem_python.knwf (145.1 KB)