MultirateFSMDirector
ptolemy.domains.fsm.kernel.MultirateFSMDirector

This director extends FSMDirector by supporting production and consumption of multiple tokens on a port in a firing. This director assumes that every state has exactly one refinement, with one exception. A state may have no refinement if upon being entered, it has an outgoing transition with a guard that is true. This will be treated as a "transient state." Transient states can have preemptive and non-preemptive transitions, while non-transient states are assumed to have only non-preemptive transitions. When a modal model reaches a transient state, it will progress through that state to the next state until it encounters a state with a refinement. This procedure is done in the preinitialize() method and the postfire() method. Hence each time when a modal model is fired, the current state always has a state refinement. <p> The number of tokens to be transferred from an input port of the modal model is at most the token consumption rate inferred by the inside port of the current state refinement. The number of tokens to be transferred from an output port of the state refinement is exactly the token production rate inferred by the state refinement. If there are not enough tokens available from the refinement, an exception is thrown. The default token consumption and production rate of a port is 1. <p> When a state transition occurs, this director compares the port rates of the destination state refinement with that of the current state refinement. If the rates are different, then invalidate the schedule of the executive director of the modal model. Update the port rates of the modal model to be the port rates of the destination state refinement. <p> This director does not support transition refinements.

Author(s): Ye Zhou
Version:$Id: MultirateFSMDirector.doc.html,v 1.1 2006/02/22 18:41:22 mangal Exp $
Pt.Proposed Rating:Red (hyzheng)
Pt.Accepted Rating:Red (hyzheng)