OR-Tools Release Notes

This page lists changes to OR-Tools, including new features, bug fixes, and improvements to the code and installation procedures.

If you experience problems installing OR-Tools, check the Troubleshooting section in the OR-Tools installation instructions. If your problem is not listed there, check the issues on GitHub, or feel free to open a new one, and we will be happy to provide you with assistance.

The following are the release notes for OR-Tools, beginning with the latest release.

July 2019

Announcing the release of OR-Tools v7.2

We have released OR-Tools v7.2. To update your version, see the appropriate section of OR-Tools Installation.

Platform changes

  • We're deprecating support for Python 2.7 to align with Google's move to Python 3. There will be at most one more release of OR-Tools supporting Python 2.7.
  • Ubuntu 18.10 updated to Ubuntu 19.04.
  • Added support for compilation from sources on Visual Studio 2019.
  • Python 3.5 is no longer supported on Windows; please use Python 3.6 or higher.

Updates to dependencies

  • We now target CBC 2.10.3.
  • We now target Protobuf 3.8.0.

CP-SAT

  • We have made multiple improvements to search, parallelism, and the linear relaxation.
  • Added LinearExpr.Sum() and LinearExpr.ScalProd() APIs in Python.
  • Deprecated IntVar[].Sum() and IntVar[].ScalProd() APIs in C#.
  • C++: Removed SolveWithModel() as it was a duplicate of SolveCpModel().
  • Added CpModel.addGreaterThan() and CpModel.addLessThan() methods to the Java API.

Linear solver

  • Added MPSolver.SetHint() for Python, Java, and C# (supported by SCIP and Gurobi).
  • Added MPSolver.SetNumThreads() for Python, Java, and C# (supported by CBC, Gurobi, and SCIP)
  • Rewrote support for SCIP 6.0.1.

Reference documentation

  • We have added doxygen and pdoc3 based reference manuals for all languages and all tools (algorithms, routing, graph, linear_solver, and CP-SAT). See OR-Tools Reference Manuals.
  • Reference 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.

May 2019

Announcing the release of OR-Tools v7.1

We have released OR-Tools v7.1. To update your version, see the appropriate section of OR-Tools Installation.

Changes to required dependencies

OR-Tools v7.1 has the following new and updated dependencies:

  • glog v0.3.5 updated to v0.4.0
  • protobuf v3.6.1 updated to v3.7.1
  • Cbc 2.9.9 updated to 2.10.1
  • Cgl 0.59.10 updated to 0.60.1
  • Clp 1.16.11 updated to 1.77.1
  • Osi 0.107.9 updated to 0.108.1
  • CoinUtils 2.10.14 updated to 2.11.1

CP-SAT API changes

The following sections describe changes to the CP-SAT API in OR-Tools 7.1.

Using Domain to create variables

The following examples show how to create an integer variable with non-contiguous domains. This replace the removed method NewEnumeratedIntVar(). Here, the variable x can be any of 1, 3, 4, or 6:

Python

model.NewIntVarFromDomain(cp_model.Domain.FromValues([1, 3, 4, 6]), 'x')

C++

model.NewIntVar(Domain::FromValues({1, 3, 4, 6}));

Java

model.newIntVarFromDomain(Domain.fromValues(new long[] {1, 3, 4, 6}), "x");

C#

model.NewIntVarFromDomain(Domain.FromValues(new long[] {1, 3, 4, 6}), "x");
Variables can also be created using a list of intervals. Below, the variable x is constrained to be 1, 2, 4, 5, or 6:

Python

model.NewIntVarFromDomain(cp_model.Domain.FromIntervals([[1, 2], [4, 6]]), 'x')

C++

model.NewIntVar(Domain::FromIntervals({ {1, 2}, {4, 6} }));

Java

model.newIntVarFromDomain(Domain.fromIntervals(new long[][] { {1, 2}, {4, 6} }), "x");

C#

model.NewIntVarFromDomain(Domain.FromIntervals(new long[][] { new long[] {1, 2}, new long[] {4, 6} }), "x");

Using Domain in linear expression

The following examples show how to limit a linear expression on a non-contiguous domain. Here, the linear expression linear_expr is defined on 5, 6, 8, 9 and 10:

Python

model.AddLinearExpressionInDomain(linear_expr, cp_model.Domain.FromIntervals([(5, 6), (8, 10)]))

C++

model.AddLinearConstraint(linear_expr, Domain::FromIntervals({ {5, 6}, {8, 10} }))

Java

model.addLinearExpressionInDomain(linear_expr, Domain.fromIntervals(new long[][] { {5, 6}, {8, 10} }))

C#

model.AddLinearExpressionInDomain(linear_expr, Domain.FromIntervals(new long[][] {new long[] {5, 6}, new long[] {8, 10} }));

Using linear expression helpers

The following examples show how to use helper methods to create sums and scalar products. Here, an examples where we want x + y == 20 and 4 * x + 2 * y = 56:

Python

model.Add(x + y == 20)
model.Add(4 * x + 2 * y == 56)

C++

cp_model.AddEquality(LinearExpr::Sum({x, y}), 20);
cp_model.AddEquality(LinearExpr::ScalProd({x, y}, {4, 2}), 56);

Java

model.addEquality(LinearExpr.sum(new IntVar[] {x, y}), 20);
model.addEquality(LinearExpr.scalProd(new IntVar[] {x, y}, new long[] {4, 2}), 56);

C#

model.Add(x + y == 20);
model.Add(4 * x + 2 * y == 56);

March 2019

Announcing the release of OR-Tools v7.0

We have released OR-Tools v7.0. To update your version, see the appropriate section of OR-Tools Installation.

Changes to supported platforms

OR-Tools v7.0 no longer supports the following platforms:

  • Visual C++ 2015
  • Ubuntu 14.04
  • Python 3.4 on Linux

If you are using one of these platforms, you can still install OR-Tools v6.10.

Changes to required dependencies

OR-Tools v7.0 has the following new and updated dependencies:

The following sections describe the new features and improvements in OR-Tools 7.0.

New index manager for routing programs

In OR-Tools v7.0, vehicle routing programs must use the new RoutingIndexManager. This ensures that the standard indices for locations are consistent with the internal indices used by the solver, and helps prevent errors in your code.

Note: The standard location indices are 0 to N-1, where N is the number of locations (including the depot). For technical reasons, the solver's internal location indices might be outside that range.

The new RoutingIndexManager requires some minor changes to routing programs, which are described in the following sections:

Include/import RoutingIndexManager

In OR-Tools 7.0, routing programs in C++ and Java must include or import the RoutingIndexManager as shown in the examples below:

C++

#include "ortools/constraint_solver/routing_index_manager.h"

Java

import com.google.ortools.constraintsolver.RoutingIndexManager;

Python and C# imports are unchanged.

Declare RoutingIndexManager

In OR-Tools v7.0, routing programs must declare the RoutingIndexManager and create the routing model, as shown in the following examples:

Python

manager = pywrapcp.RoutingIndexManager(num_locations, num_vehicles, depot)
routing = pywrapcp.RoutingModel(manager)

C++

RoutingIndexManager manager(num_locations, num_vehicles, depot);
RoutingModel routing(manager);

Java

RoutingIndexManager manager = new RoutingIndexManager(numLocations, numVehicles, depot);
RoutingModel routing = new RoutingModel(manager);

C#

RoutingIndexManager manager = new RoutingIndexManager(numLocations, numVehicles, depot);
RoutingModel routing = new RoutingModel(manager);

The arguments for RoutingIndexManager are:

  • The number of locations
  • The number of vehicles
  • The index of the depot (start and end location for all vehicles)

Note: In previous versions, these arguments were passed directly to RoutingModel, instead of RoutingIndexManager.

Callbacks

In OR-Tools v7.0, you need to use the RoutingIndexManager to create callbacks, such as the distance callback, which you then pass to the solver. The following examples show how to create a distance callback.

Python

    def distance_callback(from_index, to_index):
        """Returns the distance between the two nodes."""
        # Convert from routing variable Index to distance matrix NodeIndex.
        from_node = manager.IndexToNode(from_index)
        to_node = manager.IndexToNode(to_index)
        return data['distance_matrix'][from_node][to_node]

    transit_callback_index = routing.RegisterTransitCallback(distance_callback)
    routing.SetArcCostEvaluatorOfAllVehicles(transit_callback_index)

C++

  const int transit_callback_index = routing.RegisterTransitCallback(
      [&data, &manager](int64 from_index, int64 to_index) -> int64 {
        // Convert from routing variable Index to distance matrix NodeIndex.
        auto from_node = manager.IndexToNode(from_index).value();
        auto to_node = manager.IndexToNode(to_index).value();
        return data.distance_matrix[from_node][to_node];
      });
  routing.SetArcCostEvaluatorOfAllVehicles(transit_callback_index);

Java

    final int transitCallbackIndex =
        routing.registerTransitCallback((long fromIndex, long toIndex) -> {
          // Convert from routing variable Index to user NodeIndex.
          int fromNode = manager.indexToNode(fromIndex);
          int toNode = manager.indexToNode(toIndex);
          return data.distanceMatrix[fromNode][toNode];
        });
    routing.setArcCostEvaluatorOfAllVehicles(transitCallbackIndex);

C#

    int transitCallbackIndex = routing.RegisterTransitCallback(
      (long fromIndex, long toIndex) => {
        // Convert from routing variable Index to distance matrix NodeIndex.
        var fromNode = manager.IndexToNode(fromIndex);
        var toNode = manager.IndexToNode(toIndex);
        return data.DistanceMatrix[fromNode, toNode]; }
    );
    routing.SetArcCostEvaluatorOfAllVehicles(transitCallbackIndex);

The method IndexToNode converts the internal location indices used by the solver to the standard indices for the distance matrix.

Instead of passing the callback directly to to solver, as in previous versions, in v7.0 you first create transit callback index, a reference to the callback, and pass that to the solver (in this case by SetArcCostEvaluatorOfAllVehicles).

Dimensions

The following examples show how to create a dimension for demands and capacities, which is used to solve the capacitated vehicle routing problem.

Python

    def demand_callback(from_index):
        """Returns the demand of the node."""
        # Convert from routing variable Index to demands NodeIndex.
        from_node = manager.IndexToNode(from_index)
        return data['demands'][from_node]

    demand_callback_index = routing.RegisterUnaryTransitCallback(
        demand_callback)
    routing.AddDimensionWithVehicleCapacity(
        demand_callback_index,
        0,  # null capacity slack
        data['vehicle_capacities'],  # vehicle maximum capacities
        True,  # start cumul to zero
        'Capacity')

C++

  const int demand_callback_index = routing.RegisterUnaryTransitCallback(
      [&data, &manager](int64 from_index) -> int64 {
        // Convert from routing variable Index to demand NodeIndex.
        int from_node = manager.IndexToNode(from_index).value();
        return data.demands[from_node];
      });
  routing.AddDimensionWithVehicleCapacity(
      demand_callback_index,    // transit callback index
      int64{0},                 // null capacity slack
      data.vehicle_capacities,  // vehicle maximum capacities
      true,                     // start cumul to zero
      "Capacity");

Java

    final int demandCallbackIndex = routing.registerUnaryTransitCallback((long fromIndex) -> {
      // Convert from routing variable Index to user NodeIndex.
      int fromNode = manager.indexToNode(fromIndex);
      return data.demands[fromNode];
    });
    routing.addDimensionWithVehicleCapacity(demandCallbackIndex, 0, // null capacity slack
        data.vehicleCapacities, // vehicle maximum capacities
        true, // start cumul to zero
        "Capacity");

C#

    int demandCallbackIndex = routing.RegisterUnaryTransitCallback(
      (long fromIndex) => {
        // Convert from routing variable Index to demand NodeIndex.
        var fromNode = manager.IndexToNode(fromIndex);
        return data.Demands[fromNode]; }
    );
    routing.AddDimensionWithVehicleCapacity(
      demandCallbackIndex, 0,  // null capacity slack
      data.VehicleCapacities,   // vehicle maximum capacities
      true,                      // start cumul to zero
      "Capacity");

Printing solutions

In OR-Tools v7.0, you must use the RoutingIndexManager to display the vehicle routes in a solution. The following examples show how to print solutions in all of the supported languages.

Python

def print_solution(manager, routing, assignment):
    """Prints assignment on console."""
    print('Objective: {}'.format(assignment.ObjectiveValue()))
    index = routing.Start(0)
    plan_output = 'Route for vehicle 0:\n'
    route_distance = 0
    while not routing.IsEnd(index):
        plan_output += ' {} ->'.format(manager.IndexToNode(index))
        previous_index = index
        index = assignment.Value(routing.NextVar(index))
        route_distance += routing.GetArcCostForVehicle(previous_index, index, 0)
    plan_output += ' {}\n'.format(manager.IndexToNode(index))
    plan_output += 'Distance of the route: {}m\n'.format(route_distance)
    print(plan_output)

C++

//! @brief Print the solution
//! @param[in] manager Index manager used.
//! @param[in] routing Routing solver used.
//! @param[in] solution Solution found by the solver.
void PrintSolution(const RoutingIndexManager& manager,
                   const RoutingModel& routing, const Assignment& solution) {
  LOG(INFO) << "Objective: " << solution.ObjectiveValue();
  // Inspect solution.
  int64 index = routing.Start(0);
  LOG(INFO) << "Route for Vehicle 0:";
  int64 distance{0};
  std::stringstream route;
  while (routing.IsEnd(index) == false) {
    route << manager.IndexToNode(index).value() << " -> ";
    int64 previous_index = index;
    index = solution.Value(routing.NextVar(index));
    distance += const_cast<RoutingModel&>(routing).GetArcCostForVehicle(
        previous_index, index, 0LL);
  }
  LOG(INFO) << route.str() << manager.IndexToNode(index).value();
  LOG(INFO) << "Distance of the route: " << distance << "m";
  LOG(INFO) << "";
  LOG(INFO) << "Advanced usage:";
  LOG(INFO) << "Problem solved in " << routing.solver()->wall_time() << "ms";
}

Java

  /// @brief Print the solution.
  static void printSolution(
      DataModel data, RoutingModel routing, RoutingIndexManager manager, Assignment solution) {
    // Solution cost.
    logger.info("Objective : " + solution.objectiveValue());
    // Inspect solution.
    logger.info("Route for Vehicle 0:");
    long routeDistance = 0;
    String route = "";
    long index = routing.start(0);
    while (!routing.isEnd(index)) {
      route += manager.indexToNode(index) + " -> ";
      long previousIndex = index;
      index = solution.value(routing.nextVar(index));
      routeDistance += routing.getArcCostForVehicle(previousIndex, index, 0);
    }
    route += manager.indexToNode(routing.end(0));
    logger.info(route);
    logger.info("Distance of the route: " + routeDistance + "m");
  }

C#

  /// <summary>
  ///   Print the solution.
  /// </summary>
  static void PrintSolution(
      in RoutingModel routing,
      in RoutingIndexManager manager,
      in Assignment solution) {
    Console.WriteLine("Objective: {0}", solution.ObjectiveValue());
    // Inspect solution.
    Console.WriteLine("Route for Vehicle 0:");
    long routeDistance = 0;
    var index = routing.Start(0);
    while (routing.IsEnd(index) == false) {
      Console.Write("{0} -> ", manager.IndexToNode((int)index));
      var previousIndex = index;
      index = solution.Value(routing.NextVar(index));
      routeDistance += routing.GetArcCostForVehicle(previousIndex, index, 0);
    }
    Console.WriteLine("{0}", manager.IndexToNode((int)index));
    Console.WriteLine("Distance of the route: {0}m", routeDistance);
  }

Support for VRPs with pickups and deliveries

OR-Tools v7.0 provides support for solving vehicle routing problems (VRPs) with pickups and deliveries, in which the goal is to find the shortest routes for a fleet of vehicles picking up and delivering items at various locations. You set up the problem similarly to a standard VRP, but in addition you specify a pair (i, j) of locations for each item, where i is the pickup location and j is the drop off location. The routing solver returns vehicle routes such that for each pair (i, j), i and j are on the same route, and the vehicle visits i before j.

For an example that solves this type of problem, see Vehicle Routing with Pickups and Deliveries.

Support for lambda functions

OR-Tools v7.0 now includes support for lambda functions in C# and Java (in addition to C++ and Python, which were already supported). Lambda functions provide a convenient way to define callbacks in routing programs. However, you can define callbacks using standard functions if you feel that makes your code more readable.

The C# and Java callback examples above illustrate how to define callbacks using lambda functions.

November 2018

Announcing the release of version v6.10

We have released OR-Tools version 6.10. To update your version, see the appropriate section of OR-Tools Installation.

The following sections describe the new features and improvements in version 6.10.

Simplified commands for building and running programs

In version 6.10, you can build and run programs by entering commands like the following:

make run SOURCE=relative/path/to/program.cc

where relative/path/to is the path to the directory containing the program.

Note: It's no longer necessary to edit the Makefile to run programs.

To build a program without running it, enter:

make build SOURCE=relative/path/to/program.cc

See Get Started with OR-Tools for specific instructions for running programs by language.

Support for SCIP 6.0.0

OR-Tools now provides support for SCIP 6.0.0.

Binaries

Binary distributions have been built using Java JDK 8 (JDK 7 for Ubuntu 14.04).

CP-SAT Solver

Update the API

  • Add C++ CP-SAT CpModelBuilder API.

Examples

Some examples have been moved.

  • Move community examples to examples/contrib
  • Move some examples to ortools/component/samples (e.g. ortools/linear_solver/samples/simple_program.java)

September 2018

Announcing release of version v6.9

We have released OR-Tools version 6.9. To update your version, see the appropriate section of OR-Tools Installation.

Updated dependencies

  • Protobuf 3.5.1 -> 3.6.1.
  • SCIP 4.0 -> 6.0.

CP-SAT Solver

  • Breaking changes to the API - full details here:
    • Rename SolveWithSolutionObserver to SolveWithSolutionCallback in Python.
    • Rename NewSolution to OnSolutionCallback in class CpSolverSolutionCallback in Python. The following example shows the new way to create a solution callback in Python.
      class MySolutionCallback(cp_model.CpSolverSolutionCallback):
        def __init__(self):
          cp_model.CpSolverSolutionCallback.__init__(self)
          self.__solution_count = 0
      
        def OnSolutionCallback(self):
          print('Solution {}, time = {}s, objective = {}, makespan = {}'.format(
            self.__solution_count,
            self.WallTime(),
            self.ObjectiveValue(),
            self.Value(makespan)))
          self.__solution_count += 1
    • Expose StopSearch on solution callback in Python, Java and C#. Documentation here.
    • Expose ModelStats and CpSolverResponseStats in Python, Java and C#.
  • Improve Python docstring documentation. Documentation here.
  • Updates to Java implementation of the solver interface and cookbook.
  • Implement modulo.
  • Change implementation of reservoir: add API with boolean to specify optional draining/filling events.

Linear Solver

  • Expose InterruptSolve in Java and C#.

CP Solver

  • Expose SolutionCollector director in C#.

Python

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

.Net

  • 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.

Flatzinc

  • Add support for sets in flatzinc (using nosets.mzn).

Contributions

  • Add support for Binder. Thanks to Kevin Mader.
  • Make DecisionVisitor a director type in Java bindings. Thanks to Jeremy Apthorp.

July 2018

Announcing release of version v6.8

We have released OR-Tools version 6.8. To update your version, see the appropriate section of OR-Tools Installation.

Announcing the CP-SAT solver

The CP-SAT solver is a new solver for constraint programming. The CP-SAT solver is faster than the original CP solver, and should be preferred for CP problems.

For examples that use the CP-SAT solver, look in the examples directory on GitHub for files that have _sat in their names.

The original CP solver will continue to be maintained for a period of time to support existing code, but it is deprecated.

New options for the CP-SAT solver

The following options for the CP-SAT solver are new in this release:

  • Local neighborhood search (LNS): Use the SatParameters.use_lns option to enable LNS.
  • Parallel search: Use the SatParameters.num_search_workers option to enable multiple threads during a search. Each thread can have different parameters, and different random seeds. This maximizes diversity, and the probability that at least one thread will find solutions.

Perfomance improvements to solvers

We have made performance improvements to the CP-SAT and Glop solvers.

March 2018

Announcing release of version v6.7

We have released OR-Tools version 6.7. To update your version, see the appropriate section of OR-Tools Installation.

Update to required dependencies

  • Protobuf 3.5.0 -> 3.5.1.

Misc

  • Refactor base to prepare abseil-cpp integration.
  • Use of Travis CI and Appveyor continuous integration (CI) services.

SAT

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

Glop

  • Code refactoring.
  • Performance improvement.

CMake Support (EXPERIMENTAL)

  • 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.

Contributions

  • Fix winsock2.h redefinition on windows. Thanks to Florent Tollin de Rivarol.
  • Add F# Support (EXPERIMENTAL). Thanks to Matthew Moore.
    Note: only available with Makefile builder.
  • Add .NET Standard Support (EXPERIMENTAL). Thanks to Ziad Elmalki.
    Note: only available with Makefile builder.

November 2017

Announcing release of version v6.6

We have released OR-Tools version 6.6. To update your version, see the appropriate section of OR-Tools Installation.

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.

Bugfixes

  • Pull request #494 Name refactoring. Adding comments for IntelliSense in some editors. Thanks to Matthew Moore.
  • Pull request #516 Instruction for F# standalone binary. Thanks to Matthew Moore.
  • 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.
  • Add Reservoir constraint to the SAT cp_model protobuf format.

SAT/Python

Examples

  • Rewrite rcpsp_parser to use ProtoBuf format to store the problem.
  • Improve RCPSP parser.

October 2017

Announcing release of version v6.5

We have released OR-Tools version 6.5. To update your version, see the appropriate section of OR-Tools Installation.

Change in platforms

  • The pypi module py3-ortools has been merged into the ortools module. There is now only one module: 'ortools'.
  • The main format for these Python modules is now wheel files. To install OR-tools for python from pypi, just run pip install ortools. You need a recent version of pip installed (>= 9.0.1). This should pull the latest release (v6.5).

Bug fixed

The protobuf jar file now correctly builds with compiled classes.

New Examples

  • More F# examples have been contributed to the examples/fsharp directory (Thanks again to Matthew Moore).
  • Java MIP examples have also been contributed (Thanks Darian).

September 2017

Announcing release of version v6.4

We have released OR-Tools version 6.4. To update your version, see the appropriate section of OR-Tools Installation.

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.
  • Remove check for positive penalties in the routing library.

August 2017

Announcing release of version v6.3

We have released OR-Tools version 6.3. To update your version, see the appropriate section of OR-Tools Installation.

New download files

Python wheel files for Linux are now available to download in the OR-Tools release page, along with the latest versions of all downloads.

Minizinc solver

This version contains the final sat and flatzinc code sent for the Minizinc 2017 challenge.

July 2017

Announcing release of version v6.2

We have released OR-Tools version 6.2. To update your version, see the appropriate section of OR-Tools Installation.

Change in platforms

  • We now support multiple Linux binary distributions (Ubuntu 14.04, 16.04, 17.04, CentOS 7, 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).

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.

June 2017

Announcing release of version v6.1

We have released OR-Tools version 6.1. To update your version, see the appropriate section of OR-Tools Installation.

Change in platforms

  • Visual Studio 2017 is supported; Visual Studio 2013 is no longer supported.
  • macOS versions 10.9 and higher are supported.

New Features

We've added a new protobuf format for our CP-SAT solver. See ortools/sat/cp_model.proto to define your model, and ortools/sat/cp_model_solver.h to solve your problem.

Bugfixes

  • Issue #420: We have fixed the missing __version__ attribute on Python pypi modules on all platformss.

May 2017

Announcing release of version v6.0

We have released OR-Tools version 6.0. To update your version, see the appropriate section of OR-Tools Installation.

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 commands 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/....

Routing

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

SCIP support

The linear solver wrapper now supports 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.

Cleanups

  • We have removed all usage of hash_map and 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.

January 2017

Announcing release of version v5.1

We have released OR-Tools version 5.1. To update your version, see the appropriate section of OR-Tools Installation.

New Features

Installing

Routing

Scheduling

Sat solver

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

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 was 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

Announcing release of version v5.0

We have released OR-Tools version 5.0. To update your version, see the appropriate section of OR-Tools Installation.

Running examples

  • Introduced language-specific targets that make it easier to compile and run your programs, as well as the examples that come with OR-Tools.

Sat

FlatZinc

Constraint Solver

Routing

  • 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.

September 2016

Announcing release of version v4.4

We have released OR-Tools version 4.4. To update your version, see the appropriate section of OR-Tools Installation.

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.

August 2016

Announcing release of version v4.3

We have released OR-Tools version 4.3. To update your version, see the appropriate section of OR-Tools Installation.

Constraint 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.

Sat

Glop

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

Flatzinc

  • Fixed bugs found by minizinc challenge.

Lp_data

  • 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.

July 2016

Announcing release of version v4.2

We have released OR-Tools version 4.2. To update your version, see the appropriate section of OR-Tools Installation.

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. Check cvrp_disjoint_tw.cc example for more details.

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

June 2016

Announcing release of version v2016-06

We have released OR-Tools version v2016-06. To update your version, see the appropriate section of OR-Tools Installation.

Constraint Solver

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

Routing library

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

GLOP

  • Change internal representation of sparse matrix.
  • Performance improvements.

Graph

  • 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.

Sat

  • Remove unused core method (Resolution nodes).
  • Added drat writer to check proofs on unsatisfiability.
  • Add preprocessor.

Bop

  • Add new neighborhoods.

Examples

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

Documentation

April 2016

Announcing release of version v2016-04

We have released OR-Tools version v2016-04. To update your version, see the appropriate section of OR-Tools Installation.

Updated dependencies

December 2015

Announcing release of version v2015-12

We have released OR-Tools version v2015-12. To update your version, see the appropriate section of OR-Tools Installation.

Constraint Solver

  • Broke compatibility on the Large Neighborhood Search in the CP solver (see examples/cpp/ls_api.cc, examples/python/pyls_api.py, examples/csharp/csls_api.cs, and examples/com/google/ortools/sample/LsApi.java to see the new API).
  • Cleaned up the Python wrapping. Support custom decision in the CP solver (see examples/test/test_cp_api.py to see the API in action).
  • Various improvements and bug fixes.

September 2015

Announcing first release on github.

Files will be stored there from now on.

Flatzinc

  • Added binary archives for the flatzinc interpreter (see www.minizinc.org).
  • Contains a few fixes to the version used in the challenge.

Envoyer des commentaires concernant…