Changing a problem from type CPXPROB_LP
to CPXPROB_MILP
or from type CPXPROB_QP
to CPXPROB_MIQP
causes a ctype
array to be created such that all variables are considered continuous. Changing a problem from type CPXPROB_MILP
to CPXPROB_MIQP
causes an empty quadratic matrix to be created such that the objective is quadratic with Q = 0
. A problem of type CPXPROB_MILP
or CPXPROB_MIQP
can be solved only by the routine CPXmipopt()
.
The routine returns a zero on success, and a nonzero if an error occurs.
int CPXchgprobtype (CPXCENVptr env, CPXLPptr lp, int type); |
The pointer to the CPLEX environment as returned by CPXopenCPLEX()
.
A pointer to a CPLEX LP problem object as returned by CPXcreateprob()
.
An integer indicating the desired problem type. See the previous discussion for possible values.
status = CPXchgprobtype (env, lp, CPXPROB_MILP); |