Skip to content

Commit

Permalink
Fix log message in ChoiceManager.choose
Browse files Browse the repository at this point in the history
Before this fix, the decision level was printed before it was increased,
thus connecting the chosen atom with a wrong decision level in the log
output.
  • Loading branch information
rtaupe committed Mar 11, 2019
1 parent d773181 commit 65ad52f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/at/ac/tuwien/kr/alpha/solver/ChoiceManager.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017-2018, the Alpha Team.
* Copyright (c) 2017-2019, the Alpha Team.
* All rights reserved.
*
* Additional changes made by Siemens.
Expand Down Expand Up @@ -43,7 +43,7 @@

/**
* This class provides functionality for choice point management, detection of active choice points, etc.
* Copyright (c) 2017, the Alpha Team.
* Copyright (c) 2017-2019, the Alpha Team.
*/
public class ChoiceManager implements Checkable {
private static final Logger LOGGER = LoggerFactory.getLogger(ChoiceManager.class);
Expand Down Expand Up @@ -186,14 +186,14 @@ public void updateAssignments() {
}

public void choose(Choice choice) {
LOGGER.debug("Choice {} is {}@{}", choices, choice, assignment.getDecisionLevel());
if (!choice.isBacktracked()) {
choices++;
}

if (assignment.choose(choice.getAtom(), choice.getValue()) != null) {
throw oops("Picked choice is incompatible with current assignment");
}
LOGGER.debug("Choice {} is {}@{}", choices, choice, assignment.getDecisionLevel());

if (debugWatcher != null) {
debugWatcher.runWatcher();
Expand Down

0 comments on commit 65ad52f

Please sign in to comment.