Displaying variable or constraint names
These options display names of variables or constraints in the Interactive Optimizer.
You can display a variable name by using the display command
with the options problem names variables.
If you do not enter the word variables,
CPLEX prompts you to specify whether you wish to see a constraint
or variable name.
Type the following command:
display problem names variables
In response, CPLEX prompts you to specify a set of variable names to be displayed, like this:
Display which variable name(s):
Specify these variables by entering the names of the
variables or the numbers corresponding to the columns of those variables.
A single number can be used or a range such as 1-2 .
All of the names can be displayed if you type a hyphen (the character
- ). Try this by entering a hyphen at the prompt and pressing
the <return> key.
Display which variable name(s): -
You could also use a wildcard to display variable names, like this:
Display which variable name(s): *
In the example, there are three variables with default names. CPLEX displays these three names:
x1 x2 x3
If you want to see only the second and third names, you
could either enter the range as 2-3 or
specify everything following the second variable with 2-.
Try this technique:
display problem names variables
Display which variable name(s): 2-
x2 x3
If you enter a number without a hyphen, you will see a single variable name:
display problem names variables
Display which variable name(s): 2
x2
Summary
You can use a wildcard in the
displaycommand to specify a range of items.You can display variable names by entering the command:
display problem names variablesYou can display constraint names by entering the command:
display problem names constraints