Hello everyone,<br><br>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.<br>Following an example I downloaded (ccs.cpp, Bertsimas, Tsitsiklis page 21), the matrix is defined by <br>
<br>CoinPackedMatrix * matrix =&nbsp; new CoinPackedMatrix(false,0,0);<br>matrix-&gt;setDimensions(0, n_cols);<br><br>The data is entered by appending rows to the matrix as follows:<br>matrix-&gt;appendRow(row1);<br>matrix-&gt;appendRow(row2);<br>
<br>This is all fine and working. However, I want to solve several instances of the same problem changing <br>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 <br>
on every iteration. Is there a command to change the entries more efficiently, i.e., by allocating the matrix only once<br>and then changing the matrix&#39;s entries?<br><br>Thanks in advance,<br>Bernardo<br><br clear="all">
<br>-- <br>Bernardo Kulnig Pagnoncelli<br>PhD student<br>Dep. of Mathematics, Pontifical Catholic University of Rio de Janeiro (PUC-Rio)<br>Rua Marquês de São Vicente 225 Gávea Rio de Janeiro RJ Brazil CEP: 22453-900<br>Tel: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 55 &nbsp;21 &nbsp;3527 - 1730<br>
Fax: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;55 &nbsp;21 &nbsp;3527 - 1282<br>e-mail: <a href="mailto:bernardokp@gmail.com">bernardokp@gmail.com</a> <a href="mailto:bernardo@mat.puc-rio.br">bernardo@mat.puc-rio.br</a><br>