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

Method getBasisSolve

highs/lp_data/Highs.cpp:2344–2368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2342}
2343
2344HighsStatus Highs::getBasisSolve(const double* Xrhs, double* solution_vector,
2345 HighsInt* solution_num_nz,
2346 HighsInt* solution_indices) {
2347 if (Xrhs == NULL) {
2348 highsLogUser(options_.log_options, HighsLogType::kError,
2349 "getBasisSolve: Xrhs is NULL\n");
2350 return HighsStatus::kError;
2351 }
2352 if (solution_vector == NULL) {
2353 highsLogUser(options_.log_options, HighsLogType::kError,
2354 "getBasisSolve: solution_vector is NULL\n");
2355 return HighsStatus::kError;
2356 }
2357 // solution_indices can be NULL - it's the trigger that determines
2358 // whether they are identified or not
2359 if (!ekk_instance_.status_.has_invert)
2360 return invertRequirementError("getBasisSolve");
2361 HighsInt num_row = model_.lp_.num_row_;
2362 vector<double> rhs;
2363 rhs.assign(num_row, 0);
2364 for (HighsInt row = 0; row < num_row; row++) rhs[row] = Xrhs[row];
2365 basisSolveInterface(rhs, solution_vector, solution_num_nz, solution_indices,
2366 false);
2367 return HighsStatus::kOk;
2368}
2369
2370HighsStatus Highs::getBasisTransposeSolve(const double* Xrhs,
2371 double* solution_vector,

Callers 4

highs_getBasisSolveFunction · 0.45
testBasisSolveFunction · 0.45

Calls 1

highsLogUserFunction · 0.85

Tested by 1

testBasisSolveFunction · 0.36