1
0
Fork 0

Don't consider a revert to level 1 (base level) in sat solver a failure

pull/118/head
Nils Adermann 2011-11-21 15:02:42 +01:00
parent b717ad8851
commit bca746c947
1 changed files with 13 additions and 10 deletions

View File

@ -1748,12 +1748,14 @@ class Solver
while (true) { while (true) {
$conflictRule = $this->propagate($level); if (1 === $level) {
if ($conflictRule !== null) { $conflictRule = $this->propagate($level);
if ($this->analyzeUnsolvable($conflictRule, $disableRules)) { if ($conflictRule !== null) {
continue; if ($this->analyzeUnsolvable($conflictRule, $disableRules)) {
} else { continue;
return; } else {
return;
}
} }
} }
@ -1989,7 +1991,11 @@ class Solver
return; return;
} }
if ($level < $systemLevel || $level == 1) { // open suse sat-solver uses this, but why is $level == 1 trouble?
// SYSTEMSOLVABLE related? we don't have that, so should work
//if ($level < $systemLevel || $level == 1) {
if ($level < $systemLevel) {
break; // trouble break; // trouble
} }
@ -1997,9 +2003,6 @@ class Solver
$n = -1; $n = -1;
} }
// $this->printDecisionMap();
// $this->printDecisionQueue();
// minimization step // minimization step
if (count($this->branches)) { if (count($this->branches)) {