Non-Convex Objective Function
AnsweredHi Gurobi Experts,
I have supply chain configuration problem, where the objective function has a sqrt form like below:
I previously used Conic Constraint; However I wanted it to know does Gurobi have an API to handle this on objective function directly instead of defining a couple of quadratic constraints?

-
Hi Saeed,
It is possible to directly write the function by using the addGenConstrNL method. You would have to define an auxiliary variable \(Z'\) as you already do and then the code would look similar to
objconstr = model.addGenConstrNL(Zprime, gp.quicksum(h[j]*c[j]*z[alpha]*sigma[j]*gp.nlfunc.sqrt(SI[j]+T[j]-S[j]) for j in N ), name="obj1")
Please note that you need Gurobi version 12 to use the above method.
Also consider that it might actually be better to formulate the model via quadratic constraints only. However, this can only be said once both formulations are tested.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment