Reading LP files

To read a formatted LP file into the Interactive Optimizer, use this command with options.

At the CPLEX> prompt type:


read 

The following message appears requesting a file name:


Name of file to read:

Four files have been saved at this point in this tutorial:

example

example2

example.lp

example.bas

Specify the file named example that you saved while practicing the write command.

You recall that the example problem was saved in LP format, so in response to the file type prompt, enter:


lp

CPLEX displays a confirmation message, like this:


Problem 'example' read.
Read Time =   0.03 sec.

The example problem is now in memory, and you can manipulate it with CPLEX commands.

Tip:

The intermediate prompts for the read command can be avoided by entering the entire command on one line, like this:


make LPex1.class
java -Djava.library.path=../../../bin/<platform>: \
     -classpath ../../../lib/cplex.jar: LPex1 -r
read example lp