Package solver.search.limits

Examples of solver.search.limits.NodeCounter


    }

    @Test(groups = "1s")
    public void testGeometricalRestart1() {
        Solver solver = buildQ(4);
        SearchMonitorFactory.geometrical(solver, 2, 1.2, new NodeCounter(2), 2);
        solver.findAllSolutions();
        // not 2, because of restart, that found twice the same solution
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 2);
        Assert.assertEquals(solver.getMeasures().getRestartCount(), 2);
        Assert.assertEquals(solver.getMeasures().getNodeCount(), 12);
View Full Code Here


    }

    @Test(groups = "1s")
    public void testLubyRestart1() {
        Solver solver = buildQ(4);
        SearchMonitorFactory.luby(solver, 2, 2, new NodeCounter(2), 2);
        solver.findAllSolutions();
        // not 2, because of restart, that found twice the same solution
        Assert.assertEquals(solver.getMeasures().getSolutionCount(), 2);
        Assert.assertEquals(solver.getMeasures().getRestartCount(), 2);
        Assert.assertEquals(solver.getMeasures().getNodeCount(), 11);
View Full Code Here

TOP

Related Classes of solver.search.limits.NodeCounter

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.