Abstract base class for an object that can solve ordinary differential equations (ODE) of the type q' = f(q,u) using numerical integration. Classes deriving from this must implement the solve method. The user must supply the ODE to solve. More...
#include <ODESolver.h>
Public Types | |
typedef std::vector< double > | StateType |
Portable data type for the state values. | |
typedef boost::function< void(const StateType &, const Control *, StateType &)> | ODE |
Callback function that defines the ODE. Accepts the current state, input control, and output state. | |
typedef boost::function< void(const Control *, base::State *)> | PostPropagationEvent |
Callback function to perform an event at the end of numerical integration. This functionality is optional. |
Public Member Functions | |
ODESolver (const SpaceInformationPtr &si, const ODE &ode, double intStep) | |
Parameterized constructor. Takes a reference to SpaceInformation, an ODE to solve, and the integration step size. | |
virtual | ~ODESolver (void) |
Destructor. | |
void | setODE (const ODE &ode) |
Set the ODE to solve. | |
double | getIntegrationStepSize (void) const |
Return the size of a single numerical integration step. | |
void | setIntegrationStepSize (double intStep) |
Set the size of a single numerical integration step. | |
StatePropagatorPtr | getStatePropagator (const PostPropagationEvent &postEvent=NULL) const |
Retrieve a StatePropagator object that solves the system of ordinary differential equations defined by this ODESolver. An optional PostPropagationEvent can also be specified as a callback after numerical integration is finished for further operations on the resulting state. |
Protected Member Functions | |
virtual void | solve (StateType &state, const Control *control, const double duration) const =0 |
Solve the ODE given the initial state, and a control to apply for some duration. |
Protected Attributes | |
const SpaceInformationPtr | si_ |
The SpaceInformation that this ODESolver operates in. | |
ODE | ode_ |
Definition of the ODE to find solutions for. | |
double | intStep_ |
The size of the numerical integration step. Should be small to minimize error. |
Abstract base class for an object that can solve ordinary differential equations (ODE) of the type q' = f(q,u) using numerical integration. Classes deriving from this must implement the solve method. The user must supply the ODE to solve.
Definition at line 66 of file ODESolver.h.