Map returned by getStat() is empty
Hello Daniel,
Title is self explanatory. Here is an example program that replicates the bug.
import java.math.BigInteger;
import org.sat4j.core.Vec;
import org.sat4j.core.VecInt;
import org.sat4j.pb.IPBSolver;
import org.sat4j.pb.SolverFactory;
import org.sat4j.specs.ContradictionException;
import org.sat4j.specs.IConstr;
import org.sat4j.specs.IVec;
import org.sat4j.specs.IVecInt;
import org.sat4j.specs.TimeoutException;
public class EmptyStatsBug {
public static void main(String[] args) throws ContradictionException, TimeoutException {
IVecInt lits = new VecInt(new int[] { 1, 2, 3 });
IVec<BigInteger> coeffs = new Vec<BigInteger>(new BigInteger[] {
BigInteger.ONE,
BigInteger.ONE,
BigInteger.ONE
});
IPBSolver solver = SolverFactory.newDefault();
solver.newVar(3);
IConstr constr = null;
solver.addAtMost(lits, 2);
System.out.println(solver.getStat().keySet().size());
solver.isSatisfiable();
System.out.println(solver.getStat().keySet().size());
}
}
The above program produces the following output:
0
0
Best regards,
Miguel Neves