Skip to content

Commit

Permalink
tolerance issue for variabls with large values
Browse files Browse the repository at this point in the history
  • Loading branch information
jjhforrest committed Sep 10, 2024
1 parent 4dd6395 commit 0c2f860
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/CglGMI/CglGMI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ bool CglGMI::removeSmallCoefficients(double* cutElem, int* cutIndex,
}
else if ((value < 0.0) && (colUpper[col] < param.getINFINIT())) {
cutRhs -= value * colUpper[col];
}
}
}
else if (absval > param.getEPS_COEFF()) {
if (currPos < i) {
Expand Down Expand Up @@ -1259,6 +1259,15 @@ void CglGMI::generateCuts(OsiCuts &cs)
}
#endif
if (cleanCut(cutElem, cutIndex, cutNz, cutRhs, xlp) && cutNz > 0) {
// relax if integer values can be large
for (int i=0;i<cutNz;i++) {
int j = cutIndex[i];
if (isInteger[j]) {
double difference = colUpper[j]-colLower[j];
if (difference > 10.0)
cutRhs += 1.0e-8*difference;
}
}
OsiRowCut rc;
rc.setRow(cutNz, cutIndex, cutElem);
rc.setLb(-param.getINFINIT());
Expand Down

0 comments on commit 0c2f860

Please sign in to comment.