Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
pfetsch opened this issue Dec 11, 2022 · 5 comments
Closed

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

pfetsch opened this issue Dec 11, 2022 · 5 comments

Comments

@pfetsch
Copy link

pfetsch commented Dec 11, 2022

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?

@jjhforrest
Copy link
Contributor

jjhforrest commented Dec 11, 2022 via email

@pfetsch
Copy link
Author

pfetsch commented Dec 11, 2022

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

@pfetsch
Copy link
Author

pfetsch commented Dec 11, 2022

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;
}

@jjhforrest
Copy link
Contributor

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.

@pfetsch
Copy link
Author

pfetsch commented Dec 11, 2022

Yes it works very well, thank you!

@pfetsch pfetsch closed this as completed Dec 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants