I need to solve tsp problem in my rails application. I want to use google or-tools for solving this problem of tsp. The documentation1 tells about using or-tools in c++, c#, java and python. The code for solving tsp using or-tools in python is working fine. But I need to use or-tools in ruby for my rails app. How can I do this?
Asked
Active
Viewed 283 times
0
-
Are you sure they work with `ruby`? I don't see a mention of it on their page (_"Google created OR-Tools in C++, but you can also use it with Python, C#, or Java."_) - https://developers.google.com/optimization/introduction/installing/source – Jagdeep Singh May 03 '18 at 12:44
-
If they are not available for ruby, What other ways might be there for using or-tools in the rails app. Can I call python file in my ruby library? Are there any unofficial version available on GitHub of or-tools library's ruby version @JagdeepSingh – umang-malhotra May 03 '18 at 13:06
-
I am afraid i don't know more here. You will have to research. :) – Jagdeep Singh May 03 '18 at 13:10
-
Why are you afraid @JagdeepSingh, Is it because of my DP :-p – umang-malhotra May 03 '18 at 13:37
1 Answers
0
or-tools uses SWIG to wrap it for those other languages. You could probably reuse the code for Ruby. A few classes are probably easy, the whole API probably non-trivial.
Otherwise you could go through one of the supported languages -With jruby for example.

Olav
- 1,758
- 4
- 27
- 49