motris.model
Class State

java.lang.Object
  extended bymotris.data.Description
      extended byparameter.ParameterizedObjectAdaptor
          extended bymotris.model.State
All Implemented Interfaces:
ParameterizedObject
Direct Known Subclasses:
CarState, GenericState

public abstract class State
extends ParameterizedObjectAdaptor

Abstract class representing the State of an Actor. Includes functionality for State Vector storage/retrieval for different times, prediction and covariance management

Author:
Hendrik Dahlkamp

Nested Class Summary
 
Nested classes inherited from class parameter.ParameterizedObject
ParameterizedObject.ParameterChangedListener, ParameterizedObject.ParameterizedObjectManager
 
Field Summary
(package private)  DoubleMatrix aPrioriCovarianceBeforeProcessNoise
          this variable is to store the real a-priori-covariance, that is before adding artificial noise orthogonal to the car currently only pece2002
 int firstVisibleTime
           
protected  boolean hidden
           
 int lastVisibleTime
           
(package private)  ParameterSet parameters
           
 boolean referencePointInMiddle
           
 java.lang.Object stateChangeSemaphore
           
(package private)  int time
           
 
Fields inherited from class parameter.ParameterizedObjectAdaptor
parameterChangedNotifyList
 
Fields inherited from class motris.data.Description
 
Constructor Summary
State(java.lang.String name, ParameterSet _params, int orderofderivations)
           
 
Method Summary
 Parameter addParameter(double value, java.lang.String _name, java.lang.String _ident, java.lang.String _unit, int forWhichDerivative, boolean overwriteValue)
          Add FreeParameter to this state with the given credentials.
abstract  void advanceTimeStep(double deltaT)
           
 void finishInitialisation()
           
 DoubleMatrix getAPrioriCovarianceBeforeProcessNoise()
           
 JSci.maths.DoubleSquareMatrix getCovariance()
           
 int getNumParameter(int derivative)
           
 FreeParameter getParameter(int index, int timederivationorder)
           
 ParameterSet getParameters()
          Get a Vector of Strings with a description of each Parameter
 ParameterSet getParameters(boolean forSave)
           
 Double2Vector getPosition()
           
abstract  DoubleVector getPredictedStateVector(double deltaT)
           
abstract  JSci.maths.DoubleSquareMatrix getStateDerivativeMatrix()
           
abstract  DoubleVector getStateVector()
           
abstract  DoubleVector getStateVector(int time)
           
abstract  int getStateVectorDimension()
           
 DoubleVector getStateVectorDot(double deltaT)
           
 double getValue(int index, int timederivationorder)
           
abstract  boolean initCovariances()
           
 boolean isHidden()
           
 boolean isVisibleDuringTime(int time)
           
abstract  boolean recallState(int _time)
           
 void setAngle(double angle)
           
 void setCovariance(JSci.maths.DoubleSquareMatrix _covariance)
           
abstract  boolean setFromStateVector(DoubleVector v)
           
 void setHidden(boolean b)
           
 boolean setParameters(ParameterSet _params)
          Copies VALUES not references from supplied ParameterSet into State,
 void setPosition(double xpos, double ypos)
           
abstract  void storeCurrentState(int _time)
           
abstract  void storeState(ParameterSet params, int _time)
           
 
Methods inherited from class parameter.ParameterizedObjectAdaptor
addParameterChangedListener, finalize, fireParameterChanged, parameterEdited, removeParameterChangedListener
 
Methods inherited from class motris.data.Description
getDescription, getIdentifier, getName, setDescription, setIdentifier, setName
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

time

int time

parameters

ParameterSet parameters

firstVisibleTime

public int firstVisibleTime

lastVisibleTime

public int lastVisibleTime

referencePointInMiddle

public boolean referencePointInMiddle

hidden

protected boolean hidden

stateChangeSemaphore

public java.lang.Object stateChangeSemaphore

aPrioriCovarianceBeforeProcessNoise

DoubleMatrix aPrioriCovarianceBeforeProcessNoise
this variable is to store the real a-priori-covariance, that is before adding artificial noise orthogonal to the car currently only pece2002

Constructor Detail

State

public State(java.lang.String name,
             ParameterSet _params,
             int orderofderivations)
Method Detail

setPosition

public void setPosition(double xpos,
                        double ypos)

getPosition

public Double2Vector getPosition()

setAngle

public void setAngle(double angle)

getValue

public double getValue(int index,
                       int timederivationorder)

getParameter

public FreeParameter getParameter(int index,
                                  int timederivationorder)

addParameter

public Parameter addParameter(double value,
                              java.lang.String _name,
                              java.lang.String _ident,
                              java.lang.String _unit,
                              int forWhichDerivative,
                              boolean overwriteValue)
Add FreeParameter to this state with the given credentials. If the parameter already exists, its values are updated (if overwriteValue is true) or left unchanged otherwise

Parameters:
value - parameter value
_name -
_ident -
_unit -
forWhichDerivative - append parameter to which derivative
overwriteValue - overwrite parameter value if it is already present in the state
Returns:
the created or re-used parameter

getNumParameter

public int getNumParameter(int derivative)

getParameters

public ParameterSet getParameters()
Description copied from interface: ParameterizedObject
Get a Vector of Strings with a description of each Parameter

Specified by:
getParameters in interface ParameterizedObject
Overrides:
getParameters in class ParameterizedObjectAdaptor

getParameters

public ParameterSet getParameters(boolean forSave)

setParameters

public boolean setParameters(ParameterSet _params)
Copies VALUES not references from supplied ParameterSet into State,

Specified by:
setParameters in interface ParameterizedObject
Overrides:
setParameters in class ParameterizedObjectAdaptor
Parameters:
_params - new parameteres
Returns:
successful operation

advanceTimeStep

public abstract void advanceTimeStep(double deltaT)

getStateVectorDimension

public abstract int getStateVectorDimension()

getStateVectorDot

public DoubleVector getStateVectorDot(double deltaT)

getCovariance

public JSci.maths.DoubleSquareMatrix getCovariance()

setCovariance

public void setCovariance(JSci.maths.DoubleSquareMatrix _covariance)

getStateVector

public abstract DoubleVector getStateVector()

getStateVector

public abstract DoubleVector getStateVector(int time)

getPredictedStateVector

public abstract DoubleVector getPredictedStateVector(double deltaT)

setFromStateVector

public abstract boolean setFromStateVector(DoubleVector v)

initCovariances

public abstract boolean initCovariances()

recallState

public abstract boolean recallState(int _time)

storeCurrentState

public abstract void storeCurrentState(int _time)

storeState

public abstract void storeState(ParameterSet params,
                                int _time)

isVisibleDuringTime

public boolean isVisibleDuringTime(int time)

finishInitialisation

public void finishInitialisation()

getStateDerivativeMatrix

public abstract JSci.maths.DoubleSquareMatrix getStateDerivativeMatrix()

getAPrioriCovarianceBeforeProcessNoise

public DoubleMatrix getAPrioriCovarianceBeforeProcessNoise()

isHidden

public boolean isHidden()

setHidden

public void setHidden(boolean b)