Search code examples
linear-programmingscipinteger-programming

How to get the number of cuts and the actual cuts that have been added to SCIP using a conshdlr in C++


My scip solution log is showing that the number of cuts that have been added are 10 but when I try to get the number using SCIPgetNCuts(scip) I always get 0.

In addition to this, is there a way to get all the cuts that have been added into a vector?


Solution

  • So, I was able to figure this one out.

    Just create an additional data structure (like an std::vector) which will hold the cuts( basically the LProws and you might have to create some supplemental datastrcutureas to hold the actual cut info (say graphs info etc)). Pass this data-structure(s) between the pricer and the constraint handler and add the new variables to the existing constraints and the cuts.