NO FRAMES

CPXgetprestat

int CPXPUBLIC CPXgetprestat(CPXCENVptr env, CPXCLPptr lp, int * prestat_p, int * pcstat, int * prstat, int * ocstat, int * orstat)
Definition file: cplex.h
Include files: cplex.h
Note

This is an advanced routine. Advanced routines typically demand a profound 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 CPXgetprestat is used to get presolve status information for the columns and rows of the presolved problem in the original problem and of the original problem in the presolved problem.

Table 1: Value of prestat_p
0lp is not presolved or there were no reductions
1lp has a presolved problem
2lp was reduced to an empty problem

For variable i in the original problem, values for pcstat[i] appear in Table 2.

Table 2: Values for pcstat[i]
 ≥ 0variable i corresponds to variable pcstat[i] in the presolved problem
CPX_PRECOL_LOW-1variable i is fixed to its lower bound
CPX_PRECOL_UP-2variable i is fixed to its upper bound
CPX_PRECOL_FIX-3variable i is fixed to some other value
CPX_PRECOL_AGG-4variable i is aggregated out
CPX_PRECOL_OTHER-5variable i is deleted or merged for some other reason

For row i in the original problem, values for prstat[i] appear in Table 3.

Table 3: Values for prstat[i]
 ≥ 0row i corresponds to row prstat[i] in the original problem
CPX_PREROW_RED-1if row i is redundant
CPX_PREROW_AGG-2if row i is used for aggregation
CPX_PREROW_OTHER-3if row i is deleted for some other reason

For variable i in the presolved problem, values for ocstat[i] appear in Table 4.

Table 4: Values for ocstat[i]
≥ 0variable i in the presolved problem corresponds to variable ocstat[i] in the original problem.
-1variable i corresponds to a linear combination of some variables in the original problem.

For row i in the original problem, values for orstat[i] appear in Table 5.

Table 5: Values for orstat
≥ 0if row i in the presolved problem corresponds to row orstat[i] in the original problem
-1if row i is created by, for example, merging two rows in the original problem.

Example

 status = CPXgetprestat (env, lp, &presolvestat,
                         precstat, prerstat,
                         origcstat, origrstat);
 

See also admipex6.c in the ILOG CPLEX User's Manual.

Parameters:

env

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

lp

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

prestat_p

A pointer to an integer that will receive the status of the presolved problem associated with LP problem object lp. May be NULL.

pcstat

The array where the presolve statuses of the columns are to be returned. The array must be of length at least the number of columns in the original problem object. May be NULL.

prstat

The array where the presolve statuses of the rows are to be returned. The array must be of length at least the number of rows in the original problem object. May be NULL.

ocstat

The array where the presolve statuses of the columns of the presolved problem are to be returned. The array must be of length at least the number of columns in the presolved problem object. May be NULL.

orstat

The array where the presolve statuses of the rows of the presolved problem are to be returned. The array must be of length at least the number of rows in the presolved problem object. May be NULL.

Returns:

The routine returns zero on success and nonzero if an error occurs.