ModelStatistics
allows access to the statistics of a gurobipy.Model
. It is a convenience function that will collect a simple set of statistics.
Consider the same script shown in the model section, which solves a simple knapsack problem. You may use the ModelStatistics
to obtain the statistics of the model. This convenience functionality is provided out of the box, but we recommend that you customize how the model is interpreted to extract statistics.
Run the script: