CPXXuncrushform and CPXuncrushform
The routine CPXXuncrushform/CPXuncrushform uncrushes a linear formula of
the presolved problem to a linear formula of the original problem.
int CPXXuncrushform( CPXCENVptr env, CPXCLPptr lp, CPXDIM plen, CPXDIM const * pind, double const * pval, CPXDIM * len_p, double * offset_p, CPXDIM * ind, double * val )
int CPXuncrushform( CPXCENVptr env, CPXCLPptr lp, int plen, int const * pind, double const * pval, int * len_p, double * offset_p, int * ind, double * val )
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 routine CPXXuncrushform/CPXuncrushform uncrushes a linear formula of
the presolved problem to a linear formula of the original problem.
Let cols = CPXgetnumcols(env, lp). If
ind[i] < cols
then the i-th variable in the formula is the variable
with index ind[i] in the original problem.
If ind[i] >= cols, then the i-th variable in the formula is the
slack for the (ind[i]-cols)-th ranged row. The
arrays ind and val must be of length at least the
number of columns plus the number of ranged rows in the original LP problem
object.
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. - plen
-
The number of entries in the arrays
pindandpval. - pind
-
An array containing the column indices of coefficients in the array
pval. - pval
-
The linear formula in terms of the presolved problem. Each entry,
pind[i], specifies the column index of the corresponding coefficient,pval[i]. - len_p
-
A pointer to an integer to receive the number of nonzero coefficients, that is, the true length of the arrays
indandval. - offset_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.
- ind
-
An array containing indices of coefficients in the array
val. - val
- The linear formula in terms of the original problem.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXuncrushform (env, lp, plen, pind, pval,
&len, &offset, ind, val);