| 1987 | } |
| 1988 | |
| 1989 | bool isBasisConsistent(const HighsLp& lp, const HighsBasis& basis) { |
| 1990 | if (!isBasisRightSize(lp, basis)) return false; |
| 1991 | |
| 1992 | HighsInt num_basic_variables = 0; |
| 1993 | for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++) { |
| 1994 | if (basis.col_status[iCol] == HighsBasisStatus::kBasic) |
| 1995 | num_basic_variables++; |
| 1996 | } |
| 1997 | for (HighsInt iRow = 0; iRow < lp.num_row_; iRow++) { |
| 1998 | if (basis.row_status[iRow] == HighsBasisStatus::kBasic) |
| 1999 | num_basic_variables++; |
| 2000 | } |
| 2001 | return num_basic_variables == lp.num_row_; |
| 2002 | } |
| 2003 | |
| 2004 | bool isColPrimalSolutionRightSize(const HighsLp& lp, |
| 2005 | const HighsSolution& solution) { |
no test coverage detected