Usage
Mixed Integer Users OnlyDescription
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);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX routines.
CPXLPptr lpA pointer to a CPLEX LP problem object as returned by
CPXcreateprob().
int cntAn integer that indicates the total number of types to be changed.
cnt thus specifies the length of the arrays indices and ctype.
int *indicesAn 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 *ctypeAn 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
|
status = CPXchgctype (env, lp, cnt, indices, ctype);