Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
SAT4J
sat4j
Commits
c3d638ad
Commit
c3d638ad
authored
Sep 18, 2020
by
Romain WALLON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improves the backjump level by looking to falsified literals only
parent
63107adc
Pipeline
#9392
passed with stages
in 113 minutes and 43 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
org.sat4j.pb/src/main/java/org/sat4j/pb/constraints/pb/ConflictMap.java
...rc/main/java/org/sat4j/pb/constraints/pb/ConflictMap.java
+7
-3
No files found.
org.sat4j.pb/src/main/java/org/sat4j/pb/constraints/pb/ConflictMap.java
View file @
c3d638ad
...
...
@@ -802,9 +802,11 @@ public class ConflictMap extends MapPb implements IConflict {
// updating the new slack
lits
=
ConflictMap
.
this
.
byLevel
[
indLevel
];
int
lit
;
boolean
anyFalsified
=
false
;
for
(
IteratorInt
iterator
=
lits
.
iterator
();
iterator
.
hasNext
();)
{
lit
=
iterator
.
next
();
anyFalsified
|=
this
.
voc
.
isFalsified
(
lit
);
if
(
ConflictMap
.
this
.
voc
.
isFalsified
(
lit
)
&&
ConflictMap
.
this
.
voc
.
getLevel
(
lit
)
==
indexToLevel
(
indLevel
))
...
...
@@ -812,7 +814,7 @@ public class ConflictMap extends MapPb implements IConflict {
ConflictMap
.
this
.
weightedLits
.
get
(
lit
));
}
if
(
!
lits
.
isEmpty
()
)
if
(
anyFalsified
)
previous
=
level
;
}
...
...
@@ -842,8 +844,10 @@ public class ConflictMap extends MapPb implements IConflict {
// where there is a literal belonging to the constraint
int
retour
=
0
;
for
(
int
i
=
0
;
i
<
size
();
i
++)
{
litLevel
=
this
.
voc
.
getLevel
(
this
.
weightedLits
.
getLit
(
i
));
if
(
litLevel
>
retour
&&
litLevel
<
borneMax
)
{
int
lit
=
this
.
weightedLits
.
getLit
(
i
);
litLevel
=
this
.
voc
.
getLevel
(
lit
);
if
(
this
.
voc
.
isFalsified
(
lit
)
&&
litLevel
>
retour
&&
litLevel
<
borneMax
)
{
retour
=
litLevel
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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