Open Joao-Dionisio opened 1 year ago
Hi @Joao-Dionisio, I think with the help of this method from SCIP we can build another convenience method to clear all solutions.
Hey @mmghannam, thanks for picking this up :)
Yeah, you're right, that would definitely be helpful! Although I think freeTransform
should also do it, I think, and freeReoptSolve
should definitely not crash the code.
I am working on a pricer and my objective is to define the subproblem only once, in order to avoid unnecessary time with building the model every iteration. For this, I am adding the subMIP to the attributes of the class, and only change the objective function to reflect the changing dual values. However, throughout the iterations, the solution storage is not emptied when I use either freeTransform or freeReoptSolve.
I reproduced my problem with simpler code, using a Cutting Stock example of this repo. (The code doesn't terminate because I am not updating the objective function, it is not relevant for the issue.)
When I use freeTransform(), the solutions are kept:
When I use freeReoptSolve(), the code crashes without an error message:
This crash occurs on the next line, where I optimize the subproblem. Using freeSol also crashes the code.
code.zip