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

How can I free the solution storage? #624

Open
Joao-Dionisio opened this issue Nov 11, 2022 · 2 comments
Open

How can I free the solution storage? #624

Joao-Dionisio opened this issue Nov 11, 2022 · 2 comments

Comments

@Joao-Dionisio
Copy link
Collaborator

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:
image

When I use freeReoptSolve(), the code crashes without an error message:
image

This crash occurs on the next line, where I optimize the subproblem. Using freeSol also crashes the code.

code.zip

@Joao-Dionisio Joao-Dionisio changed the title Can't free solution storage How can I free the solution storage? Nov 11, 2022
@mmghannam
Copy link
Member

Hi @Joao-Dionisio, I think with the help of this method from SCIP we can build another convenience method to clear all solutions.

@Joao-Dionisio
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants