GUROBI results / solutions interpretation

129 views
Skip to first unread message

Asif Ali Khan Lecturer DCSE

unread,
Aug 2, 2018, 12:40:37 AM8/2/18
to gur...@googlegroups.com
Dear all,

I have some difficulties in understanding the gurobi results. As obvious, the time it takes to find optimal solution(s) directly depends on my input size. For smaller input size it works fine but for larger, it stucks.

Now, I am interrupting the model after 3 hours. In some case, I get solutions and obj; in other I don't (sol cont is 0). Does this mean no solution has been reached in this duration?

What I am not sure about is, when solution count is 0, I am expecting obj to be 0 as well. However, I am getting solution count: 0 and obj: Obj: 1e+100 (in some cases). Can somebody clarify this please.


Asif

Daniel Espinoza

unread,
Aug 2, 2018, 11:01:58 AM8/2/18
to Gurobi Optimization
Hi Khan,

Could you post the logs to give you a detailed answer?

Best,
Daniel

Robert Luce

unread,
Aug 6, 2018, 3:27:42 AM8/6/18
to Gurobi Optimization
Asif,

if the solution count is 0, then Gurobi has not been able to find a solution to your model.  In that case, the attribute ObjVal doesn't have a meaning, and the value 1e100 is simply a placeholder for the value "infinity".  The value of the attribute objVal only has a meaning in terms of the objective function if the value of the attribute SolCount is >0.

Robert

Asif Ali Khan Lecturer DCSE

unread,
Aug 6, 2018, 3:39:38 AM8/6/18
to gur...@googlegroups.com
Thank you Robert for the explanation. Another quick thing, I want to export the intermediate results of my model while it is running. I have added the following.

def mycllback(model, where):
  if where == GRB.Callback.MIPSOL:
    for i in range(n):
      print(str(m.getVarByName("v"+str(i))))

Again, for smaller input size it works fine. It gives me intermediate results. However, when the input is large, the simulation stops and gives me 0 for both solution count and obj. Though I have set a time limit of 3 hours, it returns immediately (in few seconds). Any thought on that?

Thanks again.

Asif

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages