Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Romain WALLON
sat4j
Commits
feffd5d5
Commit
feffd5d5
authored
Feb 20, 2021
by
Daniel Le Berre
Browse files
Move IConflict.setListener() to make sure it is called in all CP
solvers.
parent
454cc5f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
org.sat4j.pb/src/main/java/org/sat4j/pb/core/PBSolverCP.java
View file @
feffd5d5
...
...
@@ -169,6 +169,7 @@ public class PBSolverCP extends PBSolver {
int
litImplied
=
this
.
trail
.
last
();
int
currentLevel
=
this
.
voc
.
getLevel
(
litImplied
);
IConflict
confl
=
chooseConflict
((
PBConstr
)
myconfl
,
currentLevel
);
confl
.
setListener
(
listener
());
confl
.
setDecisionLevel
(
currentLevel
);
assert
confl
.
slackConflict
().
signum
()
<
0
;
while
(!
confl
.
isUnsat
()
&&
!
confl
.
isAssertive
(
currentLevel
))
{
...
...
@@ -237,7 +238,6 @@ public class PBSolverCP extends PBSolver {
IConflict
conflict
=
conflictFactory
.
createConflict
(
myconfl
,
level
,
noRemove
,
skipAllow
,
preprocess
,
postprocess
,
weakeningStrategy
,
autoDivisionStrategy
,
pbStats
);
conflict
.
setListener
(
listener
());
return
conflict
;
}
...
...
Write
Preview
Supports
Markdown
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