Ordering Variables

In the example problem there is a direct correlation between the variable names and their numbers (x1 is variable 1, x2 is variable 2, etc.); that is not always the case. The internal ordering of the variables is based on their order of occurrence when the problem is entered. For example, if x2 had not appeared in the objective function, then the order of the variables would be x1, x3, x2.

You can see the internal ordering by using the hyphen when you specify the range for the variables option. The variables are displayed in the order corresponding to their internal ordering.

All of the options of the display command can be entered directly after the word display to eliminate intermediate steps. The following command is correct, for example:

  display problem names variables 2-3

Previous Page: Displaying Variable or Constraint Names   Return to Top Next Page: Displaying Constraints