Posts

Documentation: new examples and reference manual

Hi all.  We've added more content to  our documentation hub : short tutorials on how to solve integer programming problems, job shop problems, and vehicle routing problems with time windows. We've also added over 800 pages of comprehensive documentation detailing our C++ API. (That documentation is automatically generated, so the formatting will be odd in places.) We'll be adding plenty more content in the months to come. If you have specific requests, let us know!

Visual Studio 2015 support + new version of protobuf

Hi, Two notable changes in the code. The first is that I have finally compiled or-tools with visual studio 2015. Compiling from sources should work straight away, hopefully. The second is that I have upgraded protobuf from 3.0.0 beta2 to beta3. This was needed to support visual studio 2015. There are two small bad news:   - It is still in beta, so I cannot release nuget packages as they require stable sub-packages (protobuf C# in that case)   - The new protoc compiler rewrites the names of enums in protobufs for C#.     Therefore PATH_CHEAPEST_ARC -> PathCheapestArc.     I have updated the tsp and vrp examples to reflect the new naming. Thanks

Heads up, upcoming incompatibility in the CP/Routing library

Hello all, I will soon push a large incompatible change in the CP and Routing libraries. The change will replace parameters (CP solver parameters, routing model parameters, routing search parameters) from struct to protobuf. This will also hide the C++ command line flags (cp_trace_search, routing_first_solution, ...) and make them redundant for controlling the behavior of the libraries. They are currently kept in the C++ library, but will be dropped out eventually. With this move, all functionalities offered by the C++ command line flags will be available from all languages (provided you implement the command line parsing part). Let's see an example (tsp) Before (in C++):    // Setting first solution heuristic (cheapest addition).    FLAGS_routing_first_solution = "PathCheapestArc";    const Assignment* solution = routing.Solve() ; After (in C++, using the command line flags compatibility) :    RoutingSearchParameters paramete...

Python 3 support

Good news, or-tools now supports python3 . How to get it (from sources only for the time being):   ubuntu: install python3 python3-dev, python3-setuptools. Change UNIX_PYTHON_VERSION to 3.4 (in 14.04), recompile.   Mac OS X: Install python (3.5.1?), change UNIX_PYTHON_VERSION to 3.5, tweak manually PYTHON_INC in makefiles/Makefile.unix to reflect the path (/Library/Framework/...) to the python3 install. recompile.   Windows: Install python 3.5.1 (32 or 64 bit), set the correct path in Makefile.local. recompile. Hopefully, everything should work. At least, make test_python works for me. Comments :   I removed dependencies on google-apputils, and python gflags. OR-Tools now uses argparse.   Protobuf has been bumped to 3.0.0 beta 1   Few python examples are ported. They will likely break on print and iterators.   I will build pypi py3-ortools modules, soon I hope.   Plenty of internal code was upgraded, especially in th...

September 2015 news

Hello Some news. Github supports releases and files attached to it. I have thus created the first github release, that also includes source and binary archives. https://github.com/google/or-tools/releases I will deprecate the Google Drive and Box.com repositories, as soon as I kill their reference properly in the or-tools website (https://developers.google.com/optimization). I have also created a new type of binary archives, dedicated to the minizinc language (www.minizinc.org). It contains the flatzinc interpreter, as well as the necessary translation rules (mznlib). Thanks

Getting rid of callbacks

Hello, with C++11 now correctly supported by compilers, we are in the process of removing callbacks, and replacing them with std::function<>. We have reached a good milestone where the constraint programming library is migrated, except the routing library. For instance: Solver::MakeElement(ResultCallback1(int64, int64) values, IntVar* index) is now Solver::MakeElement(std::function<int64(int64)> values, IntVar* index) Unfortunately for me, this impacts the other languages: Python is unchanged, thanks to swig magic. java is impacted. Previously, you needed to subclass LongResultCallback1 to implement the values in the element expression. Now, you need to subclass LongToLong. The API is the same. LongResultCallback1/2/3 are kept for the routing library. C#  follows the same road. You also need to subclass LongToLong to use the element expression. Here is the list of base classes for callbacks in Java and C#. The virtual method is called run in java ...

Changes in the last month - on windows this time

Hello all, I have bumped the gflags version to 2.1.1 on windows too. The immediate consequence is that you need cmake to build third_party dependencies on windows. So, please go to http://www.cmake.org/download/ and install the windows version. cmake.exe needs to be in the PATH such that make third_party can find it. Thanks PS: This is done on the github repository. Please consider the one on code.google.com to be obsolete.