CPXXcopybase and CPXcopybase
The routine CPXXcopybase/CPXcopybase copies a basis into a
CPLEX problem object.
int CPXXcopybase( CPXCENVptr env, CPXLPptr lp, int const * cstat, int const * rstat )
int CPXcopybase( CPXCENVptr env, CPXLPptr lp, int const * cstat, int const * rstat )
Description
The routine CPXXcopybase/CPXcopybase copies 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 the parameter known as
advanced start switch
(
CPXPARAM_Advance)
is set to 0 (zero).
CPX_AT_LOWER |
0 |
variable at lower bound |
CPX_BASIC |
1 |
variable is basic |
CPX_AT_UPPER |
2 |
variable at upper bound |
CPX_FREE_SUPER |
3 |
variable free and nonbasic |
CPX_AT_LOWER |
0 |
associated slack, surplus, or artificial variable is nonbasic at value 0.0 (zero) |
CPX_BASIC |
1 |
associated slack, surplus, or artificial variable is basic |
CPX_AT_LOWER |
0 |
associated slack, surplus, or artificial variable is nonbasic at its lower bound |
CPX_BASIC |
1 |
associated slack, surplus, or artificial variable is basic |
CPX_AT_UPPER |
2 |
associated slack, surplus, or artificial variable is nonbasic at its upper bound |
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/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, or surplus, or artificial variable associated with each row in the constraint matrix. The length of the array 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 elementrstat[i]has the meaning in Table 3.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXcopybase (env, lp, cstat, rstat);