MPL allows you to view defined items from the model formulation in a tree window. Choose Model Definitions from the View menu, to display the Model Definitions window. You can also press the View Model Definitions button in the Toolbar. You can leave this window open while you are working in MPL as it will be updated automatically when you parse in your model.
Figure 4.27: The Model Definition Window
This window will show all the defined items in the model in a hierarchical tree structure. Each branch in the tree corresponds to a section in the model. You can expand and collapse each branch to show only the elements you are interested in.
At the bottom of the window are two buttons. The View button allows you to display the contents of each defined item in a separate view window. What is displayed for each item is discussed in the following pages. The Goto button will take you directly to the declaration of the selected item in the model file.
MPL has several options in the MPL Environment Options dialog box that allow you to control how the Model Definitions window behaves. You specify whether each defined item is shown with the number of elements it contains. You can also specify whether each branch is expanded or collapsed when the tree is initially created. Finally you can set whether double-clicking on a defined item will work as the Goto or the View button.
All defined indexes for the current model are listed in the INDEX branch. If there are multiple INDEX sections in the model they will be shown as separate branches in the tree.
To obtain more information about an index entry, select the index name in the tree and press the View button. This will open a view window containing the declaration and contents for the selected index entry. What is shown for each index depends on how it was declared in the model.
For example to view the named index month select the name in the INDEX branch and press the View button. This will display the view window shown here below:
Figure 4.28: View Dense Data Vector Elements
All defined variables for the current model are listed in the VARIABLES branch. If there are multiple VARIABLES sections in the model they will be shown as separate branches in the tree.
To obtain solution values, such as activity and reduced cost, for a variable, select the variable name in the tree and press the View button. This will open a view window showing the solution values for the selected variable. If the Compute Ranges option in the General Solver Options dialog box is On the sensitivity analysis ranges for the objective function coefficients are also shown. If the model has only been parsed, which means there are no solution values available, only the expanded name for each variable is shown.
All defined macros for the current model are listed in the MACROS branch. If there are multiple MACROS sections in the model they will be shown as separate branches in the tree. To obtain more information about a macro, select the macro name in the tree and press the View button. This will open a view window containing the declaration and contents for the selected macro.
All defined constraints for the current model are listed in the CONSTRAINTS branch. To obtain solution values, such as slack and shadow prices, for a constraint, select the constraint name in the tree and press the View button. This will open a view window showing the solution values for the selected constraint.
Figure 4.30: View Constraint Solution Values
If the Compute Ranges option in the General Solver Options dialog box is On the sensitivity analysis ranges for the right-hand side are also shown. If the model has only been parsed, which means there are no solution values available, only the expanded name for each constraint is shown.