Importing Gurobi's Library

143 views
Skip to first unread message

ramy....@hotmail.com

unread,
Feb 12, 2014, 11:59:57 PM2/12/14
to ns-3-...@googlegroups.com
I am trying to integrate Gurobi's optimization software (http://www.gurobi.com/) in ns-3.19. For importing Gurobi's libraries, I searched the NS-3 forum and tried the suggestions in [1-3] , but the process is not successful. I would appreciate if someone would tell me the detailed steps for importing the libraries (including the library path, the wscript that I should edit in addition to the line numbers)

[1] http://www.nsnam.org/wiki/index.php/HOWTO_use_ns-3_with_other_libraries
[2] https://groups.google.com/forum/#!searchin/ns-3-users/library/ns-3-users/EsXhLSv9sJg/DgL5JPWs4vsJ
[3] https://groups.google.com/forum/#!searchin/ns-3-users/library/ns-3-users/8kwsFgfSO1Y/tjI69oWOBoYJ

Tom De Schepper

unread,
Mar 7, 2016, 5:05:23 AM3/7/16
to ns-3-users
Hi, did you ever managed to get Gurobi work in ns-3? I want to do the same, but I am expiring similar issues.
Thanks in advance

Op donderdag 13 februari 2014 05:59:57 UTC+1 schreef Ramy Atawia:

Ramy Atawia

unread,
Mar 7, 2016, 2:53:05 PM3/7/16
to ns-3-...@googlegroups.com
Hello,

Yes, you have to update the wscript in the main ns-3 folder.
In the wscript,you will find the following lines:
  bld.env['NS3_MODULES_WITH_TEST_LIBRARIES'] = []
    bld.env['NS3_ENABLED_MODULE_TEST_LIBRARIES'] = []
    bld.env['NS3_SCRIPT_DEPENDENCIES'] = []
    bld.env['NS3_RUNNABLE_PROGRAMS'] = []
    bld.env['NS3_RUNNABLE_SCRIPTS'] = []

Add the gurobi library lines below:
bld.env.append_value("CXXFLAGS", "-I//home/username/gurobi650/linux64/include")
    bld.env.append_value("LINKFLAGS", ["-L/home/username/gurobi650/linux64/lib"])
    bld.env.append_value('LIBPATH', ['-L/home/username/gurobi650/linux64/lib'])
    bld.env.append_value("LIB", ["gurobi_c++","gurobi_g++4.1","gurobi65"])

Finally, in the terminal after changing the directory to wokspace/ns-3.version, write the following line:
export LD_LIBRARY_PATH="/home/username/gurobi650/linux64/lib"

P.s.: don't forget to update the paths and gurobi versions in the above lines

Good luck,
Ramy


Date: Mon, 7 Mar 2016 02:05:23 -0800
From: tomdesc...@gmail.com
To: ns-3-...@googlegroups.com
Subject: Re: Importing Gurobi's Library
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/p3KsPPOs1d4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages