I have installed Gurobi 11 and Gurobi 1.2.0.jl, and it’s believed that Gurobi now supports solving general nonlinear programming like x^0.7 or x^3, but I cannot solve it with JuMP using Gurobi, if I switch the solve to Ipopt, it works.
The phrase “cannot solve it” can mean a number of different things. Do you get an error when trying to run this code? If so, it would also be helpful to post the resultant stack trace. If not, what happens when you run it?
No problem. I’m not specifically familiar with Gurobi and don’t have a license to use it, but I’ll try to help where I can.
It sounds like Gurobi.jl is a JuMP interface that runs problems in your locally-installed copy of the Gurobi solver software from within Julia. Are you able to run this problem directly in Gurobi without Julia in between? That might help us troubleshoot where the issue is happening: within Gurobi, within the JuMP interface, etc.
From a quick search, I turned up this related article: What types of models can Gurobi solve? – Gurobi Help Center. It sounds to me like they support some non-linear constraints, but the canonical objective function forms seem pretty limited/specific.
I’m attempting to solve a nonconvex optimization problem using Gurobi 11 as the solver through JuMP in Julia. The objective function involves nonconvex terms, such as higher-order polynomials, exponents, and logarithms.
However, when attempting to use Gurobi 11 as the solver within JuMP, I encounter the following error:
bashCopy code
ERROR: The solver does not support an objective function of type MathOptInterface.ScalarNonlinearFunction.
It seems that although Gurobi itself supports global optimization for certain nonconvex problems, the interface between Gurobi and JuMP might not yet have the capability to handle these specific types of nonconvex objective functions.
I’d appreciate any insights or suggestions on how to effectively handle nonconvex optimization problems involving such objective functions using Gurobi through JuMP.
Can you post the full error stack trace? From just the one-line error it sounds like the optimization model is being constructed properly but the Gurobi.jl wrapper doesn’t currently have a way to pass that problem into the software itself.