[Coin-discuss] multiple LPs with same sparsity

John J Forrest jjforre at us.ibm.com
Thu Aug 21 03:04:27 EDT 2008


Mustafa,

You can not create a ClpMatrixBase object.  I could have defined
modifyCoefficient as =0; so that user would be forced to write own
modifyCoefficient if wanted to write class derived from ClpMatrixBase.  But
I thought this imposed less effort on user as modifyCoefficient is not much
used.

If you use ClpPackedMatrix which is most likely then you will just get the
CoinPackedMatrix modifyCoefficient.

It would probably be more efficient to get the CoinPackedMatrix
representation with getPackedMatrix which is in ClpMatrixBase (and so in
ClpPackedMatrix).  Then use getMutableElements() and modify elements that
way.

John Forrest


                                                                                                                         
  From:       "Mustafa Kilinc" <mrkilinc at gmail.com>                                                                      
                                                                                                                         
  To:         coin-discuss at list.coin-or.org                                                                              
                                                                                                                         
  Date:       08/20/2008 06:22 PM                                                                                        
                                                                                                                         
  Subject:    [Coin-discuss] multiple LPs with same sparsity                                                             
                                                                                                                         





Hello,

As a subsolver to an active-set method NLP solver, I want to solve a bunch
of LPs regarding Jacobian of constraints.
Since at every iterate, the Jacobian matrix changes. But sparsity of
constraints are not different at each iterate.
Only the values in the constraints are changing but all LPs have same
sparsity pattern. What is the most efficient way to do this?

I intended to use

void modifyCoefficient (int row, int column, double newElement, bool
keepZero=false)

But from the source code, I can see that it is not implemented in
ClpMatrixBase.cpp:

void
ClpMatrixBase::modifyCoefficient(int row, int column, double newElement,
            bool keepZero)
{
  std::cerr<<"modifyCoefficient not supported - ClpMatrixBase"<<std::endl;
  abort();
}

Other than changing whole CoinPackedMatrix, is there a more efficient way?

Thanks,
Mustafa_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20080821/366a6923/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: graycol.gif
Type: image/gif
Size: 105 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20080821/366a6923/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ecblank.gif
Type: image/gif
Size: 45 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20080821/366a6923/attachment-0001.gif>


More information about the Coin-discuss mailing list