[Coin-discuss] OsiCpx use of CPXnewcols
Brady Hunsaker
hunsaker at engr.pitt.edu
Mon Feb 14 09:01:03 EST 2005
Using CPLEX 9.0 recently, I had segfaults from building an instance
using addRow. I believe the problem was that new columns were being
"added" as part of the addRow call, which uses the CPLEX function
CPXaddrows. The CPLEX 9.0 documentation says that "The use of
CPXaddrows as a way to add new columns is discouraged in favor of a
direct call to CPXnewcols before calling CPXaddrows."
Given that I was getting segfaults, "discouraged" may not be the correct
word. Anyway, I modified my version of OsiCpxSolverInterface::addRow to
use CPXnewcols first, as you can see in the attached file (which is just
that one method). Although this is not particularly efficient, it has
run just fine on an instance with about 200,000 rows but only a few
nonzeros in most rows.
I think that OsiCpx should be changed in the repository, but I'm not
sure whether this issue affects earlier versions of CPLEX or whether
there is a better approach. I'd appreciate hearing from someone who has
worked on OsiCpx. Thanks,
Brady
--
Brady Hunsaker
Assistant Professor
Industrial Engineering
University of Pittsburgh
http://www.engr.pitt.edu/hunsaker/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OsiCpx_addRow.cpp
Type: text/x-c++src
Size: 1974 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20050214/4137748f/attachment.bin>
More information about the Coin-discuss
mailing list