Why is attribute nodeCount double?
AnsweredHi there.
In the Gurobi documentation the NodeCount attribute is "number of branch-and-cut nodes explored in the most recent optimization" and the output value is a double type.
Shouldn't be then an integer type? Indeed, in the Progress Section the nodes explored and and unexplored are integer. Why does this change when getting the NodeCount attribute.
Thanks in advance.
Alberto.
-
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 Alberto,
The NodeCount can exceed values of \(2^{32}\). A double is the easiest standard data type that can cope with this. 64 bit integers might also work but they depend on the operating system, thus to not overcomplicate things, the NodeCount attribute is of double type.
Best regards,
Jaromił0 -
Thank you so much for the kind replay Jaromił.
Excuse my ignorance about data types, but what would 166.5 nodes explored mean then?
Alberto
0 -
There will be no 0.X nodes reported, i.e., you can safely convert the NodeCount to an integer. The double data type is only used to allow for very large numbers and not to report a partial NodeCount.
Best regards,
Jaromił0
Post is closed for comments.
Comments
4 comments