Skip to content
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

Editing numbers of cut #15

Open
aleraguz opened this issue Oct 15, 2018 · 5 comments
Open

Editing numbers of cut #15

aleraguz opened this issue Oct 15, 2018 · 5 comments

Comments

@aleraguz
Copy link

Is there any possibility to change the numbers of cuts used by Concorde to solve TSP? I mean, I think it is currently working con 16 cuts, can I change to 25 for example?

@jvkersch
Copy link
Owner

Hmm, not sure. I'd have to look into that...

@aleraguz
Copy link
Author

What I've figured out, so far, is a function called "usage" in concorde.c . In this function is basically explained the same thing you can find running concorde by command windows, if you put "-C 24" it will run the program adding 24 local cuts. However I could find a way to invoke it in the code.

@jvkersch
Copy link
Owner

@aleraguz That's a good find, thanks! It shouldn't be too difficult to expose that option on the Python side.

@aleraguz
Copy link
Author

To be honest I was finding this information because I got some non-exact solution using Concorde and at the beginning I thought it was because of the numbers of local cutting planes. Actually, this problem arises if you set coordinates with many decimal numbers cause of Concorde's huge approximation errors. Thus, basically, just multiply all the distances by 100 or 1000.

@jvkersch
Copy link
Owner

jvkersch commented Jan 31, 2021

@aleraguz Thanks for the find, and sorry it took me so long to get back to this.

I wanted to point out that the 0.2.0 API will run concorde in a subprocess, which will make it much easier to pass arbitrary options to the solver. See #28 (comment) for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants