Optimal Solution Discrepancy Between Convex and Non-Convex Models
AnsweredHi,
I am working with two models (one convex and one non-convex) that address the same problem but are constructed differently. Both models obtained their respective optimal solutions, with the convex model providing a better solution. When I input the optimal solution from the convex model into the non-convex model, the non-convex model recognizes this solution as optimal.
Here are my questions:
- Is this because the non-convex model is getting stuck in a local optimum?
- If the non-convex model is getting stuck in a local optimum, why does Gurobi indicate that an optimal solution is found?
- Which model's optimal solution should I trust?
Any insights or suggestions on addressing this discrepancy would be greatly appreciated.
Thank you for your help.
Best regards,
Chenhui
-
Hi Chenhui,
What version of Gurobi are you using?
Starting from Gurobi version 11.0.0, nonconvex models are solved to global optimality using outer approximation and spatial branch-and-bound when the parameter FuncNonlinear is set to 1.
Before Gurobi version 11.0.0, nonconvex models were solved by replacing the nonlinear constraints with their piecewise-linear approximations. Therefore, the solution using this approach is an approximation though it can be very close to the actual optimal solution depending on the number of pieces used to approximate the nonlinear functions.
Please check the General Constraints documentation for more details on how Gurobi handles nonlinear functions.
Since solving nonconvex models is more challenging in terms of computation time and accuracy, solving your problem as a convex optimization model is generally preferable.
Best regards,
Maliheh
0
Please sign in to leave a comment.
Comments
1 comment