Previous Page: CPXchgcolname First PageNext Page: CPXchgname

CPXchgctype


Usage

Mixed Integer Users Only

Description

The routine CPXchgctype() is used to change the types of a set of variables of an LP problem object. Several types can be changed at once, with each type specified by the index of the variable with which it is associated. If a variable is to be changed to binary, a call to CPXchgbds() should also be made to change the bounds to 0 and 1.

Return Value

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

Synopsis

int CPXchgctype (CPXENVptr env,
                 CPXLPptr lp,
                 int cnt,
                 int *indices,
                 char *ctype);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

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

int cnt
An integer that indicates the total number of types to be changed. cnt thus specifies the length of the arrays indices and ctype.

int *indices
An array containing the numerical indices of the columns corresponding to the variables the types of which are to be changed. Note that column j of the constraint matrix has the internal index j - 1.

char *ctype
An array containing characters that represent the new type for the column. Possible values for ctype[j] are:

CPX_CONTINUOUS  
`C'  
make column indices[j] continuous  
CPX_BINARY  
`B'  
make column indices[j] binary  
CPX_INTEGER  
`I'  
make column indices[j] general integer  

Example

status = CPXchgctype (env, lp, cnt, indices, ctype);
Previous Page: CPXchgcolname First PageNext Page: CPXchgname