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

Method getDualUnboundednessDirection

highs/lp_data/Highs.cpp:2164–2183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2162}
2163
2164HighsStatus 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
2185HighsStatus Highs::getPrimalRay(bool& has_primal_ray,
2186 double* primal_ray_value) {

Calls 2

dataMethod · 0.80
productTransposeQuadMethod · 0.80

Tested by 2

testInfeasibleMpsLpFunction · 0.64
testInfeasibleMpsMipFunction · 0.64