coin-or/Clp

ClpSimplex::getBasics() not available after barrier with crossover

pfetsch opened this issue · 5 comments

When I call ClpSimplex::barrier() with crossover, then rowArray_ is not available and thus ClpSimplex::getBasics() cannot be successfully called. Indeed, rowArray_ does not seem to be copied to the original model.

Can this be (easily) fixed?

Indeed, I get the above message. It comes from a call from SCIP. I just call ClpSimplex::barrier(true) and then ClpSimplex::getBasics().

Example code:

#include <stdlib.h>
#include <ClpSimplex.hpp>
#include <ClpConfig.h>

int main(int argc, char** argv)
{
   ClpSimplex* clp = new ClpSimplex();

   clp->readMps("flugpl.mps");
   clp->setLogLevel(2);
   clp->barrier(true);

   int nrows = clp->numberRows();
   int* idx = (int*) malloc(nrows * sizeof(int));
   clp->getBasics(idx);

   delete clp;

   return 0;
}

clp->dual() would also give same error. clp->dual(0,1) where 1 is the value given to startFinishOptions is needed for dual. barrier does not have the option to pass in startFinishOptions. I should say did not have the option. I have just checked in modifications (master) to allow that.

Inform me if the modifications don't work for you.

Yes it works very well, thank you!