[Cbc] Using hotstarting functionality with modifications

Ed Bulog ebul014 at aucklanduni.ac.nz
Mon Jul 26 18:04:56 EDT 2010


Dear All,

I have a large IP which I will be modifying constantly (by adding/removing
coulmns) and resolving after each modification. I am trying to see if there
is some way I could re-use the previous solution to make each solve faster.
The obvious problem is that by adding and removing columns each time I have
no way of guaranteeing that the previous solution will still be feasible,
let alone optimal.

I have experimented with the cbc example files (mostly hotstart.cpp,
modify.cpp and repeat.cpp). It would be ideal if I could solve the problem,
modify it and then re-use the previous solution in a hotstart. My basic
approach is:
 - call model.initialSolve()
 - call model.branchandbound()
 - save the bestSolution array
 - remove some columns from the reference solver
 - add some columns to the reference solver
 - modify the bestSolution array accordingly (i.e. remove entries
corresponding to deleted columns and add zeros for new columns)
 - call model.resetToReferenceSolver()
 - call model.setHotstartSolution(
bestSolution)
 - resolve using model.branchandbound()

However, this approach does not seem to do anything particularly useful.
branchandbound() does not appear to do anything differently from what it
does when I do not use the hotstart solution.

Does 'hotstarting' only work if the model remains unchanged (as in
hotstart.cpp)? Does anyone have any other suggestions? Your help is greatly
appreciated.

Thank you for your time,

Ed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20100727/39a2b848/attachment.html 


More information about the Cbc mailing list