NO FRAMES

CPXcopystart

int CPXPUBLIC CPXcopystart(CPXCENVptr env, CPXLPptr lp, const int * cstat, const int * rstat, const double * cprim, const double * rprim, const double * cdual, const double * rdual)
Definition file: cplex.h
Include files: cplex.h

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 to the barrier optimizer or the mixed integer optimizer.

When a basis (parameters cstat and rstat) is installed for a linear problem and CPXlpopt is used with CPX_PARAM_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.

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.

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.

Note
The starting information is ignored by the optimizers if the parameter CPX_PARAM_ADVIND is off.
Table 1: Values for 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 rstat elements other than ranged rows
CPX_AT_LOWER0associated slack variable nonbasic at value 0.0
CPX_BASIC1associated slack artificial variable basic
Table 3: Values of rstat elements that are ranged rows
CPX_AT_LOWER0associated slack variable nonbasic at its lower bound
CPX_BASIC1associated slack variable basic
CPX_AT_UPPER2associated slack variable nonbasic at upper bound

Example

 status = CPXcopystart (env, 
                        lp, 
                        cstat, 
                        rstat, 
                        cprim, 
                        rprim,
                        cdual, 
                        rdual);

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 CPLEX problem object. If this array is NULL, rstat must be NULL. Table 1 shows the possible values.

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 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 element rstat[i] can be set according to Table 3. If this array is NULL, cstat must 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, rprim must 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, cdual must be NULL.

Returns:

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