Entering data

Entering data from the keyboard entails these special considerations.

You can use the <return> key to split long constraints, and CPLEX still interprets the multiple lines as a single constraint. When you split a constraint in this way, do not press <return> in the middle of a variable name or coefficient. The following sequence is acceptable:


time: -x1 + x2 + <return>
x3 <= 20  <return>
labor:  x1 - 3x2 + x3 <= 30  <return>

The following entry, however, is incorrect since the <return> key splits a variable name.


time: -x1 + x2 + x <return>
3 <= 20  <return>
labor:  x1 - 3x2 + x3 <= 30  <return>

If you type a line that CPLEX cannot interpret, a message indicating the problem will appear, and the entire constraint or objective function will be ignored. You must then re-enter the constraint or objective function.

The final point to remember when you are entering a problem is that after you have pressed <return> , you can no longer directly edit the characters that precede the <return>. As long as you have not pressed the <return> key, you can use the <backspace> key to go back and change what you typed on that line. After you press <return>, you must use the change command to modify the problem. The change command is documented in Changing a problem.