CPXcopystart


Description

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.

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.

Return Value

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

Synopsis

  int CPXcopystart (CPXCENVptr env,
                    CPXLPptr lp,
                    const int *cstat,
                    const int *rstat,
                    const double *cprim,
                    const double *rprim,
                    const double *cdual,
                    const double *rdual);

Arguments

CPXCENVptr env

The pointer to the CPLEX environment as returned by CPXopenCPLEX().

CPXLPptr lp

A pointer to a CPLEX problem object as returned by CPXcreateprob().

const int *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.

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.

const int *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] has the following meaning:

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.

const double *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.

const double *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.

const double *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.

const double *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.

Example

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


Previous Page: CPXcopysos Return to Top Next Page: CPXcreateprob