Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 220072
Collapse All | Expand All

(-)src/org/eclipse/equinox/internal/p2/director/PBProjector.java (-2 / +7 lines)
Lines 17-22 Link Here
17
import org.osgi.framework.InvalidSyntaxException;
17
import org.osgi.framework.InvalidSyntaxException;
18
import org.sat4j.pb.IPBSolver;
18
import org.sat4j.pb.IPBSolver;
19
import org.sat4j.pb.SolverFactory;
19
import org.sat4j.pb.SolverFactory;
20
import org.sat4j.pb.core.PBSolverCP;
21
import org.sat4j.pb.orders.VarOrderHeapObjective;
20
import org.sat4j.pb.reader.OPBEclipseReader2007;
22
import org.sat4j.pb.reader.OPBEclipseReader2007;
21
import org.sat4j.reader.ParseFormatException;
23
import org.sat4j.reader.ParseFormatException;
22
import org.sat4j.specs.*;
24
import org.sat4j.specs.*;
Lines 317-323 Link Here
317
			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, 1, "Projection incomplete", null); //$NON-NLS-1$
319
			return new Status(IStatus.ERROR, DirectorActivator.PI_DIRECTOR, 1, "Projection incomplete", null); //$NON-NLS-1$
318
		IPBSolver solver = SolverFactory.newEclipseP2();
320
		IPBSolver solver = SolverFactory.newEclipseP2();
319
		solver.setTimeout(60);
321
		solver.setTimeout(60);
320
		org.sat4j.reader.Reader reader = new OPBEclipseReader2007(solver);
322
		OPBEclipseReader2007 reader = new OPBEclipseReader2007(solver);
321
		// CNF filename is given on the command line 
323
		// CNF filename is given on the command line 
322
		long start = System.currentTimeMillis();
324
		long start = System.currentTimeMillis();
323
		if (DEBUG)
325
		if (DEBUG)
Lines 325-331 Link Here
325
		FileReader fr = null;
327
		FileReader fr = null;
326
		try {
328
		try {
327
			fr = new FileReader(problemFile);
329
			fr = new FileReader(problemFile);
328
			IProblem problem = reader.parseInstance(fr);
330
			PBSolverCP problem = (PBSolverCP) reader.parseInstance(fr);
331
			if (problem.getOrder() instanceof VarOrderHeapObjective) {
332
				((VarOrderHeapObjective) problem.getOrder()).setObjectiveFunction(reader.getObjectiveFunction());
333
			}
329
			if (problem.isSatisfiable()) {
334
			if (problem.isSatisfiable()) {
330
				if (DEBUG) {
335
				if (DEBUG) {
331
					System.out.println("Satisfiable !"); //$NON-NLS-1$
336
					System.out.println("Satisfiable !"); //$NON-NLS-1$

Return to bug 220072