[Coin-discuss] OSI, CLP pivot

John J Forrest jjforre at us.ibm.com
Wed May 10 14:13:41 EDT 2006


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


                                                                           
             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>     
                                                                        cc 
                                                                           
             05/09/06 11:15 PM                                     Subject 
                                       Re: [Coin-discuss] OSI, CLP pivot   
                                                                           
             Please respond to                                             
             Discussions about                                             
                open source                                                
               software for                                                
                Operations                                                 
                 Research                                                  
             <coin-discuss at lis                                             
              t.coin-or.org>                                               
                                                                           
                                                                           




Hi John,

One thing that would be an immediate speedup for this kind of thing, is
to have a version of getBInvARow which does not actually do the memcpy.
Instead, it would be more efficient, if it just returned a pointer to
CLP's memory where z and slack exist. In profiling our codes, we have
found that getBInvARow takes a decent amount of our overall CPU, but 80%
of getBInvARow is the 2 memcpys.

Is this easy to add? Of course, the user has to promise not to mess up
that memory.

Matt



>Matt,
>
>If you want to keep to an OsiSolverInterface then I probably can't help,
>but if you know you will be using OsiClpSolverInterface then I may be able
>to help.  If you can put together a driver to go through the steps you
want
>then I can see how much faster I can make it - either by adding calls
using
>the Clp getModelPtr() or more elegantly by adding a new specialOption bit
>to OsiClpSolverInterface.
>
>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>

>             04/19/06 09:34 AM                                          cc

>

>                                                                   Subject

>             Please respond to         [Coin-discuss] OSI, CLP pivot

>             Discussions about

>                open source

>               software for

>                Operations

>                 Research

>             <coin-discuss at lis

>              t.coin-or.org>

>

>

>
>
>
>
>If someone wants to do the following, using the "simplex interface":
>{
>  while{
>     //some stuff...
>     ...
>     si->resolve();
>     si->pivot(colIn, colOut, outStatus);
>     ...
>     si->getBasisStatus();
>     si->getBInvARow( );
>     ...
>     //some stuff...
>  }
>}
>
>Is it neccessary to call enable/disableSimplexInterface at every call?
>
>I noticed, that if you pivot, the "basis_" is not updated until
>disableSimplexInterface is called. So, the next call to getBasisStatus
>does not have updated status.
>
>The following seems to work, but is very slow. There is alot of time
>spent in enable/disable.
>
>{
>  while{
>     //some stuff...
>     ...
>     si->resolve();
>     si->enableSimplexInterface();
>     si->pivot(colIn, colOut, outStatus);
>     si->disableSimplexInterface();
>     ...
>     si->enableSimplexInterface();
>     si->getBasisStatus();
>     si->disableSimplexInterface();
>
>     si->enableSimplexInterface();
>     si->getBInvARow( );
>     si->disableSimplexInterface();
>     ...
>     //some stuff...
>  }
>}
>
>Thanks,
>Matt
>
>
>_______________________________________________
>Coin-discuss mailing list
>Coin-discuss at list.coin-or.org
>http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
>_______________________________________________
>Coin-discuss mailing list
>Coin-discuss at list.coin-or.org
>http://list.coin-or.org/mailman/listinfo/coin-discuss
>
>
_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss





More information about the Coin-discuss mailing list