Open
Description
Summary
Gurobi v12 supports nonlinear constraints, it would be good if the direct/persistent solvers supported adding these directly to the gurobipy.Model
object.
Rationale
Right now, to use this feature through Pyomo, one must use the gurobinl
solver which uses the AMPL interface via an NL file.
Description
I would like to leverage the Pyomo expressions to either create an expression tree to pass this to gurobipy
via Model.addGenConstrNLAdv
or even create a NLExpr
whatever is easiest. This requires a bit of knowledge of the Pyomo expressions and I haven't had time to dig into it yet.
Additional information
This can be used to translate nonlinear functions such as pyomo.kernel.sin
as well as polynomials, hence it would solve #3249