Previous Page: CPXmemcpyFirst PageNext Page: CPXmpsmread

CPXmipopt


Description

At any time after a mixed integer program has been created via a call to CPXcreateprob(), the routine CPXmipopt() may be used to find a solution to that problem.

Return Value

If CPXmipopt() succeeds, it returns a 0. Success means either an optimal solution was found or some limit on optimization was reached. Nonzero values are error codes indicating which type of failure occurred. Use the CPXgetstat() routine to determine the status of the mixed integer optimization. One possible error is the inability to solve a subproblem satisfactorily, CPXERR_SUBPROB_SOLVE. The solution status of the subproblem optimization can be obtained with the function CPXgetsubstat().

An LP solution does not exist at the end of CPXmipopt(), so post-solution information is available only through the special mixed integer solution routines. To obtain post-solution information for the LP subproblem associated with either the relaxed problem or the integer solution, use the CPXchgprobtype() function.

Synopsis

int CPXmipopt (CPXENVptr env,
               CPXLPptr lp);

Arguments


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

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

Examples

status = CPXmipopt (env, lp);

See Also

Example mipex1.c in the CPLEX User's Manual.

Previous Page: CPXmemcpyFirst PageNext Page: CPXmpsmread