Displaying problem statistics
These options for displaying information in the Interactive Optimizer support large problems.
When the problem is as small as our example, it is easy
to display it on the screen; however, many real problems are far too
large to display. For these problems, the stats option
of the display problem command is helpful.
When you select stats , information about
the attributes of the problem appears, but not the entire problem
itself. These attributes include:
the number and type of constraints
variables
nonzero constraint coefficients
Try this feature by typing:
display problem stats
For our example, the following information appears:
Problem name: example
Objective sense : Maximize
Variables : 3 [Nneg: 2, Box: 1]
Objective nonzeros : 3
Linear constraints : 2 [Less: 2]
Nonzeros : 6
RHS nonzeros : 2
This information tells us that in the example there are
two constraints, three variables, and six nonzero constraint coefficients.
The two constraints are both of the type less-than-or-equal-to. Two
of the three variables have the default nonnegativity bounds (0 ≤ x ≤ +∞)
and one is restricted to a certain range (a box variable). In addition
to a constraint matrix nonzero count, there is a count of nonzero
coefficients in the objective function and on the righthand side.
Such statistics can help to identify errors in a problem without displaying
it in its entirety. The command display problem stats shows
this additional information like this:
Variables : Min LB: 0.000000 Max UB: 40.00000
Objective nonzeros : Min : 1.000000 Max : 3.000000
Linear constraints :
Nonzeros : Min : 1.000000 Max : 3.000000
RHS nonzeros : Min : 20.00000 Max : 30.00000
Another way to avoid displaying an entire problem is
to display a specific part of it by using one of the following three
options of the display problem command:
names, documented in Displaying variable or constraint names, can be used to display a specified set of variable or constraint names;constraints, documented in Displaying constraints, can be used to display a specified set of constraints;bounds, documented in Displaying bounds, can be used to display a specified set of bounds.