[Clp] CLP memory exception error for CoinPackedMatrix building
usa usa
usact2012 at gmail.com
Wed Feb 17 19:13:46 EST 2016
Hi,
I am using CLP (downloaded from
http://www.coin-or.org/download/source/Clp/Clp-1.16.9.zip) in Visual Studio
2013 VC++ on win 7.
I followed the example in "clp\examples\rowColumn.cpp" to build an LP.
I found that "elementByRow" has only one value even if I have used:
double * elementByRow = &elementByRowVect[0]; // elementByRowVect hodl the
elements loaded from a file.
I have copied the values to it.
int ind = 0;
for (vector<double>::iterator it = elementByRowVect.begin(); it !=
elementByRowVect.end(); ++it)
{
elementByRow[ind++] = *it;
}
But, in "byRow", the "element_" and "index_" are all 0x00000. I got
run-time error.
CoinPackedMatrix byRow(false, numberColumns, numberRows, numElements,
elementByRow, column, rowStart, NULL);
modelByRow.loadProblem(byRow,columnLower, columnUpper,
objective,rowLowerBound, rowUpperBound);
How to make "byRow" understand that "elementByRow" is an array that has
values ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/clp/attachments/20160217/e09457f6/attachment.html>
More information about the Clp
mailing list