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

The routine 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: Starting information is not applicable to the barrier optimizer nor to the mixed integer optimizer (MIP).

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.

Any of three different kinds of starting points can be provided:
  • a starting basis (cstat, rstat);
  • starting primal values (cprim, rprim);
  • starting dual values (cdual, rdual).
Only a starting basis is applicable to an invocation of 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.

Note: The starting information is ignored by the optimizers if the parameter known as advanced start switch (CPXPARAM_Advance) is set to 0 (zero).
Table 1. Table 1: Values for cstat[j]
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
Table 2. Table 2: Values of rstat elements other than ranged rows
CPX_AT_LOWER 0 associated slack variable nonbasic at value 0.0 (zero)
CPX_BASIC 1 associated slack artificial variable basic
Table 3. Table 3: Values of rstat elements that are ranged rows
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, rstat must 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 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.

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);