Skip to content

Commit 5143968

Browse files
committed
Finish hacky implementation
1 parent 29c52db commit 5143968

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1672,7 +1672,7 @@ bool HighsCutGeneration::preprocessSNFRelaxation() {
16721672
}
16731673
}
16741674

1675-
HighsInt maxLen = 0.15 * (lpRelaxation.numCols());
1675+
HighsInt maxLen = 100 + 0.15 * (lpRelaxation.numCols());
16761676
if (rowlen - numZeros > maxLen) return false;
16771677

16781678
if (numZeros != 0) {

highs/mip/HighsTransformedLp.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ bool HighsTransformedLp::transformSNFRelaxation(
799799
std::pair<HighsInt, HighsImplications::VarBound> vlb =
800800
std::make_pair(-1, HighsImplications::VarBound{0.0, -kHighsInf});
801801
if (col < slackOffset) {
802-
vlb = HighsImplications::getBestVlb(col, lb, ub,
802+
vlb = lprelaxation.getMipSolver().mipdata_->implications.getBestVlb(col, lb, ub,
803803
vals[i], lpSolution, vectorsum,
804804
complementvlb, inclbincolvlb);
805805
}
@@ -809,7 +809,7 @@ bool HighsTransformedLp::transformSNFRelaxation(
809809
std::pair<HighsInt, HighsImplications::VarBound> vub =
810810
std::make_pair(-1, HighsImplications::VarBound{0.0, -kHighsInf});
811811
if (col < slackOffset) {
812-
vlb = HighsImplications::getBestVub(col, lb, ub,
812+
vub = lprelaxation.getMipSolver().mipdata_->implications.getBestVub(col, lb, ub,
813813
vals[i], lpSolution, vectorsum,
814814
complementvub, inclbincolvub);
815815
}
@@ -888,11 +888,11 @@ bool HighsTransformedLp::transformSNFRelaxation(
888888
// (2) y'_j = a_j(y_j - d_j) + c_j * x_j,
889889
// 0 <= y'_j <= (a_j l'_j + c_j)x_j
890890
// rhs -= a_j * d_j
891-
vbcol = bestVlb[col].first;
892-
vbconstant = bestVlb[col].second.constant +
893-
(complementvlb ? bestVlb[col].second.coef : 0);
894-
vbcoef = complementvlb ? -bestVlb[col].second.coef
895-
: bestVlb[col].second.coef;
891+
vbcol = vlb.first;
892+
vbconstant = vlb.second.constant +
893+
(complementvlb ? vlb.second.coef : 0);
894+
vbcoef = complementvlb ? -vlb.second.coef
895+
: vlb.second.coef;
896896
bincoef = inclbincolvlb ? complementvlb ? -vectorsum.getValue(vbcol)
897897
: vectorsum.getValue(vbcol)
898898
: 0;
@@ -922,11 +922,11 @@ bool HighsTransformedLp::transformSNFRelaxation(
922922
// (2) y'_j = -(a_j(y_j - d_j) + c_j * x_j),
923923
// 0 <= y'_j <= -(a_j u'_j + c_j)x_j
924924
// rhs -= a_j * d_j
925-
vbcol = bestVub[col].first;
926-
vbconstant = bestVub[col].second.constant +
927-
(complementvub ? bestVub[col].second.coef : 0);
928-
vbcoef = complementvub ? -bestVub[col].second.coef
929-
: bestVub[col].second.coef;
925+
vbcol = vub.first;
926+
vbconstant = vub.second.constant +
927+
(complementvub ? vub.second.coef : 0);
928+
vbcoef = complementvub ? -vub.second.coef
929+
: vub.second.coef;
930930
bincoef = inclbincolvub ? complementvub ? -vectorsum.getValue(vbcol)
931931
: vectorsum.getValue(vbcol)
932932
: 0;

0 commit comments

Comments
 (0)