[Cbc] Getting information from running model in CbcMain1
acw at ascent.com
acw at ascent.com
Thu Feb 19 13:59:37 EST 2009
We have a Cbc application modeled on Cbc/examples/driver4.cpp; in
particular, it uses the function CbcMain1 to actually launch the solution.
In a previous version of the same application, we mimicked something much
simpler, more like driver1.cpp. In that version, we were able to monitor
the problem as it was being solved. We used calls like
CbcModel->getObjValue() in another thread to watch the objective
improving. (We are aware of thread hazards, but we were pretty careful to
protect ourselves from them.)
When we switched to the driver4-like approach, this stopped working.
CbcMain1 makes its own copy of the given Cbc model, and it is on this copy
(called "cbcModel" in the code, which is in CbcSolver.cpp) that
CbcModel.branchAndBound() is actually invoked. Poking the original model
to find out its best objective so far, or the number of nodes it has
processed, doesn't work.
Is there a right way to expose this copied model so that outside code can
query its progress? I'm reluctant to mess around with the code in
CbcSolver.cpp, but will do that if I have to.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20090219/0468e5df/attachment.html
More information about the Cbc
mailing list