@@ -1120,11 +1120,10 @@ MibSModel::loadProblemData(const CoinPackedMatrix& matrix,
1120
1120
CoinPackedMatrix *newMatrix = NULL ;
1121
1121
CoinPackedMatrix *matrix1 = NULL ; // YX: w/ appended equality constrs
1122
1122
1123
- // YX: need col mat to start; cp to matrix1 if row-ordered
1123
+ // YX: note that MibS defaults to using a column matrix.
1124
1124
if (!matType){
1125
- matrix1 = new CoinPackedMatrix ();
1126
- matrix1->copyOf (matrix);
1127
- matrix1->reverseOrdering ();
1125
+ throw CoinError (" Expect a column-oriented matrix. Try matrix.reverseOrdering() before loading the matrix." ,
1126
+ " loadProblemData" , " MibSModel" );
1128
1127
}
1129
1128
1130
1129
// --- prepare for equality constraints (if any) ---
@@ -1184,17 +1183,12 @@ MibSModel::loadProblemData(const CoinPackedMatrix& matrix,
1184
1183
1185
1184
// YX: add rows to the problem matrix and link pointers to vectors
1186
1185
if (numRows > inputNumRows){
1187
- if (!matrix1){
1188
- matrix1 = new CoinPackedMatrix ();
1189
- matrix1->copyOf (matrix);
1190
- }
1186
+ matrix1 = new CoinPackedMatrix ();
1187
+ matrix1->copyOf (matrix);
1191
1188
matrix1->reverseOrdering ();
1192
1189
1193
1190
rowMatrix = matrix;
1194
- // YX: switch if matrix was col ordered
1195
- if (matType){
1196
- rowMatrix.reverseOrdering ();
1197
- }
1191
+ rowMatrix.reverseOrdering ();
1198
1192
const double * matElements = rowMatrix.getElements ();
1199
1193
const int * matIndices = rowMatrix.getIndices ();
1200
1194
const int * matStarts = rowMatrix.getVectorStarts ();
0 commit comments