Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SAT4J
sat4j
Commits
b4a97f9e
Commit
b4a97f9e
authored
Oct 29, 2018
by
Daniel Le Berre
Browse files
Do not set the decisionLevel when calling isAssertive.
parent
db90c603
Pipeline
#3233
failed with stages
in 12 minutes and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.pb/src/main/java/org/sat4j/pb/constraints/pb/ConflictMap.java
View file @
b4a97f9e
...
...
@@ -567,12 +567,11 @@ public class ConflictMap extends MapPb implements IConflict {
public
boolean
isAssertive
(
int
dl
)
{
assert
dl
<=
this
.
currentLevel
;
this
.
currentLevel
=
dl
;
BigInteger
slack
=
this
.
currentSlack
.
subtract
(
this
.
degree
);
if
(
slack
.
signum
()
<
0
)
{
return
false
;
}
return
isImplyingLiteral
(
slack
);
return
isImplyingLiteral
(
slack
,
dl
);
}
/**
...
...
@@ -587,7 +586,7 @@ public class ConflictMap extends MapPb implements IConflict {
// given the slack already computed, tests if a literal could be implied at
// a particular level
// uses the byLevel data structure to parse each literal by decision level
private
boolean
isImplyingLiteral
(
BigInteger
slack
)
{
private
boolean
isImplyingLiteral
(
BigInteger
slack
,
int
currentDecisionLevel
)
{
// unassigned literals are tried first
int
unassigned
=
levelToIndex
(-
1
);
int
lit
;
...
...
@@ -605,7 +604,7 @@ public class ConflictMap extends MapPb implements IConflict {
// then we have to look at every literal
// at a decision level >= currentLevel
BigInteger
tmp
;
int
level
=
levelToIndex
(
this
.
currentLevel
);
int
level
=
levelToIndex
(
current
Decision
Level
);
if
(
this
.
byLevel
[
level
]
!=
null
)
{
for
(
IteratorInt
iterator
=
this
.
byLevel
[
level
].
iterator
();
iterator
.
hasNext
();)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment