[Cbc] Question about CbcEventHandler
Alexis Guigue
aguigue at softree.com
Thu Jun 20 19:46:03 EDT 2013
Thanks for this answer. I will dig into this.
What is interesting is that in my main code, it does not seem to be the
case, i.e.,
double *argmin = cbcModel.bestSolution();
where cbcModel is my main CbcModel object provides the ''full'' original
set of variables
On 2013-06-20 4:37 PM, Haroldo Santos wrote:
>
> Probably because the model is pre processed and some variables just
> were removed.
>
> The originaLcolumns vector in the osi interface will give the
> connection with the old variables.
>
> Cheers
>
> Em 20/06/2013 15:10, "Alexis Guigue" <aguigue at softree.com
> <mailto:aguigue at softree.com>> escreveu:
>
> Hi
>
> I have reused the class CbcEventHandler in my code. I am facing
> some issues trying to use the pointer model_.
>
> In the function event, at the end of each node (i.e.
> whichEvent==node), I need to retrieve:
> - the current best objective. I do it using
> model_->getMinimizationObjValue(). This seems ok.
> - the best possible objective. I do it using
> model_->getBestPossibleObjValue(). This seems ok.
> - the value of a particular variable, say "DUMMY". I have stored
> the column index of "DUMMY"
> when I created the model. I want to get the value of this
> variable for the best solution.
> So I do, double *argmin = model_->bestSolution() and then
> argmin[INDEXDUMMY].
> It just does not work. I am sure about that, because in the
> instance I have been testing,
> it happens that I have the constraints DUMMY = 0 (DUMMY is a
> continuous variable
> by the way)
>
> Any idea????
>
> Thanks in advance
>
> --
> Alexis Guigue, E.I.T., B.Eng., M.A.Sc <http://M.A.Sc>., Ph.D.
> Software Engineer/Research Engineer
> aguigue at softree.com <mailto:aguigue at softree.com>
> 604-519-6222, ext. 3 <tel:604-519-6222%2C%20ext.%203>
>
> Softree Technical Systems Inc.
> Engineering an Easier Way
> www.softree.com <http://www.softree.com>
>
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org <mailto:Cbc at list.coin-or.org>
> http://list.coin-or.org/mailman/listinfo/cbc
>
--
Alexis Guigue, E.I.T., B.Eng., M.A.Sc., Ph.D.
Software Engineer/Research Engineer
aguigue at softree.com
604-519-6222, ext. 3
Softree Technical Systems Inc.
Engineering an Easier Way
www.softree.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20130620/76f0c243/attachment.html>
More information about the Cbc
mailing list