[Coin-discuss] OsiCpx CPXgetstat

Ted Ralphs tkr2 at lehigh.edu
Mon Jun 30 16:42:25 EDT 2003


Matthew Galati wrote:

> It seems that Cplex (8.1) returns the status from the viewpoint of the 
> problem not the algorithm. For example, in:
> 
> bool OsiCpxSolverInterface::isProvenPrimalInfeasible() const
> {
>  debugMessage("OsiCpxSolverInterface::isProvenPrimalInfeasible()\n");
> 
>  int stat = CPXgetstat( env_, getMutableLpPtr() );
>  int method = CPXgetmethod( env_, getMutableLpPtr() );
> 
> #if CPX_VERSION >= 800
>  
>  return (method == CPX_ALG_PRIMAL && stat == CPX_STAT_INFEASIBLE || 
>          method == CPX_ALG_DUAL && stat == CPX_STAT_UNBOUNDED);
> #else
>  return (method == CPX_ALG_PRIMAL && stat == CPX_INFEASIBLE ||       
> method == CPX_ALG_DUAL && stat == CPX_UNBOUNDED ||       stat == 
> CPX_ABORT_PRIM_INFEAS ||
>       stat == CPX_ABORT_PRIM_DUAL_INFEAS);
> #endif
> }
> 
> If you use dual simplex and show dual unbounded - CPX returns that the 
> problem as infeasible (CPX_STAT_INFEASIBLE). Then, in the current OsiCpx 
> implementation, we return false for isProvenPrimalInfeasible().
> Should we just "return CPX_STAT_INFEASIBLE;" ?

Don't you mean "return stat == CPX_STAT_INFEASIBLE;"?

> 
> 
> Matt
> 

-- 
Dr. Ted Ralphs
Assistant Professor
Industrial and Systems Engineering
Lehigh University
(610)758-4784
tkralphs at lehigh.edu
www.lehigh.edu/~tkr2




More information about the Coin-discuss mailing list