Problem Size and Memory Allocation Issues

As we indicated in Change the Problem Object, after you have created a problem object by calling CPXcreateprob(), you can modify the problem in various ways through calls to routines from the Callable Library. There is no need for you to allocate extra space in anticipation of future problem modifications. Any limit on problem size is determined by system resources and the underlying implementation of the system function malloc()-not by artificial limits in ILOG CPLEX.

As you modify a problem object through calls to modification routines from the Callable Library, ILOG CPLEX automatically handles memory allocations to accommodate the increasing size of the problem. In other words, you do not have to keep track of the problem size nor make corresponding memory allocations yourself as long as you are using library modification routines such as CPXaddrows() or CPXaddcols().

However, the sequence of Callable Library routines that you invoke can influence the efficiency of memory management. Likewise, parameters controlling row growth (CPX_PARAM_ROWGROWTH), column growth (CPX_PARAM_COLGROWTH), and nonzero growth (CPX_PARAM_NZGROWTH) can also influence how efficiently ILOG CPLEX allocates memory to accommodate the problem object. These growth parameters determine how much extra space ILOG CPLEX allocates in its internal structures when additions to a problem object increase the size of the problem object so that it exceeds currently allocated space.

Table 3.2 Default values of ILOG CPLEX Growth Parameters

Parameter 
Default value 
CPX_PARAM_ROWGROWTH 
100 
CPX_PARAM_COLGROWTH 
100 
CPX_PARAM_NZGROWTH 
500 

Table 3.2 shows you the default values of these growth parameters. At these default values, if an application populates the problem object one row at a time, then ILOG CPLEX will cache the row additions until an updated problem is needed, for example when a query or optimization function is called. Similarly, it will cache column-based additions after 100 columns, and nonzero-based arrays when the additions of coefficients produces another 500 nonzeros to add to the matrix. Memory Management and Problem Growth offers guidelines about performance tuning with these parameters.


Previous Page: Copying in MIP and QP  Return to Top Next Page: Status and Return Values