Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gurobi ISV key #151

Closed
hsgan opened this issue Aug 24, 2018 · 4 comments
Closed

Gurobi ISV key #151

hsgan opened this issue Aug 24, 2018 · 4 comments
Labels
Wrapper: C API Issue is specific to low-level C API

Comments

@hsgan
Copy link

hsgan commented Aug 24, 2018

I am testing the use of Gurobi (via Julia) under the ISV program (http://www.gurobi.com/products/licensing-pricing/isv-program).

Gurobi said they don't have Julia examples on how to do it, but they have given me a Java example:
GRBEnv env = new GRBEnv("gurobi.log", "ISV Name", "Application Name", Expiration (integer), "Key Code");

Without any additional arguments, I believe this is how we define the the Gurobi env, and define a model with it:
env = Gurobi.Env()
m = Model(solver=GurobiSolver(env))

Can Gurobi.Env() take in arguments of the form described in the Java example?
I am currently on version 0.4.0 of the Gurobi package.

Thanks!!

@odow
Copy link
Member

odow commented Aug 24, 2018

Gurobi.Env() is a wrapper around the Gurobi C API function:
https://github.com/JuliaOpt/Gurobi.jl/blob/9bf2a76e27c82198ab4b2ce387944d666e5618eb/src/grb_env.jl#L4-L22
You can find the C documentation here: http://www.gurobi.com/documentation/8.0/refman/c_grbloadenv.html
You should ask Gurobi for some C examples, then we can translate those to Gurobi.jl.

Also, just a reminder that Gurobi.jl is developed and maintained by volunteers in the community. If you want commercial support for Gurobi in Julia, please let them know!

@hsgan
Copy link
Author

hsgan commented Aug 24, 2018

Here's the C example:
GRBisqp(&env, "gurobi.log", "ISV Name", "Application Name", Expiration (integer), "Key Code");

Noted re commercial support for Gurobi in Julia. Thanks!!

@hsgan hsgan closed this as completed Aug 24, 2018
@odow
Copy link
Member

odow commented Aug 24, 2018

Reopening since it this isn't implemented. Feel free to make any PRs that you need to get it working. There are lots of grb_ccall examples in the code that demonstrate how to wrap a C function.

@odow odow reopened this Aug 24, 2018
@odow odow added the Wrapper: C API Issue is specific to low-level C API label Jan 30, 2019
@odow
Copy link
Member

odow commented Sep 28, 2020

Gurobi.jl now wraps the complete C API. You can use that to create the relevant environment, and then pass it to Gurobi.Optimizer(env).

@odow odow closed this as completed Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Wrapper: C API Issue is specific to low-level C API
Development

No branches or pull requests

2 participants