Skip to content

Commit

Permalink
change to lowerCol to match lowerRow
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxies committed Feb 10, 2022
1 parent 46229a7 commit 96ae1ca
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/MibSModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6488,7 +6488,7 @@ MibSModel::instanceStructure(const CoinPackedMatrix *newMatrix,
int nonZero (newMatrix->getNumElements());
int counterStart, counterEnd;
int rowIndex;
bool lowerRow, upperCol;
bool lowerRow, lowerCol;
double rhs(0.0);

const double * matElements = newMatrix->getElements();
Expand Down Expand Up @@ -6526,8 +6526,8 @@ MibSModel::instanceStructure(const CoinPackedMatrix *newMatrix,
}
lowerRow = binarySearch(0, lRows - 1,
rowIndex, lRowIndices) < 0 ? false:true;
upperCol = binarySearch(0, lCols - 1,
i, lColIndices) < 0 ? true:false;
lowerCol = binarySearch(0, lCols - 1,
i, lColIndices) < 0 ? false:true;
if ((fabs(matElements[j] - floor(matElements[j])) > etol_) &&
(fabs(matElements[j] - ceil(matElements[j])) > etol_)){
if (lowerRow){
Expand All @@ -6538,42 +6538,42 @@ MibSModel::instanceStructure(const CoinPackedMatrix *newMatrix,
}
if (mult * matElements[j] < -etol_){
if (lowerRow){
if (upperCol){
positiveA2_ = false;
if (colSignsA2_[i] == MibSModel::colSignUnknown){
colSignsA2_[i] = MibSModel::colSignNegative;
}else if (colSignsA2_[i] == MibSModel::colSignPositive){
colSignsA2_[i] = MibSModel::colSignInconsistent;
}
}else{
if (lowerCol){
positiveG2_ = false;
if (colSignsG2_[i] == MibSModel::colSignUnknown){
colSignsG2_[i] = MibSModel::colSignNegative;
}else if (colSignsG2_[i] == MibSModel::colSignPositive){
colSignsG2_[i] = MibSModel::colSignInconsistent;
}
}else{
positiveA2_ = false;
if (colSignsA2_[i] == MibSModel::colSignUnknown){
colSignsA2_[i] = MibSModel::colSignNegative;
}else if (colSignsA2_[i] == MibSModel::colSignPositive){
colSignsA2_[i] = MibSModel::colSignInconsistent;
}
}
} else {
if (upperCol){
positiveA1_ = false;
} else {
if (lowerCol){
positiveG1_ = false;
} else {
positiveA1_ = false;
}
}
} else {
if (lowerRow) {
if (upperCol) {
if (colSignsA2_[i] == MibSModel::colSignUnknown){
colSignsA2_[i] = MibSModel::colSignPositive;
}else if (colSignsA2_[i] == MibSModel::colSignNegative){
colSignsA2_[i] = MibSModel::colSignInconsistent;
}
}else{
if (lowerCol) {
if (colSignsG2_[i] == MibSModel::colSignUnknown){
colSignsG2_[i] = MibSModel::colSignPositive;
}else if (colSignsG2_[i] == MibSModel::colSignNegative){
colSignsG2_[i] = MibSModel::colSignInconsistent;
}
}else{
if (colSignsA2_[i] == MibSModel::colSignUnknown){
colSignsA2_[i] = MibSModel::colSignPositive;
}else if (colSignsA2_[i] == MibSModel::colSignNegative){
colSignsA2_[i] = MibSModel::colSignInconsistent;
}
}
}
}
Expand Down

0 comments on commit 96ae1ca

Please sign in to comment.