[Coin-lpsolver] Re: [Coin-discuss] OSI, CLP pivot
John J Forrest
jjforre at us.ibm.com
Thu May 18 05:27:54 EDT 2006
Matt,
The code you describe makes it look as if you could just do
enableSimplexInterface at beginning and disable at end - why doesn't that
work? If there are not too many functions which need to go back to normal
way then maybe I could get those working.
Some things will work if a factorization is kept around (
clp->setSpecialOptions(currentvalue|9). Set that and then see if you can
do clp->getBasics it does not seem to require enableSimplex but does
require factorization info. I would think that I could get most things to
work with just a saved factorization except the pivotIn which definitely
needs enableSimplexInterface.
John
Matthew Galati
<magh at lehigh.edu>
Sent by: To
coin-discuss-boun Discussions about open source
ces at list.coin-or. software for Operations Research
org <coin-discuss at list.coin-or.org>,
Mustafa Rasim Kilinc
<mrk304 at lehigh.edu>, Jeff Linderoth
05/17/06 05:39 PM <jtl3 at lehigh.edu>
cc
Please respond to Subject
Discussions about Re: [Coin-discuss] OSI, CLP pivot
open source
software for
Operations
Research
<coin-discuss at lis
t.coin-or.org>
Hi John. Thanks! This is much better to be able to just get the sparse row.
The other bottleneck in our codes is related to the enable and disable
simplex interface. It's too messy to strip out the codes and give you a
small sample, but I can tell you the sequence of calls that we use which
involve the simplex interface. We did our best to minimize the number of
calls to enable/disable - but it is still too often. If you have a
special option that could allow us to call this less often, that would
be great.
{
//solve an LP
//get basis header
clp->enableSimplexInterface(false);
clp->getBasics(head);
clp->disableSimplexInterface();
//save warm start
CoinWarmStartBasis * ws =
dynamic_cast<CoinWarmStartBasis*>(si->getWarmStart());
for(...){
//go back to original ws
clp->setWarmStart(ws);
clp->resolve()
...
//get basis header
clp->enableSimplexInterface(false);
clp->getBasics(head);
clp->disableSimplexInterface();
clp->enableSimplexInterface(false);
while(...){
osiclp->getBInvARow(row, abar1, sbar1);
for(...)
osiclp->getBInvARow(row, abar2, sbar2);
clp->pivot(in_col, out_col, out_status);
clp->disableSimplexInterface();
clp->enableSimplexInterface(false);
}
}
clp->disableSimplexInterface();
...
}
}
Thanks,
Matt
>Matt,
>
>Done - example code at line 1366 of
Osi/test/OsiClpSolverInterfaceTest.cpp.
>
>You get the underlying CoinIndexedVectors so you can just get nonzeros.
>Zeroing out the contents was optional but may be slightly faster.
>
>John
>
>
>
>
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss
More information about the Clp
mailing list