CPXXcopystart and CPXcopystart
This routine provides starting information for use in a subsequent call to a simplex optimization routine.
int CPXXcopystart( CPXCENVptr env, CPXLPptr lp, int const * cstat, int const * rstat, double const * cprim, double const * rprim, double const * cdual, double const * rdual )
int CPXcopystart( CPXCENVptr env, CPXLPptr lp, int const * cstat, int const * rstat, double const * cprim, double const * rprim, double const * cdual, double const * rdual )
Description
CPXXcopystart/CPXcopystart
provides starting
information for use in a subsequent call to a simplex optimization routine. For example,
the subsequent call can be one of the following combinations:
-
CPXXlpopt and CPXlpopt
with the parameter to control the
algorithm for continuous linear problems
set to the value
CPX_ALG_PRIMALorCPX_ALG_DUAL; -
CPXXqpopt and CPXqpopt
with the parameter to control the
algorithm for continuous quadratic optimization
set to the value
CPX_ALG_PRIMALorCPX_ALG_DUAL; - CPXXdualopt and CPXdualopt;
- CPXXprimopt and CPXprimopt;
- CPXXhybnetopt and CPXhybnetopt.
When a basis (arguments cstat and
rstat) is
installed for a linear problem and
CPXXlpopt/CPXlpopt is used with
CPXPARAM_LPMethod set to
CPX_ALG_AUTOMATIC, CPLEX
will use the primal simplex algorithm if the basis is primal feasible and
the dual simplex method otherwise.
-
a starting basis (
cstat,rstat); - starting primal values
(
cprim,rprim); - starting dual values
(
cdual,rdual).
CPXXhybnetopt/CPXhybnetopt,
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.If you provide a starting basis, then both cstat and
rstat must be specified. It is permissible to provide
cprim with or without
rprim, or rdual
with or without cdual;
arrays not being provided must be passed as NULL pointers.
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 variable nonbasic at value 0.0 (zero) |
CPX_BASIC |
1 |
associated slack artificial variable basic |
CPX_AT_LOWER |
0 |
associated slack variable nonbasic at its lower bound |
CPX_BASIC |
1 |
associated slack variable basic |
CPX_AT_UPPER |
2 |
associated slack variable nonbasic at 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 CPLEX problem object. If this array is NULL,
rstatmust be NULL. Table 1 shows the possible values. - rstat
-
An array containing the basis status of the slack, 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 LP problem. For rows other than ranged rows, the array element
rstat[i]can be set according to Table 2. For ranged rows, the array elementrstat[i]can be set according to Table 3. If this array is NULL,cstatmust be NULL. - cprim
-
An array containing the initial primal values of the column variables. The length of the array must be no less than the number of columns in the CPLEX problem object. If this array is NULL,
rprimmust be NULL. - rprim
- An array containing the initial primal values of the slack (row) variables. The length of the array must be no less than the number of rows in the CPLEX problem object. This array may be NULL.
- cdual
- An array containing the initial values of the reduced costs for the column variables. The length of the array must be no less than the number of columns in the CPLEX problem object. This array may be NULL.
- rdual
-
An array containing the initial values of the dual variables for the rows.The length of the array must be no less than the number of rows in the CPLEX problem object. If this array is NULL,
cdualmust be NULL.
Return
The routine returns 0 (zero) if successful and nonzero if an error occurs.Example
status = CPXcopystart (env,
lp,
cstat,
rstat,
cprim,
rprim,
cdual,
rdual);