View Javadoc

1   package org.sat4j.multicore;
2   
3   import org.sat4j.core.ASolverFactory;
4   import org.sat4j.pb.IPBSolver;
5   import org.sat4j.specs.ISolver;
6   
7   public class SolverFactory extends ASolverFactory<IPBSolver> {
8   
9   	private static final SolverFactory instance = new SolverFactory();
10  
11  	private SolverFactory() {
12  
13  	}
14  
15  	public static SolverFactory instance() {
16  		return instance;
17  	}
18  
19  	/**
20  	 * 
21  	 */
22  	private static final long serialVersionUID = 1L;
23  
24  	public static ISolver newManyCore() {
25  		return new ManyCore<ISolver>(
26  				org.sat4j.minisat.SolverFactory.instance(), "Default",
27  				"MiniSATNoRestarts", "MiniSATHeapExpSimp", "MiniSAT2Heap");
28  	}
29  
30  	public static IPBSolver newManyCorePB() {
31  		return new ManyCorePB(org.sat4j.pb.SolverFactory.instance(),
32  				"Resolution", "CuttingPlanes");
33  	}
34  
35  	@Override
36  	public IPBSolver defaultSolver() {
37  		return newManyCorePB();
38  	}
39  
40  	@Override
41  	public IPBSolver lightSolver() {
42  		return newManyCorePB();
43  	}
44  
45  }