Can't solve a problem with nonlinear terms like x^0.7 or x^3 using JuMP with Gurobi 11

The nonlinear support in Gurobi 11 is still very limited. You need to use the C API (I haven’t tested this, but it should work):

using JuMP, Gurobi
model = direct_model(Gurobi.Optimizer())
start = [23.564546, 33.235712480000004]
@variable(model, 0 <= x[i in 1:2] <= 40, start = start[i])
@variable(model, y[1:2])
column(x::VariableRef) = Gurobi.c_column(backend(owner_model(x)), index(x))
GRBaddgenconstrPow(backend(model), "x1^0.7", column(x[1]), column(y[1]), 0.7, "")
GRBaddgenconstrPow(backend(model), "x2^3", column(x[2]), column(y[2]), 3.0, "")
@objective(model, Min, y[1] + y[2])
optimize!(model)

A future version of Gurobi will introduce a first-class nonlinear API that we can connect to the nonlinear JuMP interface.

2 Likes