Basic solver for ordinary differential equations of the type q' = f(q, u), where q is the current state of the system and u is a control applied to the system. StateType defines the container object describing the state of the system. Solver is the numerical integration method used to solve the equations. The default is a fourth order Runge-Kutta method. This class wraps around the simple stepper concept from boost::numeric::odeint. More...
#include <ODESolver.h>
Public Member Functions | |
ODEBasicSolver (const SpaceInformationPtr &si, const ODESolver::ODE &ode, double intStep=1e-2) | |
Parameterized constructor. Takes a reference to the SpaceInformation, an ODE to solve, and an optional integration step size - default is 0.01. | |
![]() | |
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. | |
const SpaceInformationPtr & | getSpaceInformation () const |
Get the current instance of the space information. | |
Protected Member Functions | |
virtual void | solve (StateType &state, const Control *control, const double duration) const |
Solve the ODE using boost::numeric::odeint. | |
Additional Inherited Members | |
![]() | |
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 base::State *state, const Control *control, const double duration, base::State *result)> | PostPropagationEvent |
Callback function to perform an event at the end of numerical integration. This functionality is optional. | |
![]() | |
static StatePropagatorPtr | getStatePropagator (ODESolverPtr solver, const PostPropagationEvent &postEvent=NULL) |
Retrieve a StatePropagator object that solves a system of ordinary differential equations defined by an ODESolver. An optional PostPropagationEvent can also be specified as a callback after numerical integration is finished for further operations on the resulting state. | |
![]() | |
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. | |
Basic solver for ordinary differential equations of the type q' = f(q, u), where q is the current state of the system and u is a control applied to the system. StateType defines the container object describing the state of the system. Solver is the numerical integration method used to solve the equations. The default is a fourth order Runge-Kutta method. This class wraps around the simple stepper concept from boost::numeric::odeint.
Definition at line 197 of file ODESolver.h.