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

Support nonlinear constraints with Gurobi 12 #93

Closed
1 of 3 tasks
simonbowly opened this issue Oct 31, 2024 · 0 comments · Fixed by #95
Closed
1 of 3 tasks

Support nonlinear constraints with Gurobi 12 #93

simonbowly opened this issue Oct 31, 2024 · 0 comments · Fixed by #95
Assignees

Comments

@simonbowly
Copy link
Member

simonbowly commented Oct 31, 2024

The upcoming Gurobi 12 release supports nonlinear constraints through gurobipy's NLExpr class. There are a few steps required to integrate it in gurobipy-pandas:

  • Recognise NLExpr's in constraints, and pass them to addGenConstrNL (the arithmetic is taken care of, e.g. x**4 will "just work" on pandas series)
  • Add some API for applying nonlinear functions to expressions, e.g. a .gppd.exp accessor or gppd.exp would map to nlfunc.exp For now, document .apply as the appropriate method for applying nlfuncs.
  • Consider whether to automatically add intermediate variables to allow more flexibility in constraint senses & objectives For now, keep the same restrictions as gurobipy and document the recommended approach to intermediate variables.
@simonbowly simonbowly self-assigned this Oct 31, 2024
simonbowly added a commit that referenced this issue Nov 14, 2024
simonbowly added a commit that referenced this issue Nov 14, 2024
simonbowly added a commit that referenced this issue Nov 14, 2024
Add a page to the users guide covering how to add nonlinear constraints
to a model using add_constrs.
simonbowly added a commit that referenced this issue Nov 15, 2024
simonbowly added a commit that referenced this issue Nov 15, 2024
Show how to create nonlinear constraints not of the form y = f(x)
by introducing temporary variables.
simonbowly added a commit that referenced this issue Nov 15, 2024
simonbowly added a commit that referenced this issue Nov 15, 2024
simonbowly added a commit that referenced this issue Nov 15, 2024
simonbowly added a commit that referenced this issue Nov 15, 2024
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 a pull request may close this issue.

1 participant