Hands-On Delivery Routes Optimization (TSP) with AI, Using LKH and Python | by Piero Paialunga | Jan, 2025


The code of this article can be found on this GitHub folder.

One of my favorite professors throughout my studies told me this:

“Just because your algorithm is inefficient, it doesn’t mean that the problem is hard

This means that if you want to solve a whatever problem (easy or hard), there will always be an approach that is naive enough to be extremely inefficient. For example, let’s say you have to go to work in a new workplace. Instead of using Google Maps, you start from your house’s alley and try all the possible combinations of the streets (north, south, west, and east). By the time you will arrive to work your company might be filing bankruptcy or having you fired.

Let’s try to be a little more formal. Let’s say that in whatever business or engineering environment, you have to find the minimum or maximum of a function. For example, your company has to maximize revenue from the sales of a given department. We call this function f. The “strings” you pull, meaning the decisions that you can take to maximize the revenue is a vector x. You can’t obviously…

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here