NO FRAMES

CPXcrushform

public int CPXcrushform(CPXCENVptr env, CPXCLPptr lp, int len, const int * ind, const double * val, int * plen_p, double * poffset_p, int * pind, double * pval)
Definition file: cplex.h
Note

This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXcrushform crushes a linear formula of the original problem to a linear formula of the presolved problem.

Example

 status = CPXcrushform (env, lp, len, ind, val,
                        &plen, &poffset, pind, pval);
 

Parameters:

env

A pointer to the CPLEX environment, as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX LP problem object, as returned by CPXcreateprob.

len

The number of entries in the arrays ind and val.

ind

An array to hold the column indices of coefficients in the array val.

val

The linear formula in terms of the original problem. Each entry, ind[i], specifies the column index of the corresponding coefficient, val[i].

plen_p

A pointer to an integer to receive the number of nonzero coefficients, that is, the true length of the arrays pind and pval.

poffset_p

A pointer to a double to contain the value of the linear formula corresponding to variables that have been removed in the presolved problem.

pind

An array to hold the column indices of coefficients in the presolved problem in the array pval.

pval

The linear formula in terms of the presolved problem. Each entry, pind[i], specifies the column index in the presolved problem of the corresponding coefficient, pval[i]. The arrays pind and pval must be of length at least the number of columns in the presolved LP problem object.

Returns:

The routine returns zero if successful and nonzero if an error occurs.