Examples of Solution


Examples of org.optaplanner.core.api.domain.solution.Solution

    @Override
    protected void onExchange(Exchange exchange) throws Exception {
        ObjectHelper.notNull(solverFactory, "solverFactory");
        Solver solver = solverFactory.buildSolver();

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

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

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

Examples of org.optaplanner.core.api.domain.solution.Solution

            this.mutationCounter = mutationCounter;
        }

        public void bestSolutionChanged(BestSolutionChangedEvent<Solution> event) {
            int mutationCount;
            Solution newBestSolution = event.getNewBestSolution();
            if (oldBestSolution == null) {
                mutationCount = 0;
            } else {
                mutationCount = mutationCounter.countMutations(oldBestSolution, newBestSolution);
            }
View Full Code Here

Examples of org.optaplanner.core.api.domain.solution.Solution

    public String getOutputFileExtension() {
        return FILE_EXTENSION;
    }

    public Solution read(File inputSolutionFile) {
        Solution unsolvedSolution;
        Reader reader = null;
        try {
            // xStream.fromXml(InputStream) does not use UTF-8
            reader = new InputStreamReader(new FileInputStream(inputSolutionFile), "UTF-8");
            unsolvedSolution = (Solution) xStream.fromXML(reader);
View Full Code Here

Examples of org.optaplanner.core.impl.solution.Solution

    @Override
    protected void onExchange(Exchange exchange) throws Exception {
        ObjectHelper.notNull(solverFactory, "solverFactory");
        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());
        exchange.getOut().setAttachments(exchange.getIn().getAttachments());
View Full Code Here

Examples of org.papoose.core.spi.Solution

            List<FragmentGeneration> fragments = new ArrayList<FragmentGeneration>(candidateBundle.getFragments().size());

            for (FragmentGeneration boundFragment : candidateBundle.getFragments()) fragments.add(boundFragment);

            solutions.add(new Solution(candidateBundle.getBundleGeneration(), fragments, wires, requiredBundles));
        }

        return solutions;
    }
View Full Code Here

Examples of ptolemy.data.unit.Solution

            try {
                _uConstraints = new UnitConstraints(_model, _entities,
                        _relations);

                Solution solution = _uConstraints.completeSolution();
                _fullSolutionResult.setText(solution.getShortStateDesc());

                //solution.trace();
            } catch (IllegalActionException e) {
                MessageHandler.error("Full Solver failed: ", e);
                return;
View Full Code Here

Examples of ptolemy.data.unit.Solution

        int index = _solutionsList.getSelectedIndex();

        if (index >= 0) {
            _showComponents();

            Solution solution = (Solution) (_solutions.elementAt(index));
            solution.annotateGraph();

            //solution.trace();
        }
    }
View Full Code Here

Examples of ru.syktsu.projects.oko2.server.objects.Solution

        result.received = input.getReceived();
        return result;
    }
   
    public static Solution convert(JaxbSolution input) {
        Solution result = new Solution();
        result.setChecked(input.checked);
        result.setCompiler(input.compiler);
        result.setDuration(input.duration);
        if (null!=input.extendedResult)result.getExtendedResult().addAll(input.extendedResult);
        result.setId(input.id);
        result.setMemoryExpend(input.memoryExpend);
        result.setParticipantId(input.participantId);
        result.setProblemId(input.problemId);
        result.setReceived(input.received);
        result.setSolution(input.solution);
        result.setCheckingResult(input.result);
        return result;
    }
View Full Code Here

Examples of uk.ac.cranfield.thesis.shared.Solution

            y = evaluateFunction(y, k1, k2, k3, k4);
           
            result.add(y.get(y.size() - 1));
        }
       
        return new Solution(result, start, stop, step);
    }
View Full Code Here

Examples of uk.ac.cranfield.thesis.shared.Solution

            Calculable calc = new ExpressionBuilder(equation.getEquation()).withVariable(
                    String.valueOf(equation.getIndependentVariable()), p).build();
            results.add(calc.calculate());
        }
       
        return new Solution(results, 0, 10, 1);
    }
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.