@@ -1294,64 +1294,6 @@ void HighsPostsolveStack::DuplicateColumn::transformToPresolvedSpace(
12941294 primalSol[col] = primalSol[col] + colScale * primalSol[duplicateCol];
12951295}
12961296
1297- void HighsPostsolveStack::SlackColSubstitution::undo (
1298- const HighsOptions& options, const std::vector<Nonzero>& rowValues,
1299- HighsSolution& solution, HighsBasis& basis) {
1300- bool debug_print = false ;
1301-
1302- // compute primal values
1303- double colCoef = 0 ;
1304- HighsCDouble rowValue = 0 ;
1305- for (const auto & rowVal : rowValues) {
1306- if (rowVal.index == col)
1307- colCoef = rowVal.value ;
1308- else
1309- rowValue += rowVal.value * solution.col_value [rowVal.index ];
1310- }
1311-
1312- assert (colCoef != 0 );
1313- // Row values aren't fully postsolved, so why do this?
1314- solution.row_value [row] =
1315- static_cast <double >(rowValue + colCoef * solution.col_value [col]);
1316-
1317- solution.col_value [col] = static_cast <double >((rhs - rowValue) / colCoef);
1318-
1319- // If no dual values requested, return here
1320- if (!solution.dual_valid ) return ;
1321-
1322- // Row retains its dual value, and column has this dual value
1323- solution.col_dual [col] = -solution.row_dual [row] * colCoef;
1324-
1325- // Set basis status if necessary
1326- if (!basis.valid ) return ;
1327-
1328- // If row is basic, then slack is basic, otherwise row retains its status
1329- HighsBasisStatus save_row_basis_status = basis.row_status [row];
1330- if (basis.row_status [row] == HighsBasisStatus::kBasic ) {
1331- basis.col_status [col] = HighsBasisStatus::kBasic ;
1332- basis.row_status [row] =
1333- computeRowStatus (solution.row_dual [row], RowType::kEq );
1334- } else if (basis.row_status [row] == HighsBasisStatus::kLower ) {
1335- basis.col_status [col] =
1336- colCoef > 0 ? HighsBasisStatus::kUpper : HighsBasisStatus::kLower ;
1337- } else {
1338- basis.col_status [col] =
1339- colCoef > 0 ? HighsBasisStatus::kLower : HighsBasisStatus::kUpper ;
1340- }
1341- if (debug_print)
1342- printf (
1343- " HighsPostsolveStack::SlackColSubstitution::undo OgRowStatus = %s; "
1344- " RowStatus = %s; ColStatus = %s\n " ,
1345- utilBasisStatusToString (save_row_basis_status).full_ .c_str (),
1346- utilBasisStatusToString (basis.row_status [row]).full_ .c_str (),
1347- utilBasisStatusToString (basis.col_status [col]).full_ .c_str ());
1348- if (basis.col_status [col] == HighsBasisStatus::kLower ) {
1349- assert (solution.col_dual [col] > -options.dual_feasibility_tolerance );
1350- } else if (basis.col_status [col] == HighsBasisStatus::kUpper ) {
1351- assert (solution.col_dual [col] < options.dual_feasibility_tolerance );
1352- }
1353- }
1354-
13551297void HighsPostsolveStack::FourierMotzkinObjCol::transformToPresolvedSpace (
13561298 const std::vector<Nonzero>& costEntries,
13571299 std::vector<double >& primalSol) const {
0 commit comments