[Cbc] modifying a CbcModel after solve?

Miles Lubin miles.lubin at gmail.com
Sun May 25 21:35:12 EDT 2014


Hi all,

I'm looking at supporting modification of the problem data after solve in
the C interface and have come across some surprising behavior.

After solving using a CbcModel (using CbcMain1), the column lower bounds
(from CbcModel::getColLower) are changed to equal the value of the optimal
solution. I.e., a binary variable set at 1 in the optimal solution will
have a reported lower bound of 1. I assume this is because the bounds are
returned from the internal Clp model.

Similarly, calling CbcModel::solver()->setColLower() after solve to modify
bounds doesn't seem to have any effect on subsequent resolves (again using
CbcMain1).

Is there a proper way to access and modify the original problem data after
a solve to avoid recreating the model from scratch? If not, I'll simply not
expose this functionality in the C interface. Obviously one shouldn't
expect to efficiently hot-start the next MIP solve, but being able to
modify a model could be convenient for the user when solving a sequence of
related MIPs.

Thanks,
Miles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20140525/3c4b2b5a/attachment.html>


More information about the Cbc mailing list