ptolemy.domains.continuous.lib
Class Integrator
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.domains.continuous.kernel.ContinuousIntegrator
ptolemy.domains.continuous.lib.Integrator
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TypedActor, ContinuousStatefulComponent, ContinuousStepSizeController, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class Integrator
- extends ContinuousIntegrator
The integrator in the continuous domain.
The derivative port receives the derivative of the state of the integrator
with respect to time. The state output port shows the state of the
integrator. So an ordinary differential equation (ODE),
dx/dt = f(x, t), can be built as follows:
+---------------+
dx/dt | | x
+--------->| Integrator |---------+----->
| | | |
| +----^-----^----+ |
| |
| |---------| |
+-------------| f(x, t) |<-----------+
|---------|
An integrator also has a port-parameter called initialState. The
parameter provides the initial state for integration during the initialization
stage of execution. If during execution an input token is provided on
the port, then the state of the integrator will be reset at that time
to the value of the token. The default value of the parameter is 0.0.
An integrator also has an input port named impulse.
When present, a token at the impulse input
port is interpreted as the weight of a Dirac delta function.
It cause an instantaneous increment or decrement to the state.
If both impulse and initialState have data, then
initialState dominates.
An integrator can generate an output (its current state) before
the derivative input is known, and hence can be used in feedback
loops like that above without creating a causality loop.
The impulse and initialState inputs
ports must be known, however, before an output can be produced.
The effect of data at these inputs on the output is instantaneous.
For different ODE solving methods, the functionality
of an integrator may be different. The delegation and strategy design
patterns are used in this class, the abstract ODESolver class, and the
concrete ODE solver classes. Some solver-dependent methods of integrators
delegate to the concrete ODE solvers.
An integrator can possibly have several auxiliary variables for the
the ODE solvers to use. The ODE solver class provides the number of
variables needed for that particular solver.
The auxiliary variables can be set and get by setAuxVariables()
and getAuxVariables() methods.
This class is based on the CTIntegrator by Jie Liu.
- Since:
- Ptolemy II 6.0
- Version:
- $Id: Integrator.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Haiyang Zheng and Edward A. Lee
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Methods inherited from class ptolemy.domains.continuous.kernel.ContinuousIntegrator |
attributeChanged, clone, fire, getAuxVariables, getCausalityInterface, getDerivative, getState, getTentativeState, initialize, isStepSizeAccurate, isStrict, postfire, prefire, refinedStepSize, rollBackToCommittedState, setAuxVariables, setTentativeState, suggestedStepSize |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, iterate, newReceiver, outputPortList, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup |
Methods inherited from class ptolemy.kernel.ComponentEntity |
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeList, attributeList, 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, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Integrator
public Integrator(CompositeEntity container,
java.lang.String name)
throws NameDuplicationException,
IllegalActionException
- Construct an integrator.
- Parameters:
container
- The container.name
- The name.
- Throws:
NameDuplicationException
- If another star already had
this name.
IllegalActionException
- If there was an internal problem.- See Also:
CTBaseIntegrator