MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / chooseColumn

Method chooseColumn

highs/simplex/HEkkDual.cpp:1546–1735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1544}
1545
1546void HEkkDual::chooseColumn(HVector* row_ep) {
1547 // Compute pivot row (PRICE) and choose the index of a column to enter the
1548 // basis (CHUZC)
1549 //
1550 // If reinversion is needed then skip this method
1551 if (rebuild_reason) return;
1552 HighsOptions* options = ekk_instance_.options_;
1553 HighsLp& lp = ekk_instance_.lp_;
1554
1555 HighsInt debug_price_report = kDebugReportOff;
1556 const bool debug_price_report_on = false;
1557 const bool debug_small_pivot_issue_report_on = false;
1558 bool debug_small_pivot_issue_report = false;
1559 bool debug_rows_report = false;
1560 if (ekk_instance_.debug_iteration_report_) {
1561 if (debug_price_report_on) debug_price_report = kDebugReportAll;
1562 debug_rows_report = debug_price_report_on;
1563 debug_small_pivot_issue_report = debug_small_pivot_issue_report_on;
1564 if (debug_price_report != kDebugReportOff || debug_rows_report ||
1565 debug_small_pivot_issue_report)
1566 printf("HEkkDual::chooseColumn Check iter = %d\n",
1567 (int)ekk_instance_.iteration_count_);
1568 }
1569 //
1570 // PRICE
1571 //
1572 const bool quad_precision = false;
1573 ekk_instance_.tableauRowPrice(quad_precision, *row_ep, row_ap,
1574 debug_price_report);
1575 if (debug_rows_report) {
1576 ekk_instance_.simplex_nla_.reportArray("Row a_p", 0, &row_ap, true);
1577 ekk_instance_.simplex_nla_.reportArray("Row e_p", lp.num_col_, row_ep,
1578 true);
1579 }
1580 //
1581 // CHUZC
1582 //
1583 // Section 0: Clear data and call createFreemove to set a value of
1584 // nonbasicMove for all free columns to prevent their dual values
1585 // from being changed.
1586 analysis->simplexTimerStart(Chuzc0Clock);
1587 dualRow.clear();
1588 dualRow.workDelta = delta_primal;
1589 dualRow.createFreemove(row_ep);
1590 analysis->simplexTimerStop(Chuzc0Clock);
1591 //
1592 // Section 1: Pack row_ap and row_ep
1593 analysis->simplexTimerStart(Chuzc1Clock);
1594 // Pack row_ap into the packIndex/Value of HEkkDualRow
1595 dualRow.chooseMakepack(&row_ap, 0);
1596 // Pack row_ep into the packIndex/Value of HEkkDualRow
1597 dualRow.chooseMakepack(row_ep, solver_num_col);
1598 const double row_ep_scale =
1599 ekk_instance_.getValueScale(dualRow.packCount, dualRow.packValue);
1600 analysis->simplexTimerStop(Chuzc1Clock);
1601 // Loop until an acceptable pivot is found. Each pass either finds a
1602 // pivot, identifies possible unboundedness, or reduced the number
1603 // of nonzeros in dualRow.pack_value

Callers

nothing calls this directly

Calls 13

tableauRowPriceMethod · 0.80
reportArrayMethod · 0.80
simplexTimerStartMethod · 0.80
createFreemoveMethod · 0.80
simplexTimerStopMethod · 0.80
chooseMakepackMethod · 0.80
getValueScaleMethod · 0.80
choosePossibleMethod · 0.80
reportVectorMethod · 0.80
chooseFinalMethod · 0.80
deleteFreemoveMethod · 0.80
computeDevexWeightMethod · 0.80

Tested by

no test coverage detected