
HSScheduler |
ptolemy.domains.hs.kernel.HSScheduler |
The Static scheduler for the CT domain.
A CT (sub)system can be mathematically represented as:<Br>
<pre>
<pre> dx/dt = f(x, u, t)<Br>
<pre> y = g(x, u, t)<BR>
</pre></pre></pre>
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.
<P>
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 <I>dynamic actors</I>.
Other actors are called <I>arithmetic actors</I>.
<P>
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 <I>event generator</I>; an actor that has
discrete input and continuous output is called a <I>waveform generator</I>.
<P>
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 that have internal states to be able
to remember and restore their states. These actors are called
<I>stateful actors</I>.
<P>
In continuous-time simulation, time progresses in a discrete way.
The distance between two consecutive time points is called the
<I>integration step size</I> or step size, for short. Some actors
may put constraints on the choice of the step size.
These actors are called <I>step size control actors</I>. Examples of step
size control actors include integrators, which control the
accuracy and speed of numerical ODE solutions, and event generators,
which produce discrete events.
<P>
To help with scheduling, the actors are partitioned into several clusters,
including <I>continuous actors</I>, <I>discrete actors</I>,
<I>arithmetic actors</I>, <I>stateTransition actors</I>,
<I>dynamic actors</I>, <I>sink actors</I>,<I> event generators</I>,
<I> waveform generators</I>, <I>CT subsystems </I>, and <I>non-CT
subsystems</I>.
This scheduler uses the cluster 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 <I>state transition schedule</I>; the firing
sequence for evaluating g() is called the <I>output schedule</I>;
and the firing sequence for dynamic actors is called the
<I>dynamic actor schedule</I>.
<P>
The state transition schedule is the actors in the f() function sorted
in 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.
<P>
The output schedule is the actors in the g() function sorted in
their topological order.
<P>
The dynamic actor schedule is a list of dynamic actors in their reverse
topological order.
<P>
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.
<p>
This CTScheduler does not support mutation.
Author(s): Jie Liu, Haiyang Zheng, Ye Zhou
Version:$Id: HSScheduler.doc.html,v 1.1 2006/02/22 18:40:27 mangal Exp $
Pt.Proposed Rating:Yellow (hyzheng)
Pt.Accepted Rating:Red (hyzheng)