PRM file format: parameter settings

CPLEX supports the PRM file format for nondefault parameter settings.

It is possible to read and write a file of parameter settings with the Callable Library. This kind of file is known as a PRM file. The file extension for a PRM file is .prm. The Callable Library routine CPXreadcopyparam reads parameter values from a file with the .prm extension. The routine CPXwriteparam writes a file of the current nondefault parameter settings to a file with the .prm extension. Here is the format of such a file:


CPLEX Parameter File Version number
  parameter_name   parameter_value

CPLEX reads the entire file before changing any of the parameter settings. After successfully reading a parameter file, the Callable Library first sets all parameters to their default value. Then it applies the settings it read from the parameter file. No changes are made if the parameter file contains errors, such as missing or illegal values. There is no checking for duplicate entries in the file. In the case of duplicate entries, the last setting in the file is applied.

When you write a parameter file from the Callable Library, only the nondefault values are written to the file.

String values may be enclosed in double quotation marks or not for reading, but CPLEX always writes string values within double quotation marks. There is no convention for marking double quotation marks as literal and thus removing their special function as delimiters. In other words, you cannot “escape” double quotation marks in this format. Consequently, a parameter value of type string containing double quotation marks as an element of the string is not supported.

Tip:

The first line CPLEX Parameter File Version number is optional. It is safe to omit it. If this line is present, then it must adhere to the specified format and CPLEX will perform the checks mentioned below. An easy way to produce a correctly formatted PRM file is to have CPLEX write it for you.

The comment character in a parameter file is #. CPLEX ignores the rest of the line.

The Callable Library issues a warning if the version recorded in the parameter file does not match the version of the product. A warning is also issued of a non-integral value is given for an integer-valued parameter.

Here is an example of such a file:


CPLEX Parameter File Version 12.3.0.0
CPX_PARAM_EPPER                  3.45000000000000e-06
CPX_PARAM_OBJULIM                1.23456789012345e+05
CPX_PARAM_PERIND                 1
CPX_PARAM_SCRIND                 1
CPX_PARAM_WORKDIR                "tmp"