1
0
Fork 0

Solver: multiconflict analyze handles positive decision same as regular literal

pull/8999/head
Nils Adermann 2020-06-26 21:47:50 +02:00
parent 6e05345be7
commit 851050e85c
1 changed files with 14 additions and 2 deletions

View File

@ -471,8 +471,20 @@ class Solver
if ($rule instanceof MultiConflictRule) { if ($rule instanceof MultiConflictRule) {
// there is only ever exactly one positive decision in a multiconflict rule // there is only ever exactly one positive decision in a multiconflict rule
foreach ($rule->getLiterals() as $literal) { foreach ($rule->getLiterals() as $literal) {
if (!isset($seen[abs($literal)]) && !$this->decisions->satisfy($literal)) { if (!isset($seen[abs($literal)]) && $this->decisions->satisfy(-$literal)) {
$num++; $l = $this->decisions->decisionLevel($literal);
if (1 === $l) {
$l1num++;
} elseif ($level === $l) {
$num++;
} else {
// not level1 or conflict level, add to new rule
$learnedLiterals[] = $literal;
if ($l > $ruleLevel) {
$ruleLevel = $l;
}
}
$seen[abs($literal)] = true; $seen[abs($literal)] = true;
break; break;
} }