My Google OR-tools / CP Solver page

Google Optimization Tools (Operations Research Tools developed at Google, a.k.a. Google CP Solver, a.k.a. Google or-tools) consists of support for constraint programming and LP/MIP.

Project group: or-tools-discuss

The solver is available via Git: https://github.com/google/or-tools. Please see Installing OR-Tools on how to install, required libraries etc.

Examples (Git repository): github.com/google/or-tools/tree/stable/examples.
Many of my older CP models are available in the OR-tools repo: Contrib.

References

See Google Operations Research C++ Reference .

See below for my Python models using the new CP-SAT solver.
See below for my Python models using the old CP solver.
See below for my Java models.
See below for my LP/MIP models.
See further below for my C# models.


All these models are available from my GitHub repo github.com/hakank/hakank/tree/master/google_or_tools as well.

My OR-tools / Python models for the new CP-SAT solver

Here are my Python models for OR-tools CP-SAT solver. Most are ports from my old
OR-tools CP solver models adjusted for the CP-SAT solver; they has the same filename with "_sat" added.

Many of these models imports cp_sat_utils.py which includes the following utilities / constraints (decompositions): Here are the models:

My OR-tools / Python models for the old CP solver

Here are my Google CP Solver / Python models (OR-tools' old CP solver). All program files contains more information about the problem as well as references to other implementations of the same problem. The first blog posts about these models are
A first look at Google CP Solver/Python (Google or-tools), Improvements of some Google CP Solver models, and Some new Google CP Solver/Python models.
Most of these model has now been ported to the newer CP-SAT solver, see above.

My Google CP Solver / Java models

2011-03-17: Google released a Java interface to the CP Solver, and I have just started to implement models for this, which is basically a port of some Python models.
2011-03-29: Blogged about it in
A first look at Google or-tools' Java interface

To simplify my life, all examples has been placed in the package com.google.ortools.constraintsolver.samples. Some (if not all) models is also available at the Git repo .

My Google or-tools LP/MIP models in Python

2011-03-31: Blogged
Google or-tools has released support for LP/IP

My OR-tools C# models (old CP system)

2012-02-05: Blogged about this in
A first look at Google or-tools C# interface

Please note that I'm developing these programs in Mono (under Ubuntu Linux 11.10, 64-bit); they will hopefully also run on other .NET/Mono platforms. Quite a few are rather faitful ports from the Java versions, and some (but not that faithful ports) from the Python models.

Many (if not all) of these models has been pushed to the or-tools Git repo

For compiling and running these models using Mono, something like this should work:
  $ export OR_TOOLS=../or-tools/svn/or-tools-read-only
  $ export MONO_PATH=$MONO_PATH:$OR_TOOLS
  $ mono-csc -lib:$OR_TOOLS /r:Google.OrTools.ConstraintSolver.dll model.cs
  $ ./model.exe

Also, see my other pages about constraint programming systems:
* My Constraint Programming Blog, especially the Google CP Solver category
* Constraint Programming
* Common constraint programming problems
* My MiniZinc page
* My Zinc page
* My JaCoP page
* My JaCoP/Scala page
* My Choco page
* My Gecode/R page
* My Comet page
* My Gecode page
* My ECLiPSe page
* My Tailor/Essence' page
* My SICStus Prolog page
* My OscaR page
* My JSR-331 page
* My Numberjack page
* My AIMMS+CP page
* My B-Prolog page
* My Choco3 page
* My Picat page
* My z3/python page
* My SWI-Prolog page

Back to my homepage
Created by Hakan Kjellerstrand hakank@gmail.com