Package org.sat4j.reader

Examples of org.sat4j.reader.Reader


    public static void main(final String[] args) {
        final ISolver solver = SolverFactory.newDefault();
        final SolutionCounter sc = new SolutionCounter(solver);
        solver.setTimeout(3600); // 1 hour timeout
        Reader reader = new InstanceReader(solver);

        // filename is given on the command line
        try {
            final IProblem problem = reader.parseInstance(args[0]);
            if (problem.isSatisfiable()) {
                System.out.println(Messages.getString("MoreThanSAT.0")); //$NON-NLS-1$
                reader.decode(problem.model(), new PrintWriter(System.out));
                IVecInt backbone = RemiUtils.backbone(solver);
                System.out
                        .println(Messages.getString("MoreThanSAT.1") + backbone); //$NON-NLS-1$
                System.out.println(Messages.getString("MoreThanSAT.2")); //$NON-NLS-1$
                System.out.println(Messages.getString("MoreThanSAT.3") //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.sat4j.reader.Reader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.