Try our new documentation site (beta).
Simplex Logging
The simplex log can be divided into three sections: the presolve section, the simplex progress section, and the summary section.
Presolve Section
The first thing the Gurobi optimizer does when optimizing a model is
to apply a presolve algorithm in order to simplify the model.
The first section of the Gurobi log provides information on the extent
to which presolve succeeds in this effort. Consider the following
example output from NETLIB model dfl001
:
Presolve removed 2348 rows and 3329 columns Presolve time: 0.05s Presolved: 3723 rows, 8901 columns, 31074 nonzerosThe example output shows that presolve was able to remove 2381 rows and 3347 columns, and it required 0.12 seconds. The final line in the presolve section shows the size of the model after presolve. This is size of the model that is passed to the simplex optimizer. Note that the solution that is computed for this model is automatically transformed into a solution for the original problem once simplex finishes (in a process often called uncrushing), but this uncrush step is transparent and produces no log output.
Progress Section
The second section of the Gurobi simplex output provides information on the progress of the simplex method:
Iteration Objective Primal Inf. Dual Inf. Time 0 2.1669702e+06 1.986805e+03 0.000000e+00 0s 18171 1.1266373e+07 5.233073e+02 0.000000e+00 5s 18331 1.1266393e+07 0.000000e+00 0.000000e+00 5sThe five columns in each output row show the number of simplex iterations performed to that point, the objective value for the current basis, the magnitude of the primal infeasibility for the current basis (computed as the sum of the absolute values of all constraint and bound violations), the magnitude of the dual infeasibility (computed as the sum of the absolute values of all dual constraint violations), and the amount of time expended to that point (measured using wall clock time). The default simplex algorithm in the Gurobi solver is dual simplex, which tries to maintain dual feasibility while performing simplex pivots to improve the objective. Thus, once the dual simplex algorithm has found an initial dual feasible basis, you will generally see a dual infeasibility value of zero. When the primal and dual infeasibilities both reach zero, the basis is optimal and optimization is complete.
By default, the Gurobi optimizer produces a log line every 5 seconds. The frequency of log lines can be changed by modifying the DisplayInterval parameter (see the Parameter section of this document for more information).
Summary Section
The third section of the simplex log provides summary information. It provides a summary of the work that the simplex algorithm performed, including the iteration count and the runtime, and it provides information on outcome of the optimization. The summary for a model that is solved to optimality would look like this:
Solved in 18331 iterations and 5.12 seconds Optimal objective 1.126639304e+07Other termination states produce different summaries. For example, a user interrupt would produce a summary that looks like:
Stopped in 7482 iterations and 3.41 seconds Solve interruptedHitting a time limit would produce a summary that looks like:
Stopped in 18082 iterations and 5.00 seconds Time limit reached