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

fix for Eclipse p2 bug #28

parent b7b13afe
Pipeline #20602 failed with stages
in 20 minutes and 18 seconds
package org.sat4j.pb;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import org.junit.Test;
import org.sat4j.pb.reader.OPBEclipseReader2007;
import org.sat4j.reader.ParseFormatException;
import org.sat4j.reader.Reader;
import org.sat4j.specs.ContradictionException;
public class BugEclipseP228 {
private static final String OPB_FILE = "* #variable= 6 #constraint= 3 \n"
+ "*\n" + "\n" + "explain: x1 x2 x3 x4 x5 ;\n" + "\n"
+ "* P 1.0.0 requires either PP 1.0.0 \n" + "-1 x2 +1 x1 >= 0;\n"
+ "* 1223597333557 0.0.0.1223597333557 requires either P 1.0.0 \n"
+ "-1 x3 +1 x2 >= 0;\n" + "+1 x3 = 1;\n";
@Test
public void testExplain()
throws ParseFormatException, ContradictionException, IOException {
IPBSolver solver = SolverFactory.newEclipseP2();
Reader reader = new OPBEclipseReader2007(solver);
reader.parseInstance(new ByteArrayInputStream(OPB_FILE.getBytes()));
}
}
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