[Osi] OsiGLPK interface problem with getReducedCost() methods

Bertrand Le Cun Bertrand.lecun at prism.uvsq.fr
Wed Oct 8 10:52:28 EDT 2014


Hi,

In one of my code I use the OsiGlpk interface (Osi-0.105.5)
I need to use getReducedCost() method but I remark some non consistent 
behaviour when
it is used with the getColSolution() methods !
The problem is the following : The getReducedCost() methods allocates, 
fills and returns an array, that getColSolution deallocates and refills
in an other way.

So I hack the code in OsiGlpkSolverInterface.cpp to be sure that there 
is no side effect to use one method before
the other one.
I remove all references to the redcost_ array in the getColSolution() and
I use the glpk function lpx_get_col_dual in the getReducedCost() method 
to fill it.

Now it is ok for me, but I am not sure that my code is ok for all 
situations !
Let me know if you want my hacks !

Best regards,
Bertrand Le Cun.



More information about the Osi mailing list