CPXXcrushform and CPXcrushform
The routineCPXcrushform crushes a linear formula of the
original problem to a linear formula of the presolved problem.
int CPXXcrushform( CPXCENVptr env, CPXCLPptr lp, CPXDIM len, CPXDIM const * ind, double const * val, CPXDIM * plen_p, double * poffset_p, CPXDIM * pind, double * pval )
int CPXcrushform( CPXCENVptr env, CPXCLPptr lp, int len, int const * ind, double const * val, int * plen_p, double * poffset_p, int * pind, double * pval )
Description
This is an advanced routine. Advanced routines typically demand a thorough understanding of the algorithms used by CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, the team encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.
The routineCPXcrushform crushes a linear formula of the
original problem to a linear formula of the presolved problem.
Arguments
- env
-
A pointer to the CPLEX environment, as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX LP problem object, as returned by
CPXXcreateprob/CPXcreateprob. - len
-
The number of entries in the arrays
indandval. - 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
pindandpval. - 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 arrayspindandpvalmust be of length at least the number of columns in the presolved LP problem object.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXcrushform (env, lp, len, ind, val,
&plen, &poffset, pind, pval);