jump-dev / Gurobi.jl

A Julia interface to the Gurobi Optimizer
http://www.gurobi.com/
MIT License
221 stars 80 forks source link

Add general constraints support #554

Closed votroto closed 6 months ago

votroto commented 6 months ago

No idea if this is a reasonable request, but it would be really nice to have support for Gurobi's general function constraints. They can now be solved exactly without piecewise lin approx.

There are a few such as:

which might not be impossible.

It's always the same pattern "one variable in a function equals another variable." If that's possible, bridges might actually make it nicer to use than even gurobi's interface.

odow commented 6 months ago

The current suggestion is to use the C API: https://github.com/jump-dev/Gurobi.jl?tab=readme-ov-file#the-c-api-from-jump

A future version of Gurobi may support general nonlinear constraints, in which case we would support MOI.ScalarNonlinearFunction.

But we don't be adding general constraint support in the near term.

odow commented 6 months ago

Closing as won't-fix. (But if you're interested, take a read of https://github.com/jump-dev/MathOptInterface.jl/issues/2402)