Skip to content

Commit 97c5757

Browse files
committed
Make formatter happy
1 parent 4d45a72 commit 97c5757

File tree

4 files changed

+35
-32
lines changed

4 files changed

+35
-32
lines changed

highs/mip/HighsCutGeneration.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,8 @@ bool HighsCutGeneration::generateCut(HighsTransformedLp& transLp,
13931393

13941394
// try to generate a cut
13951395
if (!tryGenerateCut(inds_, vals_, hasUnboundedInts, hasGeneralInts,
1396-
hasContinuous, std::max(flowCoverEfficacy - feastol, 10 * feastol),
1396+
hasContinuous,
1397+
std::max(flowCoverEfficacy - feastol, 10 * feastol),
13971398
onlyInitialCMIRScale)) {
13981399
cmirSuccess = false;
13991400
goto postprocess;

highs/mip/HighsCutGeneration.h

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,21 @@ class HighsCutGeneration {
118118

119119
/// Single Node Flow Relaxation for flow cover cuts
120120
struct SNFRelaxation {
121-
HighsInt numNnzs; // |N-| + |N+|
122-
std::vector<HighsInt> coef; // (+-1) coefficient of col in SNFR
123-
std::vector<double> vubCoef; // u_j in y'_j <= u_j x_j in SNFR
124-
std::vector<double> binSolval; // lp[x_j], y'_j <= u_j x_j in SNFR
125-
std::vector<double> contSolval; // lp[y'_j] in y'_j <= u_j x_j in SNFR
126-
std::vector<HighsInt> origBinCols; // orig x_i, y'_j <= u_j x_j in SNFR
127-
std::vector<HighsInt> origContCols; // orig y_i used to make y'_j in SNFR
128-
std::vector<double> aggrBinCoef; // c_i row coef of x_i in orig aggrrow
129-
std::vector<double> aggrContCoef; // a_i row coef of y_i in orig aggrrow
130-
std::vector<double> aggrConstant; // constant shift used in SNFR transform
131-
132-
std::vector<HighsInt> flowCoverStatus; // (+1) in f-cover (-1) notin f-cover
133-
double rhs; // in \sum_{j \in N+} y'_j - \sum_{j \in N-} y'_j <= b
134-
double lambda; // in sum_{j in C+} u_j - sum_{j in C-} u_j = b + lambda
121+
HighsInt numNnzs; // |N-| + |N+|
122+
std::vector<HighsInt> coef; // (+-1) coefficient of col in SNFR
123+
std::vector<double> vubCoef; // u_j in y'_j <= u_j x_j in SNFR
124+
std::vector<double> binSolval; // lp[x_j], y'_j <= u_j x_j in SNFR
125+
std::vector<double> contSolval; // lp[y'_j] in y'_j <= u_j x_j in SNFR
126+
std::vector<HighsInt> origBinCols; // orig x_i, y'_j <= u_j x_j in SNFR
127+
std::vector<HighsInt> origContCols; // orig y_i used to make y'_j in SNFR
128+
std::vector<double> aggrBinCoef; // c_i row coef of x_i in orig aggrrow
129+
std::vector<double> aggrContCoef; // a_i row coef of y_i in orig aggrrow
130+
std::vector<double> aggrConstant; // constant shift used in SNFR transform
131+
132+
std::vector<HighsInt>
133+
flowCoverStatus; // (+1) in f-cover (-1) notin f-cover
134+
double rhs; // in \sum_{j \in N+} y'_j - \sum_{j \in N-} y'_j <= b
135+
double lambda; // in sum_{j in C+} u_j - sum_{j in C-} u_j = b + lambda
135136
};
136137

137138
private:

highs/mip/HighsPathSeparator.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
350350

351351
// generate cut
352352
double rhs = 0;
353-
success = cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
353+
success = cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs,
354+
false, true);
354355

355356
lpAggregator.getCurrentAggregation(baseRowInds, baseRowVals, true);
356357
if (!aggregatedPath.empty() || bestOutArcCol != -1 ||
@@ -359,7 +360,8 @@ void HighsPathSeparator::separateLpSolution(HighsLpRelaxation& lpRelaxation,
359360

360361
// generate reverse cut
361362
rhs = 0;
362-
success |= cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs, false, true);
363+
success |= cutGen.generateCut(transLp, baseRowInds, baseRowVals, rhs,
364+
false, true);
363365

364366
if (success || (bestOutArcCol == -1 && bestInArcCol == -1)) break;
365367

highs/mip/HighsTransformedLp.cpp

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -760,12 +760,11 @@ bool HighsTransformedLp::transformSNFRelaxation(
760760
if (colIsBinary(col, lb, ub)) {
761761
// Binary columns can be added directly to the SNFR
762762
if (vals[i] >= 0) {
763-
addSNFRentry(col, -1, getLpSolution(col),
764-
getLpSolution(col) * vals[i], 1, vals[i], 0, vals[i], 0);
763+
addSNFRentry(col, -1, getLpSolution(col), getLpSolution(col) * vals[i],
764+
1, vals[i], 0, vals[i], 0);
765765
} else {
766-
addSNFRentry(col, -1, getLpSolution(col),
767-
-getLpSolution(col) * vals[i], -1, -vals[i], 0, -vals[i],
768-
0);
766+
addSNFRentry(col, -1, getLpSolution(col), -getLpSolution(col) * vals[i],
767+
-1, -vals[i], 0, -vals[i], 0);
769768
}
770769
} else {
771770
// Decide whether to use {simple, variable} {lower, upper} bound
@@ -857,11 +856,11 @@ bool HighsTransformedLp::transformSNFRelaxation(
857856
// 0 <= y'_j <= (a_j l'_j + c_j)x_j
858857
// rhs -= a_j * d_j
859858
vbcol = bestVlb[col].first;
860-
substsolval = static_cast<double>(
861-
vals[i] * (HighsCDouble(getLpSolution(col)) -
862-
bestVlb[col].second.constant) +
863-
(HighsCDouble(lpSolution.col_value[vbcol]) *
864-
vectorsum.getValue(vbcol)));
859+
substsolval =
860+
static_cast<double>(vals[i] * (HighsCDouble(getLpSolution(col)) -
861+
bestVlb[col].second.constant) +
862+
(HighsCDouble(lpSolution.col_value[vbcol]) *
863+
vectorsum.getValue(vbcol)));
865864
vbcoef = static_cast<double>(HighsCDouble(vals[i]) *
866865
bestVlb[col].second.coef +
867866
vectorsum.getValue(vbcol));
@@ -888,11 +887,11 @@ bool HighsTransformedLp::transformSNFRelaxation(
888887
// 0 <= y'_j <= -(a_j u'_j + c_j)x_j
889888
// rhs -= a_j * d_j
890889
vbcol = bestVub[col].first;
891-
substsolval = static_cast<double>(
892-
vals[i] * (HighsCDouble(getLpSolution(col)) -
893-
bestVub[col].second.constant) +
894-
(HighsCDouble(lpSolution.col_value[vbcol]) *
895-
vectorsum.getValue(vbcol)));
890+
substsolval =
891+
static_cast<double>(vals[i] * (HighsCDouble(getLpSolution(col)) -
892+
bestVub[col].second.constant) +
893+
(HighsCDouble(lpSolution.col_value[vbcol]) *
894+
vectorsum.getValue(vbcol)));
896895
vbcoef = static_cast<double>(HighsCDouble(vals[i]) *
897896
bestVub[col].second.coef +
898897
vectorsum.getValue(vbcol));

0 commit comments

Comments
 (0)