[Cbc] Question about CbcEventHandler

Alexis Guigue aguigue at softree.com
Thu Jun 20 14:09:26 EDT 2013


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., 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



More information about the Cbc mailing list