1
0
Fork 0

Solver: No need to check previous decision if we reached the first one

pull/8999/head
Nils Adermann 2020-06-25 09:32:51 +02:00
parent c78eb49b5e
commit b34f916470
1 changed files with 8 additions and 6 deletions

View File

@ -417,12 +417,14 @@ class Solver
} }
unset($literal); unset($literal);
$decision = $this->decisions->atOffset($decisionId-1); if ($decisionId > 0) {
if ($rule !== $decision[Decisions::DECISION_REASON] && $decision[Decisions::DECISION_REASON] instanceof MultiConflictRule) { $decision = $this->decisions->atOffset($decisionId-1);
$num++; if ($rule !== $decision[Decisions::DECISION_REASON] && $decision[Decisions::DECISION_REASON] instanceof MultiConflictRule) {
foreach ($decision[Decisions::DECISION_REASON]->getLiterals() as $literal) { $num++;
if (!$this->decisions->satisfy($literal)) { foreach ($decision[Decisions::DECISION_REASON]->getLiterals() as $literal) {
$seen[abs($literal)] = true; if (!$this->decisions->satisfy($literal)) {
$seen[abs($literal)] = true;
}
} }
} }
} }