> > Parameters of ILOG CPLEX |
Parameters of ILOG CPLEX |
INDEX
![]() |
The behavior of ILOG CPLEX is controlled by a variety of parameters that are each accessible and settable by the user. This manual lists these parameters and explains their settings in the ILOG CPLEX Component Libraries and the Interactive Optimizer. It also explains how to read and write parameter settings of the Callable Library to a file in Saving Parameter Settings to a File.
The following methods set and access parameters for objects of the Concert Technology class IloCplex
in C++ and Java:
The names of the corresponding accessors in the class Cplex
in C#.NET follow the usual conventions of names and capitalization in that language and framework.
Callable Library programs (C and other languages) access and set parameters with the following routines:
In the parameter table, each parameter has a name (that is, a symbolic constant) to refer to it within a program.
CPX_PARAM_
; for example, CPX_PARAM_ITLIM
. They are used as the second argument in all parameter routines (except CPXsetdefaults
which does not require them).
IloCplex::
for scope. For example, IloCplex::ItLim
is the IloCplex
equivalent of CPX_PARAM_ITLIM
.
IloCplex.BooleanParam
, IloCplex.IntParam
, IloCplex.DoubleParam
, and IloCplex.StringParam
for Boolean, integer, floating-point, and string parameters, respectively. The parameter object names use mixed (lower and upper) case letters and must be prefixed with the appropriate class for scope. For example, IloCplex.IntParam.ItLim
is the object representing the parameter CPX_PARAM_ITLIM
.
An integer that serves as a reference number for each parameter is shown in the table. That integer reference number corresponds to the value that each symbolic constant represents, as found in the cplex.h
header file, but it is strongly recommended that the symbolic constants be used instead of their integer equivalents whenever possible, for the sake of portability to future versions of ILOG CPLEX.
Some parameters available for the Callable Library are not supported as parameters for IloCplex
. In particular:
CPX_PARAM_SCRIND
), but when using Concert Technology, you control logging by configuring the output channel
It is possible to read and write a file of parameter settings with the Callable Library. The file extension 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 non-default 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> |
ILOG 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 in 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 non-default values are written to the file. String values may be double-quoted or not, but are always written with double quotation marks.
The comment character in a parameter file is #. ILOG 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 9.0 CPX_PARAM_EPPER 3.45000000000000e-06 CPX_PARAM_IISIND 1 CPX_PARAM_OBJULIM 1.23456789012345e+05 CPX_PARAM_PERIND 1 CPX_PARAM_SCRIND 1 CPX_PARAM_WORKDIR "tmp" |
Copyright © 1987-2003 ILOG, S.A. All rights reserved. Legal terms. | NEXT |