[Coin-lpsolver] Constraint matrix

Kyle Ellrott kellrott at csbl.bmb.uga.edu
Thu Mar 3 11:09:08 EST 2005


I've been looking through the source tree to get a better understanding 
of what's going on.  But I do have a few questions.
 From my understanding CoinPackedMatrix is derived from ClpPackedMatrix, 
and adds a few functions (actually It looks like it adds about 38 pages 
worth of code to ClpPackMatrix).  Do all those functions need to be 
added before Cbc can utilize the matrix?

There is no equivalent Coin class for the ClpPlusMinusOneMatrix.  I'm 
assuming one would have to be created before it could be used in the 
CbcModel interface.  Of course I would also have to add a loadProblem 
method to Cbc that used this hypothetical CoinPlusMinusOneMatrix.  Then 
maybe change the internal Cbc matrix pointers is a more generic 
CoinMatrixBase (which doesn't exist either) which would be an abstract 
based on ClpMatrixBase, rather then the current CoinPackedMatrix.

Is this what it would take to get a plus/minus one matrix working in 
Cbc?  Or have I over complicated the problem?

Kyle



> Thank you, that helps ;-)
>
> But I do have one problem.  According the page mentioned, both 
> ClpPlusMinusOneMatrix and ClpPackedMatrix both inherit from 
> ClpMatrixBase.  The problem is that OsiClpSolverInterface's 
> loadProblem only mentions CoinPackedMatrix (which I think is the same 
> as ClpPackedMatrix), but not the parent class of ClpMatrixBase.  So 
> when I try to pass a ClpPlusMinusOneMatrix to OsiClpSolverInterface's 
> loadProblem, I get something like
>
> intpro_threading.cc:766: error: no matching function for call to `
>    OsiClpSolverInterface::loadProblem(ClpPlusMinusOneMatrix&, double*&,
>    double*&, double*&, double*&, double*&)'
> /Users/kye/COIN/include/OsiClpSolverInterface.hpp:600: error: 
> candidates are:
>    virtual void OsiClpSolverInterface::loadProblem(const 
> CoinPackedMatrix&,
>    const double*, const double*, const double*, const double*, const 
> double*)
>
> Any thoughts?
>
> Kyle
>
>
>
>> I think you will find this page of the CLP documentation will help 
>> you:
>>
>> http://www.coin-or.org/Clp/userguide/ch03s02.html
>>
>> In other words, there's (supposed to be) a matrix class specific to 
>> your situation.
>>
>> At 02:38 PM 3/2/2005, Kyle Ellrott wrote:
>>> I'm curious about the CoinPackedMatrix structure that I use to setup 
>>> my constraint matrix for my integer programming problem.  From what 
>>> I understand so far, it's input data is doubles.  But for my 
>>> particular problem, the only values I put in it are -1, 1, and 0 (0 
>>> being being cells that aren't mentioned in my description).  By 
>>> using a double rather then a char, I'm using 8 time more memory then 
>>> I need to.
>>> Is there are more efficient method to describe this matrix?
>>>
>>> Kyle
>>>
>>> _______________________________________________
>>> Coin-lpsolver mailing list
>>> Coin-lpsolver at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/coin-lpsolver
>>
>
> _______________________________________________
> Coin-lpsolver mailing list
> Coin-lpsolver at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-lpsolver




More information about the Clp mailing list