Skip to content

Commit

Permalink
Minor renamings.
Browse files Browse the repository at this point in the history
  • Loading branch information
RuedigerLunde committed May 19, 2017
1 parent 7ba7eb3 commit 49c3900
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ private boolean makeArcConsistent(VAR xi, VAR xj, Constraint<VAR, VAL> constrain
Assignment<VAR, VAL> assignment = new Assignment<>();
for (VAL vi : csp.getDomain(xi)) {
assignment.add(xi, vi);
boolean consistentExtensionFound = false;
boolean found = false;
for (VAL vj : csp.getDomain(xj)) {
assignment.add(xj, vj);
if (constraint.isSatisfiedWith(assignment)) {
consistentExtensionFound = true;
found = true;
break;
}
}
if (!consistentExtensionFound) {
if (!found) {
csp.removeValueFromDomain(xi, vi);
revised = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ private boolean revise(VAR xi, VAR xj, Constraint<VAR, VAL> constraint,
Assignment<VAR, VAL> assignment = new Assignment<>();
for (VAL vi : csp.getDomain(xi)) {
assignment.add(xi, vi);
boolean consistentExtensionFound = false;
boolean found = false;
for (VAL vj : csp.getDomain(xj)) {
assignment.add(xj, vj);
if (constraint.isSatisfiedWith(assignment)) {
consistentExtensionFound = true;
found = true;
break;
}
}
if (!consistentExtensionFound) {
if (!found) {
log.storeDomainFor(xi, csp.getDomain(xi));
csp.removeValueFromDomain(xi, vi);
revised = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected List<Parameter> createParameters() {
Parameter p1 = new Parameter(PARAM_STRATEGY, "Backtracking", "Min-Conflicts");
Parameter p2 = new Parameter(PARAM_VAR_SELECT, "Default", "MRV", "DEG", "MRV&DEG");
Parameter p3 = new Parameter(PARAM_VAL_SELECT, "Default", "LCV");
Parameter p4 = new Parameter(PARAM_INFERENCE, "None", "FC", "AC3");
Parameter p4 = new Parameter(PARAM_INFERENCE, "None", "Forward Checking", "AC3");
p2.setDependency(PARAM_STRATEGY, "Backtracking");
p3.setDependency(PARAM_STRATEGY, "Backtracking");
p4.setDependency(PARAM_STRATEGY, "Backtracking");
Expand All @@ -104,7 +104,7 @@ public void initialize() {
case "LCV": bSolver.set(CspHeuristics.lcv()); break;
}
switch ((String) simPaneCtrl.getParamValue(PARAM_INFERENCE)) {
case "FC": bSolver.set(new ForwardCheckingStrategy<>()); break;
case "Forward Checking": bSolver.set(new ForwardCheckingStrategy<>()); break;
case "AC3": bSolver.set(new AC3Strategy<>()); break;
}
solver = bSolver;
Expand Down

0 comments on commit 49c3900

Please sign in to comment.