Or-tools: How to configure or-tools to work with Gurobi?

Created on 19 Jun 2017  Â·  8Comments  Â·  Source: google/or-tools

I suppose I have to setup UNIX_GUROBI_DIR in Makefile.local and then do 'make clean' and 'make cc', right? I've seen also GUROBI_LIB_VERSION, what kind of parameters does it refer?

Python Gurobi

Most helpful comment

this is what I write in to the Makefile and it is working with Gurobi:

echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.0/Makefile.local
echo "GUROBI_LIB_VERSION = 70" >> /opt/or-tools/or-tools-6.0/Makefile.local

I assume that GUROBI_LIB_VERSION stands for the major version:
7.0.2 -> 70

If I recall correctly the number is required to find the appropriate lib: libgurobi70.so

hope it helps!

All 8 comments

this is what I write in to the Makefile and it is working with Gurobi:

echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.0/Makefile.local
echo "GUROBI_LIB_VERSION = 70" >> /opt/or-tools/or-tools-6.0/Makefile.local

I assume that GUROBI_LIB_VERSION stands for the major version:
7.0.2 -> 70

If I recall correctly the number is required to find the appropriate lib: libgurobi70.so

hope it helps!

Yes, thanks!

Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00

2017-07-05 20:39 GMT-07:00 Stefan Hesse notifications@github.com:

this is my working config for Gurobi:

echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.0/
Makefile.local
echo "GUROBI_LIB_VERSION = 70" >> /opt/or-tools/or-tools-6.0/
Makefile.local

I assume that GUROBI_LIB_VERSION stands for the major version:
7.0.2 -> 70

If I recall correctly the number is required to find the appropriate lib:
libgurobi70.so

hope it helps!

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/421#issuecomment-313286731,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKj17cS_dBPWzznU-sp46YfrqQi7vO3lks5sLFbfgaJpZM4N-0RQ
.

this is what I write in to the Makefile and it is working with Gurobi:

echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.0/Makefile.local
echo "GUROBI_LIB_VERSION = 70" >> /opt/or-tools/or-tools-6.0/Makefile.local

I assume that GUROBI_LIB_VERSION stands for the major version:
7.0.2 -> 70

If I recall correctly the number is required to find the appropriate lib: libgurobi70.so

hope it helps!

Thanks @reinoldus !!!

I don't think this should be closed until some documentation about how to do this is put somewhere easier to find.

So to clarify, this is similar to the procedure for installing SCIP? On a mac with python, this would be:

  1. Download the latest or-tools release (after installing the latest cmake and command line tools)
  2. make third_party
  3. make python
  4. Edit Makefile.local by adding the following lines at the end (assuming or-tools v6.5 and gurobi v7.5.2):
    echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.5/Makefile.local echo "GUROBI_LIB_VERSION = 75" >> /opt/or-tools/or-tools-6.5/Makefile.local
  5. make clean && make cc

Please confirm if this is correct @lperron, thanks.

I think there are some mistakes in your procedure.

If you have to install or-tools from zero:

  1. Download them (of course check dependencies).
  2. make third_party
  3. Edit Makefile.local as you correctly said (however on my mac i have a different “UNIX_GUROBI_DIR”, so check your path to gurobi).
  4. Now make python (after would be useful also a make test)

If instead you’d like to modify a current or tools installation, i think you should:

  1. make clean
  2. Edit Makefile.local
  3. make python (oh and of course remember to check that everything is working with make test)

I hope it helps!

Il giorno 22 nov 2017, alle ore 09:18, Antonio Medrano notifications@github.com ha scritto:

So to clarify, this is similar to the procedure for installing SCIP? On a mac with python, this would be:

Download the latest or-tools release (after installing the latest cmake and command line tools)
make third_party
make python
Edit Makefile.local by adding the following lines at the end (assuming or-tools v6.5 and gurobi v7.5.2):
echo "UNIX_GUROBI_DIR = /opt/gurobi/" >> /opt/or-tools/or-tools-6.5/Makefile.local echo "GUROBI_LIB_VERSION = 75" >> /opt/or-tools/or-tools-6.5/Makefile.local
make clean && make cc
Please confirm if this is correct. Thanks.

—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/421#issuecomment-346275560, or mute the thread https://github.com/notifications/unsubscribe-auth/ALqfr8OfnXoFpp8SnQf0gDmR3z82TxxLks5s49jPgaJpZM4N-0RQ.

You can test python using make check_python (only run few samples to cover each libraries)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sanwer0 picture sanwer0  Â·  3Comments

tapafe picture tapafe  Â·  4Comments

KeremAslan picture KeremAslan  Â·  3Comments

abduakhatov picture abduakhatov  Â·  4Comments

mlk621 picture mlk621  Â·  3Comments