-
Notifications
You must be signed in to change notification settings - Fork 81
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
Package does not install without Gurobi installed #517
Comments
See jump-dev/CPLEX.jl#406 for the discussion I had with other GenX developers on this. You can set the |
To reiterate jump-dev/CPLEX.jl#406 (comment): the approach of hard-coding the solvers into the package should be changed: https://github.com/GenXProject/GenX/blob/ae19f20978255a3cfdc40e2e0292cf322095a90d/src/GenX.jl#L42 In the run file of a user's code, they should write something like (entirely made up functions): using GenX, Gurobi
GenX.run(optimizer = Gurobi.Optimizer) Don't do using GenX
GenX.run(optimizer = "gurobi") where the dispatch happens inside GenX. |
Package extensions (https://docs.julialang.org/en/v1/manual/code-loading/#man-extensions) also provide a solution to this problem. |
Thanks so much all. We are going to try to implement @odow's suggestion. |
I work on development of an open source Julia package for power systems optimization, GenX, which allows users to use multiple solvers including Gurobi. However, we are currently not able to include Gurobi.jl in our dependencies, because if we did, then users who did not have Gurobi installed would encounter an error during installation of Gurobi.jl. This is annoying for those users of our package who do want to use Gurobi as they have to manually add the package, and uncomment the "using Gurobi" line of code in the package itself. This last step in particular is problematic for those seeking to use the package without cloning the repo and modifying code. Would it be possible to add functionality to Gurobi.jl that would allow users to install the package without having Gurobi installed? Perhaps a warning could be thrown instead of an error?
The text was updated successfully, but these errors were encountered: