0

I am dealing with a challenge that is similar to the Traveling Salesman Problem but with a degree of Optimization and Constraint Satisfaction. The algorithm has as input the following variables:

  • A set of points, where each point object has the following (2000-20000 instances):
    • Coordinates (e.g. Latitude and Longitude)
    • Score/Reward of that point (Strictly positive)
    • Time cost (time spent if you go to this point, e.g. "visit time") (Strictly positive)
  • Travel time between any two given points (a matrix of nxn where n is the number of points). This is not a direct derivative of the distance between two points, it takes into account mean traffic and the road mesh through which you can go from one point to another. (Strictly non-negative)
  • Set of restrictions, which are of these types:
    • Must visit point "X"
    • You can only travel up to a time "T"

Additionally I have restrictions of the form: If point "X" is visited, it has to be between hour "A" and hour "B" but let's not consider it for the moment...

I have to implement the algorithm that maximizes the sum of the scores (Optimization), taking into strict consideration the restrictions defined (CSP) and outputting a route (TSP) or set of points that I have to visit in a given order. The output will yield (due to the characterstics of the inputs and restrictions) a route that contains at most 15 points, usually around 10.

These are the approaches I have considered and explored:

  1. Clustering - Compute an "epicenter" of high-score by getting the means of surrounding points' scores. With that "epicenter", apply a traveling salesman algorithm, to "K" surrounding points. Those "K" points will be obtained by a k-NN algorithm, increasing "K" by one (or more) until the max-travel-time condition has been reached.

  2. Knapsack Problem - As I have a max-travel-time limit and a set of points which I can include as part of the solution, the problem is very similar to the knapsack problem. The only problem here is that I don't know the cost (in travel time) of a solution until I compute the whole route (solution to the TSP) and computing the route for each iteration of the knapsack algorithm may be too complex computationally. I need to know this cost in each iteration because it is the knapsack capacity.

  3. Linear programming - Somehow model the problem as a linear programming problem, and get a solution in my lifetime. Probably impossible even with the best computer.

I have thought of setting the input into a weighted-graph-like structure, where each node is a point, and the edges contain the travel-time information. But it wasn't useful for me...

Do you have any other approaches that I've missed?

What do you think of the approaches I've proposed?

Any help would be appreciated, thanks in advance!

Lauro Bravar
  • 373
  • 2
  • 9
  • Please formalize this problem. As presented, it's hard to tackle as many details are omitted or unclear. Examples: Negative scores? Travel-time -> mathematical metric or not (the mapping between long/lat-space to travel-time is missing)? What's a route for you (graph-theory terms)? Do you really need a TSP-like solution (imho often not relevant in the real-world)? And try to ask more specific things, not presenting a list of questions. – sascha Apr 09 '18 at 22:08
  • Edited. Answering "What's a route a for you" - A route is an ordered list of points that represents a plan of which places to visit and in which order. Answering "Do you really need a TSP-like solution?" - I need a route as an answer, in the terms that I just defined above. Also - I removed the less relevant questions. Thanks for your comment! – Lauro Bravar Apr 10 '18 at 06:15
  • 1
    Looks a little bit like the prize collecting TSP. – Erwin Kalvelagen Apr 10 '18 at 08:53
  • Never heard of it. Can you give me any information/links/sources so that I can read about it? I would really appreciate it! – Lauro Bravar Apr 10 '18 at 10:43
  • Your route-description is still informal and to me it's far away from what the TSP is about. (your description of a route allows multiple visits; there is no constraint on start/end, the empty-list is a solution and so on). – sascha Apr 10 '18 at 13:19
  • A route is a set of points that has an order. An empty-list should not be a solution since your maximizing the score/reward of the points you visit, unless every visit takes longer than your max-travel-time on its own. I DON'T think TSP is a perfect representation for the problem, and I DON'T think this is a TSP problem. In fact I said that graph-like struture for this problem didn't help me. That is why I ask for other approaches to the problem, if it was a TSP I wouldn't be asking, please give me a better representation and keep an open mind about it :) – Lauro Bravar Apr 10 '18 at 14:03

0 Answers0