| 3492 | } |
| 3493 | |
| 3494 | unsigned Engine::explainFailureWithTableau() |
| 3495 | { |
| 3496 | ASSERT( _produceUNSATProofs ); |
| 3497 | |
| 3498 | // Failure of a simplex step implies infeasible bounds imposed by the row |
| 3499 | TableauRow boundUpdateRow = TableauRow( _tableau->getN() ); |
| 3500 | |
| 3501 | // For every basic, check that is has no slack and its explanations indeed prove a |
| 3502 | // contradiction |
| 3503 | unsigned basicVar; |
| 3504 | |
| 3505 | for ( unsigned i = 0; i < _tableau->getM(); ++i ) |
| 3506 | { |
| 3507 | if ( _tableau->basicOutOfBounds( i ) ) |
| 3508 | { |
| 3509 | _tableau->getTableauRow( i, &boundUpdateRow ); |
| 3510 | basicVar = boundUpdateRow._lhs; |
| 3511 | |
| 3512 | if ( FloatUtils::gt( _boundManager.computeRowBound( boundUpdateRow, Tightening::LB ), |
| 3513 | _boundManager.getUpperBound( basicVar ) ) && |
| 3514 | explainAndCheckContradiction( basicVar, Tightening::LB, &boundUpdateRow ) ) |
| 3515 | return basicVar; |
| 3516 | |
| 3517 | if ( FloatUtils::lt( _boundManager.computeRowBound( boundUpdateRow, Tightening::UB ), |
| 3518 | _boundManager.getLowerBound( basicVar ) ) && |
| 3519 | explainAndCheckContradiction( basicVar, Tightening::UB, &boundUpdateRow ) ) |
| 3520 | return basicVar; |
| 3521 | } |
| 3522 | } |
| 3523 | |
| 3524 | return IBoundManager::NO_VARIABLE_FOUND; |
| 3525 | } |
| 3526 | |
| 3527 | unsigned Engine::explainFailureWithCostFunction() |
| 3528 | { |
nothing calls this directly
no test coverage detected