ILOG CPLEX 11.0 User's Manual > Languages and APIs > ILOG CPLEX Callable Library > Managing Parameters from the Callable Library

Some ILOG CPLEX parameters assume values of type double; others assume values of type int; others are strings (that is, C-type char*). Consequently, in the Callable Library, there are sets of routines (one for int, one for double, one for char*) to access and to change parameters that control the ILOG CPLEX environment and guide optimization.

For example, the routine CPXinfointparam shows you the default, the maximum, and the minimum values of a given parameter of type int, whereas the routine CPXinfodblparam shows you the default, the maximum, and the minimum values of a given parameter of type double, and the routine CPXinfostrparam shows you the default value of a given string parameter. Those three Callable Library routines observe the same conventions: they return 0 (zero) from a successful call and a nonzero value in case of error.

The routines CPXinfointparam and CPXinfodblparam expect five arguments:

The routine CPXinfostrparam differs slightly in that it does not expect pointers to variables to hold the minimum and maximum values as those concepts do not apply to a string parameter.

To access the current value of a parameter that interests you from the Callable Library, use the routine CPXgetintparam for parameters of type int, CPXgetdblparam for parameters of type double, and CPXgetstrparam for string parameters. These routines also expect arguments to indicate the environment, the parameter you want to check, and a pointer to a variable to hold that current value.

No doubt you have noticed in other chapters of this manual that you can set parameters from the Callable Library. There are, of course, routines in the Callable Library to set such parameters: one sets parameters of type int; another sets parameters of type double; another sets string parameters.

The reference manual ILOG CPLEX Parameters documents the type of each parameter (int, double, char*) along with the symbolic constant and reference number representing the parameter.

The routine CPXsetdefaults resets all parameters (except the log file) to their default values, including the ILOG CPLEX callback functions. This routine resets the callback functions to NULL. Like other Callable Library routines to manage parameters, this one accepts an argument indicating the environment, and it returns 0 for success or a nonzero value in case of error.