[Osi-tickets] [COIN-OR Open Solver Interface] #62: OsiCpx getObjCoefficients does not work if column added
COIN-OR Open Solver Interface
coin-trac at coin-or.org
Mon Jul 28 14:01:56 EDT 2008
#62: OsiCpx getObjCoefficients does not work if column added
----------------------+-----------------------------------------------------
Reporter: mgalati | Owner: mjs
Type: defect | Status: new
Priority: major | Milestone:
Component: OsiCpx | Version: 0.96
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by stefan):
Hi,
I cannot reproduce this problem.
Adding a column via addCol or addCols frees the column caches, which
includes obj_, so it should been set to NULL.
If you add columns bypassing !OsiCpx, then you have to do an appropriate
{{{freeCachedData()}}} call by yourself.
I also tried
{{{
solver->getColCoefficients(); // to be sure that obj_ is created
solver->addCol(CoinPackedVector(), -1, 1, 42);
double shouldbe42 =
solver->getColCoefficients()[solver->getNumCols()-1];
}}}
and {{{shouldbe42}}} was indeed 42.
Best,
Stefan
--
Ticket URL: <https://projects.coin-or.org/Osi/ticket/62#comment:1>
COIN-OR Open Solver Interface <http://projects.coin-or.org/Osi>
An API for a variety of LP and MIP solvers (and more).
More information about the Osi-tickets
mailing list