In comp.soft-sys.ptolemy, "[EMAIL PROTECTED] (Russ)", wrote:

> A question about directors: should there ever be more than one
> director at the top-level of a simulation?
> 
> I was playing with the Spectrum demo model from the SDF domain, and
> added a 2nd SDF Director with a iterations parameter that differed
> from the iterations parameter for the 1st SDF director.
> 
> The simulation seemed to use the director that had been added last to
> the model, ignoring the other director.  I am not too familiar with
> the overall architecture of Ptolemy, but I can't grasp when you would
> ever want two directors at the top level of the simulation.
> 
> Should Ptolemy enforce one top-level director per model?  I am also
> thinking that if I wanted to create my own director with some utility
> methods that any actor could call, I would probably only want a single
> instance of the director (maybe make it a singleton?).
> 
> Thanks for any insights.
> 
> Regards,
> Russ

Right, this is a known feature.  In a posting to our internal mail
alias, Professor Lee wrote:

> In actor.Director, I updated the setContainer() method so it does
> this:
> 
>       *  If this method results in removing this director from a container
>       *  that is a CompositeActor, then this director ceases to be the active
>       *  director for that CompositeActor.  Moreover, if the composite actor
>       *  contains any other directors, then the most recently added of those
>       *  directors becomes the active director.
> 
> What this means is that in vergil, you can drag into a design multiple
> directors.  The most recently added director is the "active" one.  But
> the others are kept around as attributes.  If you remove the active
> director, then the most recently added of the remaining directors
> becomes the active one.
> 
> Edward

I believe that you could require that your director be the only
director, but it might be a little tricky to get right.

-Christopher

Christopher Hylands    [EMAIL PROTECTED]  University of California
Programmer/Analyst Chess/Ptolemy/GSRC         US Mail: 558 Cory Hall #1770
ph: (510)643-9841 fax:(510)642-2739           Berkeley, CA 94720-1770
home: (510)526-4010, (707)665-0131            (office: 400A Cory)



----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to