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

Pyomo can't solve cubic or higher order polynomials with Gurobi 11 #3249

Open
jhpb7 opened this issue Apr 25, 2024 · 0 comments
Open

Pyomo can't solve cubic or higher order polynomials with Gurobi 11 #3249

jhpb7 opened this issue Apr 25, 2024 · 0 comments

Comments

@jhpb7
Copy link

jhpb7 commented Apr 25, 2024

Summary

Since version 11, gurobi can solve cubic or higher order polynomials without linearisation. However, this feature is not compatibel with pyomo yet. Would be great if this could be added.

Description

I use pyomo 6.4.2 and gurobi 11.0.0 and ran this code

import pyomo.environ as pyo

m = pyo.ConcreteModel()
m.x = pyo.Var()

@m.Objective()
def obj(m):
    return m.x**3

opt = pyo.SolverFactory('gurobi_persistent')
opt.options["NonConvex"] = 2
opt.options['FuncNonlinear'] = 1
opt.set_instance(m)

results = opt.solve(tee=True)

and it throws
DegreeError: GurobiDirect does not support expressions of degree None. expr: x**3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment