NO FRAMES

CPXcopypartialbase

int CPXPUBLIC CPXcopypartialbase(CPXCENVptr env, CPXLPptr lp, int ccnt, const int * cindices, const int * cstat, int rcnt, const int * rindices, const int * rstat)
Definition file: cplex.h
Include files: cplex.h

The routine CPXcopypartialbase is used to copy a partial basis into an LP problem object. Basis statuses do not need to be specified for every variable or slack/surplus/artificial variable. If the status of a variable is not specified, it is made nonbasic at its lower bound if the lower bound is finite; otherwise, it is made nonbasic at its upper bound if the upper bound is finite; otherwise, it is made nonbasic at 0.0. If the status of a slack/surplus/artificial variable is not specified, it is made basic.

Table 1: Values of cstat[i]
CPX_AT_LOWER0variable at lower bound
CPX_BASIC1variable is basic
CPX_AT_UPPER2variable at upper bound
CPX_FREE_SUPER3variable free and nonbasic
Table 2: Status of rows other than ranged rows in rstat[i]
CPX_AT_LOWER0associated slack variable nonbasic at value 0.0
CPX_BASIC1associated slack/surplus/artificial variable basic
Table 3: Status of ranged rows in rstat[i]
CPX_AT_LOWER0associated slack variable nonbasic at its lower bound
CPX_BASIC1associated slack variable basic
CPX_AT_UPPER2associated slack variable nonbasic at its upper bound

Example

 status = CPXcopypartialbase (env, lp, ccnt, colind, colstat,
                              rcnt, rowind, rowstat);
 

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.

ccnt

An integer that indicates the number of variable/column statuses specified, and is the length of the cindices and cstat arrays.

cindices

An array of length ccnt that contains the indices of the variables for which statuses are being specified.

cstat

An array of length ccnt where the ith entry contains the status for variable cindices[i].

rcnt

An integer that indicates the number of slack/surplus/artificial statuses specified, and is the length of the rindices and rstat arrays.

rindices

An array of length rcnt that contains the indices of the slack/surplus/artificials for which statuses are being specified.

rstat

An array of length rcnt where the ith entry contains the status for slack/surplus/artificial rindices[i]. For rows other than ranged rows, the array element rstat[i] has the meaning summarized in Table 2. For ranged rows, the array element rstat[i] has the meaning summarized in Table 3.

Returns:

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