Package solver.search.loop.lns

Examples of solver.search.loop.lns.LargeNeighborhoodSearch


//        SearchMonitorFactory.log(solver, true, false);
        switch (lns) {
            case 0:
                break;
            case 1:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new RandomNeighborhood(solver, objects, 200, 123456L), true));
                SearchMonitorFactory.limitThreadTime(solver, 2000);
                break;
            case 2:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new PropagationGuidedNeighborhood(solver, objects, 123456L, 100, 10), true));
                SearchMonitorFactory.limitThreadTime(solver, 2000);
                break;
            case 3:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new SequenceNeighborhood(
                                new PropagationGuidedNeighborhood(solver, objects, 123456L, 100, 10),
                                new ReversePropagationGuidedNeighborhood(solver, objects, 123456L, 100, 10)
                        ), true));
                SearchMonitorFactory.limitThreadTime(solver, 2000);
                break;
            case 4:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new SequenceNeighborhood(
                                new PropagationGuidedNeighborhood(solver, objects, 123456L, 100, 10),
                                new ReversePropagationGuidedNeighborhood(solver, objects, 123456L, 100, 10),
                                new RandomNeighborhood(solver, objects, 200, 123456L)
                        ), true));
                SearchMonitorFactory.limitThreadTime(solver, 2000);
                break;
            case 5:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new ExplainingCut(solver, 200, 123456L), true));
                SearchMonitorFactory.limitThreadTime(solver, 2000);
                break;
            case 6:
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver,
                        new ExplainingObjective(solver, 200, 123456L), true));
                SearchMonitorFactory.limitThreadTime(solver, 200000);
                break;
            case 7:
                SequenceNeighborhood ngb = new SequenceNeighborhood(
                        new ExplainingObjective(solver, 200, 123456L),
                        new ExplainingCut(solver, 200, 123456L),
                        new RandomNeighborhood4Explanation(solver, objects, 200, 123456L));
                solver.getSearchLoop().plugSearchMonitor(new LargeNeighborhoodSearch(solver, ngb, true));
                SearchMonitorFactory.limitThreadTime(solver, 200000);
                break;
        }

        solver.findOptimalSolution(ResolutionPolicy.MAXIMIZE, power);
View Full Code Here


        solver.post(ICF.arithm(vars[0], "+", vars[1], "<", 2));
        solver.post(ICF.arithm(vars[4], "+", vars[5], ">", 3));

        NogoodStoreFromRestarts ngs = new NogoodStoreFromRestarts(vars);
        solver.getSearchLoop().plugSearchMonitor(
                new LargeNeighborhoodSearch(solver,
                        new SequenceNeighborhood(
                                new ExplainingObjective(solver, 200, 123456L),
                                new ExplainingCut(solver, 200, 123456L),
                                new RandomNeighborhood4Explanation(solver, vars, 200, 123456L)), true));
        solver.post(ngs);
View Full Code Here

TOP

Related Classes of solver.search.loop.lns.LargeNeighborhoodSearch

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.