ObjBoundC not available
AnsweredHi,
when solving a simple quadratic model, Gurobi finishes at root node. Then, trying to retrieve ObjBoundC, we get
Unable to retrieve attribute 'ObjBoundC'.
Failed to get the best bound. Gurobi error code: 10005
Is this expected behaviour and we should just take the primal value when dual bound not available?
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Gleb,
Could you post the simple quadratic model, such that we can try to reproduce this issue? If possible, please post a small self-contained code.
Best regards,
Jaromił0 -
Hi Jaromił,
the instance (recognized as convex quadratic, despite the equality) is this:
Maximize
obj
Subject To
p_times_0: - obj + [ x ^2 ] = 0
Bounds
x <= 10
obj <= 100
EndWhen I call gurobi_cl ResultFile=result.json instance.lp, the json result file contains
{ "SolutionInfo": { "Status": 2, "Runtime": "3.2305717468261719e-04", "ObjVal": "100", "BoundVio": "0", "ConstrVio": "0", "IterCount": "0", "BarIterCount": 0}}
i.e., ObjBound(C) are not there. For a slightly more complicated instance, which is also solved at root but at least requires 1 iteration of barrier, the bounds are there. I am happy to write C code but I think this shows the issue (if it is not the intended behaviour, but the documentation says nothing except that the attributes are intended for MIPs).
Cheers, Gleb
0 -
Hi Gleb,
Thanks for posting the example. The ObjBoundC attribute is not available since your model is not a MIP. If you change the type of one of your variables to integer, Gurobi will compute the ObjBoundC.
Best regards
Silke0
Post is closed for comments.
Comments
4 comments