Commit dbf63dc6 authored by Daniel Le Berre's avatar Daniel Le Berre
Browse files

Fix for ClassCastException.

parent e9448205
......@@ -67,9 +67,9 @@ import org.sat4j.core.Vec;
import org.sat4j.core.VecInt;
import org.sat4j.pb.IPBSolver;
import org.sat4j.pb.ObjectiveFunction;
import org.sat4j.pb.constraints.pb.PBConstr;
import org.sat4j.reader.ParseFormatException;
import org.sat4j.reader.Reader;
import org.sat4j.specs.Constr;
import org.sat4j.specs.ContradictionException;
import org.sat4j.specs.IConstr;
import org.sat4j.specs.IProblem;
......@@ -186,7 +186,7 @@ public class OPBReader2005 extends Reader implements Serializable {
constr = this.solver.addAtLeast(this.lits, this.coeffs, this.d);
}
this.nbConstraintsRead++;
((PBConstr) constr).setId(this.nbConstraintsRead);
((Constr) constr).setId(this.nbConstraintsRead);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment