Changeset 2024 for trunk/Clp/src/ClpModel.cpp
 Timestamp:
 Mar 7, 2014 12:18:15 PM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/Clp/src/ClpModel.cpp
r2022 r2024 2582 2582 } 2583 2583 assert (columnLower); 2584 addColumns(numberColumns2, columnLower, columnUpper, objective, NULL, NULL, NULL);2585 2584 #ifndef SLIM_CLP 2586 2585 if (!tryPlusMinusOne) { 2587 2586 #endif 2588 /* addColumns just above extended matrix  to keep2589 things clean  take off again. I know it is a bit2590 clumsy but won't break anything */2591 {2592 int * which = new int [numberColumns2];2593 for (int i=0;i<numberColumns2;i++)2594 which[i]=i+numberColumns;2595 matrix_>deleteCols(numberColumns2,which);2596 delete [] which;2597 }2598 2587 CoinPackedMatrix matrix; 2599 2588 modelObject.createPackedMatrix(matrix, associated); 2600 2589 assert (!matrix.getExtraGap()); 2601 if (matrix_>getNumCols()) { 2602 const int * row = matrix.getIndices(); 2603 //const int * columnLength = matrix.getVectorLengths(); 2604 const CoinBigIndex * columnStart = matrix.getVectorStarts(); 2605 const double * element = matrix.getElements(); 2606 // make sure matrix has enough rows 2607 matrix_>setDimensions(numberRows_, 1); 2608 numberErrors += matrix_>appendMatrix(numberColumns2, 1, columnStart, row, element, 2609 checkDuplicates ? numberRows_ : 1); 2610 } else { 2611 delete matrix_; 2612 matrix_ = new ClpPackedMatrix(matrix); 2613 } 2590 const int * row = matrix.getIndices(); 2591 //const int * columnLength = matrix.getVectorLengths(); 2592 const CoinBigIndex * columnStart = matrix.getVectorStarts(); 2593 const double * element = matrix.getElements(); 2594 // make sure matrix has enough rows 2595 matrix_>setDimensions(numberRows_, 1); 2596 addColumns(numberColumns2, columnLower, columnUpper, 2597 objective, columnStart, row, element); 2614 2598 #ifndef SLIM_CLP 2615 2599 } else { 2600 addColumns(numberColumns2, columnLower, columnUpper, objective, NULL, NULL, NULL); 2616 2601 // create +1 matrix 2617 2602 CoinBigIndex size = startPositive[numberColumns2];
Note: See TracChangeset
for help on using the changeset viewer.