public class ParticleFilter extends AbstractParticleFilter
The particle filter runs on a state space model given by
X_{t+1} = f(X_t, U_t, t) Y_{t} = g(X_t, U_t, t) X(0) = X0where X is the state vector, U is the input vector, Y is the observation vector, and t is the model time. To use this actor :
AbstractParticleFilter.InputType
CompositeEntity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
Parameter |
measurementCovariance
Standard deviation of the measurement noise ( assuming Gaussian measurement noise
at the moment).
|
Parameter |
prior
An expression for the prior distribution from which the samples are drawn.
|
Parameter |
processNoise
The process noise.
|
Parameter |
stateVariableNames
The names of the state variables, in an array of strings.
|
_inputRelations, _particleLabels, _particleTypes, _Sigma, _stateLabels, _stateNames, _stateTypes, _upToDate, bootstrap, lowVarianceSampler, MEASUREMENT_NOISE, MEASUREMENT_POSTFIX, outputParticleCount, particleCount, particleOutput, PRIOR_NAME, PROCESS_NOISE, resetOnEachRun, seed, STATE_VARIABLE_NAMES, stateEstimate, t, UPDATE_POSTFIX
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
_levelCrossingLinks
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
ParticleFilter(CompositeEntity container,
java.lang.String name)
Construct the composite actor with a name and a container.
|
ParticleFilter(Workspace workspace)
Construct a PF in the specified
workspace with no container and an empty string as a name.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_checkParameters()
Check the dimensions of all parameters and ports.
|
void |
attributeChanged(Attribute attribute)
If the argument is any parameter other than stateVariableNames
t, or any parameter matching an input port,
then request reinitialization.
|
protected AbstractParticleFilter.InputType |
getInputType(java.lang.String inputName)
Get input type by name reference
|
protected Parameter |
getMeasurementParameter(java.lang.String fullName)
Returns a parameter value corresponding to a measurement.
|
protected Parameter |
getNoiseParameter(java.lang.String inputName)
Returns a parameter value corresponding to a noise distribution.
|
protected Parameter |
getUserDefinedParameter(java.lang.String parameterName)
Return the Parameter that is part of a state space model.
|
boolean |
satisfiesMapConstraints(double[] coordinates)
Return true if the the coordinates satisfy the map constraints.
|
_constrainParticles, fire, getMeasurementParameterExpression, getUserDefinedParameterExpression, preinitialize, wrapup
_addEntity, _addPort, _addRelation, _checkTypesFromTo, _destinationTypeConstraints, attributeTypeChanged, isBackwardTypeInferenceEnabled, newPort, newRelation, resolveTypes, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, notifyConnectivityChange, outputPortList, postfire, prefire, recordFiring, registerPublisherPort, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, clone, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, initialize, removeInitializable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public Parameter measurementCovariance
public Parameter prior
public Parameter processNoise
public Parameter stateVariableNames
public ParticleFilter(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container
- The container.name
- The name.NameDuplicationException
- If another entity already had
this name.IllegalActionException
- If there was an internal problem.public ParticleFilter(Workspace workspace) throws IllegalActionException, NameDuplicationException
workspace
- The workspace that will list the actor.IllegalActionException
- If the name has a period in it, or
the director is not compatible with the specified container.NameDuplicationException
- If the container already contains
an entity with the specified name.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class AbstractParticleFilter
attribute
- The attribute that changed.IllegalActionException
- If the numerator and the
denominator matrix is not a row vector.protected void _checkParameters() throws IllegalActionException
_checkParameters
in class AbstractParticleFilter
IllegalActionException
- If the dimensions are illegal.protected Parameter getUserDefinedParameter(java.lang.String parameterName) throws IllegalActionException
getUserDefinedParameter
in class AbstractParticleFilter
parameterName
- Name of parameterIllegalActionException
- If the parameter cannot be found.protected Parameter getMeasurementParameter(java.lang.String fullName) throws IllegalActionException
AbstractParticleFilter
getMeasurementParameter
in class AbstractParticleFilter
fullName
- Name of measurement parameterIllegalActionException
protected AbstractParticleFilter.InputType getInputType(java.lang.String inputName)
AbstractParticleFilter
getInputType
in class AbstractParticleFilter
inputName
- The name of the inputprotected Parameter getNoiseParameter(java.lang.String inputName)
AbstractParticleFilter
getNoiseParameter
in class AbstractParticleFilter
inputName
- Name of noise parameterpublic boolean satisfiesMapConstraints(double[] coordinates)
MapConstrained
coordinates
- The coordinates