More digits in log file
AnsweredDear all,
I am creating plots of the evolution of the upper and lower bound of the objective function for a MILP, where I use gurobi to generate these.
When I create a logfile, either .log, .txt or .csv, it seems that values are rounded to 4 decimals in the file, and that I cannot retrieve the original values (only from the Python console directly). Is there a way to print these in a logfile with more decimals? My model is programmed in Pyomo.
Best regards,
Noortje
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 2.5500e+08 0 194 3.2154e+08 2.5500e+08 20.7% - 1s
0 0 2.5502e+08 0 193 3.2154e+08 2.5502e+08 20.7% - 1s
-
Hi Noortje,
There unfortunately isn't a way to increase the log precision like this. However, you can retrieve these lower and upper bounds programmatically with the \(\texttt{MIPNODE_OBJBST}\) and \(\texttt{MIPNODE_OBJBND}\) callbacks (see here). This should make plotting much easier, since you won't have to spend time extracting these values from the log. Pyomo is a third-party API, but I believe they support callbacks like this.
Thanks,
Eli
0 -
Thank you, Eli! I will try it like this!
0
Please sign in to leave a comment.
Comments
2 comments