[OS] CPLEX Error 1017: Not available for mixed-integer programs.

Matthew Saltzman mjs at clemson.edu
Mon Feb 18 10:57:21 EST 2008


Ooh, that is ugly.

Could you file a ticket at projects.coin-or.org/Osi and post your patch
there so we don't lose it in the archives?

Thanks.


On Mon, 2008-02-18 at 07:53 -0800, Joe wrote:
> 
> Finally, i've checked in <cplex.h> header file :
> #define CPXERR_NOT_FOR_MIP            1017
> 
> For my purpose, I've made a quick and dirty fix for my OS/Osi sources.
> I'm not sure this would be usefull for anyone else. Please find this
> ugly patch for the trunk :
> 
> Index: /local/joe/20080218/OS/OS1.1/Osi/src/OsiCpx/
> OsiCpxSolverInterface.cpp
> ===================================================================
> --- /local/joe/20080218/OS/OS1.1/Osi/src/OsiCpx/
> OsiCpxSolverInterface.cpp	(revision 1188)
> +++ /local/joe/20080218/OS/OS1.1/Osi/src/OsiCpx/
> OsiCpxSolverInterface.cpp	(working copy)
> @@ -1237,6 +1237,7 @@
>    return colsol_;
>  }
>  //------------------------------------------------------------------
> +
>  const double * OsiCpxSolverInterface::getRowPrice() const
>  {
>    debugMessage("OsiCpxSolverInterface::getRowPrice()\n");
> @@ -1248,7 +1249,7 @@
>  	{
>  	  rowsol_ = new double[nrows];
>  	  int err = CPXgetpi( env_, getMutableLpPtr(), rowsol_, 0,
> nrows-1 );
> -	  if ( err == CPXERR_NO_SOLN )
> +	  if ( err == CPXERR_NO_SOLN || err == CPXERR_NOT_FOR_MIP )
>  	    CoinFillN( rowsol_, nrows, 0.0 );
>  	  else
>  	    checkCPXerror( err, "CPXgetpi", "getRowPrice" );
> @@ -1268,7 +1269,7 @@
>  	{
>  	  redcost_ = new double[ncols];
>  	  int err = CPXgetdj( env_, getMutableLpPtr(), redcost_, 0,
> ncols-1 );
> -	  if ( err == CPXERR_NO_SOLN )
> +	  if ( err == CPXERR_NO_SOLN || err == CPXERR_NOT_FOR_MIP )
>  	    CoinFillN( redcost_, ncols, 0.0 );
>  	  else
>  	    checkCPXerror( err, "CPXgetdj", "getReducedCost" );
> 
> > 
-- 
                Matthew Saltzman

Clemson University Mathematical Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list