Class JxnODE

    • Constructor Detail

      • JxnODE

        public JxnODE​(KmgFormelInterpreter fi,
                      String[] odes)
        Constructs a FirstOrderDifferentialEquations instance to be used by Commons Math algorithms.
        Example:
            ode = @JxODE( $this, { "$y[0]*( a - b $y[1] );", "$y[1]*( d $y[0] - c );" } )
         
        Parameters:
        fi - instance of KmgFormelInterpreter on which the definitions in odes[...] are executed
        odes - array of statement_sequences (one or more statements separated by ';'). The definitions in odes[...] must use double[] $y and $t to calculate the derivatives dy/dt. If the definition in odes[i] ends with ';', log output of intermediate steps is suppressed for the definition.
      • JxnODE

        public JxnODE​(KmgFormelInterpreter fi,
                      String init,
                      String[] odes,
                      double[] parameters)
        Parameters:
        init - statement_sequence (one or more statements separated by ';'). init is evaluated before evaluating odes and can use double[] $y and $t. If init ends with ';', log output is suppressed.
        parameters - the values can be used in the init and odes definitions via the array variable $p[...]