[Clp] Performance Issue with CoinPackedMatrix

alexander alexander at lunar-orbit.de
Wed Mar 11 10:01:18 EDT 2015


Hi,

I want to solve min_y ||Ay-b|| using CLP (A has n rows and m columns,
n>>m, in my case m = 2, n something like 100). Therefore I create an
augmented matrix:
B = (A, I, -I)
and solve
min_x c^T x s.t. Bx = b

where:
a) x_i >= 0 for i > m otherwise x_i is free,
b) c_i = 1 for i > m, otherwise c_i = 0

This works just fine. My problem is that _filling_ the CoinPackedMatrix
is very slow. I compared it to filling a dense armadillo matrix, the
dense matrix is filled 40 times faster.

This is the code I use to solve the linear problem:

http://paste.debian.net/160743/

I'm using modifyCoefficient and I think that's causing the performance
issues.

I tried to use the constructor for CoinPackedMatrix which takes 8
arguments but I can't figure out what the "const int* len" argument is
supposed to be.

Is there a faster way to fill the matrix?

Alexander




More information about the Clp mailing list