Accessing parameters

Users access and modify parameters by means of methods in the various APIs.

Documentation about CPLEX parameters specific to the Python API is available as online help inside a Python session. A brief introduction to CPLEX parameters is available in the topic Using CPLEX parameters in the CPLEX Python API in the tutorial about Python in Getting Stated with CPLEX.

The following methods set and access parameters for objects of the class IloCplex in C++:

setParam
getParam
getMin
getMax
getDefault
setDefaults

The following methods set and access parameters for objects of the class IloCplex in Java:

setParam
getParam
getMin
getMax
getDefault
setDefaults

The names of the corresponding accessors in the class Cplex in the .NET API follow the usual conventions of names and capitalization of languages in that framework. For example, the class Cplex and its method Solve are denoted Cplex.Solve. Likewise, the methods Cplex.GetParam and SetParam access and set parameters in the .NET API.

C applications and applications written in other languages callable from C access and set parameters with the following routines:

Callable Library routine to access parameters Purpose
CPXgetdblparam Accesses a parameter of type double
CPXsetdblparam Changes a parameter of type double
CPXinfodblparam Gets the default value and range of a parameter of type double
CPXgetintparam Accesses a parameter of type integer
CPXsetintparam Changes a parameter of type integer
CPXinfointparam Gets the default value and range of a parameter of type integer
CPXgetlongparam Accesses a parameter of type long
CPXsetlongparam Changes a parameter of type long
CPXinfolongparam Gets the default value and range of a parameter of type long
CPXgetstrparam Accesses a parameter of type string
CPXsetstrparam Changes a parameter of type string
CPXinfostrparam Gets the default value of a parameter of type string
CPXsetdefaults Resets all parameters to their standard default values
CPXgetparamname Accesses the name of a parameter
CPXgetparamnum Access the identifying number assigned to a parameter
CPXgetchgparams Accesses all parameters not currently at their default value