Class FirstOrderIntegratorWithJacobians


  • @Deprecated
    public class FirstOrderIntegratorWithJacobians
    extends java.lang.Object
    Deprecated.
    as of 2.2 the complete package is deprecated, it will be replaced in 3.0 by a completely rewritten implementation
    This class enhances a first order integrator for differential equations to compute also partial derivatives of the solution with respect to initial state and parameters.

    In order to compute both the state and its derivatives, the ODE problem is extended with jacobians of the raw ODE and the variational equations are added to form a new compound problem of higher dimension. If the original ODE problem has dimension n and there are p parameters, the compound problem will have dimension n × (1 + n + p).

    Since:
    2.1
    Version:
    $Revision: 1073158 $ $Date: 2011-02-21 22:46:52 +0100 (lun. 21 févr. 2011) $
    See Also:
    ParameterizedODE, ODEWithJacobians
    • Method Detail

      • addStepHandler

        public void addStepHandler​(StepHandlerWithJacobians handler)
        Deprecated.
        Add a step handler to this integrator.

        The handler will be called by the integrator for each accepted step.

        Parameters:
        handler - handler for the accepted steps
        See Also:
        getStepHandlers(), clearStepHandlers()
      • addEventHandler

        public void addEventHandler​(EventHandlerWithJacobians handler,
                                    double maxCheckInterval,
                                    double convergence,
                                    int maxIterationCount)
        Deprecated.
        Add an event handler to the integrator.
        Parameters:
        handler - event handler
        maxCheckInterval - maximal time interval between switching function checks (this interval prevents missing sign changes in case the integration steps becomes very large)
        convergence - convergence threshold in the event time search
        maxIterationCount - upper limit of the iteration count in the event time search
        See Also:
        getEventHandlers(), clearEventHandlers()
      • integrate

        public double integrate​(double t0,
                                double[] y0,
                                double[][] dY0dP,
                                double t,
                                double[] y,
                                double[][] dYdY0,
                                double[][] dYdP)
                         throws DerivativeException,
                                IntegratorException
        Deprecated.
        Integrate the differential equations and the variational equations up to the given time.

        This method solves an Initial Value Problem (IVP) and also computes the derivatives of the solution with respect to initial state and parameters. This can be used as a basis to solve Boundary Value Problems (BVP).

        Since this method stores some internal state variables made available in its public interface during integration (getCurrentSignedStepsize()), it is not thread-safe.

        Parameters:
        t0 - initial time
        y0 - initial value of the state vector at t0
        dY0dP - initial value of the state vector derivative with respect to the parameters at t0
        t - target time for the integration (can be set to a value smaller than t0 for backward integration)
        y - placeholder where to put the state vector at each successful step (and hence at the end of integration), can be the same object as y0
        dYdY0 - placeholder where to put the state vector derivative with respect to the initial state (dy[i]/dy0[j] is in element array dYdY0[i][j]) at each successful step (and hence at the end of integration)
        dYdP - placeholder where to put the state vector derivative with respect to the parameters (dy[i]/dp[j] is in element array dYdP[i][j]) at each successful step (and hence at the end of integration)
        Returns:
        stop time, will be the same as target time if integration reached its target, but may be different if some event handler stops it at some point.
        Throws:
        IntegratorException - if the integrator cannot perform integration
        DerivativeException - this exception is propagated to the caller if the underlying user function triggers one
      • getCurrentStepStart

        public double getCurrentStepStart()
        Deprecated.
        Get the current value of the step start time ti.

        This method can be called during integration (typically by the object implementing the differential equations problem) if the value of the current step that is attempted is needed.

        The result is undefined if the method is called outside of calls to integrate.

        Returns:
        current value of the step start time ti
      • getCurrentSignedStepsize

        public double getCurrentSignedStepsize()
        Deprecated.
        Get the current signed value of the integration stepsize.

        This method can be called during integration (typically by the object implementing the differential equations problem) if the signed value of the current stepsize that is tried is needed.

        The result is undefined if the method is called outside of calls to integrate.

        Returns:
        current signed value of the stepsize
      • setMaxEvaluations

        public void setMaxEvaluations​(int maxEvaluations)
        Deprecated.
        Set the maximal number of differential equations function evaluations.

        The purpose of this method is to avoid infinite loops which can occur for example when stringent error constraints are set or when lots of discrete events are triggered, thus leading to many rejected steps.

        Parameters:
        maxEvaluations - maximal number of function evaluations (negative values are silently converted to maximal integer value, thus representing almost unlimited evaluations)
      • getMaxEvaluations

        public int getMaxEvaluations()
        Deprecated.
        Get the maximal number of functions evaluations.
        Returns:
        maximal number of functions evaluations
      • getEvaluations

        public int getEvaluations()
        Deprecated.
        Get the number of evaluations of the differential equations function.

        The number of evaluations corresponds to the last call to the integrate method. It is 0 if the method has not been called yet.

        Returns:
        number of evaluations of the differential equations function