Skip to content

Update Gurobi NL interface for Gurobi 12.x#3470

Merged
jsiirola merged 3 commits intoPyomo:mainfrom
jsiirola:gurobi-12-nl
Feb 12, 2025
Merged

Update Gurobi NL interface for Gurobi 12.x#3470
jsiirola merged 3 commits intoPyomo:mainfrom
jsiirola:gurobi-12-nl

Conversation

@jsiirola
Copy link
Copy Markdown
Member

Fixes # .

Summary/Motivation:

Starting in Gurobi 12.0.0, Gurobi no longer distributes the AMPL interface binary. The interface is now distributed by AMPL through a different channel. However, as part of this change, the name of the executable has changed from gurobi_ampl to just gurobi. This PR tracks that change by having the Gurobi NL interface first look for gurobi, then fall back on gurobi_ampl. Because of the high probability of running into other executables names "gurobi", in addition to looking for a executable file, we will also check that the file appears to be the NL bindings by executing it and looking for a specific string ([-AMPL]) from the ASL usage message.

Changes proposed in this PR:

  • Look for gurobi and gurobi_ampl executables when instantiating the Gurobi NL solver interface.

Legal Acknowledgement

By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola merged commit 04bd416 into Pyomo:main Feb 12, 2025
29 checks passed
@jsiirola jsiirola deleted the gurobi-12-nl branch February 12, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants