Interface INumericalIntegrator

All Known Implementing Classes:
Rk4Naive

public interface INumericalIntegrator

Interface for numerical integrator. This determines continuous time evolution of control law. Should be made so that some generic java numerical integration routine from some other software package can be easily wrapped by a class conforming to this interface.

Since:
1.0

Method Summary
 double integrateUntil(double lfTimeStop, double lfTCurr, double[] arrLfState, double[] arrLfDerivScratch, IAgent agent, StateBundle[] arrStates, ISensor[] arrSensors, IEnvironment env, ISimUICallback drawCallback, ISimUICallback haltCallback)
          Assumes that time does not step over an agent state change event.
 

Method Detail

integrateUntil

double integrateUntil(double lfTimeStop,
                      double lfTCurr,
                      double[] arrLfState,
                      double[] arrLfDerivScratch,
                      IAgent agent,
                      StateBundle[] arrStates,
                      ISensor[] arrSensors,
                      IEnvironment env,
                      ISimUICallback drawCallback,
                      ISimUICallback haltCallback)
Assumes that time does not step over an agent state change event. Other classes should handle this constraint.

Parameters:
lfTimeStop - integrate until this time.
lfTCurr - current (start) time
arrLfState - state vector (initially initial state, overwritten with final state)
arrLfDerivScratch - state derivative vector scratch space (should be same dimensionality as state vector)
agent - agent mapping (currently only support for homogenous swarms )
arrStates - discrete state and control func of each agent (assumed not to change over integration)
arrSensors - array of sensor interfaces.
env - environment
drawCallback - callback for drawing routines (can be null)
haltCallback - callback to check if we should halt (can be null)
Returns:
actual absolute (simulation) time at which we stopped integration, whether due to an interruption, or concluding the computation (lfTimeStop).