CPXcopyctype() can be used to copy variable type information to a given problem. Variable types indicate whether a variable is continuous, integer, binary, semi-continuous, or semi-integer. If the type of the problem object is
CPXPROB_LP, it is changed to
CPXPROB_MILP. If the type of the problem object is
CPXPROB_QP, it is changed to
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.
Defining a variable
Similarly, defining a variable
The routine returns a zero on success, and a nonzero if an error occurs.
int CPXcopyctype (CPXCENVptr env, CPXLPptr lp, const char *xctype);
The pointer to the CPLEX environment as returned by
A pointer to a CPLEX problem object as returned by
An array of length
CPXgetnumcols(env,lp) containing the type of each column in the constraint matrix.
Possible values for
general integer variable