The routine CPXcopystart()
is used to provide starting information for use in a subsequent call to a simplex optimization routine (CPXlpopt()
with CPX_PARAM_LPMETHOD
or CPX_PARAM_QPMETHOD
set to CPX_ALG_PRIMAL
or CPX_ALG_DUAL
, CPXdualopt()
, CPXprimopt()
, or CPXhybnetopt()
). Starting information is not applicable when using the barrier optimizer or the mixed integer optimizer.
Any of three different kinds of starting points can be provided: a starting basis (cstat
, rstat
), starting primal values (cprim
, rprim
), and starting dual values (cdual
, rdual
). Only a starting basis is applicable to a CPXhybnetopt()
call, but for Dual Simplex and Primal Simplex any combination of these three types of information can be of use in providing a starting point. If no starting-point is provided, this routine returns an error; otherwise any resident starting information in the CPLEX problem object is freed and the new information is copied into it.
![]() |
|
The routine returns a zero on success, and a nonzero if an error occurs.
int CPXcopystart (CPXCENVptr env, CPXLPptr lp, const int *cstat, const int *rstat, const double *cprim, const double *rprim, const double *cdual, const double *rdual); |
The pointer to the CPLEX environment as returned by CPXopenCPLEX()
.
A pointer to a CPLEX problem object as returned by CPXcreateprob()
.
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 non-basic |
Values for cstat[j]:
If this array is NULL
, rstat
must be NULL
.
CPX_AT_LOWER | 0 | associated slack variable non-basic at value 0.0 |
CPX_BASIC | 1 | associated slack artificial variable basic |
For ranged rows, the array element rstat[i]
has the following meaning:
CPX_AT_LOWER | 0 | associated slack variable non-basic at its lower bound |
CPX_BASIC | 1 | associated slack variable basic |
CPX_AT_UPPER | 2 | associated slack variable non-basic at upper bound |
If this array is NULL
, cstat
must be NULL
.
status = CPXcopystart (env, lp, cstat, rstat, cprim, rprim, cdual, rdual); |