| 2162 | } |
| 2163 | |
| 2164 | HighsStatus Highs::getDualUnboundednessDirection( |
| 2165 | bool& has_dual_unboundedness_direction, |
| 2166 | double* dual_unboundedness_direction_value) { |
| 2167 | if (dual_unboundedness_direction_value) { |
| 2168 | std::vector<double> dual_ray_value(this->model_.lp_.num_row_); |
| 2169 | HighsStatus status = |
| 2170 | getDualRay(has_dual_unboundedness_direction, dual_ray_value.data()); |
| 2171 | if (status != HighsStatus::kOk || !has_dual_unboundedness_direction) |
| 2172 | return HighsStatus::kError; |
| 2173 | std::vector<double> dual_unboundedness_direction; |
| 2174 | this->model_.lp_.a_matrix_.productTransposeQuad( |
| 2175 | dual_unboundedness_direction, dual_ray_value); |
| 2176 | for (HighsInt iCol = 0; iCol < this->model_.lp_.num_col_; iCol++) |
| 2177 | dual_unboundedness_direction_value[iCol] = |
| 2178 | dual_unboundedness_direction[iCol]; |
| 2179 | } else { |
| 2180 | return getDualRay(has_dual_unboundedness_direction, nullptr); |
| 2181 | } |
| 2182 | return HighsStatus::kOk; |
| 2183 | } |
| 2184 | |
| 2185 | HighsStatus Highs::getPrimalRay(bool& has_primal_ray, |
| 2186 | double* primal_ray_value) { |