Skip to content

Commit 27c6c2a

Browse files
committed
undo relaxed lifting. Set binsolval to be fractional for simple case
1 parent 4412a3d commit 27c6c2a

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -576,16 +576,6 @@ bool HighsCutGeneration::separateLiftedFlowCover() {
576576
}
577577
ld.t++;
578578

579-
const HighsSolution& lpSolution = lpRelaxation.getLpSolver().getSolution();
580-
auto getLpSolution = [&](const HighsInt col) {
581-
HighsInt numCols = lpRelaxation.numCols();
582-
if (col < numCols) {
583-
return lpSolution.col_value[col];
584-
} else {
585-
return lpSolution.row_value[col - numCols];
586-
}
587-
};
588-
589579
auto getAlphaBeta = [&](double vubcoef) {
590580
HighsInt alpha;
591581
HighsCDouble beta{};
@@ -706,14 +696,6 @@ bool HighsCutGeneration::separateLiftedFlowCover() {
706696
assert(alphabeta.first == 0 || alphabeta.first == 1);
707697
if (alphabeta.first == 1) {
708698
assert(alphabeta.second > 0);
709-
// Do not lift the column if doing so decreases the violation
710-
double viol = snfr.aggrConstant[i];
711-
if (snfr.origContCols[i] != -1 && snfr.aggrContCoef[i] != 0) {
712-
viol += snfr.aggrContCoef[i] * getLpSolution(snfr.origContCols[i]);
713-
}
714-
viol += (snfr.aggrBinCoef[i] - static_cast<double>(alphabeta.second)) *
715-
(snfr.binSolval[i]);
716-
if (viol <= 0) continue;
717699
if (snfr.origContCols[i] != -1 && snfr.aggrContCoef[i] != 0) {
718700
vals[rowlen] = snfr.aggrContCoef[i];
719701
inds[rowlen] = snfr.origContCols[i];

highs/mip/HighsTransformedLp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,10 +876,10 @@ bool HighsTransformedLp::transformSNFRelaxation(
876876
aggrvbcoef = static_cast<double>(vals[i] * (HighsCDouble(ub) - lb));
877877
aggrconstant = static_cast<double>(HighsCDouble(vals[i]) * ub);
878878
if (vals[i] >= 0) {
879-
addSNFRentry(-1, col, 1.0, -1, aggrvbcoef, aggrconstant, 0,
879+
addSNFRentry(-1, col, (ub - getLpSolution(col)) / (ub - lb), -1, aggrvbcoef, aggrconstant, 0,
880880
-vals[i], false);
881881
} else {
882-
addSNFRentry(-1, col, 1, 1, -aggrvbcoef, -aggrconstant, 0, vals[i],
882+
addSNFRentry(-1, col, (ub - getLpSolution(col)) / (ub - lb), 1, -aggrvbcoef, -aggrconstant, 0, vals[i],
883883
false);
884884
}
885885
tmpSnfrRhs -= aggrconstant;
@@ -893,10 +893,10 @@ bool HighsTransformedLp::transformSNFRelaxation(
893893
aggrvbcoef = static_cast<double>(vals[i] * (HighsCDouble(ub) - lb));
894894
aggrconstant = static_cast<double>(HighsCDouble(vals[i]) * lb);
895895
if (vals[i] >= 0) {
896-
addSNFRentry(-1, col, 1, 1, aggrvbcoef, -aggrconstant, 0, vals[i],
896+
addSNFRentry(-1, col, (getLpSolution(col) - lb) / (ub - lb), 1, aggrvbcoef, -aggrconstant, 0, vals[i],
897897
false);
898898
} else {
899-
addSNFRentry(-1, col, 1, -1, -aggrvbcoef, aggrconstant, 0, -vals[i],
899+
addSNFRentry(-1, col, (getLpSolution(col) - lb) / (ub - lb), -1, -aggrvbcoef, aggrconstant, 0, -vals[i],
900900
false);
901901
}
902902
tmpSnfrRhs -= aggrconstant;

0 commit comments

Comments
 (0)