Usage
Mixed Integer Users OnlyDescription
The CPXcopyctype() routine can be used to copy integer and binary variable declarations for a given LP problem. This routine allows the types of all the variables to be set in one function call. When CPXcopyctype() is called, any current solution information is freed.j to be binary by setting the corresponding ctype[j]='B' does not change the bounds associated with that variable. This will cause a call to CPXmipopt() to fail if the value of the corresponding variable is not between 0 and 1 in the solution of the LP relaxation at the root of the search tree. Explicitly setting the bounds of binary variables to 0 and 1 is recommended.CPXPROB_LP, it will be changed to CPXPROB_MIP. This function will fail if the type of the LP problem object is CPXPROB_QP.Return Value
The routine returns a zero on success, and a nonzero if an error occurs.Synopsis
int CPXcopyctype (CPXENVptr env,
CPXLPptr lp,
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().
char *ctypeAn array of length
CPXgetnumcols(env,lp) containing the type of each column in the constraint matrix.
CPX_CONTINUOUS
|
`C'
|
continuous variable
|
CPX_BINARY
|
`B'
|
binary variable
|
CPX_INTEGER
|
`I'
|
general integer variable
|
Possible values for ctype[j]:
status = CPXcopyctype (env, lp, ctype);