Skip to content

Commit

Permalink
changed sat4J version to the one used before for debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasPfeifer committed Mar 13, 2024
1 parent b8baf4c commit a635657
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import static org.sat4j.core.LiteralsUtils.negLit;
import static org.sat4j.core.LiteralsUtils.posLit;

import org.sat4j.minisat.core.Heap;
import org.sat4j.minisat.core.ILits;
import org.sat4j.minisat.orders.UserFixedPhaseSelectionStrategy;
import org.sat4j.minisat.orders.VarOrderHeap;
Expand Down Expand Up @@ -69,7 +70,7 @@ public void setLits(ILits lits) {
activity = new double[nlength];
phase = new boolean[nlength];
activity[0] = -1;
heap = createHeap(activity);
heap = new Heap(activity);
heap.setBounds(nlength);
for (int i = 1; i < nlength; i++) {
assert i > 0;
Expand All @@ -94,6 +95,18 @@ public void setLits(ILits lits) {
public void init() {
// nothing to be done
}

/*
* (non-Javadoc)
*
* @see org.sat4j.minisat.orders.VarOrderHeap#updateActivity(int)
*/
@Override
protected void updateActivity(final int var) {
if ((activity[var] += varInc) > VAR_RESCALE_BOUND) {
varRescaleActivity();
}
}

/**
* Increments the activity of a variable {@code var} by the specified
Expand All @@ -102,7 +115,6 @@ public void init() {
* @param var the variable
* @param inc the value to increment the variable
*/
@Override
protected void updateActivity(final int var, final double inc) {
if ((activity[var] += inc) > VAR_RESCALE_BOUND) {
varRescaleActivity();
Expand Down

0 comments on commit a635657

Please sign in to comment.