NO FRAMES

CPXcopybase

int CPXPUBLIC CPXcopybase(CPXCENVptr env, CPXLPptr lp, const int * cstat, const int * rstat)
Definition file: cplex.h
Include files: cplex.h

The routine CPXcopybase is used to copy a basis into a CPLEX problem object. It is not necessary to copy a basis prior to optimizing an LP problem, but a good initial basis can increase the speed of optimization significantly. A basis does not need to be primal or dual feasible to be used by the optimizer.

Note
The basis is ignored by the optimizer if CPX_PARAM_ADVIND is set to CPX_OFF.
Table 1: Values of basis status for columns in cstat[j]
CPX_AT_LOWER0variable at lower bound
CPX_BASIC1variable is basic
CPX_AT_UPPER2variable at upper bound
CPX_FREE_SUPER3variable free and nonbasic
Table 2: Values of basis status for rows other than ranged rows in rstat[j]
CPX_AT_LOWER0associated slack/surplus/artificial variable nonbasic at value 0.0
CPX_BASIC1associated slack/surplus/artificial variable basic
Table 3: Values of basis status for ranged rows in rstat[j]
CPX_AT_LOWER0 associated slack/surplus/artificial variable nonbasic at its lower bound
CPX_BASIC1associated slack/surplus/artificial variable basic
CPX_AT_UPPER2 associated slack/surplus/artificial variable nonbasic at its upper bound

Example

 status = CPXcopybase (env, lp, cstat, rstat);

See Also:

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

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

cstat

An array containing the basis status of the columns in the constraint matrix. The length of the array is equal to the number of columns in the problem object. Possible values of the basis status of columns appear in Table 1.

rstat

An array containing the basis status of the slack/surplus/artificial variable associated with each row in the constraint matrix. The array's length is equal to the number of rows in the CPLEX problem object. For rows other than ranged rows, the array element rstat[i] has the meaning in Table 2. For ranged rows, the array element rstat[i] has the meaning in Table 3.

Returns:

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