How to set the output time to be displayed as a real number.
回答済みIs there a setting to display the time in milliseconds or microseconds during the search in Gurobi?
By default, it only shows the time in seconds, like this
Nodes | Current Node | Objective Bounds | Work
Expl Unexpl | Obj Depth IntInf | Incumbent BestBd Gap | It/Node Time
0 0 509.00000 0 1018 351.00000 509.00000 45.0% - 0s
H 0 0 352.0000000 509.00000 44.6% - 0s
H 0 0 359.0000000 509.00000 41.8% - 0s
H 0 0 363.0000000 509.00000 40.2% - 0s
0
-
正式なコメント
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,
Currently there is no such option. If you are using an API to call Gurobi, you can define a callback, e.g., the MESSAGE callback, and retrieve the solution time via the RUNTIME \(\texttt{what}\) attribute by using the cbGet function.
A short example in Python would be
def mycallback(model, where):
if where == GRB.Callback.MESSAGE:
print(model.cbGet(GRB.Callback.RUNTIME))
[...]
model.optimize(mycallback)Best regards,
Jaromił0
投稿コメントは受け付けていません。
コメント
2件のコメント