Saving a Parameter Specification File

You can tell the ILOG CPLEX Interactive Optimizer to read customized parameter settings from a parameter specification file. By default, ILOG CPLEX expects a parameter specification file to be named cplex.par, and it looks for that file in the directory where it is executing. However, you can rename the file, or tell ILOG CPLEX to look for it in another directory by setting the system environment variable CPLEXPARFILE to the full path name to your parameter specification file. You set that environment variable in the customary way for your platform. For example, on a Unix platform, you might use a shell command to set the environment variable, or on a personal computer running NT, you might click on the System icon in the control panel, then select the environment tab from the available system properties tabs.

During initialization in the Interactive Optimizer, ILOG CPLEX locates any available parameter specification file (by checking the current execution directory for cplex.par and by checking the environment variable CPLEXPARFILE) and reads that file. As it opens the file, ILOG CPLEX displays the message "Initial parameter values are being read from cplex.par" (or from the parameter specification file you specified). As ILOG CPLEX displays that message on the screen, it also writes the message to the log file. If ILOG CPLEX cannot open the file, it displays no message, records no note in the log file, and uses default parameter settings.

You can use a parameter specification file to change any parameter or parameters accessible by the set command in the Interactive Optimizer. The parameter types, names, and options are those used by the set command in the Interactive Optimizer.

To create a parameter specification file, you can use either of these alternatives:

parameter-name option value
display settings changed lists parameters different from the default.
display settings all lists all parameters.

Each entry on a line must be separated by at least one space or tab. Blank lines in a parameter specification file are acceptable; there are no provisions for comments in the file. You may abbreviate parameter names to unique character sequences, as you do in the set command.

As ILOG CPLEX reads a parameter specification file, if the parameter name and value are valid, ILOG CPLEX sets the parameter and writes a message about it to the screen and to the log file. If ILOG CPLEX encounters a repeated parameter, it uses the last value specified. ILOG CPLEX terminates under the following conditions:

Here is an example of a parameter specification file that resets the limits on the size of problem reads and opens a log file named problem.log.

read constraints 50

read variables 100

read nonzeros 500

logfile problem.log


Previous Page: Managing Parameters in the Interactive Optimizer  Return to Top Next Page: Index