Coluna.jl icon indicating copy to clipboard operation
Coluna.jl copied to clipboard

update_all_ip_primal_solutions! reverse loop

Open guimarqu opened this issue 5 years ago • 4 comments

https://github.com/atoptima/Coluna.jl/blob/50b2f4ed95dc7cfa95f4cea5cc9bddedfeefd79e/src/Algorithm/utilities/optimizationstate.jl#L223-L231

@rrsadykov what does it change if you loop in reverse or normal mode ? I don't understand the comment.

guimarqu avatar Oct 14 '20 08:10 guimarqu

Because you want to store all of them and if you start by the beginning you'll only store the best one ? We should use add_ip_primal_sol! in that case.

guimarqu avatar Oct 14 '20 08:10 guimarqu

Yes, this is the idea: we use update_ip_primal_sol!() to store only improving solutions. Otherwise the same solution may be stored several times (orig_state is usually initialized by dest_state in the code), or we would need to compare all solutions one-by-one which takes time. Because we use update_ip_primal_sol!(), we need to call it for new solutions in the reverse order, otherwise only the best improving solution would be stored.

rrsadykov avatar Oct 14 '20 08:10 rrsadykov

Ok nice

guimarqu avatar Oct 14 '20 08:10 guimarqu

I leave the issue open, I would like to try things later to see if we can avoid having too many extra methods to handle solutions

guimarqu avatar Oct 14 '20 09:10 guimarqu

This method does not exist anymore.

guimarqu avatar Jun 05 '23 13:06 guimarqu