Changelogs » Ortools



Deprecation of Python 2.7
- **Important Notice** Python 2.7 will be obsolete by the end of 2019. There will be at most one more release supporting python 2.7.

Platform changes
- Ubuntu 18.10 -> Ubuntu 19.04
- Support compilation from sources on Visual Studio 2019
- Dropped support for python 3.5 on Windows.

Dependencies updates

- CBC 2.10.1 -> 2.10.3
- Protobuf 3.7.1 -> 3.8.0


- Multiple improvements focusing on the search, the implementation of the parallelism, and the connection to the linear relaxation
- Added `LinearExpr.Sum()` and `LinearExpr.ScalProd()` APIs in python
- Deprecate `IntVar[].Sum()` and `IntVar[].ScalProd()` APIs in C
- C++: remove `SolveWithModel` as it was a duplicate of `SolveCpModel()`
- add `CpModel.addGreaterThan` and `CpModel.addLessThan` methods to the Java API

Linear Solver:

- Add `MPSolver.SetHint()` in non C++ languages (Supported by SCIP, Gurobi)
- Add `MPSolver.SetNumThreads()` for non C++ languages (supported by CBC, Gurobi, SCIP)
- Rewrite support for scip 6.0.1

Reference manuals


- We have added doxygen and pdoc3 based reference manuals for all languages and all tools (algorithms, routing, graph, linear_solver, and CP-SAT).
- Documentation is complete for C++ (all products) and CP-SAT (C++, Python, Java).
- We are in the process of exporting all C++ documentation to Python and Java.
- .NET documentation is lacking, and we have no solution in the foreseeable future to improve this. We have kept it as it still shows the available API.
- Some non C++ APIs show the link to SWIG through the use of SWIGTYPE_* object in the signatures. We will eliminate all these in the future. Please consider that these methods are not usable.


Updates to required dependencies
* Glog 0.3.5 -> 0.4.0
* Protobuf 3.6.1 -> 3.7.1
* Cbc 2.9.9 -> 2.10.1
* Cgl 0.59.10 -> 0.60.1
* Clp 1.16.11 -> 1.77.1
* Osi 0.107.9 -> 0.108.1
* Coinutils 2.10.14 -> 2.11.1

* Breaking change in the CP-SAT API in Python, Java and .Net.
see doc [here](
* Searching for all solution in a satisfiability problem now returns `OPTIMAL` when search is finished.
* The C++ `CpModel Solve()` method and its variations now take a `CpModelProto` as input. It is created using the `CpModel.Build()` method. So the right call is `CpSolverResponse r = Solve(cp_model.Build());`

Linear solver
* Known bug: the ExportModelAsLpFormat and ExportModelAsMpsFormat methods have been accidentally removed in the Python linear solver module.
Added Support
* Fix SWIG 4.0 compatibility.


Updates to required dependencies
* GFlags 2.2.1 -> 2.2.2

New required dependencies
* Added [abseil-cpp]( (set to `SHA1:bf29470`) as required dependency.

Drop Support
* Drop support of **Visual C++ 2015**
* Visual C++ 2015 is no longer able to compile OR-Tools source code.
* Drop support of Python **3.4** on Linux
* abseil-cpp headers conflict with `Python.h` header see [abseil-cpp \235](
* Drop support Ubuntu 14.04 LTS
* need C++11 `std::vector::erase(const_iterator)` not availalbe with GCC 4.8 (see 1139)

* Use of `IndexManager` to do the conversion between `NodeIndex` and `Index` for **all** API.
* Now, transit callback must be registered first, then you must use the associated id in `AddDimension()`/`SetArcCostXXX()`
Here some examples:
* [](
* [](
* [](
* [Tsp.cs](
* Change callback API
* Add support for lambda callback in .Net using `delegate` function.
* Add support for lambda callback in Java using `functionalInterface`.
* All Java API are now in conformance with the Google Java Style Guide (i.e. lower camel case for methods).
* Expose enum class PickupAndDeliveryPolicy in all languages, sample [here](
* **WARNING** Manylinux `ortools` wheel package have been build against `manylinux2010` (see [PEP 571]( since *abseil-cpp* require `glibc >= 2.12`. But since `pip` does not support `manylinux2010` [platform compatibility tag]( yet, package and platform tag has been reset to `manylinux1` (see [PEP 513](

* Rename few enum after windows clash (e.g. `DeleteFile`, `FLOAT` are macro in MSVC).
* Fix utils/file_nonport compilation on windows.
* Remove non compact table constraints in the original CP solver.
* Add optional_boolean sub-proto.
* Fix ownership for callback in Java and .Net.


Updates to required dependencies
* GFlags 2.2.1 -> 2.2.2
* Added [abseil-cpp]( (set SHA1 to 45221cc + CMake patch) as required dependency.

Drop Support
* Drop support of VS 2015
* Drop support of Python 3.4 on Linux since abseil-cpp headers conflict with Python.h include see [abseil-cpp \235](

* **WARNING** Manylinux `ortools` wheel package have been build against `manylinux2010` (see [PEP 571]( since *abseil-cpp* require `glibc >= 2.12`. But since `pip` does not support `manylinux2010` [platform compatibility tag]( yet, package and platform tag has been reset to `manylinux1`.
* Since it is a pre-release to install binary you must use:
python -m pip install --user ortools==7.0b6150

otherwise last stable version `v6.10` will be installed...

* Use of `IndexManager` to do the conversion between `NodeIndex` and `Index` for **all** API.
* Now, transit callback are registered first, then you must use the associated id in `AddDimension()`/`SetArcCostXXX()`
Here some examples:
* [](
* [](
* [](
* [tsp.cs](

* Rename few enum after windows clash (e.g. `NO_ERROR` is a macro on MSVC)
* Fix utils/file_nonport compilation on windows
* Remove non compact table constraints
* Add optional_boolean sub-proto


- SCIP 4.0.1 -> 6.0.0

We have reworked the build and run targets
- To build examples, you must use the `build` target and `SOURCE` variable.
This will replace the `ccc`, `cjava` and `cdotnet` targets.
e.g. for a C++ example:
make build SOURCE=examples/cpp/

- To run examples, you must use the `run` target and `SOURCE` variable.
This will replace the `rcc`, `rjava` and `rdotnet` targets.
e.g. for a C++ example:
make run SOURCE=examples/cpp/</pre>

CP-SAT Solver
Update the API
- Add C++ CP-SAT `CpModelBuilder` API.

- Move community examples to `examples/contrib`
- Move some examples to `ortools/<component>/samples` (e.g.


* Fix Release script
* Add missing API on CP-SAT Java interface


Updated dependencies
* Protobuf 3.5.1 -> 3.6.1
* [Optional] SCIP 4.0 -> 6.0

* Breaking change API. Full documentation [here](ortools/sat/doc/
* Expose `ModelStats` and `CpSolverResponseStats` in Python, Java and C.
* Rename `SolveWithSolutionObserver` to `SolveWithSolutionCallback` in Python (841).
* Rename `NewSolution` to `OnSolutionCallback` on solution callback in Python.
Make sure to call super in `__init__` e.g.:
class MySolutionCallback(cp_model.CpSolverSolutionCallback):
def __init__(self):
self.__solution_count = 0

def OnSolutionCallback(self):
print('Solution {}, time = {}s, objective = {}, makespan = {}'.format(
self.__solution_count += 1

* Expose StopSearch on solution callback in Python, Java and C. Documentation [here](ortools/sat/doc/solver.mdstopping-search-early).
* Improve Python docstring documentation. Documentation [here](ortools/sat/doc/
* Complete Java implementation of the solver interface and cookbook updated.
* Implement modulo.
* Change implementation of reservoir: Add API with boolean to specify optional draining/filling events.

Linear Solver
* Expose `InterruptSolve` in Java and C.

Constraint Solver
* Expose `SolutionCollector` director in C.

* Add support for `Python 3.7`.
* When compiling from source: prefer `python3` over `python2` when detecting python.

* Complete rewrite of the .NET layer.
* Provide a `Google.OrTools` NetStandard 2.0 Nuget package compatible with [Runtime IDentifier]( `win-x64`, `linux-x64` and `osx-x64`.
* Provide a `Google.OrTools.FSharp` Nuget package.
* Add project file for all .Net examples.
* Update all F script examples (.fsx) to regular F project (.fs).
* Add documentation on .Net package build generation [here](ortools/dotnet).

* Add support for sets in Flatzinc (using `nosets.mzn`)

* Add support for Binder Thanks to [Kevin Mader](
* Make DecisionVisitor a director type in Java bindings Thanks to [Jeremy Apthorp](

Full list of commits since v6.8 [here](


* CP-SAT various bug fixes, performance improvements, and doc updates
* GLOP performance improvements
* Use dynamic dependencies on UNIX (697)
* Use Cbc from github mirror (684)
* now depends on `cbc`, `cgl`, `clp`, `osi` and `coinnutils` github repos
* Rework and fix some VRP python examples.
* Migration to netstandard2.0 for .Net support (668)
* i.e. use of `dotnet` cli instead of `mono`/`msc`/`fsharpc` (not needed anymore)
* **/!\\ require .NetCore SDK >= 302 /!\\**
* Now `install_cc` use `$(DESTDIR)$(prefix)` as destination prefix (`prefix = /usr/local` on UNIX)
* Add `install_python` target in Makefile to pip install locally build python package
* Makefile cleaning: should be more robust
* docker rework and add tests to check archives
* Remove data example from archive
* add data archive
* Rework archive Makefile
* add `detect`, `test_cc`, `test_java`, `test_dotnet`, `cc`, `java`, `dotnet` targets like the Makefile(s) used to build from source


Mostly to fix C++/C/Java binary archives issue

* Don't use rm on windows when checking shell
* Replace some CHECK_NOTNULL by CHECK
* Fixing all remaining StrCat -> absl::StrCat
* Fix all remaining StrAppend -> absl::StrAppend
* Fix compile error in in binary archive (709)
* Fix missing 'ortools/util/optional_boolean.pb.h' files in binary archive (710)
* Fix missnamed mono binary in osx binary archive Makefile (712)


Fix Protobuf version on UNIX:  ~v3.1.0-alpha-1 (3d9d1a1255) -> v3.5.1


Update to required dependencies
* Protobuf 3.5.0 -> 3.5.1

* Refactor base to prepare abseil-cpp integration.
* Add some CI jobs.
* Add `make install_python` target.
* Use `JAVA_HOME` instead of `JDK_DIRECTORY`

* Performance improvement.
* Improves Python API.
* Add C API aka CpSolver.cs (EXPERIMENTAL).

* Code refactoring.
* Performance improvement.

* Add C++ OR-Tools CMake support.
* Be able to build OR-Tools as a standalone CMake project.
* Be able to incorporate OR-Tools into an Existing CMake project.
* Add Python OR-Tools CMake based build.
* Generate python package (wheel) using CMake.

* Fix winsock2.h redefinition on windows Thanks to  <a href="">Florent Tollin de Rivarol</a>.
* Add F Support (EXPERIMENTAL) Thanks to <a href="">Matthew Moore</a>.
Note: only available with Makefile builder.
* Add .NET Standard Support (EXPERIMENTAL) Thanks to <a href="">Ziad Elmalki</a>.
Note: only available with Makefile builder

Full list of commits since v6.6 [here](


Updates to required dependencies
* Protobuf to 3.3.0 -> 3.5.0.
* gflags to 2.2.0 -> 2.2.1.
* CBC 2.9.8 -> 2.9.9.
* Add Python module six (1.10) as required dependency for Python.

* Pull request 494 Name refactoring. Adding comments for IntelliSense in some editors.
Thanks to <a href="">Matthew Moore</a>.
* Pull request 516 Instruction for F standalone binary.
Thanks to <a href="">Matthew Moore</a>.
* Improve precision in Glop.

SAT Solver
* Improve internal SAT solver, Fix various bugs.
* Add a VRP constraint to the SAT solver, linked to the LP solver.
* Change the solution observer in the SAT solver to take a CpSolverResponse as a parameter.
* Improve the use of Glop in SAT Solver.
* Speedup SAT-LP connection.</li>
* Add Reservoir constraint to the SAT cp_model protobuf format.

* Introduction of the SAT API in Python.
* Code in <a href="">ortools/sat/python/</a>.
* Add examples in <a href="">examples/python/</a>:
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>
* <a href=""></a>

* Add support for <a href="">IPython notebook.</a>
* Python examples are exported to notebooks and available in <a href="">examples/notebook</a>.

* Rewrite <a href="">rcpsp_parser</a> to use ProtoBuf format to store the problem.
* Improve RCPSP parser.

Full list of commits since v6.5 [here](




Change in platforms

- Pypi modules on Linux platforms are now delivered as wheel files using the manylinux1 tag. Thanks to Federico Ficarelli. With this change, we have backtracked the per-linux modules introduced in the July 2017 release.

New features

- Improved scaling method used inside GLOP.
- Fix wrapping of evaluators in the C routing library. Thanks to DevNamedZed.
- Improve the performance of the flatzinc presolve for large models.
- Use the SAT backed for flatzinc by default.
- Improve performance of the Core based approach for the sat solver.
- Fix bug in the linear assignment algorithm that was failing incorrectly.
- Added F examples in ortools/examples/fsharp. (Thanks to Matthew Moore).
- Remove check for positive penalties in the routing library.




Change in platforms

- We now support multiple Linux binary distributions (Ubuntu 14.04, 16.04, 17.04, CentOS 9, Debian 9).
- Pypi modules on Linux platforms now include a tag that describes the distribution (ubuntu-14.04, ubuntu-16.04, ubuntu-17.04, centos-7, debian-9).
- Python wheel files for Linux are now available to download in the github release page.

New features

We have added support for Docker to build linux artifacts. Go to or-tools/tools/docker and look at the Makefile to see possible targets (make archive, make pypi, and make pypi3). These commands will create an export subdirectory and add binary artifacts in it.




New directory structure in C++

We have changed the source/include structure of or-tools when using C++. The goal is to provide better encapsulation of the C++ include files. It also has the benefit of aligning the C++ and the python directory structures.
- src/ has been renamed ortools/.
- All include command in C++ files now have the prefix ortools added. include "constraint/constraint_solver.h" is now include "ortools/constraint/constraint_solver.h".

New features

Bazel support

You can now build or-tools with bazel, Google's build tool. It works on Linux and Mac OS X. After downloading bazel version 0.4.5 or later, change directory to or-tools and build the examples: bazel build examples/cpp/....


We have implemented the support for breaks (e.g., vehicle downtime due to drivers eating lunch)in the routing library. This feature is shown in the [](  example.

SCIP support

The linear solver wrapper now support SCIP 4.0. You now need to build SCIP first, and then tell or-tools that you will use it. Instructions are available [here](

GLPK support

We have also changed the way with build with [GLPK]( See here.


- We have removed all usage of hash_map, hash_set in the C++ codebase as they are deprecated. They were replaced by unordered_map and unordered_set from the STL.

- Cleanup of the C makefiles, courtesy of Michael Powell.


New Features

-   Introduced simpler procedures for installing or-tools, either from binary distributions or from source code. See [Installing or-tools]( for more information.

-   Implemented an algorithm to compute the Held-Karp lower bound for symmetric Traveling Salesman Problems. This enables you to compute an upper bound to the gap between the cost of a potentially non-optimal solution and the cost of the optimal solution.
-   Added a new method to the vehicle routing library, [`RoutingModel::SetBreakIntervalsOfVehicle`](, which lets you add _break_ intervals — time periods when a vehicle cannot perform any tasks (such as traveling or visiting a node). For an example that uses this option, see

-   Added support for more data formats in the parser for the [Project Scheduling Library](

Sat solver
-   The Sat solver's cumulative constraint now accepts optional intervals, created with the [`NewOptionalInterval`]( method. For an example, see
-   You can now solve a maximum satisfiability problem by specifying the objective as a weighted sum of literals. It is no longer necessary to create an intermediate integer variable.

Performance improvements
-   Sat solver — Improved performance of the Sat solver, particularly for the cumulative constraint.
-   Glop solver— Improved numerical robustness of the Glop solver, which now returns even more accurate solutions to hard numerical problems.
-   Flatzinc solver
-   Greatly improved performance of the Sat backend for the flatzinc interpreter.
-   Simplified the C flatzinc interface. For an example of the new interface, see

Bug Fixes
-   Using the [`PathCheapestArc`]( heuristic on routing models with a single vehicle and side constraints would sometimes cause the solver to run for an excessively long time. This has been fixed by properly taking into account side-constraints.
-   In Java, the routing solver would sometimes crash when solving vehicle routing problems. This has been fixed in the latest release.



November 2016

Running examples
-   Introduced language specific targets to compile and run the examples. Please check this [page](/optimization/run_programs) for more details.

-   Added support for constraint programming.
-   Implemented the [diffn](, [cumulative]( , [circuit and subcircuit]( constraints.
-   Implemented [the overlode checker]( on the basis of [Max Energy Filtering Algorithm for Discrete Cumulative Constraint.](
-   Implemented the [all different bound consistent propagator]( which implements better propagation for the AllDifferent constraint.

-   Implemented a [SAT solver]( for FlatZinc problems.

Constraint Solver
-   Implemented the following constraints :
-   [atMost]( Sets an upper bound to the count of variables that are equal to a given value.
-   [MakePathPrecedenceConstraint]( and [MakePathTransitPrecedenceConstraint]( Implement the precedence constraint for a set of pairs.

-   Implemented [AddAtSolutionCallback](, which is a callback called each time a solution is found during the search.
-   Removed the RoutingModel depot-less constructors. Specifying at least one depot in the routing model is now mandatory.


- Sat
- Extended scheduling API and modified examples (weighted_tardiness_sat, and jobshop_sat) to use it.
- Graph
- Added iterator traits to Graph classes.
- Or-tools distribution
- Nuget package is supported again.


Constraint solver
- solver
- Implemented  NotBetween method to constrain a variable to be
outside a given interval.
- routing
- Added a parse of the model to check existing NotMember constraints as shown in this [example]("), and use them in local search filters.
- Added local search profiling.
- Fix for local moves.

Linear solver
- Fixed SCIP status reporting.

- Implemented [SolveWithPresolve]( L373) method to simplify the usage of the SAT presolver.
- Regrouped search utils in src/sat/util.h|cc.
- Implemented SMT (Lazy Clause Generation) scheduling constraints: see []( and [](

- Improved performance by exploiting sparsity in more stages of computation.

- Fixed bugs found by minizinc challenge.

- Continued simplification of templates in iterators.

Or-tools distribution
- C assemblies are now strongly named by default.
- Upgraded to Protobuf3.0.0.
- Added a Python [script]( to check or-tools archive dependencies.


We’re happy to announce the release of July 2016 version of or-tools. Here's what's new with this release:

Constraint solver:
- Routing
- A disjunction can now be defined with a cardinality, which is the maximum number of nodes that can be active within this disjunction. For example, if you add a disjunction with n nodes and a cardinality of k, then k nodes among the n nodes are allowed to be active. You can use the new definition of [AddDisjunction]( to do this.
- Added support for multiple disjunctions per node. For example, you can now add a node, N1, to many disjunctions (D1..Dm). This increases its chance of being active within any one of them.
Introduced a faster routing search algorithm for problems related to disjunct time windows.
- Added constraint solver parameters to routing model parameters and log_search to routing search parameters.
- Local search algorithm is faster with resolving problems with disjoint time windows. Please see []( example.

Glop (linear optimization):
- Introduced a faster Simplex Algorithm.

Or-tools distribution:
- One archive per platform, rather than individual archives for each of C++, Java, and C. Python archives are still hosted on pypi.
- On pypi, we have switched to wheel (.whl) modules on Mac OS X and Windows.
Introduced a MAJOR.MINOR numbering schema. These numbers are used the archive names, the version stored in Mac OS X shared libraries, python modules, .NET assemblies. The first version we are releasing is with this schema is v4.2

- c++: getting rid of filelinereader in examples
- data: Add single machine scheduling problems

- Remove unused core method (Resolution nodes)
- Added drat writer to checks proofs on unsatisfiability
- Add preprocessor

- Lots of cleanup in the header files.
- Please check the new documentation at

- Add new neighborhoods

Constraint Solver:
- Removed most of the instances of the callbacks (src/base/callback.h) from the CP library
- Added NotMemberCt (variable cannot belong to a set of intervals)

Routing library:
- INCOMPATIBLE CHANGE: To specify the capacity of vehicles in the AddDimensionWithVehicleCapacity, you now need to pass an array (vector in c++) instead of a callback.

- Change internal representation of sparse matrix
- performance improvements

- Added A\* contributed code
- Rewrite Dijkstra and Bellman-Ford algorithms to replace callbacks by std::function (C++)
- Change API of different graph implementation when iterating over arcs and nodes.

Main changes:
- Use protobuf instead of flags in the Constraint Programming and routing libraries.
- See for details.

- Broke compatibility on the Large Neighborhood Search in the CP solver
(see examples/cpp/, examples/python/, examples/csharp/csls_api.cs, and
examples/com/google/ortools/sample/ to see the new API).
- Cleaned the the python wrapping. Support custom decision in the CP solver (see examples/test/ to see the API in action).
- Various improvements and bug fixes.

Release of OR-Tools
September 2015

What's new:
- First release on github. Files will be stored there from now on.
- Added binary archives for the flatzinc interpreter (see
- Contains a few fixes over the version used in the challenge