|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.util.Attribute
ptolemy.actor.sched.Scheduler
ptolemy.domains.ct.kernel.CTScheduler
Static scheduler for the CT domain.
A CT (sub)system can be mathematically represented as:
where x is the state of the system, u is the input, y is the output, f() is the state transition map and g() is the output map.dx/dt = f(x, u, t)
y = g(x, u, t)
The system is built using actors. That is, all the functions, f() and g(), are built up by chains of actors. For higher order systems, x is a vector, built using more than one integrator. In general, actors that have the functionality of integration from their inputs to their outputs are called dynamic actors. Other actors are called arithmetic actors.
In order to interact with discrete domains, some actors in the CT domain are able to convert continuous waveforms to discrete events, and vice versa. An actor that has continuous input and discrete output is call an event generator; an actor that has discrete input and continuous output is called a waveform generator.
The interaction with some discrete domains requires that the CT simulation be able to remember its state and roll-back to the remembered state when needed. This in turn requires that all actors which have internal states should be able to remember and restore their states. These actors are called stateful actors.
In the continuous time simulation, time progresses in a discrete way. The distance between consecutive simulation time points is called the integration step size or step size, for short. Some actors need to be able to control the step sizes in the simulation. These actors are called step size control actors. Examples of step size control actors include integrators, which control the accuracy and speed of numerical ODE solutions, and some event generators, which detect events.
To help with scheduling, the actors are partitioned into several clusters: the arithmetic actors, the dynamic actors, the step size control actors, the sink actors, the stateful actors, the event generators, and the waveform generators. This scheduler uses the clustered information and the system topology, to provide the firing sequences for evaluating f() and g(). It also provides a firing order for all the dynamic actors. The firing sequence for evaluating f() is called the state transition schedule; the firing sequence for evaluating g() is called the output schedule; and the firing sequence for dynamic actors is called the dynamic actor schedule.
The state transition schedule is the actors in the f() function sorted in the topological order, such that, after the integrators emit their state x, a chain of firings according to the schedule evaluates the f() function and returns tokens corresponding to dx/dt to the integrators.
The output schedule is the actors in the g() function sorted in their topological order.
The dynamic actor schedule is a list of dynamic actors in their reverse topological order.
If there are loops of arithmetic actors or loops of integrators, then the (sub)system are not schedulable, and a NotSchedulableException will be thrown if schedules are requested.
Scheduler,
Serialized Form
| Yellow (johnr) |
| Green (liuj) |
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
ptolemy.kernel.util.NamedObj.ContainedObjectsIterator |
| Field Summary | |
static CTReceiver.SignalType |
CONTINUOUS
These are syntactic sugar for signal types, which are defined in CTReceiver. |
static CTReceiver.SignalType |
DISCRETE
Signal type: DISCRETE. |
static CTReceiver.SignalType |
UNKNOWN
Signal type: UNKNOWN. |
| Fields inherited from class ptolemy.actor.sched.Scheduler |
_DEFAULT_SCHEDULER_NAME |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
CTScheduler()
Construct a CT scheduler in the default workspace with the default name "CTScheduler". |
|
CTScheduler(ptolemy.actor.Director container,
java.lang.String name)
Construct a scheduler in the given container with the given name. |
|
CTScheduler(ptolemy.kernel.util.Workspace workspace)
Construct a CT scheduler in the given workspace with the name "CTScheduler". |
|
| Method Summary | |
protected ptolemy.actor.sched.Schedule |
_getSchedule()
Return the CTSchedule. |
boolean |
isContinuous(ptolemy.actor.Actor actor)
Return true if the specified actor is in the continuous cluster of the model. |
boolean |
isDiscrete(ptolemy.actor.Actor actor)
Return true if the specified actor is in the discrete cluster of the model. |
java.util.List |
predecessorList(ptolemy.actor.Actor actor)
Return the predecessors of the given actor in the topology within this opaque composite actor. |
java.lang.String |
signalTypeToString(CTReceiver.SignalType signalType)
Return the SignalType as a String |
java.util.List |
successorList(ptolemy.actor.Actor actor)
Return the successive actors of the given actor in the topology. |
java.lang.String |
toString()
Return all the scheduling information in a String. |
| Methods inherited from class ptolemy.actor.sched.Scheduler |
clone, getSchedule, isValid, setContainer, setValid |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, getContainer, setName |
| Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setPersistent, setSource, toplevel, uniqueName, validateSettables, workspace |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final CTReceiver.SignalType CONTINUOUS
public static final CTReceiver.SignalType DISCRETE
public static final CTReceiver.SignalType UNKNOWN
| Constructor Detail |
public CTScheduler()
public CTScheduler(ptolemy.kernel.util.Workspace workspace)
workspace - The workspace.
public CTScheduler(ptolemy.actor.Director container,
java.lang.String name)
throws ptolemy.kernel.util.IllegalActionException,
ptolemy.kernel.util.NameDuplicationException
container - The container.name - The name of this attribute.
ptolemy.kernel.util.IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
ptolemy.kernel.util.NameDuplicationException - If the name coincides with
an attribute already in the container.| Method Detail |
public boolean isContinuous(ptolemy.actor.Actor actor)
throws ptolemy.kernel.util.IllegalActionException
actor - The specified actor.
ptolemy.kernel.util.IllegalActionException - If this method is called before
initialization, where the schedule is computed.
public boolean isDiscrete(ptolemy.actor.Actor actor)
throws ptolemy.kernel.util.IllegalActionException
actor - The specified actor.
ptolemy.kernel.util.IllegalActionException - If this method is called before
initialization, where the schedule is computed.public java.util.List predecessorList(ptolemy.actor.Actor actor)
actor - The specified actor.
public java.lang.String signalTypeToString(CTReceiver.SignalType signalType)
public java.util.List successorList(ptolemy.actor.Actor actor)
actor - The specified actor. If the actor is null, returns null.
public java.lang.String toString()
protected ptolemy.actor.sched.Schedule _getSchedule()
throws ptolemy.actor.sched.NotSchedulableException,
ptolemy.kernel.util.IllegalActionException
ptolemy.actor.sched.NotSchedulableException
ptolemy.kernel.util.IllegalActionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||