google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
11k stars 2.1k forks source link

Gurobi ISV License Key #1625

Closed pmotakef closed 4 years ago

pmotakef commented 4 years ago

Hello everyone, The company I work with has an ISV license key from Gurobi which means we don't have a gurobi.lic file. But to use the Gurobi we create a "gurobipy.Env.OtherEnv" object and pass in parameters for organization name, license key, etc. Then this Env object is passed to gurobipy.Model. I was wondering if in OR-tools we can pass the gurobipy.Env object (or GRBEnv) when creating the solver? Going through the source code it seems "_pywraplp.new_Solver" only takes a name and a solver type, while this method calls LoadGurobiEnvironment(GRBenv** env). But I am not sure where the env object is created and passed into this function. Thanks a lot.

lperron commented 4 years ago

As you are compiling from source already, I would patch gurobi_environment.cc or gurobi_interface.cc to do the right thing.

This would be easier than going through the python-c++ interface.

--Laurent Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 00

Le lun. 7 oct. 2019 à 10:56, Pouya Moetakef notifications@github.com a écrit :

Hello everyone, The company I work with has an ISV license key from Gurobi which means we don't have a gurobi.lic file. But to use the Gurobi we create a "gurobipy.Env.OtherEnv" object and pass in parameters for organization name, license key, etc. Then this Env object is passed to gurobipy.Model. I was wondering if in OR-tools we can pass the gurobipy.Env object (or GRBEnv) when creating the solver? Going through the source code it seems "_pywraplp.new_Solver" only takes a name and a solver type, while this method calls LoadGurobiEnvironment(GRBenv** env). But I am not sure where the env object is created and passed into this function. Thanks a lot.

— 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/1625?email_source=notifications&email_token=ACUPL3P3GIMKQ274MID7QRTQNNE3VA5CNFSM4I6FXHKKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HQC5C3Q, or mute the thread https://github.com/notifications/unsubscribe-auth/ACUPL3JGCZBCM7DBZQIWMBLQNNE3VANCNFSM4I6FXHKA .