|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.kernel.CompositeEntity
ptolemy.actor.CompositeActor
ptolemy.actor.TypedCompositeActor
ptolemy.domains.continuous.lib.DifferentialSystem
public class DifferentialSystem
A differential system in the Continuous domain.
The differential system model implements a system whose behavior is defined by:
dx/dt = f(x, u, t) y = g(x, u, t) x(0) = x0where x is the state vector, u is the input vector, and y is the output vector, t is the time. To use this actor, proceed through the following steps:
This actor is a higher-order component. Upon preinitialization, the actor will create a subsystem using integrators and expressions. These are not persistent (they are not exported in the MoML file), and will instead by created each time the actor is preinitialized.
This actor is based on the ptolemy.domain.ct.lib.DifferentialSystem actor by Jie Liu.
Integrator
,
Serialized Form
Red (cxh) |
Red (liuj) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.CompositeEntity |
---|
CompositeEntity.ContainedObjectsIterator |
Field Summary | |
---|---|
private boolean |
_upToDate
Flag indicating whether the contained model is up to date. |
Parameter |
stateVariableNames
The names of the state variables, in an array of strings. |
Parameter |
t
The value of current time. |
Fields inherited from class ptolemy.actor.CompositeActor |
---|
_actorFiringListeners, _causalityInterface, _initializables, _notifyingActorFiring, _publishedPorts, _publisherRelations, _stopRequested |
Fields inherited from class ptolemy.kernel.CompositeEntity |
---|
_levelCrossingLinks |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
DifferentialSystem(CompositeEntity container,
java.lang.String name)
Construct the composite actor with a name and a container. |
|
DifferentialSystem(Workspace workspace)
Construct a DifferentialSystem in the specified workspace with no container and an empty string as a name. |
Method Summary | |
---|---|
protected void |
_addPort(Port port)
Add a port to this actor. |
private void |
_checkParameters()
Check the dimensions of all parameters and ports. |
private void |
_init()
Initialize the class. |
private void |
_requestInitialization()
Set this composite actor to opaque and request for reinitialization from the director if there is one. |
void |
attributeChanged(Attribute attribute)
If the argument is any parameter other than stateVariableNames t, or any parameter matching an input port, then request reinitialization. |
void |
fire()
Override the base class to first set the value of the parameter t to match current time, then to set the local parameters that mirror input values, and then to fire the contained actors. |
void |
preinitialize()
Create the model inside from the parameter values. |
Methods inherited from class ptolemy.actor.TypedCompositeActor |
---|
_addEntity, _addRelation, _checkTypesFromTo, _typeConstraintsFromTo, newPort, newRelation, resolveTypes, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, initialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public Parameter stateVariableNames
public Parameter t
private boolean _upToDate
Constructor Detail |
---|
public DifferentialSystem(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 DifferentialSystem(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.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the numerator and the
denominator matrix is not a row vector.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class CompositeActor
IllegalActionException
- If there is no director, or if
the director's fire() method throws it, or if the actor is not
opaque.public void preinitialize() throws IllegalActionException
preinitialize
in interface Initializable
preinitialize
in class CompositeActor
IllegalActionException
- If there is no director,
or if any contained actors throws it in its preinitialize() method.protected void _addPort(Port port) throws IllegalActionException, NameDuplicationException
_addPort
in class TypedCompositeActor
port
- The TypedIOPort to add to this actor.
IllegalActionException
- If the port class is not
acceptable to this actor, or the port has no name.
NameDuplicationException
- If the port name collides with a
name already in the actor.private void _checkParameters() throws IllegalActionException
IllegalActionException
- If the dimensions are illegal.private void _init() throws IllegalActionException, NameDuplicationException
IllegalActionException
NameDuplicationException
private void _requestInitialization()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |