Package uk.ac.cranfield.thesis.shared.model

Examples of uk.ac.cranfield.thesis.shared.model.System


     * @throws IncorrectODEEquationException
     */
    @Override
    public System parseEquationsSystem(List<String> inputs) throws IncorrectODEEquationException
    {
        System system = new System();
        List<Character> functionalVariables = new ArrayList<Character>(inputs.size());
       
        for (String input : inputs)
        {
            input = input.replace(" ", "").toLowerCase();
            String[] parts = input.split(",");
           
            Equation equation = new Equation(parts[0]);
            equation.setOrder(longestRun(parts[0], '\'', 1));
            if (equation.getOrder() < parts.length - 1)
                throw new IncorrectODEEquationException("lack of initial values");
           
            List<String> init = new ArrayList<String>(parts.length - 1);
            for (int i = 1; i < parts.length; i++)
                init.add(parts[i]);
           
            equation.setInitValues(parseInitialValues(init));
            equation.setFunctionVariable(parseFunctionVariable(parts[0]));
            functionalVariables.add(equation.getFunctionVariable());
           
            system.addEquation(equation);
        }
       
       
        List<Equation> equations = system.getEquations();
        char independentVariable = parseIndependentVariable(inputs, functionalVariables);
       
        for (Equation eq : equations)
        {
            eq.setIndependentVariable(independentVariable);
View Full Code Here


        equation.setInitValues(list);
        equation2.setInitValues(list2);
        List<Equation> equations = new ArrayList<Equation>(2);
        equations.add(equation);
        equations.add(equation2);
        System system = new System(equations);
       
        solverService.solveSystem(system, 0.1, 0.0, 1.0, new AsyncCallback<List<Solution>>()
        {
           
            @Override
View Full Code Here

        equation.setInitValues(list);
        equation2.setInitValues(list2);
        List<Equation> equations = new ArrayList<Equation>(2);
        equations.add(equation);
        equations.add(equation2);
        System system = new System(equations);
       
        solverService.solveSystem(system, 0.1, 0.0, 1.0, new AsyncCallback<List<Solution>>()
        {
           
            @Override
View Full Code Here

       
        equations.add(equation);
        equations.add(equation2);
        equations.add(equation3);
       
        System system = new System(equations);
       
        solverService.solveSystem(system, 0.1, 0.0, 1.0, new AsyncCallback<List<Solution>>()
        {
           
            @Override
View Full Code Here

TOP

Related Classes of uk.ac.cranfield.thesis.shared.model.System

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.