Class FirstOrderIntegratorWithJacobians
 java.lang.Object

 org.apache.commons.math.ode.jacobians.FirstOrderIntegratorWithJacobians

@Deprecated public class FirstOrderIntegratorWithJacobians extends Object
Deprecated.as of 2.2 the complete package is deprecated, it will be replaced in 3.0 by a completely rewritten implementationThis 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
 See Also:
ParameterizedODE
,ODEWithJacobians


Constructor Summary
Constructors Constructor Description FirstOrderIntegratorWithJacobians(FirstOrderIntegrator integrator, ODEWithJacobians ode)
Deprecated.Build an enhanced integrator using ODE builtin jacobian computation features.FirstOrderIntegratorWithJacobians(FirstOrderIntegrator integrator, ParameterizedODE ode, double[] p, double[] hY, double[] hP)
Deprecated.Build an enhanced integrator using internal differentiation to compute jacobians.

Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addEventHandler(EventHandlerWithJacobians handler, double maxCheckInterval, double convergence, int maxIterationCount)
Deprecated.Add an event handler to the integrator.void
addStepHandler(StepHandlerWithJacobians handler)
Deprecated.Add a step handler to this integrator.void
clearEventHandlers()
Deprecated.Remove all the event handlers that have been added to the integrator.void
clearStepHandlers()
Deprecated.Remove all the step handlers that have been added to the integrator.double
getCurrentSignedStepsize()
Deprecated.Get the current signed value of the integration stepsize.double
getCurrentStepStart()
Deprecated.Get the current value of the step start time t_{i}.int
getEvaluations()
Deprecated.Get the number of evaluations of the differential equations function.Collection<EventHandlerWithJacobians>
getEventHandlers()
Deprecated.Get all the event handlers that have been added to the integrator.int
getMaxEvaluations()
Deprecated.Get the maximal number of functions evaluations.Collection<StepHandlerWithJacobians>
getStepHandlers()
Deprecated.Get all the step handlers that have been added to the integrator.double
integrate(double t0, double[] y0, double[][] dY0dP, double t, double[] y, double[][] dYdY0, double[][] dYdP)
Deprecated.Integrate the differential equations and the variational equations up to the given time.void
setMaxEvaluations(int maxEvaluations)
Deprecated.Set the maximal number of differential equations function evaluations.



Constructor Detail

FirstOrderIntegratorWithJacobians
public FirstOrderIntegratorWithJacobians(FirstOrderIntegrator integrator, ParameterizedODE ode, double[] p, double[] hY, double[] hP)
Deprecated.Build an enhanced integrator using internal differentiation to compute jacobians. Parameters:
integrator
 underlying integrator to solve the compound problemode
 original problem (f in the equation y' = f(t, y))p
 parameters array (may be null ifgetParametersDimension()
from original problem is zero)hY
 step sizes to use for computing the jacobian df/dy, must have the same dimension as the original problemhP
 step sizes to use for computing the jacobian df/dp, must have the same dimension as the original problem parameters dimension See Also:
FirstOrderIntegratorWithJacobians(FirstOrderIntegrator, ODEWithJacobians)

FirstOrderIntegratorWithJacobians
public FirstOrderIntegratorWithJacobians(FirstOrderIntegrator integrator, ODEWithJacobians ode)
Deprecated.Build an enhanced integrator using ODE builtin jacobian computation features. Parameters:
integrator
 underlying integrator to solve the compound problemode
 original problem, which can compute the jacobians by itself See Also:
FirstOrderIntegratorWithJacobians(FirstOrderIntegrator, ParameterizedODE, double[], double[], double[])


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()

getStepHandlers
public Collection<StepHandlerWithJacobians> getStepHandlers()
Deprecated.Get all the step handlers that have been added to the integrator. Returns:
 an unmodifiable collection of the added events handlers
 See Also:
addStepHandler(StepHandlerWithJacobians)
,clearStepHandlers()

clearStepHandlers
public void clearStepHandlers()
Deprecated.Remove all the step handlers that have been added to the integrator.

addEventHandler
public void addEventHandler(EventHandlerWithJacobians handler, double maxCheckInterval, double convergence, int maxIterationCount)
Deprecated.Add an event handler to the integrator. Parameters:
handler
 event handlermaxCheckInterval
 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 searchmaxIterationCount
 upper limit of the iteration count in the event time search See Also:
getEventHandlers()
,clearEventHandlers()

getEventHandlers
public Collection<EventHandlerWithJacobians> getEventHandlers()
Deprecated.Get all the event handlers that have been added to the integrator. Returns:
 an unmodifiable collection of the added events handlers
 See Also:
addEventHandler(EventHandlerWithJacobians, double, double, int)
,clearEventHandlers()

clearEventHandlers
public void clearEventHandlers()
Deprecated.Remove all the event handlers that have been added to the integrator.

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 threadsafe. Parameters:
t0
 initial timey0
 initial value of the state vector at t0dY0dP
 initial value of the state vector derivative with respect to the parameters at t0t
 target time for the integration (can be set to a value smaller thant0
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 y0dYdY0
 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 integrationDerivativeException
 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 t_{i}.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 t_{i}

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

