Saving a parameter specification file
A parameter specification file records your customized parameter settings..
You can tell the Interactive Optimizer to read customized
parameter settings from a parameter specification file. By default,
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 CPLEX to look for it in
another directory by setting the system environment variable CPLEXPARFILE to
the full path name of 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 Microsoft Windows, you
might click on the System icon in the control panel, then select the
environment tab from the available system properties tabs, and then
define the variable there.
During initialization in the Interactive Optimizer, 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, CPLEX displays the message
“Initial parameter values are being read from cplex.par”
(or from the parameter specification file you specified). As CPLEX
displays that message on the screen, it also writes the message to
the log file. If 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:
Use an ordinary text editor to create a file where each line observes the following syntax:
parameter-name option value
Use the command
display settingsin the Interactive Optimizer to generate a list of current parameter settings. Those settings will be recorded in the log file. You can then edit the log file with your preferred text editor to create your parameter specification file.display settings changedlists parameters different from the default with their values.display settings alllists all parameters with their values.
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 CPLEX reads a parameter specification file, if the parameter name and value are valid, CPLEX sets the parameter and writes a message about it to the screen and to the log file. If CPLEX encounters a repeated parameter, it uses the last value specified. CPLEX terminates under the following conditions:
if it encounters a parameter that is unknown;
if it encounters a parameter that is not unique;
if the parameter is correctly specified but the value is missing, invalid, or out of range.
Here is an example of a parameter specification file
that tells CPLEX to use wall clock rather than CPU time while limiting
total run time to 60 seconds. It also instructs CPLEX to open a log
file named problem.log .
clocktype 2
timelimit 60
logfile problem.log