| 1944 | } |
| 1945 | |
| 1946 | void HEkk::computeDualObjectiveValue(const HighsInt phase) { |
| 1947 | analysis_.simplexTimerStart(ComputeDuObjClock); |
| 1948 | info_.dual_objective_value = 0; |
| 1949 | const HighsInt num_tot = lp_.num_col_ + lp_.num_row_; |
| 1950 | for (HighsInt iCol = 0; iCol < num_tot; iCol++) { |
| 1951 | if (basis_.nonbasicFlag_[iCol]) |
| 1952 | info_.dual_objective_value += |
| 1953 | info_.workValue_[iCol] * info_.workDual_[iCol]; |
| 1954 | } |
| 1955 | info_.dual_objective_value *= cost_scale_; |
| 1956 | if (phase != 1) { |
| 1957 | // In phase 1 the dual objective has no objective |
| 1958 | // shift. Otherwise, if minimizing the shift is added. If |
| 1959 | // maximizing, workCost (and hence workDual) are negated, so the |
| 1960 | // shift is subtracted. Hence the shift is added according to the |
| 1961 | // sign implied by sense_ |
| 1962 | info_.dual_objective_value += ((HighsInt)lp_.sense_) * lp_.offset_; |
| 1963 | } |
| 1964 | // Now have dual objective value |
| 1965 | status_.has_dual_objective_value = true; |
| 1966 | analysis_.simplexTimerStop(ComputeDuObjClock); |
| 1967 | } |
| 1968 | |
| 1969 | bool HEkk::rebuildRefactor(HighsInt rebuild_reason) { |
| 1970 | // If no updates have been performed, then don't refactor! |
no test coverage detected