[Coin-discuss] OSI

Bernardo Pagnoncelli bernardokp at gmail.com
Mon Dec 15 07:49:54 EST 2008


Hello everyone,

my name is Bernardo and I am starting to use OSI. I have a question about
the input of data in form of a matrix.
Following an example I downloaded (ccs.cpp, Bertsimas, Tsitsiklis page 21),
the matrix is defined by

CoinPackedMatrix * matrix =  new CoinPackedMatrix(false,0,0);
matrix->setDimensions(0, n_cols);

The data is entered by appending rows to the matrix as follows:
matrix->appendRow(row1);
matrix->appendRow(row2);

This is all fine and working. However, I want to solve several instances of
the same problem changing
the coefficients of the matrix, but not its dimensions. It seems that using
the the code I described will declare and allocate space for a matrix
on every iteration. Is there a command to change the entries more
efficiently, i.e., by allocating the matrix only once
and then changing the matrix's entries?

Thanks in advance,
Bernardo


-- 
Bernardo Kulnig Pagnoncelli
PhD student
Dep. of Mathematics, Pontifical Catholic University of Rio de Janeiro
(PUC-Rio)
Rua Marquês de São Vicente 225 Gávea Rio de Janeiro RJ Brazil CEP: 22453-900
Tel:             55  21  3527 - 1730
Fax:            55  21  3527 - 1282
e-mail: bernardokp at gmail.com bernardo at mat.puc-rio.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20081215/744a3105/attachment.html>


More information about the Coin-discuss mailing list