The Solver|Picture command displays a model in matrix form. Viewing the model in matrix form can be helpful in a couple of instances. First and perhaps most importantly, is the use of nonzero pictures in debugging formulations. Most models have strong repetitive structure. Incorrectly entered sections of the model will stand out in a model’s matrix picture. Secondly, a nonzero picture can be helpful when you are attempting to identify special structure in your model. As an example, if your model displays strong block angular structure, then algorithms that decompose the model into smaller fragments might prove fruitful.
As an example, we loaded the DNRISK.LG4 model from LINGO’s sample model set. Issuing the Picture command, we see the following:
Positive coefficients are represented with blue tiles, negatives with red, and variables that appear in a row nonlinearly show up as black tiles.
You can zoom in on a selected range in the matrix for closer viewing. To do this, place the cursor on the upper left corner of the range you wish to view, press and hold down the left mouse button. Next, drag the mouse to the lower right-hand corner of the desired range. Now, release the left mouse button and LINGO will zoom in on the selected range. As an example, here is a view of the matrix after zooming in on a 4x4 range:
Note, we have zoomed in far enough to be able see the actual coefficient values, row names, and variable names. Scroll bars have also appeared to allow scrolling through the matrix.
The matrix picture window supports a number of additional interactive features. To access these features, place the cursor over the matrix picture, and press and hold the right mouse button. This will bring up the following menu:
A brief description of these features follows:
• | Unpermuted - Displays the matrix in its original form |
• | Lower Triangular - Displays the matrix picture to lower triangular, or almost lower triangular form |
• | Block Triangular - GP1 - The matrix is displayed in block triangular form using LINGO'S GP1 graph partitioning heuristic |
• | Block Triangular - GP2 - The matrix is displayed in block triangular form using LINGO'S GP2 graph partitioning heuristic |
• | Block Triangular - Row Names - The matrix is displayed using a block structure specified by the user as part of the row names |
• | Block Triangular - User Specified - The matrix is displayed using a block structure specified by the user via the @BLKROW function |
• | Zoom In - Zooms the view in centered around the current cursor position |
• | Zoom Out - Zooms the view out centered around the current cursor position |
• | View All - Zooms all the way out to give a full view of the matrix |
• | Row Names - Toggles the display of row names on and off |
• | Var Names - Toggles the display of variable names on and off |
• | Scroll Bars - Toggles scroll bars on and off |
• | Print - Prints the matrix picture |
• | Close - Closes the matrix picture window |
The Lower Triangular option is an interesting feature. The rows and columns are automatically permuted to place the matrix into mostly lower-triangular form. If a matrix is mostly lower triangular, then, in general, the model should prove relatively easier to solve. This is opposed to a model that contains a high degree of simultaneity that can't be permuted into lower triangular form.
Refer to the BNP Solver section above for more information on the various Block Triangular options (GP1, GP2, Row Names and User Specified).