White space and line length in LP file format

CPLEX conforms to these rules about white space and line length for the LP file format.

In general, white space between characters is irrelevant as it is skipped when a file is read. However, white space is not allowed in the keywords used to introduce a new section, such as MAX, MIN, ST, or BOUNDS. Also the keywords must be separated by white space from the rest of the file and must be at the beginning of a line.

The maximum length for any name is 255. The maximum length of any line of input is 560.

Skipping spaces may cause CPLEX to misinterpret (and accept) an invalid entry, such as the following:


 x1 x2 = 0

If the user intended to enter that example as a nonlinear constraint, CPLEX would instead interpret it as a constraint specifying that one variable named x1x2 must be equal to zero.

To indicate a quadratic constraint in this section, use explicit notation for multiplication and exponentiation (not space).