Examples of SolverFactory


Examples of org.optaplanner.core.api.solver.SolverFactory

    protected Class<? extends EasyScoreCalculator> overwritingEasyScoreCalculatorClass()  {
        return null;
    }

    protected SolverFactory buildSolverFactory() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(createSolverConfigResource());
        TerminationConfig terminationConfig = new TerminationConfig();
        // buildAndSolve() fills in minutesSpentLimit
        solverFactory.getSolverConfig().setTerminationConfig(terminationConfig);
        return solverFactory;
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

        super(dataFile);
        this.exhaustiveSearchType = exhaustiveSearchType;
    }

    protected SolverFactory buildSolverFactory() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(createSolverConfigResource());
        SolverConfig solverConfig = solverFactory.getSolverConfig();
        solverConfig.setTerminationConfig(new TerminationConfig());
        ExhaustiveSearchPhaseConfig exhaustiveSearchPhaseConfig = new ExhaustiveSearchPhaseConfig();
        exhaustiveSearchPhaseConfig.setExhaustiveSearchType(exhaustiveSearchType);
        solverConfig.setPhaseConfigList(Arrays.<PhaseConfig>asList(exhaustiveSearchPhaseConfig));
        return solverFactory;
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

    protected abstract SolutionDao createSolutionDao();

    @Test(timeout = 600000)
    public void runPhase() {
        SolverFactory solverFactory = buildSolverFactory();
        Solution planningProblem = readPlanningProblem();
        Solver solver = solverFactory.buildSolver();

        solver.solve(planningProblem);
        Solution bestSolution = solver.getBestSolution();
        assertSolution(bestSolution);
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                ProjectJobSchedulingPanel.LOGO_PATH);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                TennisPanel.LOGO_PATH);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

public class NQueensHelloWorld {

    public static void main(String[] args) {
        // Build the Solver
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(
                "org/optaplanner/examples/nqueens/solver/nqueensSolverConfig.xml");
        Solver solver = solverFactory.buildSolver();

        // Load a problem with 8 queens
        NQueens unsolved8Queens = new NQueensGenerator().createNQueens(8);

        // Solve the problem
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                MachineReassignmentPanel.LOGO_PATH);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                null);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                null);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here

Examples of org.optaplanner.core.api.solver.SolverFactory

                CurriculumCoursePanel.LOGO_PATH);
    }

    @Override
    protected Solver createSolver() {
        SolverFactory solverFactory = SolverFactory.createFromXmlResource(SOLVER_CONFIG);
        return solverFactory.buildSolver();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.