1.7. The Google or-tools library

The Google or-tools open source library was publicly released in September 2010. Since then it has evolved to be a huge project containing more than 65K lines of code written in C++[1]! The constraint programming part - including the important vehicle routing engine - has the lion’s share with approximatively 55K lines of code. That’s right, the or-tools library is really a constraint programming library. More specifically, a finite-domain constraint programming library[2].

Contrary to other constraint programming libraries, our goal is not to provide a complete set of algorithms, constraints, etc. We use our code internally at Google and we adapt it to our needs. From time to time we open source some parts and share it with the world. As our goal is to solve specific (and sometimes really challenging problems), we use a generic and lightweight approach. We believe that specialized problems need specialized code. Our library aims at simplicity because simple code, when well-written, is efficient and can be easily adapted to solve complex problems. As an example of this lightweight approach, we don’t really offer a matrix API. If you look at the results of the 2014 MiniZinc challenge, it seems our approach is not too bad[3].

That said, our library is quite robust and can be used to solve a trove of problems. If you are missing a known constraint programming algorithm, ask us on the OR Tools Discussion group, we might have what you are looking for in store or even surprise you and implement it if we see a good fit for our needs.

Footnotes

[1]Beside C++, you can use the library through SWIG in Python, Java, and .NET (using mono on non Windows platforms).
[2]Most constraint programming libraries and frameworks use finite domains. Actually, if you use a computer, you must - in a way or another - use a finite domain.
[3]

Yes, our constraint solver can read FlatZinc models. Lear more about how to use the FlatZinc API in the section Using FlatZinc.




























Google or-tools
open source library

User's Manual

Google search

Search:

Welcome

Tutorial examples

Current chapter

1. Introduction to constraint programming

Previous section

1.6. It’s always a matter of tradeoffs

Next section

1.8. The content of the manual