Examples of solve()


Examples of org.optaplanner.core.api.solver.Solver.solve()

        Solver solver = solverFactory.buildSolver();

        Solution planningProblem = exchange.getIn().getMandatoryBody(Solution.class);

        solver.setPlanningProblem(planningProblem);
        solver.solve();
        Solution bestSolution = solver.getBestSolution();

        exchange.getOut().setBody(bestSolution);
        // propagate headers and attachments
        exchange.getOut().setHeaders(exchange.getIn().getHeaders());
View Full Code Here

Examples of org.optaplanner.core.impl.phase.Phase.solve()

    protected void runPhases() {
        Iterator<Phase> it = phaseList.iterator();
        while (!termination.isSolverTerminated(solverScope) && it.hasNext()) {
            Phase phase = it.next();
            phase.solve(solverScope);
            if (it.hasNext()) {
                solverScope.setWorkingSolutionFromBestSolution();
            }
        }
        // TODO support doing round-robin of phases (only non-construction heuristics)
View Full Code Here

Examples of org.xilaew.jampl.JAMPL.solve()

  public static void main(String[] args) throws IOException {
    JAMPL jampl = AmplFactory.createJAMPL();
    jampl.setSolver("cplex");
    jampl.loadModel("output/assignment.mod");
    jampl.loadData("output/assignment0.dat");
    SolveResult result = jampl.solve();
    printResult(result);
    jampl.setSolver("couenne");
    printResult(jampl.solve());
    System.out.println("found a result!");
    System.out.println("a is: "+jampl.getParameter("a"));
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LSolver.solve()

    }
   
    final int [] incompatiblePairs = new int[ndGraph.getStateNumber()*(ndGraph.getStateNumber()+1)/2];for(int i=0;i<incompatiblePairs.length;++i) incompatiblePairs[i]=GDLearnerGraph.PAIR_OK;
    final int pairsNumber = ndGraph.findIncompatiblePairs(incompatiblePairs,ThreadNumber);
    LSolver solver = ndGraph.buildMatrix_internal(incompatiblePairs, pairsNumber, ThreadNumber,ddrh);
    solver.solve(ThreadNumber);
    solver.freeAllButResult();// deallocate memory before creating a large array.
    coregraph.pairsAndScores.clear();
    // now fill in the scores in the array.
    for(int i=0;i<incompatiblePairs.length;++i)
    {
View Full Code Here

Examples of sudoku.Sudoku.SudokuService.solve()

    private static void sendAsyncRequest(final RpcChannel channel, RpcClient client) {
        final CountDownLatch latch = new CountDownLatch(1);
        System.err.println("sendRequest " + channel);
        SudokuService remoteService = Sudoku.SudokuService.newStub(channel);
        SudokuRequest request = SudokuRequest.newBuilder().setCheckerboard("001010").build();
        remoteService.solve(null, request, new RpcCallback<Sudoku.SudokuResponse>() {
            @Override
            public void run(SudokuResponse parameter) {
                System.out.println(parameter);
                channel.disconnect();
                latch.countDown();
View Full Code Here

Examples of sudoku.Sudoku.SudokuService.BlockingInterface.solve()

        RpcClient client = new RpcClient();
        RpcChannel channel = client.blockingConnect(addr);
        //sendRequest(channel, client);
        BlockingInterface remoteService = Sudoku.SudokuService.newBlockingStub(channel);
        SudokuRequest request = SudokuRequest.newBuilder().setCheckerboard("001010").build();
        SudokuResponse response = remoteService.solve(null, request);
        System.out.println(response);
        channel.disconnect();
        client.stop();
    }
View Full Code Here

Examples of uk.ac.cranfield.thesis.client.service.RungeKuttaSolverServiceAsync.solve()

        List<Double> list = new ArrayList<Double>();
        list.add(1.0);
       
        equation.setInitValues(list);
       
        solverService.solve(equation, 0.2, 0.0, 0.2, new AsyncCallback<Solution>()
        {
           
            @Override
            public void onSuccess(Solution result)
            {
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.