CIDirector
ptolemy.domains.ci.kernel.CIDirector

Director of the component interaction (CI) domain. The CI domain supports two styles of interaction between actors, push and pull. In push interaction, the actor that produces data initiates the interaction. The receiving actor reacts to the data. The computation proceeds as data-driven. In pull interaction, the actor that consumes data decides when the interaction takes place, and the computation proceeds as demand-driven. <p> When a relation connects the push(pull) output port of one actor with the push(pull) input port of another, the style of interaction between the two actors is push(pull). To configure a port as a push port, add a parameter named <i>push</i> to the port, and give the value "true" to the parameter. Ports are pull ports by default. Relations connecting both push and pull ports are not supported. (TODO: add check in the director.) <p> Actors in a CI model are classified as either active or inactive. Each active actor is controlled by an <a href="../../../../ptolemy/domains/ci/kernel/ActiveActorManager.xml">actor manager</a>, which runs asynchronously with respect to the director (i.e. not in the same thread of control). Active actors include: <ul> <li> source actors with push output ports </li> <li> sink actors with pull input ports </li> <li> actors with pull input ports and push output ports </li> </ul> These actors initiate all the computation in a CI model. The director controls the execution of inactive actors by maintaining a task queue. A task in the queue is an inactive actor that either receives a token from an active actor via the push interaction, or is requested to produce a token by an active actor via the pull interaction. In one iteration of the CI model, the director removes the first actor from the queue. If the actor is pushed, the computation proceeds as data-driven from the actor, until the produced data reach actors that are either not ready to fire or with pull output ports and no pending pull request. If the actor is pulled, then the computation proceeds as demand-driven from the actor, until either the actor is fired or the pull request reaches actors that have push input ports and are not ready to fire.

Author(s): Xiaojun Liu, Yang Zhao
Version:$Id: CIDirector.doc.html,v 1.1 2006/02/22 18:40:26 mangal Exp $
Pt.Proposed Rating:Yellow (liuxj)
Pt.Accepted Rating:Red (liuxj)