Solver: No need to check previous decision if we reached the first one
parent
c78eb49b5e
commit
b34f916470
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue