ptolemy.domains.ct.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.ct.kernel.CTBaseIntegrator
ptolemy.domains.ct.lib.Integrator
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, TimedActor, TypedActor, CTDynamicActor, CTStatefulActor, CTStepSizeControlActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class Integrator
- extends CTBaseIntegrator
An integrator in the continuous time (CT) domain.
This actor has one input port and one output port. Conceptually,
the input is the derivative of the output with regard to time. So an ordinary
differential equation dx/dt = f(x, t) can be built by:
+---------------+
dx/dt | | x
+--------->| Integrator |---------+----->
| | | |
| +---------------+ |
| |
| |---------| |
+-------------| f(x, t) |<-----------+
|---------|
An integrator
is a dynamic actor that can emit a token (the state) without knowing the
input. An integrator is a step size control actor that can control
the accuracy of the ODE solution by adjusting step sizes.
An integrator has memory, which is its state.
An integrator has one parameter: the initialState. At the
initialization stage of the simulation, the state of the integrator is
set to the initial state. Changes of the initialState parameter
are ignored after the execution starts, unless the initialize() method
is called again. The default value of the parameter is 0.0 of type
DoubleToken.
To help solving the ODE, a set of variables are used:
state: This is the value of the state variable at a time point,
which has beed confirmed by all the step size control actors.
tentative state: This is the value of the state variable
which has not been confirmed. It is a starting point for other actors
to estimate the accuracy of this integration step.
history: The previous states and their derivatives. History may
be used by multistep methods.
For different ODE solving methods, the functionality
of an integrator may be different. The delegation and strategy design
patterns are used in this class, ODESolver class, and the concrete
ODE solver classes. Some solver-dependent methods of integrators are
delegated to the ODE solvers.
An integrator can possibly have several auxiliary variables for the
the ODE solvers to use. The number of the auxiliary variables is checked
before each iteration. 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 is a wrapper for the CTBaseIntegrator class.
- Since:
- Ptolemy II 0.3
- Version:
- $Id: Integrator.java 47513 2007-12-07 06:32:21Z cxh $
- Author:
- Jie Liu
- See Also:
CTBaseIntegrator
,
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.ct.kernel.CTBaseIntegrator |
attributeChanged, clearHistory, emitCurrentStates, fire, getAuxVariables, getDerivative, getHistory, getHistoryCapacity, getState, getTentativeDerivative, getTentativeState, getValidHistoryCount, goToMarkedState, initialize, isOutputAccurate, isStateAccurate, markState, postfire, predictedStepSize, prefire, preinitialize, refinedStepSize, setAuxVariables, setHistoryCapacity, setTentativeDerivative, setTentativeState |
Methods inherited from class ptolemy.actor.AtomicActor |
_actorFiring, _actorFiring, addActorFiringListener, addInitializable, clone, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, 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