2016-07-21 11:46:20 -07:00
|
|
|
This file describes how to install the or-tools C++, java and .Net binary
|
|
|
|
|
archive.
|
2016-07-01 11:28:05 +02:00
|
|
|
|
|
|
|
|
OR-Tools is located at https://developers.google.com/optimization
|
|
|
|
|
|
|
|
|
|
These modules have been tested under:
|
|
|
|
|
- ubuntu 14.04 and up (32 and 64 bit).
|
|
|
|
|
- Mac OS X El Capitan and up with xcode 4.x (64 bit).
|
|
|
|
|
- Microsoft Visual studio 2013 and 2015 (32 and 64 bit).
|
|
|
|
|
|
|
|
|
|
Upon decompressing the archive, you will get the following structure:
|
|
|
|
|
|
|
|
|
|
or-tools/
|
2016-07-21 11:46:20 -07:00
|
|
|
LICENSE-2.0.txt <- Apache License
|
|
|
|
|
README <- This file
|
|
|
|
|
Makefile/ <- Main makefile for cpp
|
|
|
|
|
examples/ <- C++, java and .Net examples
|
|
|
|
|
lib/ <- directory containing libraries and jar files.
|
|
|
|
|
include/ <- all include files
|
|
|
|
|
objs/ <- directory containing C++ compiled object files (*.o)
|
|
|
|
|
bin/ <- directory containing executable files, and .NET assemblies
|
2016-07-01 11:28:05 +02:00
|
|
|
|
|
|
|
|
########################## C++ ###########################
|
|
|
|
|
|
|
|
|
|
Use Makefile
|
|
|
|
|
|
|
|
|
|
########################## java ##########################
|
|
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
Running the examples will involve compiling them, then running them.
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
Let's compile and run examples/com/google/ortools/samples/RabbitsPheasants.java:
|
2016-07-01 15:29:57 +00:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on unix:
|
|
|
|
|
javac -d objs -cp lib/com.google.ortools.jar:lib/protobuf.jar examples/com/google/ortools/samples/RabbitsPheasants.java
|
|
|
|
|
java -Djava.library.path=lib -cp objs:lib/com.google.ortools.jar com.google.ortools.samples.RabbitsPheasants
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on windows:
|
|
|
|
|
javac -d objs -cp lib/com.google.ortools.jar;lib/protobuf.jar examples/com/google/ortools/samples/RabbitsPheasants.java
|
|
|
|
|
java -Djava.library.path=lib -cp objs;lib/com.google.ortools.jar com.google.ortools.samples.RabbitsPheasants
|
2016-07-01 11:28:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
########################## .Net ##########################
|
|
|
|
|
|
|
|
|
|
Running the examples will involve compiling them, then running them.
|
|
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
Let's compile examples/csflow.cs and run it:
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on windows 32 bit:
|
|
|
|
|
csc /target:exe /out:bin\csharp\csflow.exe /platform:x86 /lib:bin\csharp /r:Google.OrTools.dll examples\csharp\csflow.cs
|
|
|
|
|
bin\csharp\csflow.exe
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on windows 64 bit:
|
|
|
|
|
csc /target:exe /out:bin/csharp/csflow.exe /platform:x64 /lib:bin\csharp /r:Google.OrTools.dll examples\csharp\csflow.cs
|
|
|
|
|
bin\csharp\csflow.exe
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on linux (mono comes from the distribution, on ubuntu 16.04 and up):
|
|
|
|
|
mcs /target:exe /out:bin/csharp/csflow.exe /platform:anycpu /lib:bin/csharp /r:Google.OrTools.dll examples/csharp/csflow.cs
|
|
|
|
|
MONO_PATH=lib mono bin/csharp/csflow.exe
|
2016-07-01 11:28:05 +02:00
|
|
|
|
2016-07-21 11:46:20 -07:00
|
|
|
- on Mac OS X (Use installer with version 4.2.1 or up):
|
|
|
|
|
mcs /target:exe /out:bin/csharp/csflow.exe /platform:anycpu /lib:bin/csharp /r:Google.OrTools.dll examples/csharp/csflow.cs
|
|
|
|
|
DYLD_FALLBACK_LIBRARY_PATH=lib mono64 bin/csharp/csflow.exe
|