[OS] CPLEX Error 1017: Not available for mixed-integer programs.
Joe
joe.boublack at gmail.com
Mon Feb 18 10:53:26 EST 2008
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" );
--~--~---------~--~----~------------~-------~--~----~
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