-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pgr_TSP() argument "end_id" doesn't work on MacOS and Ubuntu for PgRouting versions 2.6.2 ... 3.0.1 #1380
Comments
On Ubuntu "end_id" is N-2 address (instead of N) when "start_id" is not defined and it's probably ignored when the both "end_id" and "start_id" arguments defined.
|
Can you give us a problem to reproduce please |
@mobigroup If you can give us the query using the sample data of the documentation would be better. |
@cvvergara That's very easy to reproduce. See the code below where we have the same output for end_id := 1 and end_id := 2:
Note: we have different output for start_id := 1 and start_id := 2. |
hmm, I see the same output in the two queries you posted. |
Yes, that’s the same but it needs to be different because end_id is different in the queries above. |
with start_id 1
with start_id = 2
So, here is what I see:
when you want v3 to be the start_id the solution is:
when you want the end_vid to be v4 (start_vid is v1 from the original problem)
which forces v4 -- v1 (when v1 is the start_vid) This would be ok
The reason it is ok, is that the route can be written like
|
I shouldnt have use |
In general, |
Please tell me your thoughts |
Here is issue for the end_id option. Why do you write about the different one (start_id)? |
beacuse they are related if you want the start_vid to be u for example, the the solution is just rotated to get that u as first node but if you want the end_vid to be v where u...., v, ........................w , s, u is the best solution for tsp So imagine a problem, the salesperson departs from the office, has to visit the customers and ends in his house |
Sorry, you are wrong. No, we can’t just replace end_id by start_id and reverse the route. Let’s think about the both options start_id and end_id defined at the same time. |
Well I would need to read the code again but as far as my memory goes that is how it works. |
Hi, maybe do you have some updates? I have the same results on MacOS and Linux for PgRouting 3.1.3. |
@mobigroup Can you try develop branch with pgr_TSP? |
Describe the bug
On MacOS in resulting routing sequence 1...N addresses the "end_id" node is N-1 sequential address instead of N. So we can't define the last address.
To Reproduce
Use pgr_TSP() function with defined "end_id" argument. With also defined "start_id" argument the "end_id" probably ignored.
Specifications (please complete the following information):
Use the commands:
The text was updated successfully, but these errors were encountered: