I'd like to test how good/fast OR-Tools is in finding hamiltonian paths on some (big) directed graphs. But I can't find simple enough (for me) examples.
Something like these ones (or even simpler), usuable by beginners like me:
- https://developers.google.com/optimization/flow/maxflow
- https://developers.google.com/optimization/cp/cryptarithmetic
- https://developers.google.com/optimization/cp/queens
I made a very basic example to illustrate my question, could someone show me how to code it with OR-tools (a Python example would be easier for me, but I’ll probably be able to understand an example in another language):
Given this directed graph:
I want OR-tools to give me the hamiltonian path connecting all the vertices (that is: A->C->B) :